# Operations with Specific Issue

Resource that provides access to issues.
|  Resource  |     ```GENERIC /api/issues/{issueID} ```    |
| --- | --- |
|  Returned entity  |  [Issue](api-entity-Issue.html). For the description of the entity attributes, see [Supported Fields](#Issue-supported-fields) section.  |
|  Supported methods  |      * `GET`: [Read a Specific Issue](#get-Issue-method).    * `POST`: [Update a Specific Issue](#update-Issue-method).    * `DELETE`: [Delete a Specific Issue](#delete-Issue-method).    |

## Issue attributes

Represents an issue in YouTrack.

### Related Resources

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

* [/api/issues](resource-api-issues.html)

* [/api/issues/{issueID}/links/{linkID}/issues](resource-api-issues-issueID-links-linkID-issues.html)

* [/api/admin/projects/{projectID}/issues](resource-api-admin-projects-projectID-issues.html)

### 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](api-entity-IssueAttachment.html)  |  The list of attachments in the issue.  |
|  comments  |  [Array of IssueComments](api-entity-IssueComment.html)  |  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](api-entity-IssueCustomField.html)  |  The collection of custom fields that are present in the issue. `Read-only`.  |
|  description  |  String  |  The issue description. `Can be null`.  |
|  draftOwner  |  [User](api-entity-User.html)  |  The creator of the draft if the issue is a draft. `null` if the issue is reported. `Read-only`. `Can be null`.  |
|  externalIssue  |  [ExternalIssue](api-entity-ExternalIssue.html)  |  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](api-entity-IssueLink.html)  |  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](api-entity-IssueLink.html)  |  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](api-entity-IssueComment.html)  |  The list of comments that are pinned in the issue. `Read-only`.  |
|  project  |  [Project](api-entity-Project.html)  |  The project where the issue belongs. `Can be null`.  |
|  reporter  |  [User](api-entity-User.html)  |  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](api-entity-IssueLink.html)  |  The list of sub-tasks of the issue. `Read-only`.  |
|  summary  |  String  |  The issue summary. `Can be null`.  |
|  tags  |  [Array of Tags](api-entity-Tag.html)  |  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](api-entity-User.html)  |  The user who last updated the issue. `Read-only`. `Can be null`.  |
|  visibility  |  [Visibility](api-entity-Visibility.html)  |  Visibility settings of the issue. They describe who is allowed to see the issue. `Can be null`.  |
|  voters  |  [IssueVoters](api-entity-IssueVoters.html)  |  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](api-entity-IssueWatchers.html)  |  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`.  |

## Read a Specific Issue

Read an issue with specific ID.

### Required permissions

Requires permissions: Read Issue. If issue visibility is limited to some users or groups, user should be a part of this set or have Override Visibility Restrictions permission. For issue reporter only Create Issue permission is required.

### Request syntax

```GENERIC
GET /api/issues/{issueID}?{fields}
```

|  {issueID}  |  ID of the issue. You can specify either the database ID of the issue (for example, `2-24`) or issue ID in the project (for example, `TST-5`).  |
| --- | --- |

### 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

```CURL
https://example.youtrack.cloud/api/issues/SP-38?fields=id,summary,customFields(id,name,value(avatarUrl,buildLink,color(id),fullName,id,isResolved,localizedName,login,minutes,name,presentation,text))
```

#### Sample response body

```JSON
{
  "summary": "Sprint 3. Task 2",
  "customFields": [
    {
      "value": {
        "localizedName": null,
        "color": {
          "id": "17",
          "$type": "FieldStyle"
        },
        "name": "Normal",
        "id": "67-3",
        "$type": "EnumBundleElement"
      },
      "name": "Priority",
      "id": "92-1",
      "$type": "SingleEnumIssueCustomField"
    },
    {
      "value": {
        "localizedName": null,
        "color": {
          "id": "0",
          "$type": "FieldStyle"
        },
        "name": "Bug",
        "id": "67-5",
        "$type": "EnumBundleElement"
      },
      "name": "Type",
      "id": "92-2",
      "$type": "SingleEnumIssueCustomField"
    },
    {
      "value": {
        "isResolved": false,
        "localizedName": null,
        "color": {
          "id": "0",
          "$type": "FieldStyle"
        },
        "name": "Open",
        "id": "69-1",
        "$type": "StateBundleElement"
      },
      "name": "State",
      "id": "92-3",
      "$type": "StateIssueCustomField"
    },
    {
      "value": {
        "login": "john.doe",
        "avatarUrl": "/hub/api/rest/avatar/cd939d5e-4c15-4080-98cd-0cde0cb3c19f?s=48",
        "fullName": "John Doe",
        "name": "John Doe",
        "id": "1-2",
        "$type": "User"
      },
      "name": "Assignee",
      "id": "94-0",
      "$type": "SingleUserIssueCustomField"
    },
    {
      "value": null,
      "name": "Subsystem",
      "id": "92-0",
      "$type": "SingleOwnedIssueCustomField"
    },
    {
      "value": [],
      "name": "Fix versions",
      "id": "92-4",
      "$type": "MultiVersionIssueCustomField"
    },
    {
      "value": [],
      "name": "Affected versions",
      "id": "92-5",
      "$type": "MultiVersionIssueCustomField"
    },
    {
      "value": null,
      "name": "Fixed in build",
      "id": "92-6",
      "$type": "SingleBuildIssueCustomField"
    }
  ],
  "id": "2-42",
  "$type": "Issue"
}
```

## Update a Specific Issue

Update single issue.

### Required permissions

Requires Create Issue permission for issue's reporter and Update Issue permission otherwise.

### Request syntax

```GENERIC
POST /api/issues/{issueID}?{fields}&{muteUpdateNotifications}
```

|  {issueID}  |  ID of the issue. You can specify either the database ID of the issue (for example, `2-24`) or issue ID in the project (for example, `TST-5`).  |
| --- | --- |

### 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

```CURL
https://example.youtrack.cloud/api/issues/SP-38?fields=id,summary,customFields(id,name,value(avatarUrl,buildLink,color(id),fullName,id,isResolved,localizedName,login,minutes,name,presentation,text))
```

#### Sample request body

```JSON
{
  "summary": "New summary",
  "customFields": [
    {
      "value": {
        "name": "Major"
      },
      "name": "Priority",
      "id": "92-1",
      "$type": "SingleEnumIssueCustomField"
    }
  ]
}
```

#### Sample response body

```JSON
{
  "summary": "New summary",
  "customFields": [
    {
      "value": {
        "localizedName": null,
        "color": {
          "id": "18",
          "$type": "FieldStyle"
        },
        "name": "Major",
        "id": "67-2",
        "$type": "EnumBundleElement"
      },
      "name": "Priority",
      "id": "92-1",
      "$type": "SingleEnumIssueCustomField"
    },
    {
      "value": {
        "localizedName": null,
        "color": {
          "id": "0",
          "$type": "FieldStyle"
        },
        "name": "Bug",
        "id": "67-5",
        "$type": "EnumBundleElement"
      },
      "name": "Type",
      "id": "92-2",
      "$type": "SingleEnumIssueCustomField"
    },
    {
      "value": {
        "isResolved": false,
        "localizedName": null,
        "color": {
          "id": "0",
          "$type": "FieldStyle"
        },
        "name": "Open",
        "id": "69-1",
        "$type": "StateBundleElement"
      },
      "name": "State",
      "id": "92-3",
      "$type": "StateIssueCustomField"
    },
    {
      "value": {
        "login": "john.doe",
        "avatarUrl": "/hub/api/rest/avatar/cd939d5e-4c15-4080-98cd-0cde0cb3c19f?s=48",
        "fullName": "John Doe",
        "name": "John Doe",
        "id": "1-2",
        "$type": "User"
      },
      "name": "Assignee",
      "id": "94-0",
      "$type": "SingleUserIssueCustomField"
    },
    {
      "value": null,
      "name": "Subsystem",
      "id": "92-0",
      "$type": "SingleOwnedIssueCustomField"
    },
    {
      "value": [],
      "name": "Fix versions",
      "id": "92-4",
      "$type": "MultiVersionIssueCustomField"
    },
    {
      "value": [],
      "name": "Affected versions",
      "id": "92-5",
      "$type": "MultiVersionIssueCustomField"
    },
    {
      "value": null,
      "name": "Fixed in build",
      "id": "92-6",
      "$type": "SingleBuildIssueCustomField"
    }
  ],
  "id": "2-42",
  "$type": "Issue"
}
```

## Delete a Specific Issue

Delete the issue. Note that this operation can not be undone.

### Required permissions

Requires permissions: Delete Issue

### Request syntax

```GENERIC
DELETE /api/issues/{issueID}
```

|  {issueID}  |  ID of the issue. You can specify either the database ID of the issue (for example, `2-24`) or issue ID in the project (for example, `TST-5`).  |
| --- | --- |

### 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

```CURL
https://example.youtrack.cloud/api/issues/2-5
```

