create jira ticket with expected request type using API post call

Wendy Wei August 16, 2024

Hello,

I am able to create a jira issue using custom API post call, however, I cannot map request type field.  in our environment, the request type field is inside a custom field   as below:

"customfield_10010": { "requestType": { "id": "237", "_links": { "self": "https://appliedsystems.atlassian.net/rest/servicedeskapi/servicedesk/9/requesttype/237" }, "name": "Employee Termination Request", }, },

what is correct format on json payload I should use when post via API call? I keep getting 403 error:   "body": { "error": "Failed to parse Connect Session Auth Token" }, "message": "403 Forbidden", "description": "HTTP Request Error",

 

I can create a jira ticket, then using API put to update request type field as second step, but I cannot populate this field while creating issue in one step.

Any idea or suggestion is highly appreciated.

thank you

Wendy

1 answer

1 accepted

1 vote
Answer accepted
Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 16, 2024

@Wendy Wei , 

If you are using the Jira Service Management API to create this ticket, I recommend using this documentation to map the request type id.

The Jira Service Management Cloud REST API (atlassian.com)

In this case, the format is: "requestTypeId": "25",

-----

But if you are using the standard API to create an issue in Jira (The Jira Cloud platform REST API (atlassian.com)), you should use the following format for Request Type

"customfield_10010: "request-type-id"

 

Have you tried one of these?

Wendy Wei August 20, 2024

thank you @Fernando Eugênio da Silva .  i got it working by using the "requestTypeId": "237".  :)

 

Fernando Eugênio da Silva
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 20, 2024

@Wendy Wei , Glad to know that worked!

Please, click on 'Accept Answer' to help other users with the same question to find this answer more quickly :)

Suggest an answer

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

Atlassian Community Events