Forums

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

Create Customer Request API using POSTMAN

Rahul_Ray May 11, 2020

Hi,

I am trying to hit the service desk API Create Customer API(https://[domainname].atlassian.net/rest/servicedeskapi/request) through POSTMAN, getting 400(bad request) response.

Request Parameters are as such-

URL - https://[domainname].atlassian.net/rest/servicedeskapi/request
Method - POST
Authorization
Basic Auth(username, Password[API Token])
ContentType : Application/json

Request Body:
{
“serviceDeskId”: “1”,
“requestTypeId”: “10009”,
“requestFieldValues”: {
“summary”: “Request JSD help via REST”,
“description”: “sdfasdfdsfsadfdfasdf”
}
}

Response :

Status: 400 Bad Request
{
“errorMessage”: “Your request could not be created. Please check the fields have been correctly filled in. Please provide a value for required field ‘Change type’”,
“i18nErrorMessage”: {
“i18nKey”: “sd.validation.request.creation.failure.required.field”,
“parameters”: [
“Please provide a value for required field ‘Change type’”
]
}
}

Please provide your view on this, may be somewhere I’m doing mistake.

API reference - https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-post

Other method like GET is working fine, I’m able to fetch all the details.

1 answer

0 votes
Mohamed Benziane
Community Champion
May 12, 2020

HI @Rahul_Ray 

It seems that you have a field called "Change Type" that is required and you don't fill it in your code.

Rahul_Ray May 13, 2020

Hi Mohamed_Benziane,

 

Thanks for the response.

I tried to add the Change Type in request body but it is not working.

And also referred the API document, not getting anything like Change Type request parameter.

https://developer.atlassian.com/cloud/jira/service-desk/rest/#api-rest-servicedeskapi-request-post

Mohamed Benziane
Community Champion
May 13, 2020

Can you create a issue using the UI. It pretty sure that you have a change type field in your create screen.

Rahul_Ray May 13, 2020

Yes, I can see it in UI and able to create Issue, It's a required field. But I want to create issue using API through POSTMAN.

Mohamed Benziane
Community Champion
May 14, 2020

You need to put this field in your body. I think you need to put it after the description field.

Suggest an answer

Log in or Sign up to answer