Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
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

How to set select lists (single, multiple, cascading), radio or checkboxes on create issue with REST

This small how-to is all about setting custom fields on creating an issue. Apart from the customfield_xxxxx elements, only the minimum required fields are set.

The REST API endpoint

POST https://myjiradomain.com/rest/api/2/issue

HTTP Headers to be set

  • Content-Type: application/json
  • User-Agent: x (required only, if you get an XSRF from browser)
  • Origin: https://myjiradomain.com (required only, if you get an XSRF)

JSON request body for Select List (single choice) / Radio Buttons

{
"fields": {
  "project": {
"key": "REST"
},
  "summary": "Issue created from REST API",
  "issuetype": {
"id": "1"
},
  "customfield_10100": {
"value": "First"
}
  }
}

JSON request body for Select List (multiple choices) / Checkboxes

{
"fields": {
"project": {
"key": "REST"
},
"summary": "Issue created from REST API",
"issuetype": {
"id": "1"
},
"customfield_10200": [
{
"value": "Apple"
},
{
"value": "Banana"
}
]
}
}

JSON request body for Select List (cascading)

{
"fields": {
  "project": {
"key": "REST"
},
  "summary": "Issue created from REST API",
  "issuetype": {
"id": "1"
},
  "customfield_10300": {
"value": "Mammal",
"child": {
"value": "Elephant"
}
}
  }
}

JSON request body for Select List (cascading) with 'none' on child option

{
"fields": {
  "project": {
"key": "REST"
},
  "summary": "Issue created from REST API",
  "issuetype": {
"id": "1"
},
  "customfield_10300": {
"value": "Mammal",
"child": null
}
  }
}

Tested with Jira Software Server 8.13.3.

0 comments

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Jira Software

👋 Looking for 15-20 volunteers to test Atlassian training content

Hi everyone! Are you interested in beta testing Atlassian University’s newest (unreleased!) training course? We’re looking for 15-20 volunteers to test our newest training course, Basic reporting...

385 views 18 22
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