Search for project in Forge BIM 360 API - autodesk-forge

We have over 3000 projects in our BIM 360 account and need to be able to search for a specific project by name. Currently we are using the GET projects endpoint in the Forge BIM 360 API to create a list of projects and querying the list to find the project. This was working well for a while, but due to a limit of 100 projects returned by the endpoint we have to make multiple calls using the offset parameter. With 3000 projects this requires 30 requests, and we are starting to see a performance hit in some of our applications, which will only get worse over time as we add more projects. Is there a way to call the GET projects endpoint with a filter on project name?

I believe you can call /project/v1/hubs/:hub_id/projects with page[limit]=200, but unfortunate we don't have a filter by name.

Related

Autodesk forge: Listing files and getting recent

I've been looking through the Autodesk Forge API a bit but I have not found a way to do the following things:
Query/list files in a whole Fusion 360 team hub, filtering on e. g. filename.
Get a list of the N most recently accessed files (created, opened, saved)
Is this possible? So far I've seen that is possible through recursion, but I want to avoid making a lot of API calls.
Query/list files in a whole Fusion 360 team hub, filtering on e. g. filename.
This can be done using the search endpoint. It traverses all subfolders recursively, and can filter based on different criteria (see https://forge.autodesk.com/en/docs/data/v2/developers_guide/filtering/). I believe it can be used at a project level.
Get a list of the N most recently accessed files (created, opened, saved)
I'm afraid this kind of sorting is not available using these endpoints.

How to distinguish BIM 360 vs ACC/unified projects?

(Update: There may or may not be any such thing as a "unified project". But there is definitely a button on my Account Admin->Projects screen that says "Go to unified projects", hence my confusion. It just takes me to a list of all projects.)
Since some API endpoints are not compatible between the two types of projects, (see https://forge.autodesk.com/en/docs/acc/v1/overview/bim-360-compatibility/compatibility-table/), it would be nice to know, programmatically, which type of project you are dealing with.
The response from https://developer.api.autodesk.com/hq/v1/accounts/:hub_id/projects lists, for example, the exact same details regardless. Is there another call that would give more info?
I know that the BIM 360 projects start with "b.", but not in the above list.
Just poking around, the BIM 360 API endpoint https://developer.api.autodesk.com/hq/v1/accounts/:account_id/projects apparently returns only(?) BIM 360 projects, complete with "b.". But if I want ALL projects, and simply need to know the difference? I could make both calls and parse the differences; but one call with the correct info would be great, if it exists.
The endpoint I meant is: https://forge.autodesk.com/en/docs/data/v2/reference/http/hubs-hub_id-projects-GET/. It is for project information in the general context. The one you pointed out is for getting project information in the context of BIM360.
Data Management is a general API. e.g. you manage your (as a web application) manage models and data in your own buckets (on Forge), this goes with Data Management. BIM360 or ACC or Fusion360 etc is the platform that manages model or data for end users, in a format of more user-orientated structure like hub>>project>>folder>>item>>version etc. These fall into Data Management. BIM 360 API will be more specific in the context of BIM360. e.g. Admin API (like what you are using), Issue API, RFI API, Cost API , Model Coordination API etc.
As to united project, it means the project list managed within Autodesk Construction Cloud (ACC), which includes BIM360 projects and ACC projects. In another word, a united portal to access the two types of projects. To distinguish the two types, the attribute I mentioned in the last email is the indicator. Hope it explains.

Fetch the review information from BIM 360 using Forge APIs

I am trying to get the data present under the 'Reviews' tab under Document Management in BIM 360. Is there an exposed endpoint that can fetch those details?
Unfortunately, there is no API available for the Reviews at this moment, but there is a wish for Review API: ALEX-37150: “API wish: expose Docs Review API”.
In addition, we would be interested in knowing what kind of workflow you are trying to accomplish with API. It might help the product team to prioritize their work. If it cannot be posted publicly, please reach out to forge[DOT]help[AT]autodesk[DOT]com.
Related: https://stackoverflow.com/a/64392350/7745569

Error in Querying BIM 360 project attribute

I'm currently using an AWS lambda function to automate the creation of a BIM 360 project by using multiple BIM 360 API endpoints.
It's been working fine, but I've just noticed that it stopped working, failing to access GET projects/:project_id endpoint. My code accesses each BIM 360 project's job_number attribute to filter duplicated projects by using job_number. And the code is failing at getting the response of the GET projects/:project_id request.
Has there been any change in the API recently? Thank you in advance.
from the latest reply, it looks you hit rate limit. If am correct, the response error code is 429. Each category API has restriction of rate limit. e.g. This is rate limit of Data Management API
https://forge.autodesk.com/en/docs/data/v2/developers_guide/rate-limiting/dm-rate-limits/
And this is BIM360 API:
https://forge.autodesk.com/en/docs/bim360/v1/overview/rate-limits/
So, you will need to set some delays of each call to meet the rate, or use some async management methods such as async-pool in Node.js to control the calls rate or every minute.

Can model derivative get all the information from BIM?

I'm very new to forge and revit. I've been trying to see if I can get all the information from Revit / BIM file programmatically. I know I might be able to get it with DB link or excel, but export to excel seems an extract steps.
Then I found out Forge, I was assuming Model Derivative APIs will did the job for you, basically upload the files to bucket and click on the models to select object, let's say a floor, I should be able to make API calls with all the information about that floor. However, when I play around with Forge, it seems like not every information is in the properties. Is that correct? Or I just didn't implement it correctly?
Thanks for your answer.
It is possible to get all the information regarding properties of any/all object(s).
First you need to get the URN of the version of the file, get the metadata from this API:
https://developer.autodesk.com/en/docs/model-derivative/v2/reference/http/urn-metadata-GET/
Use the next 2 APIs in the above link to get properties of any/all object(s).
In case you don't know how to get URN:
The way you get URN is from forge Data Management Api, you can list Hubs > Projects > Folders > Items > Versions.
This tutorial guides you on the steps.