Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Logging an attribute returned in a webhookresponse

Ste404
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 12, 2023

Hi there,

In the doco for the POST /object/aql the JSON for attributes is shown per the block below.

What I am trying to do is extract the value even just to log for various attributes.

If I log this

{{webhookResponse.body.values.attributes}}  

I am getting the attributes for all the returned objects.

But then I am getting lost on how to drill down into a particular attribute to display it's value and ultimately parse out, things like this fail miserably.

{{webhookResponse.body.values.attributes.objectTypeAttributeId=2000.DisplayValue}}

The JSON looks like this in part;

 

{workspaceId=2ae0-de875a4b04ad, globalId=2ac55-bc3f-de875a4b04ad:2815, id=2815, objectTypeAttributeId=2000, objectAttributeValues=[{value=IBM, displayValue=IBM, searchValue=IBM, referencedType=false}], objectId=347}

 

So for this example I want to Log IBM

 

This is from the doc.

https://developer.atlassian.com/cloud/assets/rest/api-group-object/#api-object-aql-post

 

"attributes": [

{

"workspaceId": "f1668d0c-828c-470c-b7d1-8c4f48cd345a",

"globalId": "f1668d0c-828c-470c-b7d1-8c4f48cd345a:637",

"id": "637",

"objectTypeAttributeId": "134",

"objectAttributeValues": [

{ "value": "ITSM-88",

"displayValue": "ITSM-88",

"searchValue": "ITSM-88",

"referencedType": false

}

],

"objectId": "88"

},

0 answers

Suggest an answer

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

Atlassian Community Events