Retrieve Hub ID
This tutorial demonstrates how to identify the hub ID used with Parameters API. If you already have them, you can skip this tutorial.
Before You Begin
- Register an app, and select the Data Management and Autodesk Forma APIs.
- Acquire a 3-legged OAuth token with
data:createdata:readanddata:writescopes. - Verify that you have access to the relevant Autodesk Forma hub, project, and folder.
- Important: make sure that the hub you are trying to access has the Parameters Service feature activated in the UI. To activate it, access Autodesk Forma as a hub admin, navigate to the Library tab > Parameters, and select “+ Create parameter collection” to initialize the Parameters Service for your hub. This is required to use the Parameters API with that hub.
Find the Hub ID
Find the hub ID for the hub you are interested in by calling GET hubs.
Note that the Parameters API hub ID is a raw UUID. To use it with the Data Management API, add a “b." prefix. For example, a hub ID of d952a4eb-ad57-4d64-b9ab-d540b3b4522e translates to a Data Management 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 hub 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.