Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get comments for an issue

Returns all comments for an issue. Results can be ordered by the ‘created’ field which means the date a comment was added.

GET/api/2/issue/{issueIdOrKey}/comment
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Path parameters
issueIdOrKeystringrequired

Issue id or key

Query parameters
expandstring

Optional flags: renderedBody (provides body rendered in HTML)

maxResultsstring

How many results on the page should be included. Defaults to 50.

orderBystring

Ordering of the results

startAtstring

The page offset, if not specified then defaults to 0

Responses
200

Returns a collection of comments associated with the issue, with count and pagination information.

commentsCommentJsonBean[]
Show properties
Array of CommentJsonBean
authorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
bodystring
createdstring
idstring
propertiesEntityPropertyBean[]
Show properties
Array of EntityPropertyBean
keystring
valuestring
renderedBodystring
selfstring
updateAuthorUserJsonBean
Show properties
activeboolean
avatarUrlsobject
displayNamestring
emailAddressstring
keystring
namestring
selfstring
timeZonestring
updatedstring
visibilityVisibilityJsonBean
Show properties
typestring
Allowed:grouprole
valuestring
maxResultsinteger<int32>
startAtinteger<int32>
totalinteger<int32>
404

Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.

Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://jira.example.com/rest/api/2/issue/string/comment' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json'
Response
{
  "comments": [
    {
      "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"
      },
      "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.",
      "created": "2012-07-06T18:30:00.000+0000",
      "id": "10000",
      "properties": [
        {
          "key": "issue.support",
          "value": "{\"hipchat.room.id\":\"support-123\",\"support.time\":\"1m\"}"
        }
      ],
      "renderedBody": "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.",
      "self": "http://www.example.com/jira/rest/api/2/issue/10010/comment/10000",
      "updateAuthor": {
        "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"
      },
      "updated": "2012-07-06T18:30:00.000+0000",
      "visibility": {
        "type": "group",
        "value": "jira-software-users"
      }
    }
  ],
  "maxResults": 50,
  "startAt": 0,
  "total": 1
}

Was this page helpful?