YouTrack InCloud 2019.1 Help

Issue Attachments

Resource

/api/issues/{issueID}/attachments

Returned entity

IssueAttachment. For the description of the entity attributes, see Supported Fields section.

Supported methods

IssueAttachment attributes

Represents a file that is attached to an issue or a comment.

This table describes attributes of the IssueAttachment entity.

  • To receive an attribute in the response from server, specify it explicitly in the request parameter fields.

  • To update an attribute, provide it in the body of a POST request.

Field

Type

Description

name

String

The name of the file. Can be null.

author

User

The user who attached the file to the issue. Read-only. Can be null.

created

Long

The date and time when the attachment was created as a timestamp. Read-only.

updated

Long

The date and time the attachment was last updated as a timestamp. Read-only.

size

Long

The size of the attached file in bytes. Read-only.

extension

String

The extension that defines the file type. Read-only. Can be null.

charset

String

Charset of the file. Read-only. Can be null.

mimeType

String

Mime type of the file. Read-only. Can be null.

metaData

String

The dimensions of an image file. For an image file, the value is rw=&rh=. For a non-image file, the value is empty. Read-only. Can be null.

draft

Boolean

If true, attachment is not yet published, otherwise false. Read-only.

removed

Boolean

If true, then attachments is considered to be removed. Read-only.

base64Content

String

Base64 content of attachment. Can be null.

url

String

URL of the file. Read-only. Can be null.

visibility

Visibility

Access setting of the attachment. Can be null.

issue

Issue

The issue that the file is attached to. Read-only. Can be null.

comment

TODO provide documentation for type

The comment that the file is attached to. Returns null, if the file was attached directly to the issue. Read-only. Can be null.

thumbnailURL

String

URL of the attachment thumbnail. Read-only. Can be null.

Read a List of IssueAttachments

Request syntax

GET /api/issues/{issueID}/attachments?{fields}&{$top}&{$skip}

Request parameters

Parameter

Type

Description

fields

string

A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityID is returned.

$skip

int

Optional. Lets you set a number of returned entities to skip before returning the first one.

$top

int

Optional. Lets you specify the maximum number of entries that are returned in the response.

Add a New IssueAttachment

Create new attachment.

Request syntax

POST /api/issues/{issueID}/attachments?{fields}

Request parameters

Parameter

Type

Description

fields

string

A list of IssueAttachment attributes that should be returned in the response. If no field is specified, only the entityID is returned.

Last modified: 17 May 2019