2

We use Forge Data Management API to access project documents. We execute next set of requests:

  • project/v1/hubs to get hubs (hubId)
  • project/v1/hubs/:hubId/projects to get projects (projectId and rootFolder)
  • data/v1/projects/:projectId/folders/:folderId/search?filter[fileType]=rvt,nwc,nwd to get files filtered by extension

On search we often get Too Many Requests status code. We have about 20 files in the project. Sometimes this request is processed instantly, sometimes 8 seconds, sometimes 20 seconds.

Response body:

{"jsonapi":{"version":"1.0"},"errors":[{"id":"GUID","status":"429","detail":"Too Many Requests"}]}

On this page we can see that there is a limit 300 requests/minute. But we get Too Many Requests status after exceeding not more that 10 requests/minute.

Also here we see that response must contain Retry-after header. But the is no such header.

So i have next questions:

  • What is the best practice to search project files by the file extension?
  • Why we get Too Many Requests even if we don't exceed the limit?
  • What should we do for not getting Too Many Requests status?
  • Why the is no Retry-after header in the Too Many Requests response?
Subhashis Pandey
  • 1,473
  • 1
  • 13
  • 16
  • I am afraid you hit an known issue of Search API.I just got to know 429 comes from the underlying system of Search API is not based on how many times a specific Forge App called the endpoint. We apologize for this confusing. I am checking further with team if there is any further information/plan about this issue. – Xiaodong Liang Nov 08 '21 at 04:20
  • @XiaodongLiang thanks for the reply. As i understand, the best solution is using GET folders/id/content to get rid of this error and get actual list of files. Correct me if im wrong. – Eduard Sionov Nov 10 '21 at 11:48

0 Answers0