what will be the maximum limit we can give while extrating contents
Asked by Sachin Somannavar:

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: `25`Minimum: `0`Format: `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


Answers:
author: Kseniia Trushnikova
body: Hello [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744),

Maximum is 250. The method /wiki/rest/api/content/{id}/child/attachment is deprecated, use the method [/pages/{id}/attachments](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-pages-id-attachments-get) instead.

Please refer to the Confluence API [documentation](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-attachment/#api-group-attachment) related to attachments.

comments: author: Sachin Somannavar
body: if we have more than 250 in that case , what we need to do


author: Kseniia Trushnikova
body: [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744), use the *cursor* parameter, see examples how to use it [here](https://developer.atlassian.com/cloud/confluence/rest/v2/intro/#auth:~:text=Use%20the%20%27limit%27%20and%20%27cursor%27%20parameters%20on%20endpoints%20that%20return%20multiple%20objects%20to%20work%20with%20pagination.).


author: Sachin Somannavar
body: 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](https://api.atlassian.com/ex/confluence/cloudid/rest/api/space/%7Bspace_name%7D/content?expand=history)'

for rest api v2 if I use [https://api.atlassian.com/ex/confluence/cloudid](https://api.atlassian.com/ex/confluence/cloudid/rest/api/space/%7Bspace_name%7D/content?expand=history)/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


author: Sachin Somannavar
body: 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


author: Kseniia Trushnikova
body: [@Sachin Somannavar](/t5/user/viewprofilepage/user-id/5428744),

![Screenshot 2024-03-06 at 13.27.39.png](https://community.atlassian.com/t5/image/serverpage/image-id/310508i87413155D2F33952/image-size/large?v=v2&px=999 "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.


author: Sachin Somannavar
body: Thank you so much , for your help , will explore if I get any doubts will reach out here


author: Sachin Somannavar
body: /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**


Tags: cloud

confluence-cloud