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

Cannot create Customer Request by using REST API

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 Nov 05, 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

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
Site Admin
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...

656 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