Skip to end of metadata
Go to start of metadata

You are viewing an old version of this content. View the current version.

Compare with Current View Version History

Version 1 Current »

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:

{
    "temporaryAttachmentIds": [
        "temp5503173652389635234"
    ],
    "public": true,
    "additionalComment": {
        "body": "Please find the screenshot."
    }
}

Note: Temporary attachment id can be added if more attachments need to be attached to the request.

  • No labels