v1/projects/{projectId}/pins:batch-get
Returns the pins for a specified set of issues, filtered by one or more files. Use this endpoint to retrieve the position data (coordinates, viewer state, and object references) for pushpins associated with issues in the specified files. Only pins matching both the specified issue IDs and the specified files are returned — if an issue has pins on other files, those are not included. Pins of deleted issues are not returned.
Note that Sheet placements are not supported. This endpoint supports file-based placements (2D and 3D) only.
For more information about issue pushpins, see the Help documentation.
For the complete workflow, see the Create Issues with File Pushpins tutorial.
Resource Information
| Method and URI | POST https://developer.api.autodesk.com/construction/issues/v1/projects/{projectId}/pins:batch-get |
| Authentication Context | User-delegated only (accepts only three-legged access tokens) |
| Required OAuth Scopes | data:read |
| Data Format | JSON |
Request
Headers
| Authorization* string | Must be Bearer <token>, where <token> is a three-legged access token obtained via an Authorization Code flow or a Secure Service Account (SSA) flow.
The SSA flow is designed for headless server-to-server operations. While it functions like a two-legged flow (no user interaction), it is classified as three-legged because it preserves user context. |
| Content-Type* string | Must be application/json |
Request
URI Parameters
| projectId string: UUID | The ID of the project.
Use the Data Management API to retrieve the project ID. For more information, see the Retrieve a Project ID tutorial. You need to convert the project ID into a project ID for the Forma API by removing the “b." prefix. For example, a project ID of b.a4be0c34a-4ab7 translates to a project ID of a4be0c34a-4ab7. |
Request
Body Structure
The body content.
| issueIds* array: string | The IDs of the issues to retrieve pins for. If you do not have the issue IDs, call GET issues with the filter[placements.lineageUrn] parameter to retrieve issues associated with a specific file. If you already have the issue IDs, you can use the filter[placements.lineageUrn] parameter on this endpoint to filter by file directly. Maximum 200 issue IDs. |
| filter[placements.lineageUrn] array: string | The lineageUrn values of the files to filter by. The lineageUrn is the unique cross-version identifier for a file. Only pins on the specified files are returned. To filter by a specific file version, append @<version-number> to the lineageUrn — for example, urn:adsk.wipprod:dm.lineage:xxx@2. By default, pins on the latest version of the file are returned. |
Response
HTTP Status Code Summary
| 200 OK | Success |
| 400 Bad Request | Invalid input |
| 403 Forbidden | The request is valid but lacks the necessary permissions. |
| 500 Internal Server Error | Internal server error |
Response
Body Structure (200)
| results array | The list of issue pins. |
| oneOf array:oneOf | |
| 3D file pin object | The pin object containing information about the individual 3D pin. |
| createdAt datetime: ISO 8601 | The date and time the pushpin was created. |
| issueId string: UUID | The unique identifier of the issue the pushpin is associated with. |
| updatedAt datetime: ISO 8601 | The date and time the pushpin was updated. |
| uid string: UUID | The unique identifier of the pin. |
| externalId string | An external identifier of the element the pushpin is associated with in the viewable. |
| objectId string | The ID of the element the pushpin is associated with in the viewable. |
| position object | The coordinates of the pushpin’s position in the viewable. |
| x number | The x-coordinate of the pushpin’s position in the viewable. |
| y number | The y-coordinate of the pushpin’s position in the viewable. |
| z number | The z-coordinate of the pushpin’s position in the viewable. |
| viewerState object | The viewer state at the time the pushpin was created. You can get the viewer state object by calling viewer.getState(). To restore the viewer instance use viewer.restoreState(). See the Viewer API documentation for more details. |
| viewableInfo object | The object containing version information for the file where the pushpin is positioned. |
| documentVersionUrn string | The decoded version URN of the document where this pushpin is positioned. |
| documentVersionId string | Not relevant |
| 2d file pin object | The pin object containing information about the individual 2D pin. |
| createdAt datetime: ISO 8601 | The date and time the pushpin was created. |
| issueId string: UUID | The unique identifier of the issue the pushpin is associated with. |
| updatedAt datetime: ISO 8601 | The date and time the pushpin was updated. |
| uid string: UUID | The unique identifier of the pin. |
| position object | The coordinates of the pushpin’s position in the viewable. |
| x number | The x-coordinate of the pushpin’s position in the viewable. |
| y number | The y-coordinate of the pushpin’s position in the viewable. |
| z number | The z-ordering that determines the render order of overlapping pins. |
| viewableInfo object | The object containing version information for the file where the pushpin is positioned. |
| documentVersionUrn string | The decoded version URN of the document where this pushpin is positioned. |
| documentVersionId string | Not relevant |
| sheet pin - not supported object | Sheet pins are currently not supported. |
| errors array: object | The list of errors for pins that could not be retrieved. |
| issueId string: UUID | The ID of the issue for which the error occurred. |
| detail string | A description of the error. |
| type string | The type of error that occurred. |
Example
Success
Request
curl -v 'https://developer.api.autodesk.com/construction/issues/v1/projects/:projectId/pins:batch-get' \
-X 'POST' \
-H 'Authorization: Bearer AuIPTf4KYLTYGVnOHQ0cuolwCW2a' \
-H 'Content-Type: application/json' \
-d '{
"issueIds": [
"d26c0adb-bb27-4cec-b3ad-bae5ce5a0b29",
"5a5f7d98-d043-4a2a-aba2-5c265ae9da9b"
],
"filter[placements.lineageUrn]": [
"urn:adsk.wipprod:dm.lineage:0C9edNQuT2SrfoyKQ1Gv_Q"
]
}'
Response
{
"results": [
{
"createdAt": "2023-10-01T12:00:00Z",
"issueId": "d26c0adb-bb27-4cec-b3ad-bae5ce5a0b29",
"updatedAt": "2023-10-01T12:00:00Z",
"uid": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"externalId": "01a239ce-47cc-4e94-8aa3-2a39866cfc61",
"objectId": "1220",
"position": {
"x": 2,
"y": 3,
"z": 8
},
"viewerState": {
"version": "2.0",
"viewport": {
"isOrthographic": true,
"eye": [
11.93456399701644,
-63.303164503703584,
23.691735672776954
],
"target": [
-1.179143015468064,
-6.361187926162934,
-10.224027244435305
],
"up": [
-0.11265990933995478,
0.4891887482888158,
0.8648711542045641
]
},
"autocam": {
"sceneUpDirection": {
"x": 0,
"y": 0,
"z": 1
},
"sceneFrontDirection": {
"x": 0,
"y": 1,
"z": 0
},
"cubeFront": {
"x": 1,
"y": 0,
"z": 0
}
}
},
"viewableInfo": {
"documentVersionUrn": "urn:adsk.wipprod:fs.file:vf.6wUAJP_jQ7OvQntO43aCrg?version=4",
"documentVersionId": "5a5f7d98-d043-4a2a-aba2-5c265ae9da9b"
}
}
],
"errors": [
{
"issueId": "5a5f7d98-d043-4a2a-aba2-5c265ae9da9b",
"detail": "User has no permission to view issue",
"type": "noPermissionToViewIssue"
}
]
}