Forums

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

How to Delete Users - Jira Cloud REST API

Dylan Richards
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 10, 2022

I am using the API documentation located here to build an offboarding automation process in Power Automate. My request looks likes this:

jira_account_deletion.PNG

My issue is that I'm getting this error when this request runs:

{
  "key""badRequestFormat",
  "context": {
    "message""Invalid content type (application/octet-stream).  These are valid: application/json"
  },
  "errorKey""bad-request-format",
  "errorDetail": {
    "message""Invalid content type (application/octet-stream).  These are valid: application/json"
  }
}
The content-type header is supplying the exact information that the error message is referring to so I'm not sure why it's throwing this error. I've contacted Jira support and they are confident that the issue lies on the Power Automate side of things. I've also hit a brick wall with Microsoft support. 
Has anyone else had this issue? Is there a way to change the request so that the content-type is accepted or any other workaround?

1 answer

1 accepted

1 vote
Answer accepted
Garrett McCreery
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.
May 10, 2022

Hi Dylan...

I just did this for my in Power Automate.

I noticed that when I run the api you described above in Postman it works, however in Power Automate I was getting the same error message you are getting. I ended up adding some body to the call and the error went away... Also Add Content-Type application/json.

screenshot.png

Dylan Richards
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 16, 2022

Hey @Garrett McCreery

I apologize for the delayed response. YOU ARE AWESOME!

I've spent countless hours with Jira and Microsoft support and you nailed it on the first try. Thank you so much!

Like Garrett McCreery likes this
Garrett McCreery
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.
May 16, 2022

@Dylan Richards you are welcome! Glad that fixed it for you!

Suggest an answer

Log in or Sign up to answer