Getting all the assets in a folder using Assets API without specifying limit | Community
Skip to main content
Level 3
March 2, 2022
Solved

Getting all the assets in a folder using Assets API without specifying limit

  • March 2, 2022
  • 2 replies
  • 1579 views

Hi Team,

 

I was going through https://experienceleague.adobe.com/docs/experience-manager-65/assets/extending/assets-api-content-fragments.html?lang=en and found that there is a Paging available.

By default when i hit the asset API at folder level, i get default limit with 20.

Do we have an option to remove this limit and retrieve all the assets?

 

  • properties:{
    • srn:paging:
       
      {
      • total: 38,
      • offset: 0,
      • limit: 20
      }

Paging

The Assets REST API supports paging (for GET requests) via the URL parameters:

  • offset - the number of the first (child) entity to retrieve
  • limit - the maximum number of entities returned

The response will contain paging information as part of the properties section of the SIREN output. This srn:paging property contains the total number of (child) entities ( total), the offset and the limit ( offset, limit) as specified in the request.

 

Thanks

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by arunpatidar

I would also not recommed to change this. This can have huge performence impact on the system 

2 replies

lukasz-m
Community Advisor
Community Advisor
March 2, 2022

Hi @user70744, I do not think it is possible to remove the limit. In general you can try to increase limit value, and for some cases it will give you all the assets at once. Nevertheless I think that paging make sens e.g. in terms of performance.

user70744Author
Level 3
March 2, 2022

Thanks @lukasz-m i do agree on the performance parameter.

user70744Author
Level 3
March 2, 2022

I was able to find i could increase the limit under this. 

But thinking as it affects all the Get requests .

 

Any views?

 

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
March 2, 2022

I would also not recommed to change this. This can have huge performence impact on the system 

Arun Patidar
user70744Author
Level 3
March 2, 2022

Thanks @arunpatidar