Dear All,
I have all my assetts loaded in JIRA and I am coding a powershell script that sync this assetts with other softwares (like AD).
I was able using the rest api to query the list of objects but unfortunately I am not abe to get all properties of the single object (extended and in this case the object is a sim card).
Documentation seems laking to me on the subject could you pls point me out some link or github where I can have a starting point?
Thanks to all in advance
Paolo Giacometti
Hi Paolo,
Welcome to the Community. I hope you're doing well.
Reviewing Atlassian Dev documentation, I see that extended was deprecated, and they recommend using includeTypeAttributes
it instead
http://localhost:8100/rest/assets/1.0/aql/objects?includeTypeAttributes=true
https://docs.atlassian.com/assets/REST/10.4.4/#aql-findObjects
I hope it helps.
Thank you.
Hector
I see now that you've raised the question for Jira Cloud, not DC. I'm sorry for misreading it.
For Jira Cloud the Asset REST API documentation shows
https://developer.atlassian.com/cloud/assets/assets-rest-api-guide/workflow/
Then, you can do a POST to the "/object/aql" endpoint, which is the option to use now.
https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post
Thank you.
Hector
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Hector,
I already arrived at point 2 using the post method in the endpoint. But the list I get I cannot understand how to get the single object detail
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Paolo,
Thank you for your response.
you get the following structure,
first level, contains the total results and includes a "Values" structure
"startAt":0,
"maxResults":25,
"total":2,
"values": [..., ...] <---------
"objectTypeAttributes": [..., ...],
"hasMoreResults":false,
"last":true,
"isLast":true
This structure contains your assets returned from the AQL
"workspaceId":"500dasd-af5d-9d742bc8807c",
"globalId":"500dasdasdasda42bc8807c:1",
"id":"1",
"label":"LG 7000",
"objectKey":"GAD-1", <<<<<-------here you have the object key that you can match
"avatar",
"objectType", [..., ...]
"created":"2024-11-28T22:22:02.651Z",
"updated":"2024-11-28T22:22:53.197Z",
"hasAvatar":false,
"timestamp":1732832573197,
attributes [..., ...] <<<<<<,----------- here you have your attributes
_links []
"name":"LG 7000"
The attributes will be structured the following way
"workspaceId":"500dasd-af5d-9d742bc8807c",
"globalId":"500dasdasdasda42bc8807c:1",
"id":"9",
"objectTypeAttributeId":"85",
objectAttributeValues [..., ...] , <<<<<----- and in here, you finally have it
"objectId":"1"
The value of the attribute will be included as follows
"value":"42",
"searchValue":"42",
"referencedType":false,
"displayValue":"42"
As you can see, here you have an asset object (GAD-1) which is an LCD Screen (object type), with details
name = LG 7000
size = 42
I hope this helps you understand It better.
Thank you.
Hector
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.