Retrieve BIM 360 Account and Project ID
This tutorial demonstrates how to obtain your BIM 360 Account and Project ID. If you already have these, you can skip this tutorial.
Before You Begin
- Register an app, and select the Data Management and BIM 360 APIs.
- Acquire a 3-legged OAuth token with
data:create
data:read
anddata:write
scopes. - Verify that you have access to the relevant BIM 360 account, project, and folder.
Step 1: Find the Hub ID for the BIM 360 Account
Find the hub ID for the BIM 360 account you are interested in, by calling GET hubs.
Note that the BIM 360 account ID corresponds to a Data Management hub ID. To convert an account ID into a hub ID you need to add a “b." prefix. For example, an account ID of d952a4eb-ad57-4d64-b9ab-d540b3b4522e translates to a hub ID of b.d952a4eb-ad57-4d64-b9ab-d540b3b4522e.
Request
curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs"
Response
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": {
"href": "https://developer.api.autodesk.com/project/v1/hubs"
}
},
"data": [
{
"type": "hubs",
"id": "b.d6cf8c84-c25e-4534-ae5c-62e08480e751",
"attributes": {
"name": "My First Account",
"extension": {
"type": "hubs:autodesk.bim360:Account",
"version": "1.0",
"schema": {
"href": "https://developer.api.autodesk.com/schema/v1/versions/hubs:autodesk.bim360:Account-1.0"
},
"data": {}
}
}
}
]
}
In this example, assume that the Account that you are interested in is in a hub called My First Account
.
Find the hub (data.name
), and note the hub ID - b.d6cf8c84-c25e-4534-ae5c-62e08480e751
.
Step 2: Find the Project ID
To get a list of all the projects in the hub (account), use the hub ID (b.d6cf8c84-c25e-4534-ae5c-62e08480e751
) to call GET hubs/:hub_id/projects. Find the project ID of the project that you are interested in.
Note that the project ID in BIM 360 corresponds to the project ID in the Data Management API. To convert a project ID in BIM 360 to a project ID in the Data Management API, you need to add a “b." prefix. For example, a project ID of a4be0c34a-4ab7 translates to a project ID of b.a4be0c34a-4ab7.
Request
curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs/b.d6cf8c84-c25e-4534-ae5c-62e08480e751/projects"
Response
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": {
"href": "https://developer.api.autodesk.com/project/v1/hubs/b.d6cf8c84-c25e-4534-ae5c-62e08480e751/projects"
}
},
"data": [
{
"type": "projects",
"id": "f6a1e3b5-abaa-4b01-b33a-5d55f36ba047",
"attributes": {
"name": "My First Project",
"extension": {
"type": "projects:autodesk.core:Project",
"version": "1.0"
}
}
}
]
}
In this example, assume that My First Project
is the project you are interested in.
Find the project (data.attributes.name
), and note the project ID (data.id
) - f6a1e3b5-abaa-4b01-b33a-5d55f36ba047
.