The default GET Jira Issue response for an asset custom field provides the objectID. Is there a way to get more attributes from the same API call? Or is an additional API to the Assets API required?
Hi @Mathew Lederman - have you tried using the https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-id-attributes-get endpoint?
It will give you all the attributes for a specific object ID so you can parse the JSON response and get the particular attribute's value.
See the output example below, which is given a specific workspace and object ID. (https://developer.atlassian.com/cloud/assets/assets-rest-api-guide/workflow/#step-2--discover-your-workspaceid)
I hope it helps you!
- Pablo
https://<YOUR_JIRA_CLOUD_INSTANCE_NAME>.atlassian.net/gateway/api/jsm/assets/workspace/<YOUR_WORKSPACE_ID>/v1/object/<OBJECT_ID>/attributes
[ { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:346", "id": "346", "objectTypeAttribute": { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:346", "id": "346", "defaultType": { "id": 0, "name": "Text" }, "description": "The name of the object", "editable": true, "hidden": false, "includeChildObjectTypes": false, "indexed": true, "label": true, "maximumCardinality": 1, "minimumCardinality": 1, "name": "Name", "options": "", "pendingCreation": false, "position": 1, "removable": false, "sortable": true, "summable": false, "system": false, "type": 0, "uniqueAttribute": false }, "objectTypeAttributeId": "346", "objectAttributeValues": [ { "displayValue": "Pablo", "searchValue": "Pablo", "referencedType": false, "value": "Pablo" } ], "objectId": "69" }, { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:504", "id": "504", "objectTypeAttribute": { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:504", "id": "504", "description": "", "editable": true, "hidden": false, "includeChildObjectTypes": false, "indexed": true, "label": false, "maximumCardinality": 3, "minimumCardinality": 0, "name": "Jira User", "options": "", "pendingCreation": false, "position": 4, "qlQuery": "", "regexValidation": "", "removable": true, "sortable": true, "suffix": "", "summable": false, "system": false, "type": 2, "uniqueAttribute": false }, "objectTypeAttributeId": "504", "objectAttributeValues": [ { "displayValue": "Pablo", "searchValue": "6332ba1e14c6b4b2210d7892", "referencedType": false, "user": { "avatarUrl": "https://avatar-management--avatars.us-west-2.prod.public.atl-paas.net/6332ba1e14c6b4b2210d7892/0f941609-3d3a-4da7-baac-aa1d4468d787/128", "displayName": "Pablo", "name": "Pablo Vergara", "key": "6332ba1e14c6b4b2210d7892", "emailAddress": "pablo@test.com", "isDeleted": false } } ], "objectId": "69" }, { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:345", "id": "345", "objectTypeAttribute": { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:345", "id": "345", "defaultType": { "id": 0, "name": "Text" }, "editable": false, "hidden": false, "includeChildObjectTypes": false, "indexed": true, "label": false, "maximumCardinality": 1, "minimumCardinality": 1, "name": "Key", "options": "", "pendingCreation": false, "position": 0, "removable": false, "sortable": true, "summable": false, "system": true, "type": 0, "uniqueAttribute": false }, "objectTypeAttributeId": "345", "objectAttributeValues": [ { "displayValue": "TSP-69", "searchValue": "TSP-69", "referencedType": false, "value": "TSP-69" } ], "objectId": "69" }, { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:347", "id": "347", "objectTypeAttribute": { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:347", "id": "347", "defaultType": { "id": 6, "name": "DateTime" }, "editable": false, "hidden": false, "includeChildObjectTypes": false, "indexed": true, "label": false, "maximumCardinality": 1, "minimumCardinality": 1, "name": "Created", "options": "", "pendingCreation": false, "position": 2, "removable": false, "sortable": true, "summable": false, "system": true, "type": 0, "uniqueAttribute": false }, "objectTypeAttributeId": "347", "objectAttributeValues": [ { "displayValue": "19/Dec/23 3:42 PM", "searchValue": "2023-12-19T15:42:50.097Z", "referencedType": false, "value": "2023-12-19T15:42:50.097Z" } ], "objectId": "69" }, { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:348", "id": "348", "objectTypeAttribute": { "workspaceId": "3460631b-f65a-4409-bd89-73ba453223c2", "globalId": "3460631b-f65a-4409-bd89-73ba453223c2:348", "id": "348", "defaultType": { "id": 6, "name": "DateTime" }, "editable": false, "hidden": false, "includeChildObjectTypes": false, "indexed": true, "label": false, "maximumCardinality": 1, "minimumCardinality": 1, "name": "Updated", "options": "", "pendingCreation": false, "position": 3, "removable": false, "sortable": true, "summable": false, "system": true, "type": 0, "uniqueAttribute": false }, "objectTypeAttributeId": "348", "objectAttributeValues": [ { "displayValue": "10/Feb/25 4:14 PM", "searchValue": "2025-02-10T16:14:15.547Z", "referencedType": false, "value": "2025-02-10T16:14:15.547Z" } ], "objectId": "69" } ]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.