Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Using Assets Rest api to update an object with multiple object references

Jeffrey Chan April 1, 2024

Hi Community,

We're starting to use Assets, and were extremely disappointed to find that there's no app for SCCM integration on the Cloud platform.  So we're rolling our own, the SQL used seems mostly somewhat complete -- missing the SQL for joining the CPU, FS, Network, OS, to the systems of course.  We'll work around that I'm sure.  Reference here: https://confluence.atlassian.com/assetapps/used-sql-statements-1168848151.html.  The issue we're seeing is that the REST api for updating an object seems to be unable to link to multiple objects.  

For instance, a System should reference multiple "Site Roles", but I've tried to update the object using the api using a PUT call on this endpoint https://api.atlassian.com/jsm/assets/workspace/{workspaceId}/v1/object/{id} with different calls with no success.  

I know the payload is good, because it works updating the object with 1 "Site Role".  It's simply providing the Site Role object Id as the value of the attribute.  Works great with 1 Site Role.  But when we have 2, it's either a bad input (HTTP400) if I provide the value as a list of Object IDs, or it just show the last(?) Site Role if I provide each Site Role association as multiple instances of the same attribute Id but different attribute values.

Has anyone been able to figure this out?  Or am I missing something?  Thanks for any insight you can provide!

0 answers

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events