This documentation refers to Jira Data Center only. This page contains the basic examples. To get all options please navigate to: https://developer.atlassian.com/server/jira/platform/rest/v10004/intro/#gettingstarted
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.
issues
Array<string>
Unique items: TRUE
curl --request POST \ --url 'http://{baseurl}/rest/agile/1.0/backlog/issue' \ --user 'email@example.com:<api_token>' \ --header 'Content-Type: application/json'
Node.js
// This code sample uses the 'node-fetch' library: // https://www.npmjs.com/package/node-fetch const fetch = require('node-fetch'); fetch('http://{baseurl}/rest/agile/1.0/backlog/issue', { method: 'POST', headers: { 'Authorization': `Basic ${Buffer.from( 'email@example.com:<api_token>' ).toString('base64')}`, 'Content-Type': 'application/json' } }) .then(response => { console.log( `Response: ${response.status} ${response.statusText}` ); return response.text(); }) .then(text => console.log(text)) .catch(err => console.error(err));
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/agile/1.0/backlog/issue" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(response.text)
Boards
GET /rest/agile/1.0/board
Returns all boards. This only includes boards that the user has permission to view.
maxResults
integer
Format: int32
name
string
projectKeyOrId
string
type
startAt
integer
Format: int64
Example
curl --request GET \ --url 'http://{baseurl}/rest/agile/1.0/board' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
# 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/agile/1.0/board" 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=(",", ": ")))
200
Returns the requested boards, at the specified page of the results.
400
Returned if the request is invalid.
A schema has not been defined for this response code.
401
Returned if the user is not logged in.
A schema has not been defined for this response code.
POST /rest/agile/1.0/board
Creates a new board. Board name, type and filter Id is required.
filterId
integer
Format: int64
name
string
type
string
curl --request POST \ --url 'http://{baseurl}/rest/agile/1.0/board' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json' \ --header 'Content-Type: application/json'
# 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/agile/1.0/board" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}
Returns a single board, for a given board Id.
boardId Required
integer
Format: int64
Example
curl --request GET \ --url 'http://{baseurl}/rest/agile/1.0/board/{boardId}' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
# 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/agile/1.0/board/{boardId}" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}/backlog
Returns all issues from a board's backlog, for a given board Id.
boardId Required
integer
Format: int64
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
curl --request GET \ --url 'http://{baseurl}/rest/agile/1.0/board/{boardId}/backlog' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
GET /rest/agile/1.0/board/{boardId}/epic
Returns all epics from the board, for the given board Id. This only includes epics that the user has permission to view. Note, if the user does not have permission to view the board, no epics will be returned at all.
boardId Required
integer
Format: int64
maxResults
integer
Format: int32
done
string
startAt
integer
Format: int64
curl --request GET \ --url 'http://{baseurl}/rest/agile/1.0/board/{boardId}/epic' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
# 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/agile/1.0/board/{boardId}/epic" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}/epic/none/issue
Returns all issues that do not belong to any epic on a board, for a given board Id.
boardId Required
integer
Format: int64
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# 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/agile/1.0/board/{boardId}/epic/none/issue" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}/epic/{epicId}/issue
Returns all issues that belong to an epic on the board, for the given epic Id and the board Id.
epicId Required
integer
Format: int64
boardId Required
integer
Format: int64
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# 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/agile/1.0/board/{boardId}/epic/{epicId}/issue" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}/issue
Returns all issues from a board, for a given board Id. This only includes issues that the user has permission to view. Note, if the user does not have permission to view the board, no issues will be returned at all. Issues returned from this resource include Agile fields, like sprint, closedSprints, flagged, and epic. By default, the returned issues are ordered by rank.
boardId Required
integer
Format: int64
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# 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/agile/1.0/board/{boardId}/issue" 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=(",", ": ")))
GET /rest/agile/1.0/board/{boardId}/sprint/{sprintId}/issue
Get all issues you have access to that belong to the sprint from the board. Issue returned from this resource contains additional fields like: sprint, closedSprints, flagged and epic. Issues are returned ordered by rank. JQL order has higher priority than default rank.
sprintId Required
integer
Format: int64
boardId Required
integer
Format: int64
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# 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/agile/1.0/board/{boardId}/sprint/{sprintId}/issue" 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=(",", ": ")))
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.
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# 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/agile/1.0/epic/none/issue" 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=(",", ": ")))
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.
issues
Array<string>
Unique items: true
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/agile/1.0/epic/none/issue" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(response.text)
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.
epicIdOrKey Required
string
# 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/agile/1.0/epic/{epicIdOrKey}" 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=(",", ": ")))
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.
epicIdOrKey Required
string
color
done
boolean
name
string
summary
string
# 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/agile/1.0/epic/{epicIdOrKey}" 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=(",", ": ")))
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.
epicIdOrKey Required
string
expand
string
jql
string
maxResults
integer
Format: int32
validateQuery
boolean
fields
Array<StringList>
startAt
integer
Format: int64
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/agile/1.0/epic/{epicIdOrKey}/issue" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(response.text)
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.
epicIdOrKey Required
string
issues
Array<string>
Unique items: true
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/agile/1.0/epic/{epicIdOrKey}/issue" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(response.text)
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:
updateHistory
boolean
Default: false
fields
historyMetadata
properties
Array<EntityPropertyBean>
transition
update
# 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=(",", ": ")))
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.
issueUpdates
Array<IssueUpdateBean>
# 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=(",", ": ")))
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.
issueIdOrKey Required
string
Issue id or key
deleteSubtasks
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.
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}" auth = HTTPBasicAuth("email@example.com", "<api_token>") response = requests.request( "DELETE", url, auth=auth ) print(response.text)
PUT /rest/api/2/issue/{issueIdOrKey}/archive
Archives an issue.
issueIdOrKey Required
string
Issue id or key
notifyUsers
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.
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/archive" auth = HTTPBasicAuth("email@example.com", "<api_token>") response = requests.request( "PUT", url, auth=auth ) print(response.text)
PUT /rest/api/2/issue/{issueIdOrKey}/assignee
Assign an issue to a user.
issueIdOrKey Required
string
Issue id or key
active
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: uri
timeZone
string
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/assignee" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "PUT", url, headers=headers, auth=auth ) print(response.text)
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
issueIdOrKey Required
string
Issue id or key
Content type | Value | Restrictions |
---|---|---|
multipart/form-data | string | Format: |
# 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}/attachments" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Accept": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
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.
issueIdOrKey Required
string
Issue id or key
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
# 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=(",", ": ")))
POST /rest/api/2/issue/{issueIdOrKey}/comment
Adds a new comment to an issue.
issueIdOrKey Required
string
Issue id or key
expand
string
Optional flags: renderedBody (provides body rendered in HTML)
author
body
string
created
string
id
string
properties
Array<EntityPropertyBean>
renderedBody
string
self
string
updateAuthor
updated
string
visibility
# 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=(",", ": ")))
PUT /rest/api/2/issue/{issueIdOrKey}/comment/{id}
Updates an existing comment using its JSON representation.
issueIdOrKey Required
string
Issue id or key
id Required
string
Comment id
expand
string
Optional flags: renderedBody (provides body rendered in HTML)
author
body
string
created
string
id
string
properties
Array<EntityPropertyBean>
renderedBody
string
self
string
updateAuthor
updated
string
visibility
# 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/{id}" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Accept": "application/json", "Content-Type": "application/json" } response = requests.request( "PUT", url, headers=headers, auth=auth ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
ELETE /rest/api/2/issue/{issueIdOrKey}/comment/{id}
Deletes an existing comment.
issueIdOrKey Required
string
Issue id or key
id Required
string
Comment id
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/comment/{id}" auth = HTTPBasicAuth("email@example.com", "<api_token>") response = requests.request( "DELETE", url, auth=auth ) print(response.text)
GET /rest/api/2/issue/{issueIdOrKey}/subtask
Returns an issue's subtask list
issueIdOrKey Required
string
The parent issue's key or id
# 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}/subtask" 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=(",", ": ")))
GET /rest/api/2/issue/{issueIdOrKey}/transitions
Get a list of the transitions possible for this issue by the current user, along with fields that are required and their types. Fields will only be returned if expand=transitions.fields
. The fields in the metadata correspond to the fields in the transition screen for that transition. Fields not in the screen will not be in the metadata.
issueIdOrKey Required
string
Issue id or key
transitionId
string
Transition id
# 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}/transitions" 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=(",", ": ")))
POST /rest/api/2/issue/{issueIdOrKey}/transitions
Perform a transition on an issue. When performing the transition you can update or set other issue fields. The fields that can be set on transition, in either the fields parameter or the update parameter can be determined using the /rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields resource. If a field is not configured to appear on the transition screen, then it will not be in the transition metadata, and a field validation error will occur if it is submitted. The updateHistory param adds the issues retrieved by this method to the current user's issue history, if set to true (by default, the issue history does not include issues retrieved via the REST API). You can view the issue history in the Jira application, via the Issues dropdown or by using the lastViewed JQL field in an issue search.
issueIdOrKey Required
string
Issue id or key
fields
historyMetadata
properties
Array<EntityPropertyBean>
transition
update
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/transitions" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Content-Type": "application/json" } response = requests.request( "POST", url, headers=headers, auth=auth ) print(response.text)
POST /rest/api/2/issue/{issueIdOrKey}/votes
Adds voter (currently logged user) to particular ticket. You need to be logged in to use this method.
issueIdOrKey Required
string
Issue id.
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/votes" auth = HTTPBasicAuth("email@example.com", "<api_token>") response = requests.request( "POST", url, auth=auth ) print(response.text)
DELETE /rest/api/2/issue/{issueIdOrKey}/votes
Remove your vote from an issue.
issueIdOrKey Required
string
Issue id or key
# This code sample uses the 'requests' library: # http://docs.python-requests.org import requests from requests.auth import HTTPBasicAuth url = "http://{baseurl}/rest/api/2/issue/{issueIdOrKey}/votes" auth = HTTPBasicAuth("email@example.com", "<api_token>") response = requests.request( "DELETE", url, auth=auth ) print(response.text)
ET /rest/api/2/issue/{issueIdOrKey}/worklog
Returns all work logs for an issue. Work logs won't be returned if the Log work field is hidden for the project.
issueIdOrKey Required
string
Issue id or key
# 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}/worklog" 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=(",", ": ")))
GET /rest/api/2/customFields
Returns a list of Custom Fields in the given range.
sortColumn
string
The column by which to sort the returned custom fields.
types
string
A list of custom field types to filter the custom fields.
search
string
A query string used to search custom fields.
maxResults
string
The maximum number of custom fields to return.
sortOrder
string
The order in which to sort the returned custom fields.
screenIds
string
A list of screen IDs to filter the custom fields.
lastValueUpdate
string
The last value update to filter the custom fields.
projectIds
string
A list of project IDs to filter the custom fields.
startAt
string
The starting index of the returned custom fields.
# 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/customFields" 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=(",", ": ")))
DELETE /rest/api/2/customFields
Deletes custom fields in bulk.
ids Required
string
A list of custom field IDs to delete.
# 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/customFields" auth = HTTPBasicAuth("email@example.com", "<api_token>") headers = { "Accept": "application/json" } query = { 'ids': '{ids}' } response = requests.request( "DELETE", url, headers=headers, params=query, auth=auth ) print(json.dumps(json.loads(response.text), sort_keys=True, indent=4, separators=(",", ": ")))
Experimental
GET /rest/api/2/customFields/{customFieldId}/options
Returns custom field's options defined in a given context composed of projects and issue types.
customFieldId Required
string
The ID of the custom field.
maxResults
string
The maximum number of results to return.
issueTypeIds
string
A list of issue type IDs in a context.
query
string
A string used to filter options.
sortByOptionName
string
Flag to sort options by their names.
useAllContexts
string
Flag to fetch all options regardless of context, project IDs, or issue type IDs.
page
string
The page of options to return.
projectIds
string
A list of project IDs in a context.
# 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/customFields/{customFieldId}/options" 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=(",", ": ")))
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.