I cannot find anywhere in your documentation where it describes the need to escape special characters when filtering on title.
In this example I create a page like
curl --request POST \
--url 'https://{your-domain}/wiki/api/v2/pages' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"spaceId": "<string>",
"status": "current",
"title": "Something (Something & Something Else) Else",
"parentId": "<string>",
"body": {
"representation": "storage",
"value": "<string>"
},
"subtype": "live"
}'
Then i go to find it like
curl --request GET \
--url 'https://{your-domain}/wiki/api/v2/pages' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--data '{
"space-id": "<string>",
"title": "Something (Something & Something Else) Else"
}'
but this will return 0 results.
Please assist me to discover the correct way to search by title. I assume the filter under the hood requires escapes of some kind.
I have tried to remove all special characters to match the URL string and that also fails.
Thanks
After talking to a co-worker they suggested using URL encoding on my title and that worked.
to update my previous example GET call:
curl --request GET \
--url 'https://{your-domain}/wiki/api/v2/pages' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json' \
--data '{
"space-id": "<string>",
"title": "Something+(Something+%26+Something+Else)+Else"
}'
This works..
I will again point to the Rest API documentation here https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-get
where it clearly says "title string". There is no mention of the need to encode this string.
clearly one head was not talking to the other behind the scenes. This is embarrassing at best and lazy at worst. Wasting everyone's time making us guess which "string" values will or wont work with or without encoding.
You didn't create a page but a "Live Doc", based on the "sub-type" option set to live.
If you want to create a page, don't use this option in the API call on creating ap age.
So if you want to find the created Live doc, you need to also include.
So you can use:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.