autodesk forge – Autodek platform services – data management , folder search endpoint – Is every item is a ‘page’?
page represents a set of results. Each result page contains 200 results. Incase of folder search,without mentioning page[number] query parameter, you will get first 200 items in the folder you are searching in.
If there are more than 200 items in the folder, you will usually see links section in the API response that tells you self, prev and next to indicate that there is more results.
Eg: below says I am in the 10th page(look at self), the 9th page is in prev and 11th page is next.
"links": {
"self": {
"href": "https://developer.api.autodesk.com/data/v1/projects/{{projectId}}/folders/{{folderId}}/search?page%5Bnumber%5D=10"
},
"prev": {
"href": "https://developer.api.autodesk.com/data/v1/projects/{{projectId}}/folders/{{folderId}}/search?page%5Bnumber%5D=9"
},
"next": {
"href": "https://developer.api.autodesk.com/data/v1/projects/{{projectId}}/folders/{{folderId}}/search?page%5Bnumber%5D=11"
}
},
To retrieve results in page number 10 my GET query would simply look like this:
https://developer.api.autodesk.com/data/v1/projects/{{projectId}}/folders/{{folderId}}/search?page[number]=10
If a specific page number gives 400 Bad Request error, it simply means that there is no content in the queried page number OR that you are searching beyond pageNumber 49. The API documentation suggests pageNumber can be 0 to 49 which is a limitation imposed by APS
So to query it better (narrow down the results) you might need to use the query parameter filter[extension]=.rvt and/or search within a subfolder rather than parent level folder. You can also combine with comparison filters (eg: to filter files with last modified date in a given time range etc, so that your results have less than 49 pages of content)
Read more here: Source link
