Retrieve ACC Account
This tutorial demonstrates how to obtain your ACC Account. If you already have these, you can skip this tutorial.
Before You Begin
- Register an app, and select the Data Management and Autodesk Construction Cloud APIs.
- Acquire a 3-legged OAuth token with
data:create
data:read
anddata:write
scopes. - Verify that you have access to the relevant ACC account, project, and folder.
- Important: make sure that the account you are trying to access has Parameter Services feature activated in the UI. To activate, access ACC as an Account Admin and navigate to the Library tab > Parameters and select “+ Create parameter collection” and initialize the Parameter Service for your account. This is required to use the Parameters API with your account.
Find the Hub ID for the ACC Account
Find the hub ID for the ACC account you are interested in, by calling GET hubs.
Note that the ACC 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.acc:Account",
"version": "1.0",
"schema": {
"href": "https://developer.api.autodesk.com/schema/v1/versions/hubs:autodesk.acc:Account-1.0"
},
"data": {}
}
}
}
]
}
Show More
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
.