I'm trying to read Confluence pages using the APIs. Every attempt to read a page ends in error 404. I have tried various URL formats:
curl -X GET -u <USERNAME>:<API TOKEN> -H "Accept: application/json" 'https://<MY COMPANY DOMAIN>/wiki/rest/api/content/898042287'
curl -X GET -u <USERNAME>:<API TOKEN> -H "Accept: application/json" 'https://<MY COMPANY DOMAIN>/confluence/rest/api/content/898042287'
curl -X GET -u <USERNAME>:<API TOKEN> -H "Accept: application/json" 'https://<MY COMPANY DOMAIN>/wiki/spaces/ds/pages/898042287'
I can create a new page without problems, the page ID on the above example is from the newly created page using the API, it is jut the GET commands that fail
I followed all different versions of the API documentation online, but none of them works. Also tried using Python with same results. I can always create pages, but I cannot read them.
I assume the URL might be incorrect for the latest version of Confluence Cloud?
Hello Fabian,
Thank you for reporting your issue along with the examples you provided. I tested the following on a Mac using Conflund cloud and found I was able to GET pages without issue:
curl --request GET \
--url 'https://DOMAIN.atlassian.net/wiki/rest/api/content/123456' \
--user 'email@example.com:<api_token>' \
--header 'Accept: application/json'
To see where the disconnect might be, you stated you’re using REST API calls to create content but you’re unable to GET the content you’ve created. Could you please show us the REST API POST or PUT calls you’re making against Confluence?
Once we have the REST API calls you’re using that work we might be able to find the issue with getting your GET calls working.
Regards,
Stephen Sifers
Hi Stephen, thanks for the response. I just tried the same script from Friday and today they are working. I guess it was some glitch on the servers.
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.