Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

what will be the maximum limit we can give while extrating contents

Sachin Somannavar March 5, 2024

url = "https://your-domain.atlassian.net/wiki/rest/api/content/{id}/child/attachment"

 

limit

integer

The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits.

Default: 25Minimum: 0Format: int32
if we have huge number of pages in that case what to do
using this to list the pages present inside the space content url = f'https://api.atlassian.com/ex/confluence/cloudid/rest/api/space/{space_name}/content?expand=history'    what will be the maximum limit here , how get all the pages if there more pages 

1 answer

1 vote
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

Hello @Sachin Somannavar,

Maximum is 250. The method /wiki/rest/api/content/{id}/child/attachment is deprecated, use the method /pages/{id}/attachments instead.

Please refer to the Confluence API documentation related to attachments.

Sachin Somannavar March 6, 2024

if we have more than 250 in that case , what we need to do

 

Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

@Sachin Somannavar, use the cursor parameter, see examples how to use it here.

Like Sachin Somannavar likes this
Sachin Somannavar March 6, 2024

even if this is /wiki/rest/api/content/{id}/child/attachment  depricated still I am able to you see it , is there any timeline when this will be completely non functional, because I am som issue while using the rest api v2 

for example https://api.atlassian.com/ex/confluence/cloudid/rest/api/space/{space_name}/content?expand=history'

 

for rest api v2 if I use  https://api.atlassian.com/ex/confluence/cloudid/wiki/api/v2/pages/{id}/attachments

it is giving the error , I am using all the possible changes and but not able to get correct url for this

 

 

Sachin Somannavar March 6, 2024

can you please let me know </wiki/api/v2/pages?limit=5&cursor=<cursor token>>; rel="next"  , where I will get the cursor token , since I am facing issue with rest api v2 not able to explore this

 

Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 6, 2024

@Sachin Somannavar,

Screenshot 2024-03-06 at 13.27.39.png

If you send the GET request with the limit parameter (for example, /pages/{id}/attachments?limit=5 to get five attachments of the page), you'll get the header in response which can be used to get the next five attachments (highlighted in green on the screenshot above).

So in your case use the method /pages/{id}/attachments?limit=250 and then the "next" attribute to get the next 250 attachments and so on.

Sachin Somannavar March 6, 2024

Thank you so much , for your help , will explore if I get any doubts will reach out here

Sachin Somannavar March 6, 2024

/pages/{id}/attachments?limit=250  by using this we will get first 250  then for next 250 ,  do we need to construct the url like this ? /pages/{id}/attachments?limit=250 ; rel="next"  , is this correct one

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events