Retrieve an Issues Container ID
This tutorial demonstrates how to retrieve an issues container ID for a BIM 360 project. Each BIM 360 project is assigned an issues container (issueContainerId
) that stores all the issues data for the project. The issues container ID is used to call the issues endpoints. To retrieve the ID, you need to call several Data Management endpoints.
Note that this tutorial is the same for BIM 360 Issues v1 and BIM 360 Issues v2.
Before You Begin
- Register an app
- Acquire a 3-legged OAuth token with the
data:read
scope. - Verify that you have access to the relevant BIM 360 account and BIM 360 project. (To create a new BIM 360 project, see POST projects)
Step 1: Find the Hub ID
You first need to call GET hubs to find the hub ID for your BIM 360 account.
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 c8b0c73d-3ae9 translates to a hub ID of b.c8b0c73d-3ae9.
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.cGVyc29uYWw6cGUyOWNjZjMy",
"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 project you want the container for is in My First Account hub.
Step 2: Find the Issues Container ID for the Project
Use the BIM 360 hub ID that you retrieved in the previous step (b.cGVyc29uYWw6cGUyOWNjZjMy
) to call GET hubs/:hub_id/projects, and retrieve a list of all the projects in the hub the user has access to. In this example, we have added a filter to only return details of a specific project (Demo Project).
Request
curl -X GET -H "Authorization: Bearer nFRJxzCD8OOUr7hzBwbr06D76zAT" "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects?filter%5Battributes.name%5D=Demo%20Project"
Response
The response payload includes the issues container ID (data.relationships.issues.data.id
).
{
"jsonapi": {
"version": "1.0"
},
"links": {
"self": {
"href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects"
}
},
"data": [
{
"type": "projects",
"id": "b.cGVyc29uYWw6cGUyOWNjZjMyI0QyMDE2MDUyNDEyOTI5NzY",
"attributes": {
"name": "My First Project",
"extension": {
"type": "projects:autodesk.bim360:Project",
"version": "1.0",
"schema": {
"href": "https://developer.api.autodesk.com/schema/v1/versions/projects%3Aautodesk.bim360%3AProject-1.0"
},
"data": {}
}
},
"links": {
"self": {
"href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects/b.57be304852e74856a61bf25acebc200f"
}
},
"relationships": {
"hub": {
"data": {
"type": "hubs",
"id": "b.cGVyc29uYWw6cGUyOWNjZjMy"
},
"links": {
"related": {
"href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy"
}
}
},
"rootFolder": {
"data": {
"type": "folders",
"id": "urn:adsk.wipprod:fs.folder:co.uvDiLQ5DRYidDQ_EFW1OOg"
},
"meta": {
"link": {
"href": "https://developer.api.autodesk.com/data/v1/projects/b.57be304852e74856a61bf25acebc200f/folders/urn%3Aadsk.wipprod%3Afs.folder%3Aco.uvDiLQ5DRYidDQ_EFW1OOg"
}
}
},
"topFolders": {
"links": {
"related": {
"href": "https://developer.api.autodesk.com/project/v1/hubs/b.cGVyc29uYWw6cGUyOWNjZjMy/projects/b.57be304852e74856a61bf25acebc200f/topFolders"
}
}
},
"issues": {
"data": {
"type": "issueContainerId",
"id": "be00f32e-c03c-4c7b-9ec4-d2614bf1980c"
}
}
}
}
]
}