This documentation refers to Jira Data Center only. |
Jira has REST APIs and Java APis that you can use to interact with Jira. For example, you may want to integrate your existing application with Jira or write a script to get information from Jira. For more information, check out our reference documentation:
The following authentication methods are supported for the Jira REST APIs:
Jira uses cookie-based authentication in the browser, so you can call the REST API from Javascript on the page and rely on the authentication the browser has established. To reproduce the behavior of the Jira log-in page, you can POST to the /auth/1/session resource. You can use it, for example, to display authentication error messages to users.
Backlog
POST /rest/agile/1.0/backlog/issue Move issues to the backlog. This operation is equivalent to remove future and active sprints from a given set of issues. At most 50 issues may be moved at once. RequestBody parametersissues Array<string> Unique items: Example
|
Boards
|
GET /rest/agile/1.0/epic/none/issue Returns all issues that do not belong to any epic. This only includes issues that the user has permission to view. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank. RequestQuery parametersexpand string jql string maxResults integer validateQuery boolean fields Array<StringList> startAt integer Example
|
POST /rest/agile/1.0/epic/none/issue Removes issues from epics. The user needs to have the edit issue permission for all issue they want to remove from epics. The maximum number of issues that can be moved in one operation is 50. RequestBody parametersissues Array<string> Unique items: Example
|
GET /rest/agile/1.0/epic/{epicIdOrKey} Returns the epic for a given epic Id. This epic will only be returned if the user has permission to view it. RequestPath parametersepicIdOrKey Required string Example
|
POST /rest/agile/1.0/epic/{epicIdOrKey} Performs a partial update of the epic. A partial update means that fields not present in the request JSON will not be updated. Valid values for color are color_1 to color_9. RequestPath parametersepicIdOrKey Required string Body parameterscolor done boolean name string summary string Example
|
GET /rest/agile/1.0/epic/{epicIdOrKey}/issue Returns all issues that belong to the epic, for the given epic Id. This only includes issues that the user has permission to view. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank. RequestPath parametersepicIdOrKey Required string Query parametersexpand string jql string maxResults integer validateQuery boolean fields Array<StringList> startAt integer Example
|
POST /rest/agile/1.0/epic/{epicIdOrKey}/issue Moves issues to an epic, for a given epic id. Issues can be only in a single epic at the same time. That means that already assigned issues to an epic, will not be assigned to the previous epic anymore. The user needs to have the edit issue permission for all issue they want to move and to the epic. The maximum number of issues that can be moved in one operation is 50. RequestPath parametersepicIdOrKey Required string Body parametersissues Array<string> Unique items: Example
|
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:
RequestQuery parametersupdateHistory boolean Body parametersfields historyMetadata properties Array<EntityPropertyBean> transition update Example
|
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. RequestBody parametersissueUpdates Array<IssueUpdateBean> Example
|
DELETE /rest/api/2/issue/{issueIdOrKey} Deletes an issue. If the issue has subtasks you must set the parameter deleteSubtasks=true to delete the issue. You cannot delete an issue without its subtasks also being deleted. RequestPath parametersissueIdOrKey Required string Issue id or key Query parametersdeleteSubtasks string A String of true or false indicating that any subtasks should also be deleted. If the issue has no subtasks this parameter is ignored. If the issue has subtasks and this parameter is missing or false, then the issue will not be deleted and an error will be returned. Example
|
PUT /rest/api/2/issue/{issueIdOrKey}/archive Archives an issue. RequestPath parametersissueIdOrKey Required string Issue id or key Query parametersnotifyUsers string Send the email with notification that the issue was updated to users that watch it. Admin or project admin permissions are required to disable the notification. Example
|
PUT /rest/api/2/issue/{issueIdOrKey}/assignee Assign an issue to a user. RequestPath parametersissueIdOrKey Required string Issue id or key Body parametersactive boolean applicationRoles SimpleListWrapperApplicationRoleBean avatarUrls deleted boolean displayName string emailAddress string expand string groups SimpleListWrapperGroupJsonBean key string lastLoginTime string locale string name string self string Format: timeZone string Example
|
POST /rest/api/2/issue/{issueIdOrKey}/attachments Add one or more attachments to an issue. This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST. In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: no-check with the request, otherwise it will be blocked. The name of the multipart/form-data parameter that contains attachments must be file. A simple example to upload a file called "myfile.txt" to issue TEST-123: curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments RequestPath parametersissueIdOrKey Required string Issue id or key Body parameters
Example
|
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. RequestPath parametersissueIdOrKey Required string Issue id or key Query parametersexpand 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
|
POST /rest/api/2/issue/{issueIdOrKey}/comment Adds a new comment to an issue. RequestPath parametersissueIdOrKey Required string Issue id or key Query parametersexpand string Optional flags: renderedBody (provides body rendered in HTML) Body parametersauthor body string created string id string properties Array<EntityPropertyBean> renderedBody string self string updateAuthor updated string visibility Example
|
PUT /rest/api/2/issue/{issueIdOrKey}/comment/{id} Updates an existing comment using its JSON representation. RequestPath parametersissueIdOrKey Required string Issue id or key id Required string Comment id Query parametersexpand string Optional flags: renderedBody (provides body rendered in HTML) Body parametersauthor body string created string id string properties Array<EntityPropertyBean> renderedBody string self string updateAuthor updated string visibility Example
|
Atlassian's architecture documentation will help you understand Jira fundamentals and get a high-level perspective of Jira's dependencies.
It covers such topics as webhooks, web panels, web fragments, authentication, and templates.
Learn more about Jira architecture