Issue Pushpins API Migration Guide
The Issue Pushpins API Migration Guide is for developers who are migrating from the deprecated linkedDocuments field to the new placements field for managing issue pushpins. The linkedDocuments field will be removed in a future release. This guide outlines the changes developers need to make to their code.
Note that BIM 360 projects do not support the placements field. Sheet placements are not supported.
General Changes
- Unified Support for 2D and 3D Files: Manages both 2D and 3D file pushpins with a consistent structure.
- New Dedicated Endpoints:
- POST placements:upsert - Add or update placements for an existing issue.
- POST placements:unlink - Remove placements from an issue.
- POST pins:batch-get - Fetch pins data for one or multiple files.
- New Filter: Use
filter[placements.lineageUrn]to retrieve all issues associated with a specific file. This filter replaces the deprecatedfilter[linkedDocumentUrn]filter. - Improved Data Structure: Hierarchical organization that separates placement-level data (file, viewable, etc) from pin data (position, viewerState, etc).
Note that PATCH issues/:issueId does not accept the placements field. To add or update placements on an existing issue, use POST placements:upsert.
Key Structural Changes
Understanding the Hierarchy
linkedDocuments (Deprecated)
The linkedDocuments field uses a flat structure where each array element represents a single pushpin with all metadata at the top level:
"linkedDocuments": [
{
"type": "TwoDVectorPushpin",
"urn": "urn:adsk.wipprod:dm.lineage:69a6ZRNySI-Foh3rWfFfrg",
"createdBy": "A3RGM375QTZ7",
"createdAt": "2018-07-22T15:05:58.033Z",
"createdAtVersion": 1,
"closedBy": "A3RGM375QTZ7",
"closedAt": "2018-08-22T15:05:58.033Z",
"details": {
"viewable": {
"id": "24820322-7c54-4a01-93e6-e701749f0345",
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D view of the 3rd floor of the building",
"is3D": true
},
"position": {
"x": -0.35907751666652,
"y": 0.23,
"z": 0.9998
},
"objectId": 3,
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b",
"viewerState": { /* viewer state object */ }
}
}
]
placements (New)
The placements field uses a hierarchical structure. Each placement contains the placement-level data (the file and the viewable) and a pins array with the pin data (position, viewer state, and so on). Note that each issue currently supports one placement, and each placement contains one pin.
"placements": [
{
"type": "file",
"createdAtVersion": 1,
"lineageUrn": "urn:adsk.wipprod:dm.lineage:69a6ZRNySI-Foh3rWfFfrg",
"viewable": {
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D view of the 3rd floor of the building",
"is3D": true
},
"pins": [
{
"createdAt": "2018-07-22T15:05:58.033Z",
"position": {
"x": -0.35907751666652,
"y": 0.23,
"z": 0.9998
},
"issueId": "d01074b4-682f-4784-8a91-cac940f19b44",
"updatedAt": "2018-07-22T15:05:58.033Z",
"viewerState": { /* viewer state object */ },
"viewableInfo": {
"documentVersionUrn": "urn:adsk.wipprod:fs.file:vf.69a6ZRNySI-Foh3rWfFfrg?version=1",
"documentVersionId": "5a5f7d98-d043-4a2a-aba2-5c265ae9da9b"
},
"objectId": "3",
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b"
}
]
}
]
Field Mapping Table
The following table shows how fields map from linkedDocuments to placements:
| linkedDocuments Field | placements Field | Notes |
|---|---|---|
type |
type |
Changed from TwoDVectorPushpin/TwoDRasterPushpin to ‘file’ |
urn |
lineageUrn |
Renamed for clarity |
createdAt |
pins[].createdAt |
Moved to individual pin level |
createdAtVersion |
createdAtVersion |
Remains at top level |
details.viewable |
viewable |
Moved up one level (no longer nested in details) |
details.viewable.id |
Removed | No longer needed |
details.viewable.guid |
viewable.guid |
No longer nested in details |
details.viewable.viewableId |
viewable.viewableId |
No longer nested in details |
details.viewable.name |
viewable.name |
No longer nested in details |
details.viewable.is3D |
viewable.is3D |
No longer nested in details |
details.position |
pins[].position |
Moved to pin level |
details.position.x |
pins[].position.x |
Moved to individual pin level |
details.position.y |
pins[].position.y |
Moved to individual pin level |
details.position.z |
pins[].position.z |
Moved to individual pin level (3D only) |
details.objectId |
pins[].objectId |
Moved to individual pin level (3D only). Changed from integer to string. |
details.externalId |
pins[].externalId |
Moved to individual pin level (3D only) |
details.viewerState |
pins[].viewerState |
Moved to individual pin level (3D only) |
| Not in linkedDocuments | pins[].viewableInfo |
New object containing document version info |
| Not in linkedDocuments | pins[].viewableInfo.documentVersionUrn |
New - decoded version URN |
| Not in linkedDocuments | pins[].viewableInfo.documentVersionId |
New - version identifier |
| Not in linkedDocuments | pins[].issueId |
New - associated issue identifier |
| Not in linkedDocuments | pins[].updatedAt |
New - last update timestamp |
| Not in linkedDocuments | pins[].uid |
New - unique identifier of the pin |
| Not in linkedDocuments | pins[].z |
New - z-ordering of overlapping pins (2D only) |
createdBy |
Removed | Not returned in placements |
closedBy |
Removed | Not returned in placements |
closedAt |
Removed | Not returned in placements |
closedAtVersion |
Removed | Not returned in placements |
Before and After Examples
Reading Issues - GET projects/:projectId/issues/:issueId Response
Before (linkedDocuments)
{
"id": "3570f222-6c54-4b01-90e6-e701749f0222",
"title": "Door missing a screw",
"status": "open",
"linkedDocuments": [
{
"type": "TwoDVectorPushpin",
"urn": "urn:adsk.wipprod:dm.lineage:69a6ZRNySI-Foh3rWfFfrg",
"createdBy": "A3RGM375QTZ7",
"createdAt": "2018-07-22T15:05:58.033Z",
"createdAtVersion": 1,
"closedBy": null,
"closedAt": null,
"closedAtVersion": null,
"details": {
"viewable": {
"id": "24820322-7c54-4a01-93e6-e701749f0345",
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D view of the 3rd floor of the building",
"is3D": true
},
"position": {
"x": -0.35907751666652,
"y": 0.23,
"z": 0.9998
},
"objectId": 3,
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b",
"viewerState": { /* viewer state object */ }
}
}
]
}
After (placements) Issues include the placement-level data, without the pin object.
{
"id": "3570f222-6c54-4b01-90e6-e701749f0222",
"title": "Door missing a screw",
"status": "open",
"placements": [
{
"type": "file",
"lineageUrn": "urn:adsk.wipprod:dm.lineage:6wUAJP_jQ7OvQntO43aCrg",
"createdAtVersion": 1,
"viewable": {
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D view of the 3rd floor of the building",
"is3D": true
}
}
]
}
Note that GET issues and GET issues/:issueId do not return the pins array. To retrieve pin data, use filter[placements.lineageUrn] on GET issues to find issues with placements on a given file, then pass those issue IDs (with the same lineageUrn filter) to POST pins:batch-get below.
Reading Issue Pins - POST projects/:projectId/pins:batch-get Response
The pins are returned by POST pins:batch-get, not by GET issues. The endpoint returns the pins for a specified set of issues, filtered by one or more files.
{
"results": [
{
"createdAt": "2018-07-22T15:05:58.033Z",
"position": {
"x": -0.35907751666652,
"y": 0.23,
"z": 0.9998
},
"issueId": "3570f222-6c54-4b01-90e6-e701749f0222",
"updatedAt": "2018-07-22T15:05:58.033Z",
"viewerState": { /* viewer state object */ },
"viewableInfo": {
"documentVersionId": "5a5f7d98-d043-4a2a-aba2-5c265ae9da9b",
"documentVersionUrn": "urn:adsk.wipqa:fs.file:vf.6wUAJP_jQ7OvQntO43aCrg?version=1"
},
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b",
"objectId": "3"
}
],
"errors": []
}
Creating Issue - POST projects/:projectId/issues Request (3D Example)
Before (linkedDocuments)
{
"title": "Missing door handle",
"issueSubtypeId": "2220f222-6c54-4b01-90e6-d701748f0222",
"status": "open",
"linkedDocuments": [
{
"type": "TwoDVectorPushpin",
"urn": "urn:adsk.wipprod:dm.lineage:0C9edNQuT2SrfoyKQ1Gv_Q",
"createdAtVersion": 1,
"details": {
"viewable": {
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D Model View",
"is3D": true
},
"position": {
"x": 100.5,
"y": 250.3,
"z": 56.2
},
"objectId": 3,
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b",
"viewerState": { /* viewer state object */ }
}
}
]
}
After (placements)
{
"title": "Missing door handle",
"issueSubtypeId": "2220f222-6c54-4b01-90e6-d701748f0222",
"status": "open",
"placements": [
{
"type": "file",
"lineageUrn": "urn:adsk.wipprod:dm.lineage:0C9edNQuT2SrfoyKQ1Gv_Q",
"createdAtVersion": 1,
"viewable": {
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "3D Model View",
"is3D": true
},
"pins": [
{
"position": {
"x": 100.5,
"y": 250.3,
"z": 56.2
},
"objectId": "3",
"externalId": "160fbf50-f33b-41aa-8c4e-9291feaac09b",
"viewerState": { /* viewer state object */ },
"viewableInfo": {
"documentVersionUrn": "urn:adsk.wipprod:fs.file:vf.0C9edNQuT2SrfoyKQ1Gv_Q?version=1"
}
}
]
}
]
}
Creating Issue - POST projects/:projectId/issues Request (2D Example)
After (placements)
{
"title": "Missing door handle",
"issueSubtypeId": "2220f222-6c54-4b01-90e6-d701748f0222",
"status": "open",
"placements": [
{
"type": "file",
"lineageUrn": "urn:adsk.wipprod:dm.lineage:0C9edNQuT2SrfoyKQ1Gv_Q",
"createdAtVersion": 1,
"viewable": {
"guid": "24820322-7c54-4a01-93e6-e701749f0345",
"viewableId": "42",
"name": "Floor Plan - Level 1",
"is3D": false
},
"pins": [
{
"position": {
"x": 100.5,
"y": 250.3
},
"z": 0,
"viewableInfo": {
"documentVersionUrn": "urn:adsk.wipprod:fs.file:vf.0C9edNQuT2SrfoyKQ1Gv_Q?version=1"
}
}
]
}
]
}
New ‘viewableInfo’ Object
When creating pins, the new viewableInfo object contains version information for the specific file.
The documentVersionUrn is used to identify the exact version of the file where the pin is located.
To retrieve the documentVersionUrn from the viewer, decode the encoded URN as shown below if your workflow requires extracting data from the loaded model.
Alternatively, if your workflow already has the corresponding model file version, call the Data Management API’s GET versions/:version_id endpoint on your server side to obtain the version URN.
// Get the encoded URN from the viewer
let encodedUrn = viewer.model.getDocumentNode().getRootNode().urn();
// Convert URL-safe Base64 back to standard Base64
let urn = encodedUrn.replace(/-/g, "+").replace(/_/g, "/");
// Add padding if needed
while (urn.length % 4) {
urn += "=";
}
// Decode from Base64 to get the URN
let documentVersionUrn = atob(urn);
// Include this in your pin request
let pin = {
viewableInfo: {
documentVersionUrn: documentVersionUrn
}
// ... other pin properties
};
Step-by-Step Tutorial
For more information about how to create an issue pushpin using the placements field, see the Create Issues With File Pushpins tutorial.