When using the GET catalog/{type}?search=* endpoint, we hit an API limit of oa-total-items=10,000. This prevents us from collecting all items of type analysis.
To work around this, we collect items separately for each folder using the endpoint:GET catalog/folders/{id}?search=*&type=analysis
However, the behavior of this endpoint is problematic because the search is recursive — a folder query also returns items contained in all of its subfolders.
Given the following parent-to-child hierarchy — Folder A → Folder B → Folder C — the endpoint behaves as follows:
GET catalog/folders/<folder_c_id>?search=*&type=analysis → returns a paginated response containing only Folder C's analyses.GET catalog/folders/<folder_b_id>?search=*&type=analysis → returns a paginated response containing analyses from both Folder B and Folder C.GET catalog/folders/<folder_a_id>?search=*&type=analysis → returns a paginated response containing analyses from Folder A, Folder B, and Folder C — and as a result, we hit the same oa-total-items=10,000 limit again.
This recursive behavior causes two issues:
- It forces additional, redundant calls, since each parent folder re-returns the items already retrieved from its child folders.
- It reintroduces the original problem we were trying to avoid, because a top-level folder still aggregates enough items to exceed the 10,000-item limit.
Proposed solution:
Add a parameter to control recursion depth so that a folder query can return items located directly in the specified folder only, excluding subfolders — for example: GET catalog/folders/{id}?search=*&type=analysis&recursive=false
This would let us paginate folder by folder without duplicate results and without exceeding the oa-total-items=10,000 limit.