Servicedesk

Attach temporary file

Changed on

This method adds one or more temporary attachments to a service desk, which can then be permanently attached to a customer request using servicedeskapi/request/{issueIdOrKey}/attachment.

Note: It is possible for a service desk administrator to turn off the ability to add attachments to a service desk.

This method expects a multipart request. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides MultiPartEntity.

Because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: no-check with the request or it will be blocked.

The name of the multipart/form-data parameter that contains the attachments must be file.

For example, to upload a file called myfile.txt in the Service Desk with ID 10001 use

curl -D- -u customer:customer -X POST -H "X-ExperimentalApi: opt-in" -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" https://your-domain.atlassian.net/rest/servicedeskapi/servicedesk/10001/attachTemporaryFile

Permissions required: Permission to add attachments in this Service Desk.

post/rest/servicedeskapi/servicedesk/{serviceDeskId}/attachTemporaryFile

Request

Path parameters

serviceDeskIdstring required

The ID of the Service Desk to which the file will be attached. This can alternatively be a project identifier.

Request body multipart/form-data

bytesstring[]
contentTypestring
emptyboolean
inputStreamobject
namestring
originalFilenamestring
sizeinteger

Response

Returns if the file(s) were attached.

Changes

    • info

      added the new optional request property //

    • breaking

      request body became required

    • breaking

      the request's body type changed from string to array, and format from binary to no format

    • info

      added the non-success response with the status