---
ai:
  exclude: true
search:
  tags:
    - issue
    - GET
seo:
  description: >-
    Returns a full representation of the issue… Reference for the GET
    /api/2/issue/{issueIdOrKey} endpoint in the Jira Software Data Center REST
    API Reference.
sidebar:
  label: Get issue for key
  badge: GET
title: Get issue for key
type: openapi-operation
---
Returns a full representation of the issue for the given issue key.
An issue JSON consists of the issue key, a collection of fields,
a link to the workflow transition sub-resource, and (optionally) the HTML rendered values of any fields that support it
(e.g. if wiki syntax is enabled for the description or comments).
The fields param (which can be specified multiple times) gives a comma-separated list of fields
to include in the response. This can be used to retrieve a subset of fields.
A particular field can be excluded by prefixing it with a minus.
By default, all (*all) fields are returned in this get-issue resource. Note: the default is different
when doing a jql search -- the default there is just navigable fields (*navigable).
- *all - include all fields
- *navigable - include just navigable fields
- summary,comment - include just the summary and comments
- -comment - include everything except comments (the default is *all for get-issue)
- *all,-comment - include everything except comments

The &#123;@code properties&#125; param is similar to &#123;@code fields&#125; and specifies a comma-separated list of issue
properties to include. Unlike &#123;@code fields&#125;, properties are not included by default. To include them all
send &#123;@code ?properties=*all&#125;. You can also include only specified properties or exclude some properties
with a minus (-) sign.

- &#123;@code *all&#125; - include all properties
- &#123;@code *all, -prop1&#125; - include all properties except &#123;@code prop1&#125;
- &#123;@code prop1, prop1&#125; - include &#123;@code prop1&#125; and &#123;@code prop2&#125; properties

Jira will attempt to identify the issue by the issueIdOrKey path parameter. This can be an issue id,
or an issue key. If the issue cannot be found via an exact match, Jira will also look for the issue in a case-insensitive way,
by looking to see if the issue was moved. In either of these cases, the request will proceed as normal (a 302 or other redirect
will not be returned). The issue key contained in the response will indicate the current value of issue's key.

The expand param is used to include, hidden by default, parts of response. This can be used to include:

- renderedFields - field values in HTML format
- names - display name of each field
- schema - schema for each field which describes a type of the field
- transitions - all possible transitions for the given issue
- operations - all possibles operations which may be applied on issue
- editmeta - information about how each field may be edited. It contains field's schema as well.
- changelog - history of all changes of the given issue
- versionedRepresentations -
REST representations of all fields. Some field may contain more recent versions. RESET representations are numbered.
The greatest number always represents the most recent version. It is recommended that the most recent version is used.
version for these fields which provide a more recent REST representation.
After including versionedRepresentations "fields" field become hidden.

`GET /api/2/issue/{issueIdOrKey}`

**Responses**

- `200` — Returns a full representation of a Jira issue in JSON format.
- `404` — Returned if the requested issue is not found, or the user does not have permission to view it.

Response example, 200:

```json
{
  "changelog": {
    "histories": [
      {
        "author": {
          "active": true,
          "avatarUrls": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
          "displayName": "Fred F. User",
          "emailAddress": "fred@example.com",
          "key": "fred",
          "name": "Fred",
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "timeZone": "Australia/Sydney"
        },
        "created": "2019-08-24T14:15:22Z",
        "historyMetadata": {
          "activityDescription": "text description",
          "activityDescriptionKey": "plugin.activity.i18.key",
          "actor": {
            "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
            "displayName": "Tony",
            "displayNameKey": "tony",
            "id": "tony",
            "type": "mysystem-user",
            "url": "http://mysystem.com/user/tony"
          },
          "cause": {
            "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
            "displayName": "Tony",
            "displayNameKey": "tony",
            "id": "tony",
            "type": "mysystem-user",
            "url": "http://mysystem.com/user/tony"
          },
          "description": "The issue was created.",
          "descriptionKey": "plugin.changereason.i18.key",
          "emailDescription": "email description",
          "emailDescriptionKey": "plugin.email.i18.key",
          "extraData": {
            "keyvalue": "extra data",
            "goes": "here"
          },
          "generator": {
            "avatarUrl": "http://mysystem.com/avatar/tony.jpg",
            "displayName": "Tony",
            "displayNameKey": "tony",
            "id": "tony",
            "type": "mysystem-user",
            "url": "http://mysystem.com/user/tony"
          },
          "type": "myplugin:type"
        },
        "id": "string",
        "items": [
          {
            "field": "string",
            "fieldtype": "string",
            "from": "string",
            "fromString": "string",
            "to": "string",
            "toString": "string"
          }
        ]
      }
    ],
    "maxResults": 0,
    "startAt": 0,
    "total": 0
  },
  "editmeta": {},
  "fields": {
    "watcher": {
      "self": "http://www.example.com/jira/rest/api/2/issue/EX-1/watchers",
      "isWatching": false,
      "watchCount": 1,
      "watchers": [
        {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        }
      ]
    },
    "attachment": [
      {
        "self": "http://www.example.com/jira/rest/api/2.0/attachments/10000",
        "filename": "picture.jpg",
        "author": {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "key": "JIRAUSER10100",
          "name": "fred",
          "emailAddress": "fred@example.com",
          "avatarUrls": {
            "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
            "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
            "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
            "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
          },
          "displayName": "Fred F. User",
          "active": true,
          "deleted": false,
          "timeZone": "Australia/Sydney",
          "locale": "en_AU",
          "lastLoginTime": "2023-08-30T16:37:01+1000"
        },
        "created": "2024-05-23T14:47:28.592+0000",
        "size": 23123,
        "mimeType": "image/jpeg",
        "content": "http://www.example.com/jira/attachments/10000",
        "thumbnail": "http://www.example.com/jira/secure/thumbnail/10000"
      }
    ],
    "sub-tasks": [
      {
        "id": "10000",
        "type": {
          "id": "10000",
          "name": "",
          "inward": "Parent",
          "outward": "Sub-task"
        },
        "outwardIssue": {
          "id": "10003",
          "key": "EX-2",
          "self": "http://www.example.com/jira/rest/api/2/issue/EX-2",
          "fields": {
            "status": {
              "iconUrl": "http://www.example.com/jira//images/icons/statuses/open.png",
              "name": "Open"
            }
          }
        }
      }
    ],
    "description": "example bug report",
    "project": {
      "self": "http://www.example.com/jira/rest/api/2/project/EX",
      "id": "10000",
      "key": "EX",
      "name": "Example",
      "avatarUrls": {
        "48x48": "http://www.example.com/jira/secure/projectavatar?size=large&pid=10000",
        "24x24": "http://www.example.com/jira/secure/projectavatar?size=small&pid=10000",
        "16x16": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
        "32x32": "http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"
      },
      "projectCategory": {
        "self": "http://www.example.com/jira/rest/api/2/projectCategory/10000",
        "id": "10000",
        "name": "FIRST",
        "description": "First Project Category"
      }
    },
    "comment": [
      {
        "self": "http://www.example.com/jira/rest/api/2/issue/10010/comment/10000",
        "id": "10000",
        "author": {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        },
        "body": "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.",
        "updateAuthor": {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        },
        "created": "2024-05-23T14:47:28.538+0000",
        "updated": "2024-05-23T14:47:28.538+0000",
        "visibility": {
          "type": "role",
          "value": "Administrators"
        }
      }
    ],
    "issuelinks": [
      {
        "id": "10001",
        "type": {
          "id": "10000",
          "name": "Dependent",
          "inward": "depends on",
          "outward": "is depended by"
        },
        "outwardIssue": {
          "id": "10004L",
          "key": "PRJ-2",
          "self": "http://www.example.com/jira/rest/api/2/issue/PRJ-2",
          "fields": {
            "status": {
              "iconUrl": "http://www.example.com/jira//images/icons/statuses/open.png",
              "name": "Open"
            }
          }
        }
      },
      {
        "id": "10002",
        "type": {
          "id": "10000",
          "name": "Dependent",
          "inward": "depends on",
          "outward": "is depended by"
        },
        "inwardIssue": {
          "id": "10004",
          "key": "PRJ-3",
          "self": "http://www.example.com/jira/rest/api/2/issue/PRJ-3",
          "fields": {
            "status": {
              "iconUrl": "http://www.example.com/jira//images/icons/statuses/open.png",
              "name": "Open"
            }
          }
        }
      }
    ],
    "worklog": [
      {
        "self": "http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000",
        "author": {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        },
        "updateAuthor": {
          "self": "http://www.example.com/jira/rest/api/2/user?username=fred",
          "name": "fred",
          "displayName": "Fred F. User",
          "active": false
        },
        "comment": "I did some work here.",
        "updated": "2024-05-23T14:47:28.599+0000",
        "visibility": {
          "type": "group",
          "value": "jira-developers"
        },
        "started": "2024-05-23T14:47:28.598+0000",
        "timeSpent": "3h 20m",
        "timeSpentSeconds": 12000,
        "id": "100028",
        "issueId": "10002"
      }
    ],
    "updated": 1,
    "timetracking": {
      "originalEstimate": "10m",
      "remainingEstimate": "3m",
      "timeSpent": "6m",
      "originalEstimateSeconds": 600,
      "remainingEstimateSeconds": 200,
      "timeSpentSeconds": 400
    }
  },
  "fieldsToInclude": {
    "included": [
      "string"
    ]
  },
  "id": "10000",
  "key": "HSP-1",
  "names": {
    "property1": "string",
    "property2": "string"
  },
  "operations": {
    "linkGroups": [
      {
        "groups": [
          {}
        ],
        "header": {
          "href": "/secure/EditIssue!default.jspa?id=10000",
          "iconClass": "aui-icon aui-icon-small aui-iconfont-edit",
          "id": "edit-issue",
          "label": "Edit",
          "params": "{'iconClass':'aui-icon aui-icon-small aui-iconfont-edit'}",
          "styleClass": "edit-cls",
          "title": "Click to Edit the Issue",
          "weight": 1
        },
        "id": "string",
        "links": [
          {
            "href": "/secure/EditIssue!default.jspa?id=10000",
            "iconClass": "aui-icon aui-icon-small aui-iconfont-edit",
            "id": "edit-issue",
            "label": "Edit",
            "params": "{'iconClass':'aui-icon aui-icon-small aui-iconfont-edit'}",
            "styleClass": "edit-cls",
            "title": "Click to Edit the Issue",
            "weight": 1
          }
        ],
        "styleClass": "string",
        "weight": 0
      }
    ]
  },
  "properties": {
    "properties": {
      "property1": "string",
      "property2": "string"
    }
  },
  "renderedFields": {
    "property1": {},
    "property2": {}
  },
  "schema": {
    "property1": {},
    "property2": {}
  },
  "self": "https://jira.atlassian.com/rest/api/2/issue/10000",
  "transitions": [
    {
      "description": "Close the issue.",
      "fields": {
        "property1": {
          "allowedValues": [
            "red",
            "blue",
            "default value"
          ],
          "autoCompleteUrl": "/rest/api/2/customFieldOption/10000",
          "defaultValue": {},
          "fieldId": "customfield_10000",
          "hasDefaultValue": true,
          "name": "My Multi Select",
          "operations": [
            "set",
            "add"
          ],
          "required": true,
          "schema": {}
        },
        "property2": {
          "allowedValues": [
            "red",
            "blue",
            "default value"
          ],
          "autoCompleteUrl": "/rest/api/2/customFieldOption/10000",
          "defaultValue": {},
          "fieldId": "customfield_10000",
          "hasDefaultValue": true,
          "name": "My Multi Select",
          "operations": [
            "set",
            "add"
          ],
          "required": true,
          "schema": {}
        }
      },
      "id": "2",
      "name": "Close Issue",
      "opsbarSequence": 10,
      "to": {
        "description": "The issue is currently being worked on.",
        "iconUrl": "http://localhost:8090/jira/images/icons/progress.gif",
        "id": "10000",
        "name": "In Progress",
        "self": "http://localhost:8090/jira/rest/api/2.0/status/10000",
        "statusCategory": {
          "colorName": "blue-gray",
          "id": 1,
          "key": "new",
          "name": "To Do",
          "self": "http://localhost:8090/jira/rest/api/2.0/statuscategory/1"
        },
        "statusColor": "green"
      }
    }
  ],
  "versionedRepresentations": {
    "property1": {
      "property1": {},
      "property2": {}
    },
    "property2": {
      "property1": {},
      "property2": {}
    }
  }
}
```
