Attach temporary file
Changed onThis 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.
Request
- Base URLhttps://your-domain.atlassian.net
- AuthOAuth 2Authorization codehttps://auth.atlassian.com/authorizeToken URLhttps://auth.atlassian.com/oauth/tokenScopeswrite:servicedesk-request
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
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
Response
Returns if the file(s) were attached.
Changes
- info
added the new optional request property
//
- info
- breaking
request body became required
- breaking
the request's body type changed from
stringtoarray, and format frombinaryto no format - info
added the non-success response with the status
- breaking