So I'm trying to create a complex rule (if you're wondering, is related to Grafana),
1. first call an endpoint to get a very large JSON response (more than 4k lines)
2. use that JSON to call another endpoint....
that's it! it's simple in reality, but the problem is when using that json response as the custom data for the second request...
1. in that json response, I need to update a single line
2. Jira inputs it as "string" instead of a json object
I get this error in the Audit log
Send web request
Error response HTTP body:
Error publishing web request. Response HTTP status:
400
I tried these, according to the documentation, but they didn't work.... they print a blank string instead of parsing the json object
webhookResponse.body.dashboard.annotations.asJsonObject("annotations")
{{webhookResponse.body.dashboard.annotations.asJsonObject("annotations")}}
------
webhookResponse.body.dashboard.annotations.asJsonObjectArray("annotations")
{{webhookResponse.body.dashboard.annotations.asJsonObjectArray("annotations")}}
this is the expected result from above snippet
"annotations": {
"list": [
{
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "#5794F2",
"limit": 100,
"matchAny": true,
"name": "releases",
"showIn": 0,
"tags": [
"release"
],
"type": "tags"
},
{
"builtIn": 1,
"datasource": "-- Grafana --",
"enable": true,
"hide": true,
"iconColor": "rgba(0, 211, 255, 1)",
"limit": 100,
"name": "Annotations & Alerts",
"showIn": 0,
"type": "dashboard"
}
]
}
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.