How to get URN for a model in tandem api?

49 Views Asked by At

I am begineer and new to tandem. I am trying to read and write property of a model from the javascript test bed. When I am trying to read from it is asking for the URN value. I am don't know from were I will get this URN value. Please guide me.

I tried to find it in the documentation but I was not able find it. Please guide me from where can I get it.

1

There are 1 best solutions below

4
Jan Liska On BEST ANSWER

in Tandem the facility can have multiple models. So you need to start with facility URN - you can find it in your browser bar (see image below).

Address bar with facility URN

Once you have facility URN you can use GET twins/:urn to get facility details. The links array contains URNs of linked models - check out the modelId property:

"links": [
  {
    "disciplines": null,
    "label": "LTU2022 - Arch.rvt",
    "main": true,
    "modelId": "urn:adsk.dtm:CTmdTcAoSwaP79cLYjn8xQ",
    "on": true,
    "accessLevel": "Owner"
  },
  {
    "disciplines": null,
    "label": "LTU2022 - MEP.rvt",
    "main": false,
    "modelId": "urn:adsk.dtm:IVkKaloKQpG2IQcsl1yDwA",
    "on": true,
    "accessLevel": "Owner"
  }
]

You can use this example to read asset properties and this example to update them.