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

Cannot create Customer Request by using REST API

Shinsuke Maita November 5, 2021

I referred this site and tried to create a customer request the following command.

curl --request POST \
	--url 'https://{my_instance}.atlassian.net/rest/servicedeskapi/request' \
	--user {my_account}:{my_tokone} \
	--header 'Accept: application/json' \
	--header 'Content-Type: application/json' \
	-d customer_request.json

Also, the above json file is below. 

{
	"serviceDeskId": "1",
	"requestTypeId": "88",
	"requestFieldValues":
	{
		"summary": "Request JSD via REST",
		"description": "This was issued by Jira Cloud REST API."
	}
}

However, the response was below.

{"errorMessages":["There was an error parsing JSON. Check that your request body is valid."]}

Please note that I can execute GET command with my account and token.

Do you have any ideas to fix the issue?

Regards,

1 answer

1 vote
Tansu Akdeniz
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 5, 2021

Hi @Shinsuke Maita 

There is nothing wrong with data indeed. Maybe there is an encoding problem with customer_request.json file? Can you please try the same call on postman?

Best

Shinsuke Maita November 9, 2021

Hi @Tansu Akdeniz 

Thank you for your reply!
I could create customer request on Postman.

Do you know what encoding I should specify the json file?
I have specified UTF-8 and CRLF to it.

Best Regards,

Suggest an answer

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

Upcoming Jira Service Management Events