Create JIRA Issue with REST API via vrops error code 400
Header Content-Type application/json
-----------------------------------------------------
Boby
{
"fields": {
"project": {
"key": "ISD"
},
"summary": "fix invalid HTML or missing opening",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "paragraph",
"content": [
{
"text": "Sample description",
"type": "text"
}
]
}
]
},
"priority": {
"name": "Low"
},
"customfield_10083": "fix invalid HTML or missing opening",
"issuetype": {
"name": "Email request"
}
}
}
Hello @cherdsit_t ,
Thanks for reaching out, and looking at the screenshot and the details you provided I think the conflict might be on Jira API vs Service Desk API for create issue options.
First you have this question flagged with a jira-service-desk-cloud tag, which is where I am pulling this assumption from so please correct me if this is not the case.
But, looking at the the screenshot in particular it cut off and I cannot see the full end point you're performing the POST on but it looks like you're doing a POST to the create issue dialogue via a POST /rest/api/3/issue, but creating a customer request in a service desk project would be to the endpoint POST /rest/servicedeskapi/request, and the call and body should look more like the EXE from that second link for creating a customer request:
curl --request POST \
--url 'https://your-domain.atlassian.net/rest/servicedeskapi/request' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"requestParticipants": [
"qm:a713c8ea-1075-4e30-9d96-891a7d181739:5ad6d69abfa3980ce712caae"
],
"serviceDeskId": "10",
"requestTypeId": "25",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new *mouse* for my Mac"
}
}'
If this is not the case can you let me know the endpoint you're hitting, and the project type.
Regards,
Earl
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.