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

How to add custom fields on Jira Service Desk request Api

satheesh January 11, 2021

I need to pass custom fields through the create request api. How to do that?

POST /rest/servicedeskapi/request

 

$data = [
"serviceDeskId" => $serviceDeskId,
"requestTypeId" => $request->feedback_type,
"requestParticipants" => [
$customerId
],
"requestFieldValues" => [
"summary" => $request->summary,
"description" => $request->description,
],
];

 

1 answer

1 accepted

0 votes
Answer accepted
Ewin Davis K
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2021

Hi @satheesh , this document describes how you can pass custom field value in the rest API's. https://developer.atlassian.com/cloud/jira/service-desk/rest/intro/#fieldformats

Let me know if that helps.

Ewin Davis K
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 12, 2021

You will need to know the custom field Id after which you can pass it in the requestFieldValues. e.g. 

{
"requestParticipants": [
"5ee0a49c775ca80ac014b29f"
],
"serviceDeskId": "13",
"requestTypeId": "309",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac",
"customfield_10086": "Testing custom field"
}
}
satheesh January 12, 2021

Thanks for the response. I tried it and it says "Unable to create request because of theses errors : The field 'customfield_10036' i"s not valid".

satheesh January 12, 2021

Thanks Ewin. I have changed the fields to be visible. Now it's working fine.

Bhanu Chava June 2, 2021

@satheesh I am facing the same issue , Can you please point out the way to change the fields to visible . Where should I change it ? Thank you 

Richard Jenkins September 20, 2021

@Bhanu Chava , the field needs to be visible in the Request Type in the Service Desk. If you want to use the api for Service Desk, then the actual portal must be set up, even if you have it hidden from portal, the actual request type must be configured with the fields

amir abu issa April 3, 2023

Hi,

can anyone send example how to add field in jsm request?

 

Thanks

Suggest an answer

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

Atlassian Community Events