Create Issue
POST {{baseUrl}}/rest/api/3/issue
Creates an issue or, where the option to create subtasks is enabled in Jira, a subtask. A transition may be applied, to move the issue or subtask to a workflow step other than the default start step, and issue properties set.
The content of the issue or subtask is defined using update
and fields
. The fields that can be set in the issue or subtask are determined using the Get create issue metadata. These are the same fields that appear on the issue's create screen. Note that the description
, environment
, and any textarea
type custom fields (multi-line text fields) take Atlassian Document Format content. Single line custom fields (textfield
) accept a string and don't handle Atlassian Document Format content.
Creating a subtask differs from creating an issue as follows:
-
issueType
must be set to a subtask issue type (use Get create issue metadata to find subtask issue types). -
parent
must contain the ID or key of the parent issue.
In a next-gen project any issue may be made a child providing that the parent and child are members of the same project. In a classic project the parent field is only valid for subtasks.
Permissions required: Browse projects and Create issues project permissions for the project in which the issue or subtask is created.
Request Params
Key | Datatype | Required | Description |
---|---|---|---|
updateHistory | boolean | Whether the project in which the issue is created is added to the user's Recently viewed project list, as shown under Projects in Jira. |
Request Body
{"fields"=>{"project"=>{"key"=>"{{jira_project}}"}, "summary"=>"Creating From Collection", "description"=>{"type"=>"doc", "version"=>1, "content"=>[{"type"=>"paragraph", "content"=>[{"type"=>"text", "text"=>"This is an autogenerated issue from a demo."}]}]}, "issuetype"=>{"name"=>"Task"}}}
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string |