Insert Item to Managed items tab using V3 API

Insert Item to Managed items tab using V3 API

b_sugumar
Enthusiast Enthusiast
975 Views
5 Replies
Message 1 of 6

Insert Item to Managed items tab using V3 API

b_sugumar
Enthusiast
Enthusiast

It is difficult to add around 500 items at once to managed items by searching from the find box. We wanted to automate the process by using POST method. I have the needed payload but Schema for Item is missing. Even if I use the same payload as schema for item, POST method is successful without inclusion of item to Managed tab. 

b_sugumar_0-1714069423612.png

Thanks in advance.

Bala

0 Likes
Accepted solutions (1)
976 Views
5 Replies
Replies (5)
Message 2 of 6

sven.dickmans
Autodesk
Autodesk

You can add items to this list by sending a post request to the following endpoint:

 

 

'https://' + tenant + '.autodeskplm360.net/api/v3/workspaces/' + wsIdCO + '/items/' + dmsIdCO + '/affected-items'

 

 

 The body / payload of your request must contain an array of api-links for the given items to add:

 

 

['/api/v3/workspaces/' + wsIdItem + '/items/' + dmsIdItem]

 

 

In the request headers, you also must set a specific Accept header:

 

 

'Accept' : 'application/vnd.autodesk.plm.affected.items.bulk+json'

 

 

 

0 Likes
Message 3 of 6

sven.dickmans
Autodesk
Autodesk

You can find a working example in my list of api examples. Have a look at function addManagedItem here: https://github.com/dickmans/plm-utilities/blob/main/api-examples/56-managed-items-add.js

0 Likes
Message 4 of 6

b_sugumar
Enthusiast
Enthusiast

I'm exactly using the same POST endpoint, Payload & accept header. HTTP status code is 200 but no insertions are made to managed Items.

Regards,

Bala

0 Likes
Message 5 of 6

sven.dickmans
Autodesk
Autodesk
Accepted solution

Can you see the given items when requesting the affected items using the following endpoint?

'https://' + tenant + '.autodeskplm360.net/api/v3/workspaces/' + wsIdCO + '/items/' + dmsIdCO + '/views/11'

 Did you add the working versions of the given items to this list?

Is there an entry in the Change Log of your change process which indicates the addition of the item to this tab?

Message 6 of 6

b_sugumar
Enthusiast
Enthusiast

I have been using DMSID of production revision which didn't allow me to insert. Thanks for your support.

I will use PUT method to update the TO state as well, let me get back if I need your support again.

Thanks,

Bala