Versions Compared

Key

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

...

Expand
titleCreate an issue or sub-task from json

POST /rest/api/2/issue

Creates an issue or a sub-task from a JSON representation. The fields that can be set on create, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/createmeta resource. If a field is not configured to appear on the create screen, then it will not be in the createmeta, and a field validation error will occur if it is submitted. Creating a sub-task is similar to creating a regular issue, with two important differences:

  • the issueType field must correspond to a sub-task issue type (you can use /issue/createmeta to discover sub-task issue types), and
  • you must provide a parent field in the issue create request containing the id or key of the parent issue. The updateHistory param adds the project that this issue is created in, to the current user's project history, if set to true (by default, the project history is not updated). You can view the project history in the Jira application, via the Projects dropdown.

Request

Query parameters

updateHistory

boolean
Default: false

Body parameters

fields

object

historyMetadata

HistoryMetadata

properties

Array<EntityPropertyBean>

transition

TransitionBean

update

object

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"

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=(",", ": ")))


Expand
titleCreate an issue or sub-task from json - bulk operation

POST /rest/api/2/issue/bulk

Creates issues or sub-tasks from a JSON representation. Creates many issues in one bulk operation. Creating a sub-task is similar to creating a regular issue. More details can be found in createIssue section.

Request

Body parameters

issueUpdates

Array<IssueUpdateBean>

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/bulk"

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.

...