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

Unable to Create a Customer Request via Service Desk REST API

Ben Whatley May 23, 2017

I'm working with JIRA service desk on a cloud instance, and I'm unable to create customer requests using the REST API.  Creating via the interface works without issue.

The body of my POST looks like this:

{
  "raiseOnBehalfOf": "myuser",
  "requestFieldValues": {
  	"summary": "test",
  	"description": "test"
  },
  "requestTypeId": "1",
  "serviceDeskId": "SDID"
}

I've also tried with the "requestParticipants" field.  No matter what I try, I always get the same result:

HTTP 400 

{
  "errorMessage": "This request is invalid. Check that the request contains all the required parameters and that the parameters are valid.",
  "i18nErrorMessage": {
    "i18nKey": "sd.rest.error.bad.request",
    "parameters": []
  }
}

What could I be doing wrong?  I've tried every combination of parameters that I can think of.

2 answers

0 votes
Justin Toth November 19, 2017

This is the create issue api call: Snippet

rest/servicedeskapi/request
0 votes
Lorenzo Bueno
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 11, 2017

Hello Ben, the error 400 indicates that:

400 Bad Request schema

Returned if the HTTP request call is invalid.

You can see this on the documentation for Service Desk APIs: https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-request-post.

What is the call that you're trying? Make sure to follow:

POST 

servicedesk/{serviceDeskId}/requesttype/{requestTypeId}/field

Also make sure that your user is a customer on the project. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events