1
votes

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!

2
Did you get this working, Dan? Having the same issue.alekperos

2 Answers

1
votes

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.

0
votes

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.