Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Create issue and set assignee via rest api

Deleted user October 14, 2022

Hello, 
I have to implement a REST API call to create an issue in a Jira Service Management project.
The issue type I use has the assignee field visible in both Create and Edit/View screens.
I prepared and used the following request that I'm showing below with masked values.
As you can see, I set the assignee and the issue is created on Jira Service Management, but if I open the issue the assignee is not set.
I took the assignee id searching my user account in the section "People" and copied it from the url of my user account page resulting with the search.

url where I took the assignee id 
https://my.jira.software.manager.domain/jira/people/xxxxxxxxxxxxxxxxxxxxx


url for rest api call:    https://my.jira.software.manager.domain/rest/api/3/issue

request body:

{
    "fields": {
        "summary""Request Summary",
        "issuetype": {
            "id""10011"
        },
        "project": {
            "id""10005"
        },
        "assignee""xxxxxxxxxxxxxxxxxxxxx",
        "customfield_10065": {"disabled"false"value""value1"},
        "customfield_10067": {"disabled"false"value""value2"},
        "customfield_10093": {"disabled"false"value""value3"},
        "customfield_10066": {"disabled"false"value""value4"},
        "customfield_10099""myvalue1",
        "customfield_10083""myvalue2"
    }
}

The new created issue but without assignee 
Immagine 2022-10-14 132907.png

Can you tell me where is my error?
Thank you. 

1 answer

0 votes
servet kıraç July 30, 2024

Hello,
I'm not too familiar with the cloud side but in DC you have to call servicemanagement side apis for this to be able to choose a request type and everything.

  1. This link could be helpful:
    https://docs.atlassian.com/jira-servicedesk/REST/4.15.0/#servicedeskapi/request-createCustomerRequest
  2. Also the user that you used for calling the api needs to have permissions.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events