• Approval
  • Customer
  • Customer Request
  • Customer Transition
  • Jira Service Management Application
  • Organization
  • Organization Service Desk
  • Portals
  • Queue
  • Queue Settings
  • Request Attachment
  • Request Type
  • Request Type Permissions
  • Service Desk
  • Service Desk Customer
  • application-properties
  • applicationrole
  • attachment
  • avatar
  • cluster
  • comment
  • component
  • configuration
  • customFieldOption
  • customFields
  • dashboard
  • email-templates
  • field
  • filter
  • group
  • groups
  • groupuserpicker
  • index
  • index-snapshot
  • issue
  • issueLinkType
  • issuesecurityschemes
  • issuetype
  • issuetypescheme
  • jql
  • licenseValidator
  • monitoring
  • mypermissions
  • mypreferences
  • myself
  • notificationscheme
  • password
  • permissions
  • permissionscheme
  • priority
  • priorityschemes
  • project
  • projectCategory
  • projects
  • projectvalidate
  • reindex
  • resolution
  • role
  • screens
  • securitylevel
  • serverInfo
  • session
  • settings
  • status
  • statuscategory
  • terminology
  • universal_avatar
  • upgrade
  • user
  • version
  • websudo
  • workflow
  • workflowscheme
  • worklog
  • Assets - AQL
  • Assets - Analytics
  • Assets - Archived Objects
  • Assets - Attachments
  • Assets - Comments
  • Assets - Icons
  • Assets - Index Configuration
  • Assets - Object
  • Assets - Object Archive
  • Assets - Object Attribute
  • Assets - Object Connected Tickets
  • Assets - Object Restore
  • Assets - Object Schema
  • Assets - Object Type
  • Assets - Object Type Attribute
  • Assets - Progress
  • Assets - QR Code
  • Assets - Status Types
Server
Jira Service Management / Reference / REST API

Request Attachment

Postman Collection
OpenAPI
POST

Add attachment

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.

Request

Path parameters

issueIdOrKey

string

Required

Request bodyapplication/json

The attachment to be added to the customer request.

temporaryAttachmentIds

array<string>

public

boolean

additionalComment

AdditionalCommentDTO

Responses

Return the newly created attachments.

application/json

AttachmentCreateResultDTO
POST/servicedeskapi/request/{issueIdOrKey}/attachment
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>" } }'
201Response
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>" } } ] }
POST

Attach temporary files

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.

Request

Path parameters

serviceDeskId

string

Required

Request bodymultipart/form-data

The files to attach.

array<FilePart>

contentType

string

formField

boolean

inputStream

object

name

string

size

integer

value

string

Responses

Returned if the temporary attachment was successfully created.

application/json

CreateTemporaryWebAttachmentResultDTO