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 add custom fields on Jira Service Desk request Api

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 Jan 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 Jan 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"
}
}

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".

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

@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 

@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

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
Community showcase
Published in Jira Service Management

JSM Jira Automation: How to Send SLA Breached Notifications

Hi Everyone, In   this tutorial,  we will show you how you can monitor an SLA, and send notifications before or after the SLA has been breached.   SLA Threshold Trigger The SLA t...

638 views 5 12
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