JIRA 5.0-rc1 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}}

WADL

This documentation in WADL format can be found here: jira-rest-plugin.wadl

Index

This documents the current REST API provided by JIRA.

Resources

/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]

    Returned if the requested user is not found.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"}

    Returns a full representation of a JIRA user in JSON format.

  • 401 [expand]

    Returned if the current user is not authenticated.

/api/2/user/search?username&startAt&maxResults

Methods

GET

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

request query parameters
parametervaluedescription

username

string

A string used to search username, Name or e-mail address

startAt

int

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

maxResults

int

the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated.

available response representations:

  • 404 [expand]

    Returned if the requested user is not found.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"}

    Returns a full representation of a JIRA user in JSON format.

  • 401 [expand]

    Returned if the current user is not authenticated.

/api/2/user/assignable/search?username&project&issueKey&startAt&maxResults

Methods

GET

Returns a list of users that match the search string. This resource cannot be accessed anonymously. Please note that this resource should be called with an issue key when a list of assignable users is retrieved for editing. For create only a project key should be supplied. The list of assignable users may be incorrect if it's called with the project key for editing.

request query parameters
parametervaluedescription

username

string

the username

project

string

the key of the project we are finding assignable users for

issueKey

string

the issue key for the issue being edited we need to find assignable users for.

startAt

int

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

maxResults

int

the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated.

available response representations:

  • 404 [expand]

    Returned if the requested user is not found.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"}

    Returns a full representation of a JIRA user in JSON format.

  • 401 [expand]

    Returned if the current user is not authenticated.

  • 400 [expand]

    Returned if no project or issue key was provided

/api/2/user/viewissue/search?username&issueKey&projectKey&startAt&maxResults

Methods

GET

Returns a list of users that match the search string. This resource cannot be accessed anonymously. Given an issue key this resource will provide a list of users that match the search string and have the browse issue permission for the issue provided.

request query parameters
parametervaluedescription

username

string

the username

issueKey

string

the issue key for the issue being edited we need to find viewable users for.

projectKey

string

the optional project key to search for users with if no issueKey is supplied.

startAt

int

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

maxResults

int

the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated.

available response representations:

  • 404 [expand]

    Returned if the requested user is not found.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"}

    Returns a full representation of a JIRA user in JSON format.

  • 401 [expand]

    Returned if the current user is not authenticated.

  • 400 [expand]

    Returned if no project or issue key was provided

/api/2/user/assignable/multiProjectSearch?username&projectKeys&startAt&maxResults

Methods

GET

Returns a list of users that match the search string and can be assigned issues for all the given projects. This resource cannot be accessed anonymously.

request query parameters
parametervaluedescription

username

string

the username

projectKeys

string

the keys of the projects we are finding assignable users for, comma-separated

startAt

int

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

maxResults

int

the maximum number of users to return (defaults to 50). The maximum allowed value is 1000. If you specify a value that is higher than this number, your search results will be truncated.

available response representations:

  • 404 [expand]

    Returned if the requested user is not found.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"}

    Returns a full representation of a JIRA user in JSON format.

  • 401 [expand]

    Returned if the current user is not authenticated.

/api/2/user/avatars?username

Methods

GET

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

request query parameters
parametervaluedescription

username

string

username

available response representations:

  • 404 [expand]

    Returned if the requested user is not found.

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

    Example
    {"id":1000,"owner":"fred","isSystemAvatar":true,"isSelected":true,"selected":true}

    Returns a map containing a list of avatars for both custom an system avatars

  • 401 [expand]

    Returned if the current user is not authenticated.

  • 500 [expand]

    Returned if an error occurs while retrieving the list of avatars.

/api/2/user/avatar?username

Methods

POST

Converts temporary avatar into a real avatar

request query parameters
parametervaluedescription

username

string

username

acceptable request representations:

  • application/json [expand]

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"needsCropping":false}

available response representations:

  • 404 [expand]

    Returned if the currently authenticated user does not have EDIT PROJECT permission.

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

    Example
    {"id":1000,"owner":"fred","isSystemAvatar":true,"isSelected":true,"selected":true}

    Returns created avatar

  • 400 [expand]

    Returned if the cropping coordinates are invalid

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to pick avatar

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

PUT

request query parameters
parametervaluedescription

username

string

acceptable request representations:

available response representations:

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

Methods

POST

Creates temporary avatar

request query parameters
parametervaluedescription

username

string

username

filename

string

name of file being uploaded

size

long

size of file

available response representations:

  • 404 [expand]

    Returned if the currently authenticated user does not have EDIT PROJECT permission.

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

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"url":"http://example.com/jira/secure/temporaryavatar?cropped=true","needsCropping":true}

    temporary avatar cropping instructions

  • 403 [expand]

    Returned if the request does not conain a valid XSRF token

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

POST

Creates temporary avatar using multipart. The response is sent back as JSON stored in a textarea. This is because the client uses remote iframing to submit avatars using multipart. So we must send them a valid HTML page back from which the client parses the JSON from.

request query parameters
parametervaluedescription

username

string

Username

available response representations:

  • 404 [expand]

    Returned if user does NOT exist

  • 201 - text/html (avatar) [expand]

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"url":"http://example.com/jira/secure/temporaryavatar?cropped=true","needsCropping":true}

    temporary avatar cropping instructions embeded in HTML page. Error messages will also be embeded in the page.

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

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

resource-wide template parameters
parametervaluedescription

id

long

database id for avatar

Methods

DELETE

Deletes avatar

request query parameters
parametervaluedescription

username

string

username

available response representations:

  • 204 - application/json [expand]

    Returned if the avatar is successfully deleted.

  • 404 [expand]

    Returned if the avatar does not exist or the currently authenticated user does not have permission to delete it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to delete the avatar.

/auth/1/websudo

Methods

DELETE

available response representations:

/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/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]

    Returned if the custom Field Option does not exist, or is not visible to the calling user.

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

    Returned if the custom Field Option exists and is visible by the calling user.

/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]

    Returned if the project is not found, or the calling user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"Users":"http://www.example.com/jira/rest/api/2/project/MKY/role/10001","Administrators":"http://www.example.com/jira/rest/api/2/project/MKY/role/10002","Developers":"http://www.example.com/jira/rest/api/2/project/MKY/role/10000"}

    Returned if the project exists and the user has permission to view it. A maps of roles to URIs containing full details for that role.

/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]

    Returned if the project or role is not found, or the calling user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/project/MKY/role/10360","name":"Developers","id":10360,"description":"A project role that represents developers in a project","actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}

    Returned if the project and role exists and the user has permission to view it. Contains the role name, description, and project actors.

PUT

Updates a project role to contain the sent actors.

acceptable request representations:

  • application/json [expand]

    Example
    { "user" : ["admin"] }
          { "group" : ["jira-developers"] }

available response representations:

  • 404 [expand]

    Returned if the actor could not be added to the project role

  • 200 - application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/project/MKY/role/10360","name":"Developers","id":10360,"description":"A project role that represents developers in a project","actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}

    Returned if the project and role exists and the user has permission to view it. Contains the role name, description, and project actors.

POST

Add an actor to a project role.

acceptable request representations:

  • application/json [expand]

    Example
    { "user" : ["admin"] }
          { "group" : ["jira-developers"] }

available response representations:

  • 404 [expand]

    Returned if the actor could not be added to the project role

  • 200 - application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/project/MKY/role/10360","name":"Developers","id":10360,"description":"A project role that represents developers in a project","actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}

    Returned if the project and role exists and the user has permission to view it. Contains the role name, description, and project actors.

DELETE

Remove actors from a project role.

available response representations:

  • 204 [expand]

    Returned if the actor was successfully removed from the project role.

  • 404 [expand]

    Returned if the project or role is not found, the calling user does not have permission to view it, or does not have permission to modify the actors in the project role.

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]

    Returned even if no groups match the given substring

/api/2/issuetype

Methods

GET

Returns a list of all issue types visible to the user

available response representations:

  • 200 - application/json [expand]

    Returned if the issue type exists and is visible by the calling user.

/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]

    Returned if the issue type does not exist, or is not visible to the calling user.

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

    Returned if the issue type exists and is visible by the calling user.

/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]

    Example
    {"type":{"name":"Duplicate"},"inwardIssue":{"key":"HSP-1"},"outwardIssue":{"key":"MKY-1"},"comment":{"body":"Linked related issue!","visibility":{"type":"group","value":"jira-users"}}}

available response representations:

  • 404 [expand]

    If issue linking is disabled or it failed to find one of the issues (issue might exist, but it is not visible for this user) or it failed to find the specified issue link type.

  • 200 - application/json [expand]

    if the issue link was created successfully.

  • 401 [expand]

    if the user does not have the link issue permission for the issue, which will be linked to another issue.

  • 400 [expand]

    if it can't create the supplied comment. The response will contain an error message indicating why it failed to create the comment. No issue link will be created if it failed to create the comment.

  • 500 [expand]

    if an error occurred when creating the issue link or the comment.

Resource for searches.

/api/2/filter/{id}

resource-wide template parameters
parametervaluedescription

id

long

the id of the filter being looked up

Methods

GET

Returns a filter given an id

available response representations:

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"A sample filter description","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true}

    Returns a JSON representation of a filter

  • 400 [expand]

    Returned if there is a problem looking up the filter given the id

/api/2/filter/favourite

Methods

GET

Returns the favourite filters of the logged-in user.

available response representations:

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

    Example
    [{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"A sample filter description","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true},{"self":"http://www.example.com/jira/rest/api/2/filter/10010","id":"10010","name":"My issues","description":"Issues assigned to me","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"16x16":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user"},{"name":"jira-admin"},{"name":"important"}]},"expand":"groups"},"jql":"assignee = currentUser() and resolution is empty","viewUrl":"http://www.example.com/jira/secure/IssueNavigator.jspa?mode=hide&requestId=10010","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=assignee+%3D+currentUser%28%29+and+resolution+is+empty","favourite":true}]

    Returns a JSON representation of a list of filters

  • 400 [expand]

    Returned if there is a problem looking up the filter given the id

/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]

    Example
    [{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"16x16":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000"}},{"self":"http://www.example.com/jira/rest/api/2/project/ABC","id":"10001","key":"ABC","name":"Alphabetical","avatarUrls":{"16x16":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10001","48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10001"}}]

    Returns a list of projects for which the user has the BROWSE, ADMINISTER or PROJECT_ADMIN project permission.

  • 500 [expand]

    Returned if an error occurs while retrieving the list of projects.

/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]

    Returned if the project is not found, or the calling user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","description":"This project was created as an example for REST.","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"components":[{"self":"http://www.example.com/jira/rest/api/2/component/10000","id":"10000","name":"Component 1","description":"This is a JIRA component","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false}],"url":"http://www.example.com/jira/browse/EX","assigneeType":"PROJECT_LEAD","versions":[],"name":"Example","roles":{"Developers":"http://www.example.com/jira/rest/api/2/project/EX/role/10000"},"avatarUrls":{"16x16":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000"}}

    Returned if the project exists and the user has permission to view it. Contains a full representation of a project in JSON format.

/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]

    Returned if the currently authenticated user does not have VIEW PROJECT permission.

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

    Example
    {"id":1000,"owner":"fred","isSystemAvatar":true,"isSelected":true,"selected":true}

    Returns a map containing a list of avatars for both custom an system avatars, which the user has the BROWSE project permission.

  • 500 [expand]

    Returned if an error occurs while retrieving the list of avatars.

/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]

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"needsCropping":false}

available response representations:

  • 404 [expand]

    Returned if the currently authenticated user does not have EDIT PROJECT permission.

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

    Example
    {"id":1000,"owner":"fred","isSystemAvatar":true,"isSelected":true,"selected":true}

    Returns created avatar

  • 400 [expand]

    Returned if the cropping coordinates are invalid

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to pick avatar

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

PUT

acceptable request representations:

available response representations:

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

resource-wide template parameters
parametervaluedescription

key

string

Project key

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]

    Returned if the currently authenticated user does not have EDIT PROJECT permission.

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

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"url":"http://example.com/jira/secure/temporaryavatar?cropped=true","needsCropping":true}

    temporary avatar cropping instructions

  • 400 [expand]

    Valiation failed. For example filesize is beyond max attachment size.

  • 403 [expand]

    Returned if the request does not conain a valid XSRF token

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

POST

Creates temporary avatar using multipart. The response is sent back as JSON stored in a textarea. This is because the client uses remote iframing to submit avatars using multipart. So we must send them a valid HTML page back from which the client parses the JSON from.

available response representations:

  • 404 [expand]

    Returned if the currently authenticated user does not have EDIT PROJECT permission.

  • 201 - text/html (avatar) [expand]

    Example
    {"cropperWidth":120,"cropperOffsetX":50,"cropperOffsetY":50,"url":"http://example.com/jira/secure/temporaryavatar?cropped=true","needsCropping":true}

    temporary avatar cropping instructions embeded in HTML page. Error messages will also be embeded in the page.

  • 500 [expand]

    Returned if an error occurs while converting temporary avatar to real avatar

/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]

    Returned if the avatar is successfully deleted.

  • 404 [expand]

    Returned if the avatar does not exist or the currently authenticated user does not have permission to delete it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to delete the component.

/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]

    Returned if the project is not found, or the calling user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","overdue":true,"userReleaseDate":"5/Jul/2010","releaseDate":"2010-07-05","released":true,"archived":false}

    Returned if the project exists and the user has permission to view its versions. Contains a full representation of the project's versions in JSON format.

/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]

    Returned if the project is not found, or the calling user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/component/10000","id":"10000","name":"Component 1","description":"This is a JIRA component","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false}

    Returned if the project exists and the user has permission to view its components. Contains a full representation of the project's components in JSON format.

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

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 REST-123:

curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: nocheck" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments

available response representations:

  • 404 [expand]

    Returned if the requested issue is not found, the user does not have permission to view it, or if the attachments exceeds the maximum configured attachment size.

  • 200 - application/json [expand]

    Example
    [{"self":"http://www.example.com/jira/rest/api/2.0/attachments/10000","filename":"picture.jpg","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.054-0600","size":23123,"mimeType":"image/jpeg","content":"http://www.example.com/jira/attachments/10000","thumbnail":"http://www.example.com/jira/secure/thumbnail/10000"},{"self":"http://www.example.com/jira/rest/api/2.0/attachments/10001","filename":"dbeuglog.txt","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.054-0600","size":2460,"mimeType":"text/plain","content":"http://www.example.com/jira/attachments/10001","thumbnail":"http://www.example.com/jira/secure/thumbnail/10002"}]

  • 403 [expand]

    Returned if attachments is disabled or if you don't have permission to add attachments to this issue.

/api/2/securitylevel/{id}

resource-wide template parameters
parametervaluedescription

id

string

a String containing an issue security level id

Methods

GET

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

available response representations:

  • 404 [expand]

    Returned if the issue type does not exist, or is not visible to the calling user.

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

    Returned if the issue type exists and is visible by the calling user.

/api/2/priority

Methods

GET

Returns a list of all priorities.

available response representations:

  • 200 - application/json (list of priorities) [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/priority/3","statusColor":"#009900","description":"Major loss of function.","iconUrl":"http://www.example.com/jira/images/icons/priority_major.gif","name":"Major"}

    Returned if the priorities exists and the user has permission to view it. Contains a full representation of the priority in JSON format.

/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]

    Returned if the issue priority does not exist or is not visible to the calling user.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/priority/3","statusColor":"#009900","description":"Major loss of function.","iconUrl":"http://www.example.com/jira/images/icons/priority_major.gif","name":"Major"}

    Returned if the issue priority exists and is visible by the calling user. Contains a full representation of the issue priority in JSON.

/api/2/dashboard?filter&startAt&maxResults

The /dashboard resource.

Methods

GET

Returns a list of all dashboards, optionally filtering them.

request query parameters
parametervaluedescription

filter

string

an optional filter that is applied to the list of dashboards. Valid values include "favourite" for returning only favourite dashboards, and "my" for returning dashboards that are owned by the calling user.

startAt

int

the index of the first dashboard to return (0-based). must be 0 or a multiple of maxResults

maxResults

int

a hint as to the the maximum number of dashboards to return in each call. Note that the JIRA server reserves the right to impose a maxResults limit that is lower than the value that a client provides, dues to lack or resources or any other condition. When this happens, your results will be truncated. Callers should always check the returned maxResults to determine the value that is effectively being used.

available response representations:

  • 200 [expand]

    Example
    {"startAt":10,"maxResults":10,"total":143,"prev":"http://www.example.com/jira/rest/api/2/dashboard?startAt=0","next":"http://www.example.com/jira/rest/api/2/dashboard?startAt=10","dashboards":[{"id":"10000","name":"System Dashboard","self":"http://www.example.com/jira/rest/api/2/dashboard/10000","view":"http://www.example.com/jira/secure/Dashboard.jspa?selectPageId=10000"},{"id":"20000","name":"Build Engineering","self":"http://www.example.com/jira/rest/api/2/dashboard/20000","view":"http://www.example.com/jira/secure/Dashboard.jspa?selectPageId=20000"}]}

    Returns a list of dashboards.

/api/2/dashboard/{id}

resource-wide template parameters
parametervaluedescription

id

string

the dashboard id

Methods

GET

Returns a single dashboard.

available response representations:

  • 404 [expand]

    Returned if there is no dashboard with the specified id, or if the user does not have permission to see it.

  • 200 [expand]

    Example
    {"id":"10000","name":"System Dashboard","self":"http://www.example.com/jira/rest/api/2/dashboard/10000","view":"http://www.example.com/jira/secure/Dashboard.jspa?selectPageId=10000"}

    Returns a single dashboard.

/api/2/status

Methods

GET

Returns a list of all statuses

available response representations:

  • 404 [expand]

    Returned if the requested issue status is not found, or the user does not have permission to view it.

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

    Example
    [{"self":"http://localhost:8090/jira/rest/api/2.0/status/10000","description":"The issue is currently being worked on.","iconUrl":"http://localhost:8090/jira/images/icons/progress.gif","name":"In Progress","id":"10000"},{"self":"http://localhost:8090/jira/rest/api/2.0/status/5","description":"The issue is closed.","iconUrl":"http://localhost:8090/jira/images/icons/closed.gif","name":"Closed","id":"5"}]

    Returns a list of all JIRA issue statuses in JSON format, that are visible to the user.

/api/2/status/{idOrName}

resource-wide template parameters
parametervaluedescription

idOrName

string

a numeric Status id or a status name

Methods

GET

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

available response representations:

  • 404 [expand]

    Returned if the requested issue status is not found, or the user does not have permission to view it.

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

    Example
    {"self":"http://localhost:8090/jira/rest/api/2.0/status/10000","description":"The issue is currently being worked on.","iconUrl":"http://localhost:8090/jira/images/icons/progress.gif","name":"In Progress","id":"10000"}

    Returns a full representation of a JIRA issue status in JSON format.

/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]

    Returned if issue linking is disabled.

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

    Example
    {"issueLinkTypes":[{"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"},{"id":"1010","name":"Blocks","inward":"Blocked by","outward":"Blocks","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1010"}]}

    Returns a list of all available issue link types.

/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]

    Returned if issue linking is disabled or no issue link type with the given id exists.

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

    Example
    {"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"}

    Returns the issue link type with the given id.

/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]

    Example
    {"name":"Component 1","description":"This is a JIRA component","leadUserName":"fred","assigneeType":"PROJECT_LEAD","isAssigneeTypeValid":false,"project":"PXA"}

available response representations:

  • 404 [expand]

    Returned if the component does not exist or the currently authenticated user does not have permission to view it.

  • 201 - application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/component/10000","id":"10000","name":"Component 1","description":"This is a JIRA component","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false}

    Returned if the component is created successfully.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to edit the component.

/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]

    Returned if the component is successfully deleted.

  • 404 [expand]

    Returned if the component does not exist or the currently authenticated user does not have permission to view it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to delete the component.

GET

Returns a project component.

available response representations:

  • 404 [expand]

    Returned if there is no component with the given key, or if the calling user does not have permission to view the component.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/component/10000","id":"10000","name":"Component 1","description":"This is a JIRA component","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false}

    Returns a full JSON representation of a project component.

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]

    Example
    {"name":"Component 1","description":"This is a JIRA component","leadUserName":"fred","assigneeType":"PROJECT_LEAD","isAssigneeTypeValid":false}

available response representations:

  • 404 [expand]

    Returned if the component does not exist or the currently authenticated user does not have permission to view it.

  • 200 [expand]

    Returned if the component exists and the currently authenticated user has permission to edit it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to edit the component.

/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]

    Returned if the component does not exist or the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/component/10000","issueCount":23}

    Returned if the component exists and the currently authenticated user has permission to view it. Contains counts of issues fixed in and affecting this component.

/api/2/version

Methods

POST

Create a version via POST.

acceptable request representations:

  • application/json [expand]

    Example
    {"description":"An excellent version","name":"New Version 1","userReleaseDate":"5/Jul/2010","project":"PXA","releaseDate":"2010-07-05","released":true,"archived":false}

available response representations:

  • 404 [expand]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

  • 201 - application/json [expand]

    Example
    {"description":"An excellent version","name":"New Version 1","userReleaseDate":"5/Jul/2010","project":"PXA","releaseDate":"2010-07-05","released":true,"archived":false}

    Returned if the version is created successfully.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to edit the version.

/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]

    Returned if the version is successfully deleted.

  • 404 [expand]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to delete the version.

GET

Returns a project version.

request query parameters
parametervaluedescription

expand

string

available response representations:

  • 404 [expand]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","overdue":true,"userReleaseDate":"5/Jul/2010","releaseDate":"2010-07-05","released":true,"archived":false}

    Returned if the version exists and the currently authenticated user has permission to view it. Contains a full representation of the version.

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]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","overdue":true,"userReleaseDate":"5/Jul/2010","releaseDate":"2010-07-05","released":true,"archived":false}

available response representations:

  • 404 [expand]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

  • 200 [expand]

    Returned if the version exists and the currently authenticated user has permission to edit it.

  • 403 [expand]

    Returned if the currently authenticated user does not have permission to edit the version.

/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]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","issuesFixedCount":23,"issuesAffectedCount":101}

    Returned if the version exists and the currently authenticated user has permission to view it. Contains counts of issues fixed in and affecting this version.

/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]

    Returned if the version does not exist or the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","issuesUnresolvedCount":23}

    Returned if the version exists and the currently authenticated user has permission to view it. Contains counts of issues unresolved in this version.

/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]

    Example
    {"after":"http://www.example.com/jira/rest/api/2/version/10000"}

available response representations:

  • 404 [expand]

    Returned if the version, or target of the version to move after does not exist or the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","overdue":true,"userReleaseDate":"5/Jul/2010","releaseDate":"2010-07-05","released":true,"archived":false}

    Returned if the version exists and the currently authenticated user has permission to view it. Contains a full representation of the version moved.

/api/2/attachment/{id}

resource-wide template parameters
parametervaluedescription

id

string

the id of the attachment to ddelete.

Methods

GET

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

available response representations:

  • 404 [expand]

    Returned if the attachment with the given id does not exist, or is not accessible by the calling user.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/attachments/10000","filename":"picture.jpg","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.054-0600","size":23123,"mimeType":"image/jpeg","content":"http://www.example.com/jira/attachments/10000","thumbnail":"http://www.example.com/jira/secure/thumbnail/10000"}

    Returns a JSON representation of the attachment meta-data. The representation does not contain the attachment itself, but contains a URI that can be used to download the actual attached file.

DELETE

Remove an attachment from an issue.

available response representations:

  • 204 [expand]

    Returned if successful.

  • 404 [expand]

    Returned if the attachment is not found

  • 403 [expand]

    Returned if attachments is disabled or if you don't have permission to remove attachments from this issue.

/api/2/attachment/meta

Methods

GET

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

available response representations:

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

    Example
    {"enabled":true,"uploadLimit":1000000}

    Returns a JSON representation of the attachment capabilities. Consumers of this resource may also need to check if the logged in user has permission to upload or otherwise manipulate attachments using the {@link com.atlassian.jira.rest.v2.permission.PermissionsResource}.

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

Resource for searches.

Methods

GET

Searches for issues using JQL.

Sorting the jql parameter is a full JQL expression, and includes an ORDER BY clause.

The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus.

By default, only navigable (*navigable) fields are returned in this search resource. Note: the default is different in the get-issue resource -- the default there all fields (*all).

  • *all - include all fields
  • *navigable - include just navigable fields
  • summary,comment - include just the summary and comments
  • -description - include navigable fields except the description (the default is *navigable for search)
  • *all,-comment - include everything except comments

GET vs POST: 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. By defailt, all navigable fields are returned.

expand

string

the parameters to expand

available response representations:

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

    Example
    {"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"","id":"10001","self":"http://www.example.com/jira/rest/api/2/issue/10001","key":"HSP-1","changelog":"TODO"}]}

    Returns a JSON representation of the search results.

  • 400 [expand]

    Returned if there is a problem with the JQL query.

POST

Performs a search using JQL.

acceptable request representations:

  • application/json (searchRequest) [expand]

    Example
    {"jql":"project = HSP","startAt":0,"maxResults":15,"fields":["summary","status","assignee"]}

available response representations:

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

    Example
    {"expand":"names,schema","startAt":0,"maxResults":50,"total":1,"issues":[{"expand":"","id":"10001","self":"http://www.example.com/jira/rest/api/2/issue/10001","key":"HSP-1","changelog":"TODO"}]}

    Returns a JSON representation of the search results.

  • 400 [expand]

    Returned if there is a problem with the JQL query.

/api/2/issue

Methods

POST

Creates an issue from a JSON representation.

acceptable request representations:

  • application/json [expand]

    Example
    {"update":{"worklog":[{"add":{"started":"2011-07-05T11:05:00.000+0000","timeSpent":"60m"}}]},"fields":{"project":{"id":"10000"},"summary":"something's wrong","issuetype":{"id":"10000"},"assignee":{"name":"homer"},"reporter":{"name":"smithers"},"priority":{"id":"20000"},"labels":["bugfix","blitz_test"],"timetracking":{"originalEstimate":"10","remainingEstimate":"5"},"security":{"id":"10000"},"versions":[{"id":"10000"}],"environment":"environment","description":"description","duedate":"2011-03-11","fixVersions":[{"id":"10001"}],"components":[{"id":"10000"}],"customfield_60000":"jira-developers","customfield_20000":"06/Jul/11 3:25 PM","customfield_40000":"this is a text field","customfield_30000":["10000","10002"],"customfield_70000":["jira-administrators","jira-users"],"customfield_50000":"this is a text area. big text.","customfield_10000":"09/Jun/81"}}

available response representations:

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

    Example
    {"id":"10000","key":"TST-24","self":"http://www.example.com/jira/rest/api/2/issue/10000"}

    Returns a link to the created issue.

  • 400 [expand]

    Example
    {"errorMessages":["Field 'priority' is required"],"errors":{}}

    Returned if the input is invalid (e.g. missing required fields, invalid field values, and so forth).

/api/2/issue/{issueIdOrKey}/comment

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

a string containing the issue id or key the comment will be added to

Methods

GET

Returns all comments for an issue.

available response representations:

  • 404 [expand]

    Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}]}

    returns a collection of comments associated with the issue, with count and pagination information.

POST

Adds a new comment to an issue.

acceptable request representations:

  • application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}

available response representations:

  • 201 [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}

    Returned if add was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

/api/2/issue/{issueIdOrKey}/comment/{id}

resource-wide template parameters
parametervaluedescription

id

string

id of the comment to be deleted

issueIdOrKey

string

a string containing the issue id or key the comment belongs to

Methods

GET

Returns all comments for an issue.

available response representations:

  • 404 [expand]

    Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}]}

    returns a collection of comments associated with the issue, with count and pagination information.

PUT

Updates an existing comment using its JSON representation.

acceptable request representations:

  • application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}

available response representations:

  • 200 [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}

    Returned if update was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

DELETE

Deletes an existing comment .

available response representations:

  • 204 [expand]

    Returned if delete was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

/api/2/issue/{issueIdOrKey}/assignee

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

a String containing an issue key

Methods

PUT

Assigns an issue to a user. You can use this resource to assign issues when the user submitting the request has the assign permission but not the edit issue permission.

acceptable request representations:

  • application/json [expand]

    Example
    {"name":"harry"}

available response representations:

  • 204 [expand]

    Returned if the issue is successfully assigned.

  • 404 [expand]

    Returned if either the issue or the user does not exist.

  • 401 [expand]

    Returned if the calling user does not have permission to assign the issue.

  • 400 [expand]

    Returned if there is a problem with the received user representation.

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

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue id or key to update (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).

The fields param (which can be specified multiple times) gives a comma-separated list of fields to include in the response. This can be used to retrieve a subset of fields. A particular field can be excluded by prefixing it with a minus.

By default, all (*all) fields are returned in this get-issue resource. Note: the default is different when doing a jql search -- the default there is just navigable fields (*navigable).

  • *all - include all fields
  • *navigable - include just navigable fields
  • summary,comment - include just the summary and comments
  • -comment - include everything except comments (the default is *all for get-issue)
  • *all,-comment - include everything except comments

request query parameters
parametervaluedescription

fields

string

the list of fields to return for the issue. By default, all fields are returned.

expand

string

available response representations:

  • 404 [expand]

    Returned if the requested issue is not found, or the user does not have permission to view it.

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

    Example
    {"expand":"renderedFields,names,schema,transitions,editmeta","id":"10002","self":"http://www.example.com/jira/rest/api/2/issue/10002","key":"EX-1","fields":{"sub-tasks":[{"type":{"id":"10000","name":"","inward":"Parent","outward":"Sub-task"},"outwardIssue":{"id":"10003","key":"EX-2","self":"http://www.example.com/jira/rest/api/2/issue/EX-2","fields":{"status":{"iconUrl":"http://www.example.com/jira//images/icons/status_open.gif","name":"Open"}}}}],"timetracking":{"timeoriginalestimate":10,"timeestimate":3,"timespent":6},"project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"16x16":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000"}},"updated":1,"description":"example bug report","issuelinks":[{"type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"outwardIssue":{"id":"10004L","key":"PRJ-2","self":"http://www.example.com/jira/rest/api/2/issue/PRJ-2","fields":{"status":{"iconUrl":"http://www.example.com/jira//images/icons/status_open.gif","name":"Open"}}}},{"type":{"id":"10000","name":"Dependent","inward":"depends on","outward":"is depended by"},"inwardIssue":{"id":"10004","key":"PRJ-3","self":"http://www.example.com/jira/rest/api/2/issue/PRJ-3","fields":{"status":{"iconUrl":"http://www.example.com/jira//images/icons/status_open.gif","name":"Open"}}}}],"attachment":[{"self":"http://www.example.com/jira/rest/api/2.0/attachments/10000","filename":"picture.jpg","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.054-0600","size":23123,"mimeType":"image/jpeg","content":"http://www.example.com/jira/attachments/10000","thumbnail":"http://www.example.com/jira/secure/thumbnail/10000"}],"watcher":{"self":"http://www.example.com/jira/rest/api/2/issue/EX-1/watchers","isWatching":false,"watchCount":1,"watchers":[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false}]},"comment":[{"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"body":"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget venenatis elit. Duis eu justo eget augue iaculis fermentum. Sed semper quam laoreet nisi egestas at posuere augue semper.","updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2011-11-10T05:57:31.222-0600","updated":"2011-11-10T05:57:31.222-0600","visibility":{"type":"role","value":"Administrators"}}],"worklog":[{"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}]},"names":{"sub-tasks":"sub-tasks","timetracking":"timetracking","project":"project","updated":"updated","description":"description","issuelinks":"issuelinks","attachment":"attachment","watcher":"watcher","comment":"comment","worklog":"worklog"},"schema":{},"changelog":"TODO"}

    Returns a full representation of a JIRA issue in JSON format.

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]

    Example
    {"update":{"summary":[{"set":"Bug in business logic"}],"labels":[{"add":"triaged"},{"remove":"blocker"}],"components":[{"set":""}]}}

available response representations:

  • 200 - application/json [expand]

    Returned if it updated the issue succesfully.

  • 400 [expand]

    Returned if the requested issue update failed.

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

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.

request query parameters
parametervaluedescription

transitionId

string

available response representations:

  • 404 [expand]

    Returned if the requested issue is not found or the user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"731":{"id":"2","name":"Close Issue","to":{"self":"http://localhost:8090/jira/rest/api/2.0/status/10000","description":"The issue is currently being worked on.","iconUrl":"http://localhost:8090/jira/images/icons/progress.gif","name":"In Progress","id":"10000"},"fields":{"summary":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"operations":["set","add"],"allowedValues":["red","blue"]}}}}

    Returns a full representation of the transitions possible for the specified issue and the fields required to perform the transition.

POST

Perform a transition on an issue. When performing the transition you can udate or set other issue fields.

acceptable request representations:

  • application/json [expand]

    Example
    {"update":{"comment":[{"add":{"body":"Bug has been fixed."}}]},"fields":{"assignee":{"name":"bob"},"resolution":{"name":"Fixed"}},"transition":{"id":"5"}}

available response representations:

  • 204 [expand]

    Returned if the transition was successful.

  • 404 [expand]

    The issue does not exist or the user does not have permission to view it

  • 400 [expand]

    If there is no transition specified.

/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]

    Nothing is returned on success.

  • 404 [expand]

    Returned if the user cannot remove a vote for any reason. (The user did not vote on the issue, the user is the reporter, voting is disabled, the issue does not exist, etc.)

POST

Cast your vote in favour of an issue.

available response representations:

  • 204 [expand]

    Nothing is returned on success.

  • 404 [expand]

    Returned if the user cannot vote for any reason. (The user is the reporter, the user does not have permission to vote, voting is disabled in the instance, the issue does not exist, etc.)

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]

    Returned if the user cannot view the issue in question or voting is disabled.

  • 200 - application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/issue/MKY-1/votes","votes":24,"hasVoted":true,"voters":[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false}]}

    Information about voting on the current issue.

/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]

    Returned if the requested issue is not found, or the user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/issue/EX-1/watchers","isWatching":false,"watchCount":1,"watchers":[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false}]}

    Returns the list of watchers for an issue.

POST

Adds a user to an issue's watcher list.

acceptable request representations:

  • application/json [expand]

    Example
    "fred"

available response representations:

  • 204 [expand]

    Returned if the watcher was added successfully.

  • 404 [expand]

    Returned if either the issue or the user does not exist.

  • 401 [expand]

    Returned if the calling user does not have permission to add the watcher to the issue's list of watchers.

  • 400 [expand]

    Returned if there is a problem with the received user representation.

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]

    Returned if the watcher was removed successfully.

  • 404 [expand]

    Returned if either the issue or the user does not exist.

  • 401 [expand]

    Returned if the calling user does not have permission to remove the watcher from the issue's list of watchers.

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

available response representations:

  • 204 [expand]

    Returned if the issue was removed successfully.

  • 404 [expand]

    Returned if the issue does not exist.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 403 [expand]

    Returned if the calling user does not have permission to delete the issue.

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

Methods

GET

Returns the meta data for creating issues. This includes the available projects, issue types and fields, including field types and whether or not those fields are required. Projects will not be returned if the user does not have permission to create issues in that project.

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 absent, all projects are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.

projectKeys

string

combined with the projectIds param, lists the projects with which to filter the results. If null, all projects are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying a project that does not exist (or that you cannot create issues in) is not an error, but it will not be in the results.

issuetypeIds

string

combinded with issuetypeNames, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifiying an issue type that does not exist is not an error.

issuetypeNames

string

combinded with issuetypeIds, lists the issue types with which to filter the results. If null, all issue types are returned. This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list. Specifiying an issue type that does not exist is not an error.

available response representations:

  • 200 - application/json [expand]

    Example
    {"expand":"projects","projects":[{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example Project","avatarUrls":{"16x16":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000&avatarId=10011","48x48":"http://www.example.com/jira/secure/projectavatar?pid=10000&avatarId=10011"},"issuetypes":[{"self":"http://www.example.com/jira/rest/api/2/issueType/1","id":"1","description":"An error in the code","iconUrl":"http://www.example.com/jira/images/icons/bug.gif","name":"Bug","fields":{"issuetype":{"required":true,"operations":["set"]}},"subtask":false}]}]}

    Returns the meta data for creating issues.

  • 403 [expand]

    Returned if the user does not have permission to view any of the requested projects.

/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]

    Returned if the requested issue is not found or the user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"fields":{"summary":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"operations":["set","add"],"allowedValues":["red","blue"]}}}

    Returns a response containing a Map of FieldBeans for fields edited by the current user.

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

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue to create the remote issue link for

Methods

GET

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

request query parameters
parametervaluedescription

globalId

string

if not null, return only the remote issue link with this globalId

available response representations:

  • 404 [expand]

    Returned if the issue or remote issue link do not exist.

  • 200 - application/json [expand]

    Example
    [{"id":10000,"self":"http://www.example.com/jira/rest/api/issue/MKY-1/remotelink/10000","globalId":"system=http://www.mycompany.com/support&id=1","application":{"type":"com.acme.tracker","name":"My Acme Tracker"},"relationship":"causes","object":{"url":"http://www.mycompany.com/support?id=1","title":"TSTSUP-111","summary":"Crazy customer support issue","icon":{"url16x16":"http://www.mycompany.com/support/ticket.png","title":"Support Ticket"},"status":{"resolved":true,"icon":{"url16x16":"http://www.mycompany.com/support/resolved.png","title":"Case Closed","link":"http://www.mycompany.com/support?id=1&details=closed"}}}},{"id":10001,"self":"http://www.example.com/jira/rest/api/issue/MKY-1/remotelink/10001","globalId":"system=http://www.anothercompany.com/tester&id=1234","application":{"type":"com.acme.tester","name":"My Acme Tester"},"relationship":"is tested by","object":{"url":"http://www.anothercompany.com/tester/testcase/1234","title":"Test Case #1234","summary":"Test that the submit button saves the thing","icon":{"url16x16":"http://www.anothercompany.com/tester/images/testcase.gif","title":"Test Case"},"status":{"resolved":false,"icon":{"url16x16":"http://www.anothercompany.com/tester/images/person/fred.gif","title":"Tested by Fred Jones","link":"http://www.anothercompany.com/tester/person?username=fred"}}}}]

    Information on the remote issue links for the current issue.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 403 [expand]

    Returned if the calling user does not have permission to view the remote issue links, or if issue linking is disabled.

POST

Creates or updates a remote issue link from a JSON representation. If a globalId is provided and a remote issue link exists with that globalId, the remote issue link is updated. Otherwise, the remote issue link is created.

acceptable request representations:

  • application/json [expand]

    Example
    {"globalId":"system=http://www.mycompany.com/support&id=1","application":{"type":"com.acme.tracker","name":"My Acme Tracker"},"relationship":"causes","object":{"url":"http://www.mycompany.com/support?id=1","title":"TSTSUP-111","summary":"Crazy customer support issue","icon":{"url16x16":"http://www.mycompany.com/support/ticket.png","title":"Support Ticket"},"status":{"resolved":true,"icon":{"url16x16":"http://www.mycompany.com/support/resolved.png","title":"Case Closed","link":"http://www.mycompany.com/support?id=1&details=closed"}}}}

available response representations:

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

    Example
    {"id":10000,"self":"http://www.example.com/jira/rest/api/issue/MKY-1/remotelink/10000"}

    Returns a link to the created/updated remote issue link.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 400 [expand]

    Example
    {"errorMessages":[],"errors":{"title":"'title' is required."}}

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

  • 403 [expand]

    Returned if the calling user does not have permission to create/update the remote issue link, or if issue linking is disabled.

DELETE

Delete the remote issue link with the given global id on the issue.

request query parameters
parametervaluedescription

globalId

string

the global id of the remote issue link

available response representations:

  • 204 [expand]

    Returned if the remote issue link was removed successfully.

  • 404 [expand]

    Returned if the issue or remote issue link do not exist.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 403 [expand]

    Returned if the calling user does not have permission to delete the remote issue link, or if issue linking is disabled.

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

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

the issue to create the remote issue link for

linkId

string

the id of the remote issue link

Methods

GET

Get the remote issue link with the given id on the issue.

available response representations:

  • 404 [expand]

    Returned if the issue or remote issue link do not exist.

  • 200 - application/json [expand]

    Example
    {"id":10000,"self":"http://www.example.com/jira/rest/api/issue/MKY-1/remotelink/10000","globalId":"system=http://www.mycompany.com/support&id=1","application":{"type":"com.acme.tracker","name":"My Acme Tracker"},"relationship":"causes","object":{"url":"http://www.mycompany.com/support?id=1","title":"TSTSUP-111","summary":"Crazy customer support issue","icon":{"url16x16":"http://www.mycompany.com/support/ticket.png","title":"Support Ticket"},"status":{"resolved":true,"icon":{"url16x16":"http://www.mycompany.com/support/resolved.png","title":"Case Closed","link":"http://www.mycompany.com/support?id=1&details=closed"}}}}

    Information on the remote issue link with the given id.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 400 [expand]

    Returned if the linkId is not a valid number, or if the remote issue link with the given id does not belong to the given issue.

  • 403 [expand]

    Returned if the calling user does not have permission to view the remote issue link, or if issue linking is disabled.

PUT

Updates a remote issue link from a JSON representation. Any fields not provided are set to null.

acceptable request representations:

  • application/json [expand]

    Example
    {"globalId":"system=http://www.mycompany.com/support&id=1","application":{"type":"com.acme.tracker","name":"My Acme Tracker"},"relationship":"causes","object":{"url":"http://www.mycompany.com/support?id=1","title":"TSTSUP-111","summary":"Crazy customer support issue","icon":{"url16x16":"http://www.mycompany.com/support/ticket.png","title":"Support Ticket"},"status":{"resolved":true,"icon":{"url16x16":"http://www.mycompany.com/support/resolved.png","title":"Case Closed","link":"http://www.mycompany.com/support?id=1&details=closed"}}}}

available response representations:

  • 204 [expand]

    Returned if the remote issue link was updated successfully.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 400 [expand]

    Example
    {"errorMessages":[],"errors":{"title":"'title' is required."}}

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

  • 403 [expand]

    Returned if the calling user does not have permission to update the remote issue link, or if issue linking is disabled.

DELETE

Delete the remote issue link with the given id on the issue.

available response representations:

  • 204 [expand]

    Returned if the remote issue link was removed successfully.

  • 404 [expand]

    Returned if the issue or remote issue link do not exist.

  • 401 [expand]

    Returned if the calling user is not authenticated.

  • 403 [expand]

    Returned if the calling user does not have permission to delete the remote issue link, or if issue linking is disabled.

/api/2/issue/{issueIdOrKey}/worklog

resource-wide template parameters
parametervaluedescription

issueIdOrKey

string

a string containing the issue id or key the worklog will be added to

Methods

GET

Returns all work logs for an issue.

available response representations:

  • 404 [expand]

    Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.

  • 200 - application/json [expand]

    Example
    {"startAt":0,"maxResults":1,"total":1,"worklogs":[{"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}]}

    returns a collection of worklogs associated with the issue, with count and pagination information.

POST

Adds a new worklog entry to an issue.

request query parameters
parametervaluedescription

adjustEstimate

string

(optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are "new" - sets the estimate to a specific value "leave"- leaves the estimate as is "manual" - specify a specific amount to increase remaining estimate by "auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklog

newEstimate

string

(required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"

reduceBy

string

(required when "manual" is selected for adjustEstimate) the amount to reduce the remaining estimate by e.g. "2d"

acceptable request representations:

  • application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}

available response representations:

  • 201 [expand]

    Returned if add was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

  • 403 [expand]

    Returned if the calling user does not have permission to add the worklog

/api/2/issue/{issueIdOrKey}/worklog/{id}

resource-wide template parameters
parametervaluedescription

id

string

id of the worklog to be deleted

issueIdOrKey

string

a string containing the issue id or key the worklog belongs to

Methods

GET

Returns a specific worklog.

available response representations:

  • 404 [expand]

    Returned if the work log with the given id does not exist or if the currently authenticated user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}

    Returned if the work log with the given id exists and the currently authenticated user has permission to view it. The returned response contains a full representation of the work log in JSON format.

PUT

Updates an existing worklog entry using its JSON representation.

request query parameters
parametervaluedescription

adjustEstimate

string

(optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are "new" - sets the estimate to a specific value "leave"- leaves the estimate as is "auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklog

newEstimate

string

(required when "new" is selected for adjustEstimate) the new value for the remaining estimate field.

acceptable request representations:

  • application/json [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}

available response representations:

  • 200 [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2.0/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","started":"2011-11-10T05:57:31.351-0600","timeSpent":"3h 20m","id":"100028","visibility":{"type":"group","value":"jira-developers"}}

    Returned if update was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

  • 403 [expand]

    Returned if the calling user does not have permission to update the worklog

DELETE

Deletes an existing worklog entry .

request query parameters
parametervaluedescription

adjustEstimate

string

(optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are "new" - sets the estimate to a specific value "leave"- leaves the estimate as is "manual" - specify a specific amount to increase remaining estimate by "auto"- Default option. Will automatically adjust the value based on the new timeSpent specified on the worklog

newEstimate

string

(required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. e.g. "2d"

increaseBy

string

(required when "manual" is selected for adjustEstimate) the amount to increase the remaining estimate by e.g. "2d"

available response representations:

  • 204 [expand]

    Returned if delete was successful

  • 400 [expand]

    Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).

  • 403 [expand]

    Returned if the calling user does not have permission to delete the worklog

/api/2/mypermissions?projectKey&projectId&issueKey&issueId

Provide permission information for the current user.

Methods

GET

Returns all permissions in the system and whether the currently logged in user has them. You can optionally provide a specific context to get permissions for (projectKey OR projectId OR issueKey OR issueId)

  • When no context supplied the project related permissions will return true if the user has that permission in ANY project
  • If a project context is provided, project related permissions will return true if the user has the permissions in the specified project. For permissions that are determined using issue data (e.g Current Assignee), true will be returned if the user meets the permission criteria in ANY issue in that project
  • If an issue context is provided, it will return whether or not the user has each permission in that specific issue

NB: The above means that for issue-level permissions (EDIT_ISSUE for example), hasPermission may be true when no context is provided, or when a project context is provided, but may be false for any given (or all) issues. This would occur (for example) if Reporters were given the EDIT_ISSUE permission. This is because any user could be a reporter, except in the context of a concrete issue, where the reporter is known.

Global permissions will still be returned for all scopes.

request query parameters
parametervaluedescription

projectKey

string

- key of project to scope returned permissions for.

projectId

string

- id of project to scope returned permissions for.

issueKey

string

- key of the issue to scope returned permissions for.

issueId

string

- id of the issue to scope returned permissions for.

available response representations:

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

    Example
    {"permissions":{"EDIT_ISSUE":{"id":"12","key":"EDIT_ISSUE","name":"Edit Issues","description":"Ability to edit issues.","havePermission":true}}}

    Returns a list of all permissions in JIRA and whether the user has them.

  • 500 [expand]

    Returned if an error occurs while retrieving permissions.

/api/2/resolution

Methods

GET

Returns a list of all resolutions.

available response representations:

  • 200 - application/json (list of resolutions) [expand]

    Example
    {"self":"http://www.example.com/jira/rest/api/2/resolution/1","description":"A fix for this issue is checked into the tree and tested.","iconUrl":"http://www.example.com/jira/images/icons/status_resolved.gif","name":"Fixed"}

    Returned if the resolutions exists and the user has permission to view them. Contains a full representation of the resolution in JSON format.

/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]

    Returned if the resolution does not exist or the user does not have permission to view it.

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

    Example
    {"self":"http://www.example.com/jira/rest/api/2/resolution/1","description":"A fix for this issue is checked into the tree and tested.","iconUrl":"http://www.example.com/jira/images/icons/status_resolved.gif","name":"Fixed"}

    Returned if the resolution exists and the user has permission to view it. Contains a full representation of the resolution in JSON format.

/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]

    Example
    {"username":"fred","password":"freds_password"}

available response representations:

  • 200 [expand]

    Example
    {"session":{"name":"JSESSIONID","value":"12345678901234567890"},"loginInfo":{"failedLoginCount":10,"loginCount":127,"lastFailedLoginTime":"2011-11-10T05:57:30.328-0600","previousLoginTime":"2011-11-10T05:57:30.328-0600"}}

    The response contains an Atlassian-wide "session" portion containing the session ID that can used for further authenticated-requests. It also contains a JIRA-specific "loginInfo" section containing information about the current user's login details.

  • 401 [expand]

    Returned if the login fails due to an invalid credentials.

  • 403 [expand]

    Returned if the login is denied due to a CAPTCHA requirement, throtting, or any other reason. It's possible that the supplied credentials are valid, in this case.

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]

    Example
    {"self":"http://www.example.com/jira/rest/api/2.0/user/fred","name":"fred","loginInfo":{"failedLoginCount":10,"loginCount":127,"lastFailedLoginTime":"2011-11-10T05:57:30.328-0600","previousLoginTime":"2011-11-10T05:57:30.328-0600"}}

DELETE

Log the current user out of JIRA.

available response representations:

  • 204 [expand]

    Returned if the user was successfully logged out.

  • 401 [expand]

    Returned if the user is not authenticated.

/api/2/serverInfo

Methods

GET

Returns general information about the current JIRA server.

available response representations:

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

    Example
    {"baseUrl":"http://localhost:8080/jira","version":"5.0-SNAPSHOT","versionNumbers":[5,0,0],"buildNumber":582,"buildDate":"2011-11-10T05:57:30.985-0600","serverTime":"2011-11-10T05:57:30.985-0600","scmInfo":"482389","buildPartnerName":"Example Partner Co.","serverTitle":"My Shiny New JIRA Server"}

    Returns a full representation of the server info in JSON format

/api/2/field

Methods

GET

Returns a list of all fields, both System and Custom

available response representations:

  • 200 - application/json (List of field) [expand]

    Example
    [{"id":"description","name":"Description","custom":false,"schema":{"type":"string","system":"description"}},{"id":"summary","name":"Summary","custom":false,"schema":{"type":"string","system":"summary"}}]

    Contains a full representation of all visible fields in JSON.