Cookie Notice

JIRA REST API documentation

This document describes the REST API and resources provided by JIRA. The REST APIs are for developers who want to integrate JIRA into their application and for administrators who want to script interactions with the JIRA server.

JIRA's REST APIs provide access to resources (data entities) via URI paths. To use a REST API, your application will make an HTTP request and parse the response. Currently, the only supported reponse format is JSON. Your methods will be the standard HTTP methods like GET, PUT, POST and DELETE (see API descriptions below for which methods are available for each resource).

Because the REST API is based on open standards, you can use any web development language to access the API.

Structure of the REST URIs

URIs for JIRA's REST API resource have the following structure:

With context: http://host:port/context/rest/api-name/api-version/resource-name

Or without context: http://host:port/rest/api-name/api-version/resource-name

Currently, the are two api-names available 'api' and 'auth'. REST endpoints in the 'api' path allow you to access most of the information contained within an issue. The current api-version is 2. REST endpoints in the 'auth' path allow you to access information related to authentication. The current api-version is 1.

Example with context: http://myhost.com:8080/jira/rest/api/2/project/JRA

Example without context: http://myhost.com:8080/rest/api/2/project/JRA

How to use expansion in the REST APIs

In order to minimise network traffic from the client perspective, our API uses a technique called expansion.

You can use the 'expand' query parameter to specify a comma-separated list of entities that you want expanded, identifying each entity by a given identifier. For example, the value "comments,worklogs" requests the expansion of entities for which the expand identifier is "comments" and worklogs".

To discover the identifiers for each entity, look at the 'expand' attribute in the parent object. In the JSON example below, the object declares widgets as being expandable.

Note: The 'expand' attribute should not be confused with the 'expand' query parameter which specifies which entities you want expanded.

You can use the dot notation to specify expansion of entities within another entity. For example "children.children" would expand the children and the children's children (because its expand identifier is children) and the child entities within the plugin.

All methods return accept and return JSON exclusively. Example:

{
    "expand": "widgets",
    "self": "http://www.example.com/jira/rest/api/resource/KEY-1",
    "widgets": {
        "widgets": [],
        "size": 5
    }
}

This documents the current REST API provided by JIRA.

Resources

/api/2/resolution/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing the resolution id

Methods

GET

Returns a resolution.

available response representations:

  • 404 [expand]
  • 200 - application/json (resolution) [expand]

/api/2/project

Methods

GET

Returns all projects which are visible for the currently logged in user. If no user is logged in, it returns the list of projects that are visible when using anonymous access.

available response representations:

  • 200 - application/json (projects) [expand]
  • 500 [expand]

/api/2/project/{key}

resource-wide template parameters
parametervaluedescription

key

string

the project key

Methods

GET

Contains a full representation of a project in JSON format.

available response representations:

  • 404 [expand]
  • 200 - application/json (project) [expand]

/api/2/project/{key}/avatars

resource-wide template parameters
parametervaluedescription

key

string

project key

Methods

GET

Returns all avatars which are visible for the currently logged in user.

available response representations:

  • 404 [expand]
  • 200 - application/json (avatars) [expand]
  • 500 [expand]

/api/2/project/{key}/avatar

resource-wide template parameters
parametervaluedescription

key

string

Methods

POST

Converts temporary avatar into a real avatar

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 201 - application/json (avatar) [expand]
  • 400 [expand]
  • 403 [expand]
  • 500 [expand]

PUT

acceptable request representations:

available response representations:

/api/2/project/{key}/avatar/temporary?filename&size

resource-wide template parameters
parametervaluedescription

key

string

Methods

POST

Creates temporary avatar

request query parameters
parametervaluedescription

filename

string

name of file being uploaded

size

long

size of file

available response representations:

  • 404 [expand]
  • 201 - application/json (avatar) [expand]
  • 403 [expand]
  • 500 [expand]

POST

available response representations:

/api/2/project/{key}/avatar/{id}

resource-wide template parameters
parametervaluedescription

id

long

database id for avatar

key

string

Project key

Methods

DELETE

Deletes avatar

available response representations:

  • 204 - application/json [expand]
  • 404 [expand]
  • 403 [expand]

/api/2/project/{key}/versions?expand

resource-wide template parameters
parametervaluedescription

key

string

the project key

Methods

GET

Contains a full representation of a the specified project's versions.

request query parameters
parametervaluedescription

expand

string

available response representations:

  • 404 [expand]
  • 200 - application/json (versions) [expand]

/api/2/project/{key}/components

resource-wide template parameters
parametervaluedescription

key

string

the project key

Methods

GET

Contains a full representation of a the specified project's components.

available response representations:

  • 404 [expand]
  • 200 - application/json (components) [expand]

/api/2/search?jql&startAt&maxResults&fields&expand

Resource for searches.

Methods

GET

Searches for issues using JQL. If the JQL query is too large to be encoded as a query param you should instead POST to this resource.

request query parameters
parametervaluedescription

jql

string

a JQL query string

startAt

int

the index of the first issue to return (0-based)

maxResults

int

the maximum number of issues to return (defaults to 50). The maximum allowable value is dictated by the JIRA property 'jira.search.views.default.max'. If you specify a value that is higher than this number, your search results will be truncated.

fields

string

the list of fields to return for each issue. If null, all fields are returned.

expand

string

the parameters to expand

available response representations:

  • 200 - application/json (searchResults) [expand]
  • 400 [expand]

POST

Performs a search using JQL.

acceptable request representations:

  • application/json (searchRequest) [expand]

available response representations:

  • 200 - application/json (searchResults) [expand]
  • 400 [expand]

/api/2/status/{id}

resource-wide template parameters
parametervaluedescription

id

string

a numeric Status id

Methods

GET

Returns a full representation of the Status having the given id.

available response representations:

  • 404 [expand]
  • 200 - application/json (status) [expand]

/api/2/comment/{id}?render

resource-wide template parameters
parametervaluedescription

id

string

the ID of the comment to request

Methods

GET

Returns a single issue comment.

request query parameters
parametervaluedescription

render

boolean

Default: true

true if text fields should be rendered according to the renderer associated with them; false to return the raw, unrendered data

available response representations:

  • 404 [expand]
  • 200 - application/json (comment) [expand]

/api/2/serverInfo

Methods

GET

Returns general information about the current JIRA server.

available response representations:

  • 200 - application/json (serverInfo) [expand]

/api/2/customFieldOption/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing an custom Field Option id

Methods

GET

Returns a full representation of the custom Field Option that has the given id.

available response representations:

  • 404 [expand]
  • 200 - application/json (customFieldOption) [expand]

/api/2/component

Methods

POST

Create a component via POST. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 201 - application/json [expand]
  • 403 [expand]

/api/2/component/{id}?moveIssuesTo

resource-wide template parameters
parametervaluedescription

id

string

Methods

DELETE

Delete a project component.

request query parameters
parametervaluedescription

moveIssuesTo

string

The new component applied to issues whose 'id' component will be deleted. If this value is null, then the 'id' component is simply deleted.

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 403 [expand]

GET

Returns a project component.

available response representations:

  • 404 [expand]
  • 200 - application/json (component) [expand]

PUT

Modify a component via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored. If leadUserName is an empty string ("") the component lead will be removed.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 [expand]
  • 403 [expand]

/api/2/component/{id}/relatedIssueCounts

resource-wide template parameters
parametervaluedescription

id

string

a String containing the component id

Methods

GET

Returns a project component.

available response representations:

  • 404 [expand]
  • 200 - application/json (issue Count Bean) [expand]

/api/2/application-properties?key

Methods

GET

request query parameters
parametervaluedescription

key

string

available response representations:

/api/2/application-properties/{id}

resource-wide template parameters
parametervaluedescription

id

string

Methods

PUT

acceptable request representations:

available response representations:

/api/2/version

Methods

POST

Create a version via POST.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 201 - application/json [expand]
  • 403 [expand]

/api/2/version/{id}?moveFixIssuesTo&moveAffectedIssuesTo

resource-wide template parameters
parametervaluedescription

id

string

Methods

DELETE

Delete a project version.

request query parameters
parametervaluedescription

moveFixIssuesTo

string

The version to set fixVersion to on issues where the deleted version is the fix version, If null then the fixVersion is removed.

moveAffectedIssuesTo

string

The version to set affectedVersion to on issues where the deleted version is the affected version, If null then the affectedVersion is removed.

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 403 [expand]

GET

Returns a project version.

request query parameters
parametervaluedescription

expand

string

available response representations:

  • 404 [expand]
  • 200 - application/json (project) [expand]

PUT

Modify a version via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 [expand]
  • 403 [expand]

/api/2/version/{id}/relatedIssueCounts

resource-wide template parameters
parametervaluedescription

id

string

a String containing the version id

Methods

GET

Returns a bean containing the number of fixed in and affected issues for the given version.

available response representations:

  • 404 [expand]
  • 200 - application/json (issue Count Bean) [expand]

/api/2/version/{id}/unresolvedIssueCount

resource-wide template parameters
parametervaluedescription

id

string

a String containing the version id

Methods

GET

Returns the number of unresolved issues for the given version

available response representations:

  • 404 [expand]
  • 200 - application/json (issuesUnresolvedCount) [expand]

/api/2/version/{id}/move

resource-wide template parameters
parametervaluedescription

id

string

a String containing the version id

Methods

POST

Modify a version's sequence within a project. The move version bean has 2 alternative field value pairs:

position
An absolute position, which may have a value of 'First', 'Last', 'Earlier' or 'Later'
after
A version to place this version after. The value should be the self link of another version

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 - application/json (project version) [expand]

/api/2/priority/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing the priority id

Methods

GET

Returns an issue priority.

available response representations:

  • 404 [expand]
  • 200 - application/json (issuePriority) [expand]

/api/2/project/{projectKey}/role

resource-wide template parameters
parametervaluedescription

projectKey

string

the project key

Methods

GET

Contains a list of roles in this project with links to full details.

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

/api/2/project/{projectKey}/role/{id}

resource-wide template parameters
parametervaluedescription

projectKey

string

the project key

id

long

the project role id

projectKey

string

the project key

Methods

GET

Details on a given project role.

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

PUT

Updates a project role to contain the sent actors.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

POST

Add an actor to a project role.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

DELETE

Remove actors from a project role.

available response representations:

  • 204 [expand]
  • 404 [expand]

/auth/1/session

Implement a REST resource for acquiring a session cookie.

Methods

POST

Login a user to JIRA.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 200 [expand]
  • 401 [expand]
  • 403 [expand]

GET

Get information about the current user. If the current user is anonymous they will get a permission denied error trying to access this resource. The response contains information about the current user. It will contain their username, login information, and a link to the User Resource for the user.

available response representations:

  • 200 [expand]

DELETE

Log the current user out of JIRA.

available response representations:

  • 204 [expand]
  • 401 [expand]

/api/2/issueType/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing an issue type id

Methods

GET

Returns a full representation of the issue type that has the given id.

available response representations:

  • 404 [expand]
  • 200 - application/json (issueType) [expand]

/api/2/issueLinkType

Rest resource to retrieve a list of issue link types.

Methods

GET

Returns a list of available issue link types, if issue linking is enabled. Each issue link type has an id, a name and a label for the outward and inward link relationship.

available response representations:

  • 404 [expand]
  • 200 - application/json (issueLinkTypes) [expand]

/api/2/issueLinkType/{issueLinkTypeId}

resource-wide template parameters
parametervaluedescription

issueLinkTypeId

string

Methods

GET

Returns for a given issue link type id all information about this issue link type.

available response representations:

  • 404 [expand]
  • 200 - application/json (issueLinkType) [expand]

/api/2/issue

Methods

POST

Creates an issue from a JSON representation.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 200 - application/json (issue) [expand]
  • 400 [expand]

PUT

Edits an issue from a JSON representation. The issue can either be updated by setting explicit the field value(s) or by using an operation to change the field value.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 200 - application/json [expand]
  • 400 [expand]

/api/2/issue/{issueIdOrKey}?fields

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue id or key to request (i.e. JRA-1330)

Methods

GET

Returns a full representation of the issue for the given issue key. An issue JSON consists of the issue key, a collection of fields, a link to the workflow transition sub-resource, and (optionally) the HTML rendered values of any fields that support it (e.g. if wiki syntax is enabled for the description or comments).

request query parameters
parametervaluedescription

fields

string

the list of fields to return for the issue. If null, all fields are returned.

available response representations:

  • 404 [expand]
  • 200 - application/json (issue) [expand]

/api/2/issue/{issueIdOrKey}/transitions

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue you want to transition

Methods

GET

Get a list of the transitions possible for this issue by the current user, along with fields that are required and their types.

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

POST

Perform a transition on an issue. The POST must contain a single JSON Object. It must have a "transition" string and a "fields" object. A "comment" is optional. The comment can be either a simple string or an object with a "body" and "role" or "group".

acceptable request representations:

  • application/json [expand]

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 400 [expand]

/api/2/issue/{issueIdOrKey}/votes

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue to view voting information for

Methods

DELETE

Remove your vote from an issue. (i.e. "unvote")

available response representations:

  • 204 [expand]
  • 404 [expand]

POST

Cast your vote in favour of an issue.

available response representations:

  • 204 [expand]
  • 404 [expand]

GET

A REST sub-resource representing the voters on the issue. This sub-resource is also used for voting and unvoting (via POST and DELETE).

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

/api/2/issue/{issueIdOrKey}/watchers

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

a String containing an issue key

Methods

GET

Returns the list of watchers for the issue with the given key.

available response representations:

  • 404 [expand]
  • 200 - application/json (watchers) [expand]

POST

Adds a user to an issue's watcher list.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 401 [expand]
  • 400 [expand]

DELETE

Removes a user from an issue's watcher list.

request query parameters
parametervaluedescription

username

string

a String containing the name of the user to remove from the watcher list

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 401 [expand]

/api/2/issue/{issueIdOrKey}?deleteSubtasks

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

a String containing an issue id or key

Methods

DELETE

Delete 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.

request query parameters
parametervaluedescription

deleteSubtasks

string

a String of true or false indicating that any subttsks 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.

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 401 [expand]
  • 403 [expand]

/api/2/issue/createmeta?projectIds&projectKeys&issuetypeIds

Methods

GET

Returns the meta data for creating issues. This includes the available projects, issue types and fields, including field types and field requiredness.

Fields will only be returned if expand=projects.issuetypes.fields.

The results can be filtered by project and/or issue type, given by the query params.

request query parameters
parametervaluedescription

projectIds

string

combined with the projectKeys param, lists the projects with which to filter the results. If null, all projects are returned.

projectKeys

string

combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned.

issuetypeIds

string

lists the issue types with which to filter the results. If null, all issue types are returned.

available response representations:

  • 200 - application/json [expand]
  • 400 [expand]
  • 403 [expand]

/api/2/issue/{issueIdOrKey}/editmeta

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue whose edit meta data you want to view

Methods

GET

Returns the meta data for editing an issue.

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

/api/2/issue/{issueIdOrKey}/remotelink

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

Methods

GET

A REST sub-resource representing the remote links on the issue. This sub-resource is also used for creating, updating and deleting links (via POST, PUT and DELETE).

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

POST

Creates a remote issue link from a JSON representation.

acceptable request representations:

available response representations:

  • 200 - application/json (remote issue link) [expand]
  • 400 [expand]

/api/2/issue/{issueIdOrKey}/remotelink/{linkId}

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue to view the remote links for

linkId

string

Methods

GET

A REST sub-resource representing the remote links on the issue. This sub-resource is also used for creating, updating and deleting links (via POST, PUT and DELETE).

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]

/api/2/worklog/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing the work log id

Methods

GET

Returns a work log.

available response representations:

  • 404 [expand]
  • 200 - application/json (worklog) [expand]

/api/2/attachment/{id}

resource-wide template parameters
parametervaluedescription

id

string

the attachment id

Methods

GET

Returns the meta-data for an attachment, including the URI of the actual attached file.

available response representations:

  • 404 [expand]
  • 200 - application/json (attachment) [expand]

/auth/1/websudo

Methods

DELETE

available response representations:

/api/2/user?username

Methods

GET

Returns a user. This resource cannot be accessed anonymously.

request query parameters
parametervaluedescription

username

string

the username

available response representations:

  • 404 [expand]
  • 200 - application/json (user) [expand]
  • 401 [expand]

/api/2/user/search?username

Methods

GET

Returns a list of users that match the search string. This resource cannot be accessed anonymously.

request query parameters
parametervaluedescription

username

string

the username

available response representations:

  • 404 [expand]
  • 200 - application/json (List of users) [expand]
  • 401 [expand]

/api/2/user/assignable/search?username&project

Methods

GET

Returns a list of users that match the search string. This resource cannot be accessed anonymously.

request query parameters
parametervaluedescription

username

string

the username

project

string

the key of the project we are finding assignable users for

available response representations:

  • 404 [expand]
  • 200 - application/json (user) [expand]
  • 401 [expand]

/api/2/user/{username}/avatars

resource-wide template parameters
parametervaluedescription

username

string

username

Methods

GET

Returns all avatars which are visible for the currently logged in user.

available response representations:

  • 404 [expand]
  • 200 - application/json (avatars) [expand]
  • 401 [expand]
  • 500 [expand]

/api/2/user/{username}/avatar

resource-wide template parameters
parametervaluedescription

username

string

Methods

POST

Converts temporary avatar into a real avatar

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 201 - application/json (avatar) [expand]
  • 400 [expand]
  • 403 [expand]
  • 500 [expand]

PUT

acceptable request representations:

available response representations:

/api/2/user/{username}/avatar/temporary?filename&size

resource-wide template parameters
parametervaluedescription

username

string

Methods

POST

Creates temporary avatar

request query parameters
parametervaluedescription

filename

string

name of file being uploaded

size

long

size of file

available response representations:

  • 404 [expand]
  • 201 - application/json (avatar) [expand]
  • 403 [expand]
  • 500 [expand]

POST

available response representations:

/api/2/user/{username}/avatar/{id}

resource-wide template parameters
parametervaluedescription

id

long

database id for avatar

username

string

username

Methods

DELETE

Deletes avatar

available response representations:

  • 204 - application/json [expand]
  • 404 [expand]
  • 403 [expand]

/api/2/issueLink

The Link Issue Resource provides functionality to manage issue links.

Methods

POST

Creates an issue link between two issues. The user requires the link issue permission for the issue which will be linked to another issue. The specified link type in the request is used to create the link and will create a link from the first issue to the second issue using the outward description. It also create a link from the second issue to the first issue using the inward description of the issue link type. It will add the supplied comment to the first issue. The comment can have a restriction who can view it. If group is specified, only users of this group can view this comment, if roleLevel is specified only users who have the specified role can view this comment. The user who creates the issue link needs to belong to the specified group or have the specified role.

acceptable request representations:

  • application/json [expand]

available response representations:

  • 404 [expand]
  • 200 - application/json [expand]
  • 401 [expand]
  • 400 [expand]
  • 500 [expand]

/api/2/issue/{issueIdOrKey}/attachments

Issue attachments

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue that you want to add the attachments to

Methods

POST

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: nocheck with the request, otherwise it will be blocked.

available response representations:

  • 204 [expand]
  • 404 [expand]
  • 403 [expand]
REST endpoint for searching groups in a group picker

/api/2/groups/picker?query

Methods

GET

Returns groups with substrings matching a given query. This is mainly for use with the group picker, so the returned groups contain html to be used as picker suggestions. The groups are also wrapped in a single response object that also contains a header for use in the picker, specifically Showing X of Y matching groups. The number of groups returned is limited by the system property "jira.ajax.autocomplete.limit" The groups will be unique and sorted.

request query parameters
parametervaluedescription

query

string

a String to match groups agains

available response representations:

  • 200 - application/json (groupsuggestions) [expand]
View cookie preferences