Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Statuspage http web request



I am trying to use scriptrunner to sync JIRA and Statuspage using the API. I am able to get this to work within Automation for Jira using the Webhook action, but I needed to add logic in for multiple components. I took the exact header and body from the working Automation for Jira step but when I try to run it in groovy I can't get past compilation. 

Here is the code:

import static
import static

def incidentsURL = ""
def http = new HTTPBuilder(incidentsURL)

return http.request(POST, JSON) { req ->
headers."Authorization" = "API_KEY"
body = [
"incident": {
"name": "{{issue.summary}}",
"status": "identified",
"metadata": {},
"deliver_notifications": true,
"body": "{{issue.description}}",
"components": {
"COMPONENTID_1": "degraded_performance",
"COMPONENTID_1": "degraded_performance"
"component_ids": [

response.success = { resp, json ->
assert resp.status == 200
log.debug("My response handler got response: ${resp.statusLine}")
return htmlText.getText()
return null

// called only for a 404 (not found) status code:
response."404" = { resp ->
log.error ("Not found")
return null

I get this error:

Compilation error(s):
script_faebee5c347ccee6da33a12299bf286d.groovy: 18: expecting '}', found ':' @ line 18, column 13.
     "incident": {


1 answer

0 votes

@Mike Abbe -

Hi Mike:

In your code you have component_id mentioned twice -

     "components": {
"COMPONENTID_1": "degraded_performance",
"COMPONENTID_1": "degraded_performance"

Don't know if that was the cause of your error.

Best, Joseph Chung Yin

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Service Management

ThinkTilt is joining the Atlassian Family!

This morning, Atlassian announced the acquisition of ThinkTilt , the maker of ProForma, a no-code/low code form builder with 700+ customers worldwide. ThinkTilt helps IT empower any team in their or...

1,109 views 32 33
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you