Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Curl command to create incident


I'm currently testing the curl command to create a new incident and with the example you provided it's not possible. I need to format it on one line to pass it through terminal. 

I was successful to use curl get, so I know my access key and page ID are correct.

Can you confirm one line format curl to create new incident? 

1 answer

0 votes
Charlie Misonne Community Leader Sep 02, 2021

Hi Diane, welcome to the Atlassian Community,

On this page  you will find an example of a curl request to create an incident in statuspage.

I'm not sure why you need this to be on 1 line but in the example you must know that the backslashes are meant to put the single command on multiple lines in order to make that more readable. So the one line command becomes this by removing backslashes:

curl{page_id}/incidents -H "Authorization: OAuth your-api-key-goes-here" -X POST "incident[name]=string" -d "incident[status]=string" -d "incident[body]=string"

Hi Charlie,


So the one line curl command seems to work in my case, I'm testing it via terminal. I also added the component, statue a d body. I can successfully create new incidents.

Please add some examples in the developer documentation as everyone is complaining about that.


Charlie Misonne Community Leader Sep 03, 2021

Hi Diane,

Let me repeat what I tried to explain earlier, I hope you'll understand what I mean and can pass this information to everyone.

A backslash at the end of a line will ignore the line ending. So a multi-line command where every line ends with a backslash is actually a single line command.
And that's exactly what the statuspage documentation does.

What you are asking is to add the same example without the backslashes in the documentation. This would just duplicate the example and it doesn't make much sense.

Please be aware that this is the Atlassian Community where mostly volunteers answser questions. We are not able to change Atlassian's documentation.
If you see mistakes in the documentations you should contact Atlassian directly.
But in this case there is not mistake, you just need to understand how backslashes work in a shell.

May I ask what you get when you enter the curl command like it has been documented in the documentation? (with multi-lines and backslashes).
When I execute it I get this which seems perfectly fine:

2021-09-03 10_50_04-MINGW64__c_Users_CMOAR99.png

Suggest an answer

Log in or Sign up to answer
Site Admin

Atlassian Community Events