Get a list of attached files

Use this request to get a list of files attached in the issue description and in the comments below it.

Request format

To get a list of attached files, use the HTTP GET request:

GET /v2/issues/<issue-id>/attachments
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-Id: <organization ID>
Resource
<issue-id>
Issue ID or key.

Request for a list of attached files for the issue with the key JUNE-2:

  • Uses the HTTP GET method.

GET /v2/issues/JUNE-2/attachments HTTP/1.1
Host: https://api.tracker.yandex.net
Authorization: OAuth <OAuth token>
X-Org-Id: <organization ID>

Response format

For a successful request, the API returns a 200 response. The response body contains a JSON array with a list of attached files.

[ 
{
  "self" : "<адрес ресурса API, соответствующего прикрепленному файлу>",
  "id" : "<идентификатор файла>",
  "name" : "<имя файла>",
  "content" : "<адрес для скачивания файла>",
  "thumbnail" : "<адрес для скачивания превью>",
  "createdBy" : {
    "self" : "<ресурс, соответствующий создателю файла>",
    "id" : "<логин создателя>",
    "display" : "<имя создателя>"
  },
  "createdAt" : "<дата и время добавления файла>",
  "mimetype" : "<тип данных файла>",
  "size" : <размер файла>
  "metadata" : {
    "size" : "<геометрический размер (для изображений)>"
  }
}, 
...
]
Response parameters
Parameter Description Data type
self

URL of the API resource that corresponds to the attached file.

String.

id

Unique identifier of the file.

String.

name

Name of the file.

String.

content

URL of the file download resource.

String.

thumbnail

URL of the resource for downloading preview thumbnails. Available for image files only.

String.

createdBy

An object with information about the user who attached the file.

JSON object.

createdAt

Date and time the file was uploaded in the format:

YYYY-MM-DDThh:mm:ss.sss±hhmm

String.

mimetype

File type:

  • text/plain — Text file.

  • image/png — Image in PNG format.

String.

size

File size in bytes.

Integer.

metadata

Object with file metadata.

JSON object.

Fields for the createdBy object
self

URL of the resource corresponding to the user who uploaded the file.

String.

id

User login.

String.

display

The user's name (as shown in the interface).

String.

Fields for the metadata object
size

The size of the image in pixels.

String.

Parameter Description Data type
self

URL of the API resource that corresponds to the attached file.

String.

id

Unique identifier of the file.

String.

name

Name of the file.

String.

content

URL of the file download resource.

String.

thumbnail

URL of the resource for downloading preview thumbnails. Available for image files only.

String.

createdBy

An object with information about the user who attached the file.

JSON object.

createdAt

Date and time the file was uploaded in the format:

YYYY-MM-DDThh:mm:ss.sss±hhmm

String.

mimetype

File type:

  • text/plain — Text file.

  • image/png — Image in PNG format.

String.

size

File size in bytes.

Integer.

metadata

Object with file metadata.

JSON object.

Fields for the createdBy object
self

URL of the resource corresponding to the user who uploaded the file.

String.

id

User login.

String.

display

The user's name (as shown in the interface).

String.

Fields for the metadata object
size

The size of the image in pixels.

String.

Possible response codes

200
The request was successful.
404
The requested object was not found. You might have entered an incorrect object ID or key value.