Jira Asset Automation using smart values using http request and post data

Karina Green February 6, 2025

I have created an automation rule, where it is triggered on the update of an object

I am  trying to add an asset attribute value (RecId)to the end of a url and send the values of any asset attributes (attribute Name & attribute Value) that have been updated via the http request. (When I hardcode the values the post is sent, so the connection is working) What do I need to change to get the actual values of the attributes returned?

The configuration of my rule is as follows

Action: Http Request

Url: https:/xxxxx.com/services/../../../{{asset.RecId}}

userName: xxxx

Password: xxxx

Http method: POST

Post Data: 

{ "objectId": "{{asset.object.id}}", "objectName": "{{asset.object.name}}", "updatedAttributes": [ { "attributeName": "{{asset.attribute.name}}", "newValue": "{{asset.attribute.value}}" } ] }

 

The log is returning:

 

AutomationRuleHttpRequestAction action data after replacing placeholders: {"url":"https://xxx/xx/xx/{{asset.RecId}}","method":"POST","postData":"{\n \"objectId\": \"{{asset.object.id}}\",\n \"objectName\": \"{{asset.object.name}}\",\n \"updatedAttributes\": [\n {\n \"attributeName\": \"{{asset.attribute.name}}\",\n \"newValue\": \"{{asset.attribute.value}}\"\n }\n ]\n}\n","username":null,"password":"***”}

 

1 answer

0 votes
Karina Green February 7, 2025

so figured out some of my issues, in data center I needed to use the following format --

${Recid} on the url and ${objectId} objectId and ${label} for the objectName this will return some of the values I need to send to my http post request.

"url":"https://xxx/xx/xx/xxx/xx/xx/${RecId}

{
"objectId": ${objectId},
"objectName": ${label},

What I still cannot figure out is how to send the name and value of the attributes that were updated in data center.

"updatedAttributes": [
{
"attributeName": ${attribute.name},
"newValue": ${attribute.value}
}

 

Any help on this would be appreciated.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events