Forums

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

How can you tell the api what type of ticket request is being created?

Victor Tobon
Contributor
October 31, 2022

Good day, community. I have used the api to create tickets within Jira service management, but I want to tell you what type of request should be created when this ticket is sent. When I put the json body, I get an error that the field should already be on the creation screen. I have added it but the error remains could you tell me how I can solve this

 

{
"fields": {
"project": {
"key": "MDA"
},
"summary": "1234791733970-01",
"issuetype": {
"id": "10135"
},
"requestType": {
"id": "95"
}post.jpg
}
}

1 answer

1 accepted

2 votes
Answer accepted
Mikael Sandberg
Community Champion
October 31, 2022

For JSM you have to use a different endpoint, Create customer request. And for that endpoint your JSON should look something like this:

'{
"requestParticipants": [
"qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae"
],
"serviceDeskId": "10",
"requestTypeId": "25",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}' 
Victor Tobon
Contributor
November 3, 2022

@Mikael Sandberg Thank you very much for your answer, you can create a ticket at the service desk, I have this portal public, you can create a ticket just by entering the email and filling in the request fields, is it possible to do this with the api?

Mikael Sandberg
Community Champion
November 4, 2022

Yes, if you look at the endpoint that i linked to, Create customer request, above you can see how to create the request via API.

Like Victor Tobon likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events