Get attachment metadata

Use this request to get metadata of a file attached to an issue. To download the file contents, use Downloading a file.

GET

https://api.tracker.yandex.net/v3/issues/{issue_id}/attachments/{attachment_id}

Request format

Before making the request, get access to the API.

To get attachment metadata, use an HTTP GET request:

GET /v3/issues/{issue_id}/attachments/{attachment_id}
Host: api.tracker.yandex.net
Authorization: OAuth API_TOKEN
X-Org-ID or X-Cloud-Org-ID: ORGANIZATION_ID
Headers
  • Host: address of the node that provides the API.

  • Authorization: Authorization token about these formats:

    • OAuth OAUTH_TOKEN: For authorization using the OAuth 2.0 protocol. Learn more

    • Bearer IAM_TOKEN: For authorization using an IAM token, if a Yandex Identity Hub organization is linked to Tracker. Learn more

  • ID types

    X-Org-ID or X-Cloud-Org-ID: Organization ID.

    • Use the X-Org-ID header if a Tracker organization is linked to Yandex 360 for Business.

    • Use the X-Cloud-Org-ID header if a Tracker organization is linked to Yandex Identity Hub.

    Finding the ID

    To get the organization ID, go to Administration → Organizations and copy the value from the ID field.

Resource

Required parameters

Parameter Description Data type
issue_id Issue ID or key. String
attachment_id Unique file ID. String or number

Example: Get attachment metadata

GET https://api.tracker.yandex.net/v3/issues/JUNE-2/attachments/4159

Response format

If the request is successful, the API returns a response with code 200 OK.

The response body contains attachment metadata in JSON format.

{
    "self": "https://api.tracker.yandex.net/v3/issues/JUNE-2/attachments/4159",
    "id": "4159",
    "name": "attachment.txt",
    "content": "https://api.tracker.yandex.net/v3/issues/JUNE-2/attachments/4159/attachment.txt",
    "createdBy": {
        "self": "https://api.tracker.yandex.net/v3/users/11********",
        "id": "11********",
        "display": "User Name"
    },
    "createdAt": "2017-06-11T05:11:12.347+0000",
    "mimetype": "text/plain",
    "size": 19090
}

Response parameters

Parameter Description Data type
self URL of the API resource that represents the attachment. String
id Unique file ID. String
name File name. String
content URL for downloading the file. String
createdBy Object with information about the user who attached the file. Object
createdAt File upload date and time. String
mimetype File MIME type. String
size File size in bytes. Integer

Fields of the createdBy object

Parameter Description Data type
self Address of the API resource with information about the user String
id User ID. String
display Displayed user name String
passportUid Unique ID of the user account in the Yandex 360 for Business organization and Yandex ID. Number
cloudUid Unique user ID in Yandex Identity Hub String