Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Expand
titleGet comments for an issue

GET /rest/api/2/issue/{issueIdOrKey}/comment

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

Request

Path parameters

issueIdOrKey Required

string

Issue id or key

Query parameters

expand

string

Optional flags: renderedBody (provides body rendered in HTML)

maxResults

string

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

orderBy

string

Ordering of the results

startAt

string

The page offset, if not specified then defaults to 0

Example

Code Block
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json

url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/comment"

auth = HTTPBasicAuth("email@example.com", "<api_token>")

headers = {
  "Accept": "application/json"
}

response = requests.request(
   "GET",
   url,
   headers=headers,
   auth=auth
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))


Expand
titleAdd a comment

POST /rest/api/2/issue/{issueIdOrKey}/comment

Adds a new comment to an issue.

Request

Path parameters

issueIdOrKey Required

string

Issue id or key

Query parameters

expand

string

Optional flags: renderedBody (provides body rendered in HTML)

Body parameters

author

UserJsonBean

body

string

created

string

id

string

properties

Array<EntityPropertyBean>

renderedBody

string

self

string

updateAuthor

UserJsonBean

updated

string

visibility

VisibilityJsonBean

Example

Code Block
# This code sample uses the 'requests' library:
# http://docs.python-requests.org
import requests
from requests.auth import HTTPBasicAuth
import json

url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/comment"

auth = HTTPBasicAuth("email@example.com", "<api_token>")

headers = {
  "Accept": "application/json",
  "Content-Type": "application/json"
}

response = requests.request(
   "POST",
   url,
   headers=headers,
   auth=auth
)

print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))




...

Jira architecture

Atlassian's architecture documentation will help you understand Jira fundamentals and get a high-level perspective of Jira's dependencies.

...