1

I'm attempting to use the Data Management API to update the display name of an item within BIM 360 Docs, it looks like this API call is the one I'm after, however the documentation for it is less than helpful.

I can see the call should be...

developer.api.autodesk.com/data/v1/projects/PROJECT ID/items/ITEM ID

which makes sense, its the body that is less than descriptive

-d '{ "jsonapi": { "version": "1.0" }, "data": { "type": "items", "id": "urn:adsk.wipprod:dm.lineage:AeYgDtcTSuqYoyMweWFhhQ", "attributes": { "displayName": "new name for drawing.dwg" } } }'

Theres no indication as to what the urn is and how i should go about getting it, I've tried just using the item ID again with no joy, if anyone could help me it would be much appreciated,

image of postman response

Thanks!

Dan Scott
  • 19
  • 6

2 Answers2

1

I tried this PATCH API with my A360 hub, and it works good as shown in the following picture.

enter image description here

But, tried with BIM 360 Doc, I got same failure as you show when I try to update the name of one item, when I try to update the name of a BIM 360 Doc folder, it's even said this is disabled for BIM360. I think this API may not work with BIM 360 Doc currently, I will check more with our colleague about it.

Zhong Wu
  • 1,721
  • 1
  • 8
  • 9
0

The body should look like as following if you want to use PATCH request for BIM360 Docs:

               {
                    "jsonapi": {
                        "version": "1.0"
                    },
                    "data": {
                        "type": "items",
                        "id": "urn:adsk.wipprod:dm.lineage:ABCD",
                        "attributes": { "displayName": "new name for drawing.dwg" },
                        "relationships": {
                            "parent": {
                                "data": {
                                    "type": "folders",
                                    "id": "urn:adsk.wipprod:fs.folder:ABCD"
                                }
                            }
                        }
                    }
                }

Additional pproperty is relatioinships which defines which folder to look at for the update.

alekperos
  • 566
  • 4
  • 10
  • Hey, thank you for responding, sorry it took so long to get back, i have tried using that request however it doesn't appear to update any attributed (tried the displayName) can you confirm that you got this working and if I'm missing any steps, thanks in advance! – Dan Scott Jul 25 '17 at 13:23
  • Do you have any updates within this question? I got the same error in developing. I found the answer to upgrade the version when you want to rename the item. But I don't want to update version. Referenced link: https://stackoverflow.com/questions/47558579/autodesk-forge-data-manager-api-rename-a-item/47564036#47564036 – Kate Dec 18 '20 at 19:15