I used the curl command but was unable to do it gives the information only for the main page and not for the remaining pages. Also it gives a limit of 1000 words. But I want to actually extract the data from confluence pages to store it to somewhere else.
I have used the curl command:
curl -u abcd:xxxapi-tokenxxx -X GET "https://your-confluence-instance/wiki/rest/api/space/content?start=0&limit=1000" | python3 -m json.tool > spaceat.content
Hello Ankita Patel
limit here is not WORD limit - it is limit of results (maximum 500)
When you use /rest/api/space/content you get ALL the content in your confluence in portions of max 500 - default = 50 items.
You need to know how the data in Confluence is structured and how to use REST API https://developer.atlassian.com/cloud/confluence/rest/v1/intro/#about so that you could get pages from one space or several spaces, from CQL query, from user etc. - then you can get any data in JSON format with the structure you need.
/rest/api/space/content - all content
/rest/api/space/content /{pageID} - page bi ID
/rest/api/space/content/{pageID}/child/page - children
/rest/api/space/content/{pageID}/child/descendant - all the hierarchy under root page
etc
it keeps giving me the error:"
Expecting value: line 1 column 1 (char 0)
"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please check the response - it must be that response is not valid JSON - you are not authenticated or some other issue. You can check the HTTP response to see what is the issue.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the response I received, it appears that the API request was successful, but the response body indicates that there are no results. The "results"
field is an empty array, and the "size"
field is 0, indicating that there is no content available for the specified Confluence page. But the page does exists.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.