Add Attachment
Adds one or more attachments to an issue. Attachments are posted as multipart/form-data (RFC 1867).
Note that:
- The request must have a
X-Atlassian-Token: no-check
header, if not it is blocked. See Special headers for more information. - The name of the multipart/form-data parameter that contains the attachments must be
file
.
This operation can be accessed anonymously.
Permissions required:
- Browse Projects and Create attachments project permission for the project that the issue is in.
- If issue-level security is configured, issue-level security permission to view the issue.
Parameters
Parameter | Description |
---|---|
File Identifier | The file identifier of the attachment. You can create a file identifier using the Set File Variable action. |
File Name | The name of the file. |
Issue ID Or Key | The ID or key of the issue. Can be obtained via the List Issues action. |
Example Output
[
{
"self": "http://www.example.com/jira/rest/api/2.0/attachments/10000",
"filename": "picture.jpg",
"author": {
"self": "http://www.example.com/jira/rest/api/2/user?username=fred",
"key": "JIRAUSER10100",
"name": "fred",
"emailAddress": "fred@example.com",
"avatarUrls": {
"48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
"24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
},
"displayName": "Fred F. User",
"active": true,
"deleted": false,
"timeZone": "Australia/Sydney",
"locale": "en_AU"
},
"created": "2022-11-15T02:47:10.492+0000",
"size": 23123,
"mimeType": "image/jpeg",
"content": "http://www.example.com/jira/attachments/10000",
"thumbnail": "http://www.example.com/jira/secure/thumbnail/10000"
},
{
"self": "http://www.example.com/jira/rest/api/2.0/attachments/10001",
"filename": "dbeuglog.txt",
"author": {
"self": "http://www.example.com/jira/rest/api/2/user?username=fred",
"key": "JIRAUSER10100",
"name": "fred",
"emailAddress": "fred@example.com",
"avatarUrls": {
"48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
"24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
"16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
"32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
},
"displayName": "Fred F. User",
"active": true,
"deleted": false,
"timeZone": "Australia/Sydney",
"locale": "en_AU"
},
"created": "2022-11-15T02:47:10.492+0000",
"size": 2460,
"mimeType": "text/plain",
"content": "http://www.example.com/jira/attachments/10001",
"thumbnail": "http://www.example.com/jira/secure/thumbnail/10002"
}
]
Workflow Library Example
Add Attachment with Jira Data Center and Send Results Via Email
Preview this Workflow on desktop