Set issue security level via REST API

Laura Gomez
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!
August 10, 2018

Hi,

My user has permissions to change an issue security level in Jira via browser, I'm trying to do this via REST API. However, when I create the issue it sets the default security level instead of the one I'm specifying.

I'm calling this endpoint

POST /rest/api/2/issue

with a JSON payload like:

{
"fields"
: { "security": { "id" : "10000" } }
}

I verified that the id belongs to the security level I want to set, but the issue gets created with the default security level instead of the one I'm specifying in the payload, so I'm being forced to change it manually on the browser. What can I be doing wrong here? 

2 answers

1 accepted

1 vote
Answer accepted
Laura Gomez
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!
August 10, 2018

Found a way to do it, works if I create the issue first via REST API and then update it with a different security field.

Lindsey White
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!
November 2, 2022

@Laura Gomez sorry to bring up an old thread, but would you be able to provide how you updated it to a different security field?

Like Mark_Hortman likes this
Melissa Nielsen November 25, 2024

Yes I'm also stuck on this...6 years later lol.

0 votes
Aaron Pavez _ServiceRocket_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 25, 2024

Suggest an answer

Log in or Sign up to answer