The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

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

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

1 vote
Tansu Akdeniz
Community Champion
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,

DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events