30.Jira JSD API documentation
1.Create Request API
URL: http://host:port/rest/servicedeskapi/request
Body Parameters (required):
serviceDeskId (ServiceDesk Portal Id)
requestTypeId (Request Type Id)
requestFieldValues
summary
description
requestParticipants
Example:
Request:
{
"serviceDeskId": "2",
"requestTypeId": "8",
"requestFieldValues": {
"summary": "Request JSD help via REST",
"description": "I need a new mouse for my Mac"
},
"requestParticipants": [
"admin"
]
}
Note: The Fields need to be filled in Jira can be passed in the requestFieldValues
2. Create Attachment API
Getting the Create one or more temporary attachments, which can later be converted into permanent attachments on Create attachment.
URL: https://host:port/rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile
Body Parameters (required):
Image file
Example:
Request:
curl -D- -u customer:customer -X POST -H "X-ExperimentalApi: opt-in" -F "file=@myfile.txt" http://host:port/rest/servicedeskapi/servicedesk/serviceDeskId/attachTemporaryFile
Response:
{
"temporaryAttachments": [
{
"temporaryAttachmentId": "temp6457478642300032983",
"fileName": "NetX.png"
}
]
}
Adding one or more temporary attachments that were created using Attach temporary file to a customer request.
URL: http://host:port/rest/servicedeskapi/request/{issueKeyOrId}/attachment
Body Parameters (required):
temporaryAttachmentIds
public
additionalComment
Example:
Request:
Note: Temporary attachment id can be added if more attachments need to be attached to the request.