Adds one or more temporary attachments that were created using Attach temporary file to a customer request.
The attachment visibility is set by the public
field.
Setting attachment visibility is dependent on the user's permission. For example, Agents can create either public or internal attachments, while Unlicensed users can only create internal attachments, and Customers can only create public attachments.
An additional comment may be provided which will be prepended to the attachments.
string
RequiredThe attachment to be added to the customer request.
array<string>
boolean
AdditionalCommentDTO
Return the newly created attachments.
1
2
3
4
5
6
7
8
9
10
11
12
13
curl --request POST \
--url 'http://{baseurl}/rest/servicedeskapi/request/{issueIdOrKey}/attachment' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"temporaryAttachmentIds": [
"<string>"
],
"public": true,
"additionalComment": {
"body": "<string>"
}
}'
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
{
"comment": {
"id": "<string>",
"body": "<string>",
"public": true,
"author": {
"name": "<string>",
"key": "<string>",
"emailAddress": "<string>",
"displayName": "<string>",
"active": true,
"timeZone": "<string>",
"_links": {}
},
"created": {
"iso8601": "<string>",
"jira": "<string>",
"friendly": "<string>",
"epochMillis": 2154
},
"_links": {
"self": "<string>"
}
},
"attachments": [
{
"filename": "<string>",
"author": {
"name": "<string>",
"key": "<string>",
"emailAddress": "<string>",
"displayName": "<string>",
"active": true,
"timeZone": "<string>",
"_links": {}
},
"created": {
"iso8601": "<string>",
"jira": "<string>",
"friendly": "<string>",
"epochMillis": 2154
},
"size": 2154,
"mimeType": "<string>",
"_links": {
"jiraRest": "<string>",
"content": "<string>",
"thumbnail": "<string>",
"self": "<string>"
}
}
]
}
Create one or more temporary attachments, which can later be converted into permanent attachments on Create attachment.
On successful execution, this resource will return a list of temporary attachment IDs, which are used in subsequent calls to convert the attachments into permanent attachments.
This resource expects a multipart post. 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 a MultiPartEntity that makes it simple to submit a multipart POST.
In order to protect against XSRF attacks, 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, otherwise it will be blocked.
The name of the multipart/form-data parameter that contains attachments must be "file".
A simple example to upload a file called "myfile.txt" in service project with ID 10001
curl -D- -u customer:customer -X POST -H "X-Atlassian-Token: no-check" -F
.
string
RequiredThe files to attach.
array<FilePart>
string
boolean
object
string
integer
string
Returned if the temporary attachment was successfully created.