Developer Portal for YouTrack and Hub Help

Operations with Specific Issue

This resource lets you work with issues within the particular project.

Resource

/api/admin/projects/{projectID}/issues/{issueID}

Returned entity

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

Supported methods

Issue attributes

Represents an issue in YouTrack.

Related Resources

Below you can find the list of resources that let you work with this entity.

Attributes

This table describes attributes of the Issue entity.

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

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

Field

Type

Description

id

String

The database ID of the issue. Read-only.

attachments

Array of IssueAttachments

The list of attachments in the issue.

comments

Array of IssueComments

A list of comments for the issue.

commentsCount

Int

The number of comments in the issue. Read-only.

created

Long

The timestamp in milliseconds indicating the moment when the issue was created. Stored as a unix timestamp at UTC. Read-only.

customFields

Array of IssueCustomFields

The collection of custom fields that are present in the issue. Read-only.

description

String

The issue description. Can be null.

draftOwner

User

The creator of the draft if the issue is a draft. null if the issue is reported. Read-only. Can be null.

externalIssue

ExternalIssue

Reference to the issue or similar object in an originating third-party system. Read-only. Can be null.

idReadable

String

The issue ID as seen in the YouTrack interface. Read-only.

isDraft

Boolean

true if this issue is a draft, false if it is reported. Read-only.

links

Array of IssueLinks

Issue links (for example, `relates to`, `parent for`, and so on). Read-only.

numberInProject

Long

The issue number in the project. Read-only.

parent

IssueLink

The parent issue for the current one. If the issue is not a sub-task of any issue, then null. Read-only.

pinnedComments

Array of IssueComments

The list of comments that are pinned in the issue. Read-only.

project

Project

The project where the issue belongs. Can be null.

reporter

User

The user who reported (created) the issue. Read-only. Can be null.

resolved

Long

The timestamp in milliseconds indicating the moment when the issue was assigned a state that is considered to be resolved. Stored as a unix timestamp at UTC. null if the issue is still in an unresolved state. Read-only. Can be null.

subtasks

IssueLink

The list of sub-tasks of the issue. Read-only.

summary

String

The issue summary. Can be null.

tags

Array of Tags

The list of tags that are added to the issue.

updated

Long

The timestamp in milliseconds indicating the last update of the issue. Stored as a unix timestamp at UTC. Read-only.

updater

User

The user who last updated the issue. Read-only. Can be null.

visibility

Visibility

Visibility settings of the issue. They describe who is allowed to see the issue. Can be null.

voters

IssueVoters

Object that contains data about voters for the issue and for its duplicates. Read-only.

votes

Int

The sum of votes for this issue and votes for its duplicates. A reporter of a duplicate issue automatically becomes a voter for the main issue. Read-only.

watchers

IssueWatchers

Object that contains data about users watching this issue or its duplicates. Read-only.

wikifiedDescription

String

The issue description as shown in the UI after processing wiki/Markdown markup (including HTML markup). Read-only.

Update a Specific Issue

Update a specific issue in the project.

Required permissions

Requires Create Issue permission for the issue reporter and Update Issue permission otherwise.

Request syntax

POST /api/admin/projects/{projectID}/issues/{issueID}?{fields}&{muteUpdateNotifications}

{issueID}

Database ID of the issue.

Request parameters

Parameter

Type

Description

fields

String

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

muteUpdateNotifications

Boolean

Set this parameter to true if no notifications should be sent on changes made by this request. This doesn't mute notifications sent by any workflow rules. Using this parameter requires Apply Commands Silently permission in all projects affected by the request. Available since 2021.3.

Sample

Sample request

https://example.youtrack.cloud/api/admin/projects/0-6/issues/2-74?fields=id,idReadable,summary,description,customFields(id,name,value(id,name))

Sample request body

{ "summary": "Sample: update an issue in specific project", "description": "This issue is a sample for updating an issue in specific project. Using the `api/admin/projects/:id/issues/:id` endpoint.", "customFields": [ { "value": { "name": "Major", "$type": "EnumBundleElement" }, "name": "Priority", "id": "92-43", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Task", "$type": "EnumBundleElement" }, "name": "Type", "id": "92-44", "$type": "SingleEnumIssueCustomField" } ] }

Sample response body

{ "description": "This issue is a sample for updating an issue in specific project. Using the `api/admin/projects/:id/issues/:id` endpoint.", "customFields": [ { "value": { "name": "Major", "id": "67-2", "$type": "EnumBundleElement" }, "name": "Priority", "id": "92-43", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Task", "id": "67-9", "$type": "EnumBundleElement" }, "name": "Type", "id": "92-44", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Submitted", "id": "69-0", "$type": "StateBundleElement" }, "name": "State", "id": "92-45", "$type": "StateIssueCustomField" }, { "value": null, "name": "Assignee", "id": "94-6", "$type": "SingleUserIssueCustomField" }, { "value": null, "name": "Subsystem", "id": "92-42", "$type": "SingleOwnedIssueCustomField" }, { "value": [], "name": "Fix versions", "id": "92-46", "$type": "MultiVersionIssueCustomField" }, { "value": [], "name": "Affected versions", "id": "92-47", "$type": "MultiVersionIssueCustomField" }, { "value": null, "name": "Fixed in build", "id": "92-48", "$type": "SingleBuildIssueCustomField" } ], "idReadable": "RP-6", "summary": "Sample: update an issue in specific project", "id": "2-74", "$type": "Issue" }

Read a Specific Issue

Read a specific issue in the project.

Request syntax

GET /api/admin/projects/{projectID}/issues/{issueID}?{fields}

{issueID}

Database ID of the issue.

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request

https://example.youtrack.cloud/api/admin/projects/0-6/issues/2-74?fields=id,idReadable,summary,description,customFields(id,name,value(id,name))

Sample response body

{ "description": null, "customFields": [ { "value": { "name": "Normal", "id": "67-3", "$type": "EnumBundleElement" }, "name": "Priority", "id": "92-43", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Bug", "id": "67-5", "$type": "EnumBundleElement" }, "name": "Type", "id": "92-44", "$type": "SingleEnumIssueCustomField" }, { "value": { "name": "Submitted", "id": "69-0", "$type": "StateBundleElement" }, "name": "State", "id": "92-45", "$type": "StateIssueCustomField" }, { "value": null, "name": "Assignee", "id": "94-6", "$type": "SingleUserIssueCustomField" }, { "value": null, "name": "Subsystem", "id": "92-42", "$type": "SingleOwnedIssueCustomField" }, { "value": [], "name": "Fix versions", "id": "92-46", "$type": "MultiVersionIssueCustomField" }, { "value": [], "name": "Affected versions", "id": "92-47", "$type": "MultiVersionIssueCustomField" }, { "value": null, "name": "Fixed in build", "id": "92-48", "$type": "SingleBuildIssueCustomField" } ], "idReadable": "RP-6", "summary": "Another sample for api/admin/projects/:id/issues endpoint", "id": "2-74", "$type": "Issue" }

Delete a Specific Issue

Delete a specific issue in the project.

Request syntax

DELETE /api/admin/projects/{projectID}/issues/{issueID}

{issueID}

Database ID of the issue.

Request parameters

Parameter

Type

Description

fields

String

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

Sample

Sample request

https://example.youtrack.cloud/api/admin/projects/0-6/issues/2-72
Last modified: 7 November 2024