Create an issue or sub-task from json
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.
/api/2/issueAuthorizationBasic auth · headerrequiredIn order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.
AuthorizationBearer token · headerrequiredPersonal Access Token — Administration > Profile > Personal Access Tokens
AuthorizationBasic auth · headerrequiredIn order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.
updateHistorybooleanapplication/jsonIssue update bean
fieldsobjecthistoryMetadataHistoryMetadataShow propertiesHide properties
activityDescriptionstringactivityDescriptionKeystringactorHistoryMetadataParticipantShow propertiesHide properties
avatarUrlstringdisplayNamestringdisplayNameKeystringidstringtypestringurlstringcauseHistoryMetadataParticipantShow propertiesHide properties
avatarUrlstringdisplayNamestringdisplayNameKeystringidstringtypestringurlstringdescriptionstringdescriptionKeystringemailDescriptionstringemailDescriptionKeystringextraDataobjectgeneratorHistoryMetadataParticipantShow propertiesHide properties
avatarUrlstringdisplayNamestringdisplayNameKeystringidstringtypestringurlstringtypestringpropertiesEntityPropertyBean[]Show propertiesHide properties
EntityPropertyBeankeystringvaluestringtransitionTransitionBeanShow propertiesHide properties
descriptionstringfieldsobjectidstringnamestringopsbarSequenceinteger<int32>toStatusJsonBeanShow propertiesHide properties
descriptionstringiconUrlstringidstringnamestringselfstringstatusCategoryStatusCategoryJsonBeanShow propertiesHide properties
colorNamestringidinteger<int64>keystringnamestringselfstringstatusColorstringupdateobjectReturns a link to the created issue.
idstringkeystringselfstringReturned if the input is invalid (e.g. missing required fields, invalid field values, and so forth).