Jira Cloud REST API Reference
Jira 1000.1578.0
About
This is the reference for the Jira Cloud REST API. This API is the primary way to interact with Jira remotely, whether you are building an app, scripting interactions with Jira or developing any other integration. This page documents the REST resources available in Jira Cloud, along with expected HTTP response codes and sample requests.
Looking for the REST API reference for Jira Server? Follow the Jira Server REST API link.
Getting started
If you haven't integrated with Jira Cloud before, start with Integrating with Jira Cloud guide. The guide will introduce you to the Atlassian Connect framework, as well as Jira features and services that you can use when building an app. Then, read our Getting started guide to learn how to set up a development environment and build a Jira Cloud app.
Authentication
Authentication for Atlassian Connect apps
If you are building an Atlassian Connect app to interact with the Jira Cloud REST API, authentication is handled by JWT (JSON Web Token) technology. This is built into the supported Atlassian Connect libraries. At a high level, a security context is exchanged when the app is installed, and this context is used to create and validate JWT tokens, embedded in API calls. To learn more, read the Authentication for apps guide.
Authentication for REST API requests
If you are integrating directly with the Jira Cloud REST APIs it is recommended to use OAuth authentication method. For implementations with low security requirements, such as scripts and bots, it is also possible to use Basic authentication method.
Jira itself uses cookie-based authentication in the browser, so you can call the REST API from JavaScript on the page and rely on the authentication that the browser has established.
Expansion
To simplify API responses, the Jira REST API uses resource expansion, which means that the API will only return parts of a resource when explicitly requested.
If you want to expand part of a resource in a request, use the expand
query parameter to specify a comma-separated list of entities to be expanded, identifying each of them by name. For example, the following request will expand information about display name of each field as well as the HTML-rendered field values of the JRACLOUD-34423 issue:
https://jira.atlassian.com/rest/api/2/issue/JRACLOUD-34423?expand=names,renderedFields
To discover what entities can be expanded in the request, refer to the expand
property in the parent object. In the
JSON example below, the resource declares widgets
as expandable.
{"expand":"widgets", "self":"http://www.example.com/jira/rest/api/resource/KEY-1", "widgets":{"widgets":[],"size":5}}
You can use the .
dot notation to expand nested entities. For example
?expand=widgets.fringels
would expand the widgets
collection as well as the fringel
property on each widget.
Pagination
The Jira Cloud REST API uses pagination to improve performance for all Jira Cloud users. Pagination is enforced for methods that could return a large collection of items. When you make a request to a paged API, the response will wrap the returned array of values in a JSON object with paging metadata, for example:
{ "startAt" : 0, "maxResults" : 10, "total": 200, "isLast": false, "values": [ { /* result 0 */ }, { /* result 1 */ }, { /* result 2 */ } ] }
Where:
startAt
is the index of the first item returned in the page of results.maxResults
is the maximum number of items that can be returned per page. Each API endpoint may have a different limit for the number of items returned, and these limits may change without notice.total
(optional) is the total number of items contained in all pages. This number may change as the client requests the subsequent pages, therefore the client should always assume that the requested page can be empty.isLast
(optional) indicates whether the page returned is the last one.
Ordering
Some Jira REST API resources support ordering of the elements in the response on a specific field. Refer to the endpoint's documentation to confirm whether ordering of the response is supported for this method, and which fields can be used in ordering. The list can be ordered in ascending or descending order, with ascending being the default one.
You can order the elements in response on a given field using the orderBy
query parameter with -
or +
signs to specify ordering. In particular:
?orderBy=name
to order byname
field ascending.?orderBy=+name
to order byname
field ascending.?orderBy=-name
to order byname
field descending.
Asynchronous methods
experimental
Some Jira REST API resources may trigger long-running or computationally expensive tasks. In this case, the method will schedule an asynchronous task and return a 303 (See Other)
response, indicating the location of the queued task in the Location
header. You can query this task systematically to get progress updates.
When the task eventually finishes, the bean will contain the result
field. This result may have a different type, depending on the method. Refer to the endpoint's documentation for more information.
Note that asynchronous tasks are not guaranteed to be run in order. In other words, if you rely on the sequence of execution of your tasks, you need to start the next one only after all the prerequisite tasks have finished.
Experimental methods
Methods marked as experimental may change without notice.
We are open to your feedback on the these methods. Report your suggestions and bugs for experimental APIs in the ACJIRA project on ecosystem.atlassian.net or using the feedback button at the top of the page.
Special headers
The following request and response headers define important metadata for the Jira Cloud REST API resources.
- X-AUSERNAME (response) - This response header contains either the username of the logged-in user or
anonymous
. - X-Atlassian-Token (request) - Methods that accept multipart/form-data will only process requests with
X-Atlassian-Token: no-check
header. Otherwise the request will be blocked by XSRF protection.
Error responses
Most resources will return a response body in addition to the status code. Usually, the JSON schema of the entity returned is the following:{"id":"https://docs.atlassian.com/jira/REST/schema/error-collection#","title":"Error Collection","type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}},"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"status":{"type":"integer"}},"additionalProperties":false}
Resources
api/2
Provide permission information for the current user.
Get permissionsGET /rest/api/2/mypermissions
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.
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
parameter | type | description |
---|---|---|
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. |
Responses
- Status
200 - application/jsonReturns a list of all permissions in Jira and whether the user has them.
Example
{"permissions":{"EDIT_ISSUE":{"id":"12","key":"EDIT_ISSUES","name":"Edit Issues","type":"PROJECT","description":"Ability to edit issues.","havePermission":true}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permissions#","title":"Permissions","type":"object","properties":{"permissions":{"type":"object","patternProperties":{".+":{"title":"Permission","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["GLOBAL","PROJECT"]},"description":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the project or issue id is invalid.
- Status
404Returned if the project or issue id or key is not found.
Get all permissionsGET /rest/api/2/permissions
Returns all permissions that are present in the Jira instance - Global, Project and the global ones added by plugins
Responses
- Status
200 - application/jsonReturns a list of all permissions in Jira.
Example
{"permissions":{"BULK_CHANGE":{"key":"BULK_CHANGE","name":"Bulk Change","type":"GLOBAL","description":"Ability to modify a collection of issues at once. For example, resolve multiple issues in one step."}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permissions#","title":"Permissions","type":"object","properties":{"permissions":{"type":"object","patternProperties":{".+":{"title":"Permission","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"type":{"type":"string","enum":["GLOBAL","PROJECT"]},"description":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
401Returned for unauthenticated requests
- Status
403Returned for users without administer permissions
Get permitted projects
experimentalPOST /rest/api/2/permissions/project
Returns all projects where currently logged in user was granted ALL requested project permissions.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permissions-keys#","title":"Permissions Keys","type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturns a list of all projects where user have given project permission
Example
{"projects":[{"id":10000,"key":"DEMO"},{"id":10101,"key":"TEST"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permitted-projects#","title":"Permitted Projects","type":"object","properties":{"projects":{"type":"array","items":{"title":"Project Identifier","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400 - application/jsonReturned if ANY project permission with given key does not exist
Example
{"errorMessages":["Could not find permission with key: NOT_EXISTING_PERMISSION_KEY"],"errors":{}}
api/2//userProperties
Delete propertyDELETE /rest/api/2//userProperties
Request
query parameters
parameter | type | description |
---|---|---|
key | string |
Responses
- Status - application/json
Set propertyPOST /rest/api/2//userProperties
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}
Responses
- Status - application/json
Get propertyGET /rest/api/2//userProperties
Request
query parameters
parameter | type | description |
---|---|---|
key | string |
Responses
- Status - application/json
api/2/application-properties
Get propertyGET /rest/api/2/application-properties
Returns an application property.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | a String containing the property key |
permissionLevel | string | when fetching a list specifies the permission level of all items in the list see {@link com.atlassian.jira.bc.admin.ApplicationPropertiesService.EditPermissionLevel} |
keyFilter | string | when fetching a list allows the list to be filtered by the property's start of key e.g. "jira.lf.*" whould fetch only those permissions that are editable and whose keys start with "jira.lf.". This is a regex. |
Responses
- Status
200 - application/jsonReturned if the property exists and the currently authenticated user has permission to view it. Contains a full representation of the property.
Example
[{"id":"jira.home","key":"jira.home","value":"/var/jira/jira-home","name":"jira.home","desc":"Jira home directory","type":"string","defaultValue":""},{"id":"jira.clone.prefix","key":"jira.clone.prefix","value":"CLONE -","name":"The prefix added to the Summary field of cloned issues","type":"string","defaultValue":"CLONE -"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-application-property#","title":"List of Application Property","type":"array","items":{"title":"Application Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"desc":{"type":"string"},"type":{"type":"string"},"defaultValue":{"type":"string"},"example":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}
- Status
404Returned if the property does not exist or the currently authenticated user does not have permission to view it.
Set property via restful tablePUT /rest/api/2/application-properties/{id}
Modify an application property via PUT. The "value" field present in the PUT will override the existing value.
Request
Example
{"id":"jira.home","value":"/var/jira/jira-home"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/simple-application-property#","title":"Simple Application Property","type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returned if the property exists and the currently authenticated user has permission to edit it.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/application-property#","title":"Application Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"desc":{"type":"string"},"type":{"type":"string"},"defaultValue":{"type":"string"},"example":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
- Status
400Returned if the value is not applicable for property type.
- Status
403Returned if the currently authenticated user does not have permission to edit the property.
- Status
404Returned if the property does not exist or the currently authenticated user does not have permission to view it.
Get advanced settingsGET /rest/api/2/application-properties/advanced-settings
Returns the properties that are displayed on the "General Configuration > Advanced Settings" page.
Responses
- Status
200 - application/jsonReturns all properties to display in the "General Configuration > Advanced Settings" page.
Example
[{"id":"jira.home","key":"jira.home","value":"/var/jira/jira-home","name":"jira.home","desc":"Jira home directory","type":"string","defaultValue":""},{"id":"jira.clone.prefix","key":"jira.clone.prefix","value":"CLONE -","name":"The prefix added to the Summary field of cloned issues","type":"string","defaultValue":"CLONE -"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-application-property#","title":"List of Application Property","type":"array","items":{"title":"Application Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"},"name":{"type":"string"},"desc":{"type":"string"},"type":{"type":"string"},"defaultValue":{"type":"string"},"example":{"type":"string"},"allowedValues":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}}
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user is not an administrator.
api/2/applicationrole
Provides REST access to Jira's Application Roles.
Get allGET /rest/api/2/applicationrole
Returns all ApplicationRoles in the system. Will also return an ETag header containing a version hash of the collection of ApplicationRoles.
Responses
- Status
200 - application/jsonReturns all ApplicationRoles in the system
Example
[{"key":"jira-software","groups":["jira-software-users","jira-testers"],"name":"Jira Software","defaultGroups":["jira-software-users"],"selectedByDefault":false,"defined":false,"numberOfSeats":10,"remainingSeats":5,"userCount":5,"userCountDescription":"5 developers","hasUnlimitedSeats":false,"platform":false},{"key":"jira-core","groups":["jira-core-users"],"name":"Jira Core","defaultGroups":["jira-core-users"],"selectedByDefault":false,"defined":false,"numberOfSeats":1,"remainingSeats":1,"userCount":0,"userCountDescription":"0 users","hasUnlimitedSeats":false,"platform":true}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-application-role#","title":"List of Application Role","type":"array","items":{"title":"Application Role","type":"object","properties":{"key":{"type":"string"},"groups":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"defaultGroups":{"type":"array","items":{"type":"string"}},"selectedByDefault":{"type":"boolean"},"defined":{"type":"boolean"},"numberOfSeats":{"type":"integer"},"remainingSeats":{"type":"integer"},"userCount":{"type":"integer"},"userCountDescription":{"type":"string"},"hasUnlimitedSeats":{"type":"boolean"},"platform":{"type":"boolean"}},"additionalProperties":false}}
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user is not an administrator.
GetGET /rest/api/2/applicationrole/{key}
Returns the ApplicationRole with passed key if it exists.
Responses
- Status
200 - application/jsonReturns the ApplicationRole if it exists.
Example
{"key":"jira-software","groups":["jira-software-users","jira-testers"],"name":"Jira Software","defaultGroups":["jira-software-users"],"selectedByDefault":false,"defined":false,"numberOfSeats":10,"remainingSeats":5,"userCount":5,"userCountDescription":"5 developers","hasUnlimitedSeats":false,"platform":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/application-role#","title":"Application Role","type":"object","properties":{"key":{"type":"string"},"groups":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"defaultGroups":{"type":"array","items":{"type":"string"}},"selectedByDefault":{"type":"boolean"},"defined":{"type":"boolean"},"numberOfSeats":{"type":"integer"},"remainingSeats":{"type":"integer"},"userCount":{"type":"integer"},"userCountDescription":{"type":"string"},"hasUnlimitedSeats":{"type":"boolean"},"platform":{"type":"boolean"}},"additionalProperties":false}
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user is not an administrator.
- Status
404Returned if the role does not exist.
api/2/attachment
Get attachmentGET /rest/api/2/attachment/{id}
Returns the meta-data for an attachment, including the URI of the actual attached file.
Responses
- Status
200 - application/jsonJSON 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.
Example
{"id":10001,"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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:55.720+0000","size":23123,"mimeType":"image/jpeg","content":"http://www.example.com/jira/attachments/10000","thumbnail":"http://www.example.com/jira/secure/thumbnail/10000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/attachment#","title":"Attachment","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"filename":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"size":{"type":"integer"},"mimeType":{"type":"string"},"properties":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"content":{"type":"string"},"thumbnail":{"type":"string"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["id","size"]}
- Status
403The user is not permitted to view the requested attachment.
- Status
404Any of:
- there is no attachment with the requested id
- attachments feature is disabled
Remove attachmentDELETE /rest/api/2/attachment/{id}
Remove an attachment from an issue.
Responses
- Status
204Removal was successful
- Status
403The user is not permitted to remove the requested attachment.
- Status
404Any of:
- there is no attachment with the requested id
- attachments feature is disabled
Expand for humans
experimentalGET /rest/api/2/attachment/{id}/expand/human
Tries to expand an attachment. Output is human-readable and subject to change.
Responses
- Status
200 - application/jsonJSON representation of the attachment expanded contents. Empty entry list means that attachment cannot be expanded. It's either empty, corrupt or not an archive at all.
Example
{"id":7237823,"name":"images.zip","entries":[{"path":"MG00N067.JPG","index":0,"size":"119 kB","mediaType":"image/jpeg","label":"MG00N067.JPG"},{"path":"Allegro from Duet in C Major.mp3","index":1,"size":"1.36 MB","mediaType":"audio/mpeg","label":"Allegro from Duet in C Major.mp3"},{"path":"long/path/thanks/to/lots/of/subdirectories/inside/making/it/quite/hard/to/reach/the/leaf.txt","index":2,"size":"0.0 k","mediaType":"text/plain","label":"long/path/thanks/to/.../reach/the/leaf.txt"}],"totalEntryCount":39,"mediaType":"application/zip"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/human-readable-archive#","title":"Human Readable Archive","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"entries":{"type":"array","items":{"title":"Human Readable Archive Entry","type":"object","properties":{"path":{"type":"string"},"index":{"type":"integer"},"size":{"type":"string"},"mediaType":{"type":"string"},"label":{"type":"string"}},"additionalProperties":false,"required":["index"]}},"totalEntryCount":{"type":"integer"},"mediaType":{"type":"string"}},"additionalProperties":false,"required":["id","totalEntryCount"]}
- Status
403The user is not permitted to view the requested attachment.
- Status
404Any of:
- there is no attachment with the requested id
- attachments feature is disabled
- Status
409The archive format is not supported.
Expand for machines
experimentalGET /rest/api/2/attachment/{id}/expand/raw
Tries to expand an attachment. Output is raw and should be backwards-compatible through the course of time.
Responses
- Status
200 - application/jsonJSON representation of the attachment expanded contents. Empty entry list means that attachment cannot be expanded. It's either empty, corrupt or not an archive at all.
Example
{"entries":[{"entryIndex":0,"name":"Allegro from Duet in C Major.mp3","size":1430174,"mediaType":"audio/mpeg"},{"entryIndex":1,"name":"lrm.rtf","size":331,"mediaType":"text/rtf"}],"totalEntryCount":24}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/attachment-archive-impl#","title":"Attachment Archive Impl","type":"object","properties":{"entries":{"type":"array","items":{"title":"Attachment Archive Entry","type":"object","properties":{"abbreviatedName":{"type":"string"},"entryIndex":{"type":"integer"},"mediaType":{"type":"string"},"name":{"type":"string"},"size":{"type":"integer"}},"additionalProperties":false,"required":["entryIndex","size"]}},"totalEntryCount":{"type":"integer"}},"additionalProperties":false,"required":["totalEntryCount"]}
- Status
403The user is not permitted to view the requested attachment.
- Status
404Any of:
- there is no attachment with the requested id
- attachments feature is disabled
- Status
409The archive format is not supported.
Get attachment metaGET /rest/api/2/attachment/meta
Returns the meta information for an attachments, specifically if they are enabled and the maximum upload size allowed.
Responses
- Status
200 - application/jsonJSON 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}.
Example
{"enabled":true,"uploadLimit":1000000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/attachment-meta#","title":"Attachment Meta","type":"object","properties":{"enabled":{"type":"boolean"},"uploadLimit":{"type":"integer"}},"additionalProperties":false,"required":["enabled"]}
api/2/auditing
Resource representing the auditing records
Get recordsGET /rest/api/2/auditing/record
Returns auditing records filtered using provided parameters
Request
query parameters
parameter | type | description |
---|---|---|
offset | int | - the number of record from which search starts |
limit | int | - maximum number of returned results (if is limit is <= 0 or > 1000, it will be set do default value: 1000) |
filter | string | - text query; each record that will be returned must contain the provided text in one of its fields |
from | string | - timestamp in past; 'from' must be less or equal 'to', otherwise the result set will be empty only records that where created in the same moment or after the 'from' timestamp will be provided in response |
to | string | - timestamp in past; 'from' must be less or equal 'to', otherwise the result set will be empty only records that where created in the same moment or earlier than the 'to' timestamp will be provided in response |
Responses
- Status
200 - application/jsonReturns a list auditing records filtered with request query parameters
Example
{"id":1,"summary":"User created","remoteAddress":"192.168.1.1","authorKey":"administrator","created":"2014-03-19T18:45:42.967+0000","category":"user management","eventSource":"Jira Connect Plugin","description":"Optional description","objectItem":{"id":"user","name":"user","typeName":"USER","parentId":"1","parentName":"Jira Internal Directory"},"changedValues":[{"fieldName":"email","changedFrom":"user@atlassian.com","changedTo":"newuser@atlassian.com"}],"associatedItems":[{"id":"jira-software-users","name":"jira-software-users","typeName":"GROUP","parentId":"1","parentName":"Jira Internal Directory"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/audit-record#","title":"Audit Record","type":"object","properties":{"id":{"type":"integer"},"summary":{"type":"string"},"remoteAddress":{"type":"string"},"authorKey":{"type":"string"},"created":{"type":"string"},"category":{"type":"string"},"eventSource":{"type":"string"},"description":{"type":"string"},"objectItem":{"$ref":"#/definitions/associated-item"},"changedValues":{"type":"array","items":{"title":"Changed Value","type":"object","properties":{"fieldName":{"type":"string"},"changedFrom":{"type":"string"},"changedTo":{"type":"string"}},"additionalProperties":false}},"associatedItems":{"type":"array","items":{"$ref":"#/definitions/associated-item"}}},"definitions":{"associated-item":{"title":"Associated Item","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"typeName":{"type":"string"},"parentId":{"type":"string"},"parentName":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
- Status
400In case of unhandled error while fetching auditing records
- Status
403Returned if the user does not have admin permission
api/2/avatar
Get all system avatarsGET /rest/api/2/avatar/{type}/system
Returns all system avatars of the given type.
Responses
- Status
200 - application/jsonReturns a map containing a list of system avatars. A map is returned to be consistent with the shape of the project/KEY/avatars REST end point.
Example
{"system":[{"id":"1000","owner":"fred","isSystemAvatar":true,"isSelected":false,"isDeletable":false,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10040","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10040","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10040","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10040"},"selected":false}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/system-avatars#","title":"System Avatars","type":"object","properties":{"system":{"type":"array","items":{"title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}}},"additionalProperties":false}
- Status
500Returned if an error occurs while retrieving the list of avatars.
api/2/comment/{commentId}/properties
Get properties keysGET /rest/api/2/comment/{commentId}/properties
Returns the keys of all properties for the comment identified by the key or by the id.
Responses
- Status
200 - application/jsonReturned if the comment was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the comment key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the comment.
- Status
404Returned if the comment with given key or id does not exist or if the property with given key is not found.
Delete propertyDELETE /rest/api/2/comment/{commentId}/properties/{propertyKey}
Removes the property from the comment identified by the key or by the id. Ths user removing the property is required to have permissions to administer the comment.
Responses
- Status
400Returned if the comment key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the comment property was removed successfully.
- Status
403Returned if the user does not have permission to edit the comment.
- Status
404Returned if the comment with given key or id does not exist or if the property with given key is not found.
Set propertyPUT /rest/api/2/comment/{commentId}/properties/{propertyKey}
Sets the value of the specified comment's property.
You can use this resource to store a custom data against the comment identified by the key or by the id. The user who stores the data is required to have permissions to administer the comment.
Responses
- Status
200Returned if the comment property is successfully updated.
- Status
201Returned if the comment property is successfully created.
- Status
400Returned if the comment key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer the comment.
- Status
404Returned if the comment with given key or id does not exist.
Get propertyGET /rest/api/2/comment/{commentId}/properties/{propertyKey}
Returns the value of the property with a given key from the comment identified by the key or by the id. The user who retrieves the property is required to have permissions to read the comment.
Responses
- Status
200 - application/jsonReturned if the comment property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the comment key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the comment.
- Status
404Returned if the comment with given key or id does not exist or if the property with given key is not found.
api/2/component
Create componentPOST /rest/api/2/component
Create a component via POST.
Request
Example
{"name":"Component 1","description":"This is a Jira component","leadUserName":"fred","assigneeType":"PROJECT_LEAD","isAssigneeTypeValid":false,"project":"PROJECTKEY","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component#","title":"Component","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}
Responses
- Status
201 - application/jsonReturned if the component is created successfully.
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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component#","title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}
- Status
401Returned if the caller is not logged in and does not have permission to create components in the project.
- Status
403Returned if the caller is authenticated and does not have permission to create components in the project.
- Status
404Returned if the project does not exist or the currently authenticated user does not have permission to view it.
Update componentPUT /rest/api/2/component/{id}
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.
Request
Example
{"name":"Component 1","description":"This is a Jira component","leadUserName":"fred","assigneeType":"PROJECT_LEAD","isAssigneeTypeValid":false,"project":"PROJECTKEY","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component#","title":"Component","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}
Responses
- Status
200Returned if the component exists and the currently authenticated user has permission to edit it.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component#","title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}
- Status
403Returned if the currently authenticated user does not have permission to edit the component.
- Status
404Returned if the component does not exist or the currently authenticated user does not have permission to view it.
Get componentGET /rest/api/2/component/{id}
Returns a project component.
Responses
- Status
200 - application/jsonReturns a full JSON representation of a project component.
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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component#","title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}
- Status
404Returned if there is no component with the given key, or if the user does not have permission to view the component.
DeleteDELETE /rest/api/2/component/{id}
Delete a project component.
Request
query parameters
parameter | type | description |
---|---|---|
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 removed from the related isues. |
Responses
- Status
204Returned if the component is successfully deleted.
- Status
403Returned if the currently authenticated user does not have permission to delete the component.
- Status
404Returned if the component does not exist or the currently authenticated user does not have permission to view it.
Get component related issuesGET /rest/api/2/component/{id}/relatedIssueCounts
Returns counts of issues related to this component.
Responses
- Status
200 - application/jsonReturned if the component exists and the currently authenticated user has permission to view it. Contains counts of issues related to this component.
Example
{"self":"http://www.example.com/jira/rest/api/2/component/10000","issueCount":23}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/component-issue-counts#","title":"Component Issue Counts","type":"object","properties":{"self":{"type":"string","format":"uri"},"issueCount":{"type":"integer"}},"additionalProperties":false,"required":["issueCount"]}
- Status
404Returned if the component does not exist or the currently authenticated user does not have permission to view it.
api/2/configuration
Get configurationGET /rest/api/2/configuration
Returns the information if the optional features in Jira are enabled or disabled. If the time tracking is enabled, it also returns the detailed information about time tracking configuration.
Responses
- Status
200 - application/jsonReturned the configuration of optional features in Jira.
Example
{"votingEnabled":true,"watchingEnabled":true,"unassignedIssuesAllowed":false,"subTasksEnabled":false,"issueLinkingEnabled":true,"timeTrackingEnabled":true,"attachmentsEnabled":true,"timeTrackingConfiguration":{"workingHoursPerDay":8.0,"workingDaysPerWeek":5.0,"timeFormat":"pretty","defaultUnit":"day"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/configuration#","title":"Configuration","type":"object","properties":{"votingEnabled":{"type":"boolean"},"watchingEnabled":{"type":"boolean"},"unassignedIssuesAllowed":{"type":"boolean"},"subTasksEnabled":{"type":"boolean"},"issueLinkingEnabled":{"type":"boolean"},"timeTrackingEnabled":{"type":"boolean"},"attachmentsEnabled":{"type":"boolean"},"timeTrackingConfiguration":{"title":"Time Tracking Configuration","type":"object","properties":{"workingHoursPerDay":{"type":"number"},"workingDaysPerWeek":{"type":"number"},"timeFormat":{"type":"string","enum":["pretty","days","hours"]},"defaultUnit":{"type":"string","enum":["minute","hour","day","week"]}},"additionalProperties":false,"required":["workingHoursPerDay","workingDaysPerWeek"]}},"additionalProperties":false,"required":["votingEnabled","watchingEnabled","unassignedIssuesAllowed","subTasksEnabled","issueLinkingEnabled","timeTrackingEnabled","attachmentsEnabled"]}
- Status
401Returned if the user is not logged in.
api/2/configuration/timetracking
Get selected time tracking implementationGET /rest/api/2/configuration/timetracking
Returns the currently selected time-tracking implementation
Responses
- Status
200 - application/jsonReturned if one of the available time tracking implementations is enabled
Example
{"key":"Jira","name":"Jira time tracking","url":"/example/config/url"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/time-tracking-implementation#","title":"Time Tracking Implementation","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if user is not logged in
- Status
204Returned if none of the available time tracking implementations are enabled
- Status
403Returned if the user is not an administrator
Select time tracking implementationPUT /rest/api/2/configuration/timetracking
Selects a time tracking implementation
Request
Example
{"key":"Jira"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/time-tracking-implementation#","title":"Time Tracking Implementation","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}
Responses
- Status
400Returned if the provided implementation does not exist
- Status
401Returned if user is not logged in
- Status
204Returned on success
- Status
403Returned if the user is not an administrator
Disable time trackingDELETE /rest/api/2/configuration/timetracking
Disables time tracking
Responses
- Status
401Returned if user is not logged in
- Status
204Returned on success
- Status
403Returned if the user is not an administrator
Get available time tracking implementationsGET /rest/api/2/configuration/timetracking/list
Retrieve the list of available time tracking implementations
Responses
- Status
200 - application/jsonReturns the available time tracking implementations
Example
[{"key":"Jira","name":"Jira time tracking","url":"/example/config/url"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-time-tracking-implementation#","title":"List of Time Tracking Implementation","type":"array","items":{"title":"Time Tracking Implementation","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}}
Get shared time tracking configurationGET /rest/api/2/configuration/timetracking/options
Returns the configuration options for time tracking
Responses
- Status
200Returned on success
Example
{"workingHoursPerDay":8.0,"workingDaysPerWeek":5.0,"timeFormat":"pretty","defaultUnit":"hour"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/time-tracking-configuration#","title":"Time Tracking Configuration","type":"object","properties":{"workingHoursPerDay":{"type":"number"},"workingDaysPerWeek":{"type":"number"},"timeFormat":{"type":"string","enum":["pretty","days","hours"]},"defaultUnit":{"type":"string","enum":["minute","hour","day","week"]}},"additionalProperties":false,"required":["workingHoursPerDay","workingDaysPerWeek"]}
- Status
401Returned if user is not logged in
- Status
403Returned if the user is not an administrator
Set shared time tracking configurationPUT /rest/api/2/configuration/timetracking/options
Sets the options for time tracking
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/time-tracking-configuration#","title":"Time Tracking Configuration","type":"object","properties":{"workingHoursPerDay":{"type":"number"},"workingDaysPerWeek":{"type":"number"},"timeFormat":{"type":"string","enum":["pretty","days","hours"]},"defaultUnit":{"type":"string","enum":["minute","hour","day","week"]}},"additionalProperties":false,"required":["workingHoursPerDay","workingDaysPerWeek"]}
Responses
- Status
200Returned on success
Example
{"workingHoursPerDay":8.0,"workingDaysPerWeek":5.0,"timeFormat":"pretty","defaultUnit":"hour"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/time-tracking-configuration#","title":"Time Tracking Configuration","type":"object","properties":{"workingHoursPerDay":{"type":"number"},"workingDaysPerWeek":{"type":"number"},"timeFormat":{"type":"string","enum":["pretty","days","hours"]},"defaultUnit":{"type":"string","enum":["minute","hour","day","week"]}},"additionalProperties":false,"required":["workingHoursPerDay","workingDaysPerWeek"]}
- Status
400Returned if the bean validation has failed
- Status
401Returned if user is not logged in
- Status
403Returned if the user is not an administrator
api/2/customFieldOption
Get custom field optionGET /rest/api/2/customFieldOption/{id}
Returns a full representation of the Custom Field Option that has the given id.
Responses
- Status
200 - application/jsonReturned if the Custom Field Option exists and is visible by the user.
Example
{"self":"http://localhost:8090/jira/rest/api/2.0/customFieldOption/3","value":"Blue"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/custom-field-option#","title":"Custom Field Option","type":"object","properties":{"self":{"type":"string","format":"uri"},"value":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the Custom Field Option does not exist, or is not visible to the user.
api/2/dashboard
The /dashboard
resource.
ListGET /rest/api/2/dashboard
Returns a list of all dashboards, optionally filtering them.
Request
query parameters
parameter | type | description |
---|---|---|
filter | string | an optional filter that is applied to the list of dashboards. Valid values include
|
startAt | int | the index of the first dashboard to return (0-based). must be 0 or a multiple of
|
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 |
Responses
- Status
200Returns a list of dashboards.
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"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/dashboards#","title":"Dashboards","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"prev":{"type":"string"},"next":{"type":"string"},"dashboards":{"type":"array","items":{"title":"Dashboard","type":"object","properties":{"description":{"type":"string"},"id":{"type":"string"},"isFavourite":{"type":"boolean"},"name":{"type":"string"},"owner":{"title":"User","type":"object","properties":{"key":{"type":"string"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"displayName":{"type":"string"},"active":{"type":"boolean"},"accountId":{"type":"string"},"avatarUrls":{"title":"User Bean Avatar Urls","type":"object","properties":{"_16x16":{"type":"string","format":"uri"},"_24x24":{"type":"string","format":"uri"},"_32x32":{"type":"string","format":"uri"},"_48x48":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"popularity":{"type":"integer"},"rank":{"type":"integer"},"self":{"type":"string","format":"uri"},"sharePermissions":{"type":"array","items":{"title":"Share Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"project":{"title":"Project Identity","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"view":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
Get dashboardGET /rest/api/2/dashboard/{id}
Returns a single dashboard.
Responses
- Status
200Returns a single dashboard.
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"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/dashboard#","title":"Dashboard","type":"object","properties":{"description":{"type":"string"},"id":{"type":"string"},"isFavourite":{"type":"boolean"},"name":{"type":"string"},"owner":{"title":"User","type":"object","properties":{"key":{"type":"string"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"displayName":{"type":"string"},"active":{"type":"boolean"},"accountId":{"type":"string"},"avatarUrls":{"title":"User Bean Avatar Urls","type":"object","properties":{"_16x16":{"type":"string","format":"uri"},"_24x24":{"type":"string","format":"uri"},"_32x32":{"type":"string","format":"uri"},"_48x48":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"popularity":{"type":"integer"},"rank":{"type":"integer"},"self":{"type":"string","format":"uri"},"sharePermissions":{"type":"array","items":{"title":"Share Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"project":{"title":"Project Identity","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}},"view":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if there is no dashboard with the specified id, or if the user does not have permission to see it.
api/2/dashboard/{dashboardId}/items/{itemId}/properties
Get properties keysGET /rest/api/2/dashboard/{dashboardId}/items/{itemId}/properties
Returns the keys of all properties for the dashboard item identified by the id.
Responses
- Status
200 - application/jsonReturned if the dashboard item was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the dashboard item id is invalid.
- Status
404Returned if the dashboard item with given id does not exist or user does not have permissions to view it.
Delete propertyDELETE /rest/api/2/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}
Removes the property from the dashboard item identified by the key or by the id. Ths user removing the property is required to have permissions to administer the dashboard item.
Responses
- Status
400Returned if the dashboard item id is invalid.
- Status
204Returned if the dashboard item property was removed successfully.
- Status
403Returned if the user does not have permission to edit the dashboard item.
- Status
404Returned if the dashboard item with given id does not exist or user does not have permissions to view it.
Set propertyPUT /rest/api/2/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}
Sets the value of the specified dashboard item's property.
You can use this resource to store a custom data against the dashboard item identified by the id. The user who stores the data is required to have permissions to administer the dashboard item.
Responses
- Status
200Returned if the dashboard item property is successfully updated.
- Status
201Returned if the dashboard item property is successfully created.
- Status
400Returned if the dashboard item id is invalid.
- Status
403Returned if the user does not have permission to administer the dashboard item.
- Status
404Returned if the dashboard item with given id does not exist or user does not have permissions to view it.
Get propertyGET /rest/api/2/dashboard/{dashboardId}/items/{itemId}/properties/{propertyKey}
Returns the value of the property with a given key from the dashboard item identified by the id. The user who retrieves the property is required to have permissions to read the dashboard item.
Responses
- Status
200 - application/jsonReturned if the dashboard item property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the dashboard item id is invalid.
- Status
404Returned if the dashboard item with given id does not exist or user does not have permissions to view it.
api/2/field
Create custom fieldPOST /rest/api/2/field
Creates a custom field using a definition (object encapsulating custom field data)
Request
Example
{"name":"New custom field","description":"Custom field for picking groups","type":"com.atlassian.jira.plugin.system.customfieldtypes:grouppicker","searcherKey":"com.atlassian.jira.plugin.system.customfieldtypes:grouppickersearcher"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/custom-field-definition#","title":"Custom Field Definition","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string"},"searcherKey":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201Returned if custom field was created.
Example
{"id":"customfield_10101","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/field#","title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. invalid values).
- Status
500Returned if exception occured during custom field creation.
Get fieldsGET /rest/api/2/field
Returns a list of all fields, both System and Custom
Responses
- Status
200 - application/jsonContains a full representation of all visible fields in JSON.
Example
[{"id":"description","name":"Description","custom":false,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["description"],"schema":{"type":"string","system":"description"}},{"id":"summary","key":"summary","name":"Summary","custom":false,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["summary"],"schema":{"type":"string","system":"summary"}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-field#","title":"List of Field","type":"array","items":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}}
api/2/field/{fieldKey}/option
Create optionPOST /rest/api/2/field/{fieldKey}/option
Creates an option for a select list issue field, for a given field key. The Id will be automatically assigned. Only Jira administrators or the add-ons that provided the field may use this method.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-field-option#","title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturned if the option has been successfully created.
Example
{"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"},"config":{"scope":{"projects":[],"projects2":[{"id":1001,"attributes":["notSelectable"]},{"id":1002,"attributes":["notSelectable"]}],"global":{}},"attributes":[]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-field-option#","title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the option is invalid.
- Status
403Returned if the request is not authenticated as a Jira administrator nor the add-on that provided the field.
- Status
404Returned if the field does not exist or does not support options.
Get all optionsGET /rest/api/2/field/{fieldKey}/option
Returns all options defined for a select list issue field, for a given field key. Only Jira administrators or the add-ons that provided the field may use this method.
The list of options will be ordered by the option Id and paginated.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | The starting index of the returned objects. Base index: 0. |
maxResults | int | The maximum number of items to return per page. Default: 50. |
Responses
- Status
200 - application/jsonReturned if the request is successful.
Example
{"self":"http://www.example.com/jira/rest/api/2/field/fieldKey/option?startAt=0&maxResults=1","nextPage":"http://www.example.com/jira/rest/api/2/field/fieldKey/option?startAt=1&maxResults=1","maxResults":1,"startAt":0,"total":10,"isLast":false,"values":[{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"},"config":{"scope":{"projects":[],"projects2":[{"id":1001,"attributes":["notSelectable"]},{"id":1002,"attributes":["notSelectable"]}],"global":{}},"attributes":[]}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-issue-field-option#","title":"Page of Issue Field Option","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
403Returned if the request is not authenticated as the Jira administrator nor the add-on that provided the field.
- Status
404Returned if the field does not exist or does not support options.
Put optionPUT /rest/api/2/field/{fieldKey}/option/{optionId}
Creates or updates an option for a select list issue field, for a given field key and option Id. Only Jira administrators or the add-ons that provided the field may use this method.
Request
Example
{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"},"config":{"scope":{"projects":[],"projects2":[{"id":1001,"attributes":["notSelectable"]},{"id":1002,"attributes":["notSelectable"]}],"global":{}},"attributes":[]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-field-option#","title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturned if the option has been successfully created.
Example
{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"},"config":{"scope":{"projects":[],"projects2":[{"id":1001,"attributes":["notSelectable"]},{"id":1002,"attributes":["notSelectable"]}],"global":{}},"attributes":[]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-field-option#","title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the option is invalid, or the option Id does not match the optionId path parameter.
- Status
403Returned if the request is not authenticated as a Jira administrator nor the add-on that provided the field.
- Status
404Returned if field does not exist.
Get optionGET /rest/api/2/field/{fieldKey}/option/{optionId}
Returns an option for a select list issue field, for a given field key and option Id. Only Jira administrators or the add-on that provided the field may use this method.
Responses
- Status
200 - application/jsonReturned if the request is successful.
Example
{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"},"config":{"scope":{"projects":[],"projects2":[{"id":1001,"attributes":["notSelectable"]},{"id":1002,"attributes":["notSelectable"]}],"global":{}},"attributes":[]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-field-option#","title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}
- Status
403Returned if the request is not authenticated as the Jira administrator nor the add-on that provided the field.
- Status
404Returned if the field does not exist or does not support options.
DeleteDELETE /rest/api/2/field/{fieldKey}/option/{optionId}
Deletes an option from a select list issue field, for a given field key and option Id. Only Jira administrators or the add-ons that provided the field may use this method.
Responses
- Status
204Returned if the field option has been successfully removed.
- Status
403Returned if the request is not authenticated as a Jira administrator nor the add-on that provided the field.
- Status
404Returned if field does not exist or the option does not exist.
- Status
409Returned if the option is selected for the field in any issue.
ReplaceDELETE /rest/api/2/field/{fieldKey}/option/{optionId}/issue
Removes an option from issues that it is set on. Issues may be narrowed down by a JQL filter. A replacement option may be specified.
This is an asynchronous method.
Request
query parameters
parameter | type | description |
---|---|---|
replaceWith | long | The replacement option. |
jql | string | The jql filter to narrow down the set of issues that should be affected. |
Responses
- Status
400Returned if the JQL query is invalid.
- Status
303Returned if the request is successful. Follow the "location" header to get the task progress.
Example
{"self":"http://www.example.com/jira/rest/api/2/task/1","id":"1","description":"Remove option 1 from issues matched by '*', and replace with option 3","status":"COMPLETE","result":{"modifiedIssues":[10001,10010],"unmodifiedIssues":[10005],"errors":{"errors":{},"errorMessages":["Option 2 cannot be set on issue MKY-5 as it is not in the correct scope"]}},"elapsedRuntime":42}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/task-progress-of-remove-option-from-issues-result#","title":"Task Progress of Remove Option From Issues Result","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"description":"Description of the task","type":"string"},"status":{"description":"Current status of the task","type":"string","enum":["ENQUEUED","RUNNING","COMPLETE","FAILED","CANCEL_REQUESTED","CANCELLED","DEAD"]},"message":{"description":"Message regarding the current progress","type":"string"},"result":{"title":"Remove Option From Issues Result","description":"The eventual result, will be available when the task is finished successfully","type":"object","properties":{"modifiedIssues":{"description":"IDs of issues that were successfully modified","type":"array","items":{"type":"integer"}},"unmodifiedIssues":{"description":"IDs of issues that could not be changed due to errors","type":"array","items":{"type":"integer"}},"errors":{"title":"Simple Error Collection","description":"A collection of errors related to issues that could not be changed. The collection size is limited, which means not all errors will be returned if there are a lot of them.","type":"object","properties":{"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"errorMessages":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false},"submittedBy":{"description":"Id of the user that submitted the task","type":"integer"},"progress":{"description":"The progress percentage (from 0 to 100)","type":"integer"},"elapsedRuntime":{"description":"How much time did running the task take (so far, this is updated in real time), in milliseconds","type":"integer"},"submitted":{"description":"The timestamp of when the task was submitted","type":"string"},"started":{"description":"The timestamp of when the task was started","type":"string"},"finished":{"description":"The timestamp of when the task processing was finished","type":"string"},"lastUpdate":{"description":"The timestamp of when the task progress was last updated","type":"string"}},"additionalProperties":false,"required":["self","id","status","submittedBy","progress","elapsedRuntime","submitted","started","lastUpdate"]}
- Status
404Returned if the field does not exist or does not support options, or if the options to be replaced do not exist.
Get suggestions editGET /rest/api/2/field/{fieldKey}/option/suggestions/edit
Returns the options defined for a select list issue field that are available to the currently logged-in user and can be assigned to an issue, for a given field key. Options which are not selectable are not returned. The list of options will be paginated.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | The starting index of the returned objects. Base index: 0. |
maxResults | int | The maximum number of items to return per page. Default: 50. |
projectId | long | Only options available for this project will be returned. |
Responses
- Status
200 - application/jsonReturned if the request is successful.
Example
{"self":"http://www.example.com/jira/rest/api/2/field/fieldKey/option/suggestions?startAt=0&maxResults=1","nextPage":"http://www.example.com/jira/rest/api/2/field/fieldKey/option/suggestions?startAt=1&maxResults=1","maxResults":1,"startAt":0,"total":10,"isLast":false,"values":[{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-issue-field-option#","title":"Page of Issue Field Option","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
404Returned if the field does not exist or does not support options.
Get suggestions searchGET /rest/api/2/field/{fieldKey}/option/suggestions/search
Returns the options defined for a select list issue field that are available to the currently logged-in user, for a given field key. The list of options will be paginated.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | The starting index of the returned objects. Base index: 0. |
maxResults | int | The maximum number of items to return per page. Default: 50. |
projectId | long | Only options available for this project will be returned. |
Responses
- Status
200 - application/jsonReturned if the request is successful.
Example
{"self":"http://www.example.com/jira/rest/api/2/field/fieldKey/option/suggestions?startAt=0&maxResults=1","nextPage":"http://www.example.com/jira/rest/api/2/field/fieldKey/option/suggestions?startAt=1&maxResults=1","maxResults":1,"startAt":0,"total":10,"isLast":false,"values":[{"id":1,"value":"Team 1","properties":{"leader":{"name":"Leader Name","email":"lname@example.com"},"members":42,"description":"The team's description","founded":"2016-06-06"}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-issue-field-option#","title":"Page of Issue Field Option","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Issue Field Option","type":"object","properties":{"id":{"type":"integer"},"value":{"type":"string"},"properties":{"title":"Object Node","type":"object"},"config":{"title":"Issue Field Option Config","type":"object","properties":{"scope":{"title":"Issue Field Option Scope","type":"object","properties":{"projects":{"type":"array","items":{"type":"integer"}},"projects2":{"type":"array","items":{"title":"Project Scope","type":"object","properties":{"id":{"type":"integer"},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false,"required":["id"]}},"global":{"title":"Global Scope","type":"object","properties":{"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false},"attributes":{"type":"array","items":{"type":"string","enum":["notSelectable","defaultValue"]}}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
404Returned if the field does not exist or does not support options.
api/2/filter
Resource for searches.
Create filterPOST /rest/api/2/filter
Creates a new filter, and returns newly created filter. Currently sets permissions just using the users default sharing permissions
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Example
{"name":"All Open Bugs","description":"Lists all open bugs","jql":"type = Bug and resolution is empty","favourite":true,"favouritedCount":0}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
- Status
400Returned if the input is invalid (e.g. filter name was not provided).
Get filtersGET /rest/api/2/filter
Returns all filters for the current user
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-filter#","title":"List of Filter","type":"array","items":{"title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
- Status
400Returned if there is a problem looking up the filter given the id
Edit filterPUT /rest/api/2/filter/{id}
Updates an existing filter, and returns its new value.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Example
{"name":"All Open Bugs","description":"Lists all open bugs","jql":"type = Bug and resolution is empty","favourite":true,"favouritedCount":0}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
- Status
400Returned if there is a problem updating up the filter of the given id
Delete filterDELETE /rest/api/2/filter/{id}
Delete a filter.
Responses
- Status
400Returned if an error occurs.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the filter was removed successfully.
Get filterGET /rest/api/2/filter/{id}
Returns a filter given an id
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
- Status
400Returned if there is a problem looking up the filter given the id
Default columnsGET /rest/api/2/filter/{id}/columns
Returns the default columns for the given filter. Currently logged in user will be used as the user making such request.
Responses
- Status
200 - application/jsonReturns a list of columns for configured for the given user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-column-layout-item#","title":"List of Column Layout Item","type":"array","items":{"title":"Column Layout Item","type":"object","properties":{"columnHeadingKey":{"type":"string"},"id":{"type":"string"},"navigableField":{"title":"Navigable Field","type":"object","properties":{"columnCssClass":{"type":"string"},"columnHeadingKey":{"type":"string"},"defaultSortOrder":{"type":"string"},"hiddenFieldId":{"type":"string"},"sortComparatorSource":{"title":"Field Comparator Source","type":"object"},"sorter":{"title":"Lucene Field Sorter","type":"object","properties":{"comparator":{"type":"object"},"documentConstant":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"position":{"type":"integer"}},"additionalProperties":false,"required":["position"]}}
- Status
500Returned if an error occurs while retrieving the column configuration.
- Status
404Returned if the filter does not have any columns.
Reset columnsDELETE /rest/api/2/filter/{id}/columns
Resets the columns for the given filter such that the filter no longer has its own column config.
Responses
- Status
500Returned if an error occurs while retrieving the column configuration.
- Status
204Returned when the columns are reset/removed successfully
Set columnsPUT /rest/api/2/filter/{id}/columns
Sets the default columns for the given filter.
Request
Responses
- Status
200Returned when the columns are saved successfully
- Status
500Returned if an error occurs while retrieving the column configuration.
Set favourite for filterPUT /rest/api/2/filter/{id}/favourite
Favourites a filter
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
- Status
400Returned if there is a problem looking up the filter given the id
Delete favourite for filterDELETE /rest/api/2/filter/{id}/favourite
UN-Favourites a filter
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Responses
- Status
200 - application/jsonReturns a JSON representation of a filter
Example
{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter#","title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]}
- Status
400Returned if there is a problem looking up the filter given the id
Get share permissionsGET /rest/api/2/filter/{id}/permission
Returns all share permissions of the given filter.
Responses
- Status
200 - application/jsonReturned if successful.
Example
[{"id":10000,"type":"global"},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/MKY","id":"10002","key":"MKY","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10002","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10002","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10002","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10002"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false},"role":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]}},{"id":10010,"type":"group","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-filter-permission#","title":"List of Filter Permission","type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
- Status
401Returned if user is not logged in.
- Status
404Returned when filter with given id does not exist or when the user does not have permissions to view the filter. .
Add share permissionPOST /rest/api/2/filter/{id}/permission
Adds a share permissions to the given filter. Adding a global permission removes all previous permissions from the filter.
Request
Example
{"type":"group","groupname":"jira-administrators"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/share-permission-input#","title":"Share Permission Input","type":"object","properties":{"type":{"type":"string"},"projectId":{"type":"string"},"groupname":{"type":"string"},"projectRoleId":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if successful.
Example
[{"id":10000,"type":"global"},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/MKY","id":"10002","key":"MKY","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10002","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10002","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10002","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10002"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false},"role":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]}},{"id":10010,"type":"group","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-filter-permission#","title":"List of Filter Permission","type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
- Status
400Returned given permission input bean is invalid or when user does not have the permission to share filters or when the user cannot edit the given filter.
- Status
401Returned if user is not logged in.
- Status
404Returned when filter with given id does not exist or when the user does not have permissions to view the filter. .
Get share permissionGET /rest/api/2/filter/{id}/permission/{permissionId}
Returns a single share permission of the given filter.
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"id":10000,"type":"global"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/filter-permission#","title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
401Returned if user is not logged in.
- Status
404Returned when filter or permission with given id does not exist or when the user does not have permissions to view the filter.
Delete share permissionDELETE /rest/api/2/filter/{id}/permission/{permissionId}
Removes a share permissions from the given filter.
Responses
- Status 200 - application/json
- Status
204Returned if successful.
- Status
404Returned when filter or permission with given id does not exist or when the user does not have permissions to view the filter.
Get default share scopeGET /rest/api/2/filter/defaultShareScope
Returns the default share scope of the logged-in user.
Responses
- Status
200 - application/jsonReturns the default share scope of the logged-in user.
Example
{"scope":"GLOBAL"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default-share-scope#","title":"Default Share Scope","type":"object","properties":{"scope":{"type":"string","enum":["GLOBAL","AUTHENTICATED","PRIVATE"]}},"additionalProperties":false}
- Status
400Returned if there is a problem looking up preferences for the logged-in user
Set default share scopePUT /rest/api/2/filter/defaultShareScope
Sets the default share scope of the logged-in user. Available values are GLOBAL and PRIVATE.
Request
Example
{"scope":"GLOBAL"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default-share-scope#","title":"Default Share Scope","type":"object","properties":{"scope":{"type":"string","enum":["GLOBAL","AUTHENTICATED","PRIVATE"]}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturns the new default share scope of the logged-in user.
Example
{"scope":"GLOBAL"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default-share-scope#","title":"Default Share Scope","type":"object","properties":{"scope":{"type":"string","enum":["GLOBAL","AUTHENTICATED","PRIVATE"]}},"additionalProperties":false}
- Status
400Returned if there is a problem setting the preferences for the logged-in user
Get favourite filtersGET /rest/api/2/filter/favourite
Returns the favourite filters of the logged-in user.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
Responses
- Status
200 - application/jsonReturns a JSON representation of a list of filters
Example
[{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}},{"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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"assignee = currentUser() and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10010","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=assignee+in+%28currentUser%28%29%29+and+resolution+is+empty","favourite":true,"favouritedCount":0,"sharePermissions":[{"id":10000,"type":"global"},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}}],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-filter#","title":"List of Filter","type":"array","items":{"title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
Get my filtersGET /rest/api/2/filter/my
Returns the user filters, which include personal and favourite filters (if {@code includeFavourites} is true).
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | the parameters to expand |
includeFavourites | boolean |
Responses
- Status
200 - application/jsonReturns a JSON representation of a list of filters
Example
[{"self":"http://www.example.com/jira/rest/api/2/filter/10000","id":"10000","name":"All Open Bugs","description":"Lists all open bugs","owner":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"type = Bug and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10000","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty","favourite":true,"favouritedCount":0,"sharePermissions":[],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}},{"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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"jql":"assignee = currentUser() and resolution is empty","viewUrl":"http://www.example.com/jira/issues/?filter=10010","searchUrl":"http://www.example.com/jira/rest/api/2/search?jql=assignee+in+%28currentUser%28%29%29+and+resolution+is+empty","favourite":true,"favouritedCount":0,"sharePermissions":[{"id":10000,"type":"global"},{"id":10010,"type":"project","project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}}],"subscriptions":{"size":0,"items":[],"max-results":0,"start-index":0,"end-index":0}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-filter#","title":"List of Filter","type":"array","items":{"title":"Filter","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"owner":{"$ref":"#/definitions/user"},"jql":{"type":"string"},"viewUrl":{"type":"string","format":"uri"},"searchUrl":{"type":"string","format":"uri"},"favourite":{"type":"boolean"},"favouritedCount":{"type":"integer"},"sharePermissions":{"type":"array","items":{"title":"Filter Permission","type":"object","properties":{"id":{"type":"integer"},"type":{"type":"string"},"project":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"role":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}},"sharedUsers":{"title":"User Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/user"}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"subscriptions":{"title":"Filter Subscription Bean List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"Filter Subscription","type":"object","properties":{"id":{"type":"integer"},"user":{"$ref":"#/definitions/user"},"group":{"$ref":"#/definitions/group"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]}},"additionalProperties":false,"required":["favourite","favouritedCount"]},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
api/2/group
Remove groupDELETE /rest/api/2/group
Deletes a group by given group parameter.
Returns no content
Request
query parameters
parameter | type | description |
---|---|---|
groupname | string | (mandatory) The name of the group to delete. |
swapGroup | string | If you delete a group and content is restricted to that group, the content will be hidden from all users. To prevent this, use this parameter to specify a different group to transfer the restrictions (comments and worklogs only) to. |
Responses
- Status
200 - application/jsonReturned if the group was deleted.
- Status
400Returned if user requested an group that does not exist.
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user does not have administrator permissions.
- Status
404Returned if the requested group was not found.
Create groupPOST /rest/api/2/group
Creates a group by given group parameter
Returns REST representation for the requested group.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/add-group#","title":"Add Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturns full representation of a Jira group in JSON format.
Example
{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators","users":{"size":1,"items":[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false}],"max-results":50,"start-index":0,"end-index":0},"expand":"users"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/group#","title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"},"users":{"title":"Paged List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"expand":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if user requested an empty group name or group already exists
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user does not have administrator permissions.
Get group
deprecatedGET /rest/api/2/group
Returns REST representation for the requested group. Allows to get list of active users belonging to the specified group and its subgroups if "users" expand option is provided. You can page through users list by using indexes in expand param. For example to get users from index 10 to index 15 use "users[10:15]" expand value. This will return 6 users (if there are at least 16 users in this group). Indexes are 0-based and inclusive.
This resource is deprecated, please use group/member API instead.
Request
query parameters
parameter | type | description |
---|---|---|
groupname | string | A name of requested group. |
expand | string | List of fields to expand. Currently only available expand is "users". |
Responses
- Status - application/json
Get users from groupGET /rest/api/2/group/member
This resource returns a paginated list of users who are members of the specified group and its subgroups. Users in the page are ordered by user names. User of this resource is required to have sysadmin or admin permissions.
Request
query parameters
parameter | type | description |
---|---|---|
groupname | string | a name of the group for which members will be returned. |
includeInactiveUsers | boolean Default: false | inactive users will be included in the response if set to true. |
startAt | long Default: 0 | the index of the first user in group to return (0 based). |
maxResults | int Default: 50 | the maximum number of users to return (max 50). |
Responses
- Status
200 - application/jsonPaginated list of users in the group.
Example
{"self":"http://www.example.com/jira/rest/api/2/group/member?groupname=jira-administrators&includeInactiveUsers=false&startAt=2&maxResults=2","nextPage":"http://www.example.com/jira/rest/api/2/group/member?groupname=jira-administrators&includeInactiveUsers=false&startAt=4&maxResults=2","maxResults":2,"startAt":3,"total":5,"isLast":false,"values":[{"self":"http://example/jira/rest/api/2/user?username=fred","name":"Fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","emailAddress":"fred@atlassian.com","avatarUrls":{},"displayName":"Fred","active":true,"timeZone":"Australia/Sydney"},{"self":"http://example/jira/rest/api/2/user?username=barney","name":"Barney","key":"barney","emailAddress":"barney@atlassian.com","avatarUrls":{},"displayName":"Barney","active":false,"timeZone":"Australia/Sydney"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-user#","title":"Page of User","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
400Returned if the name of the provided group is empty
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user is not admin or sysadmin
- Status
404Returned if the specified group does not exist
Add user to groupPOST /rest/api/2/group/user
Adds given user to a group.
Returns the current state of the group.
Request
query parameters
parameter | type | description |
---|---|---|
groupname | string | A name of requested group. |
Example
{"name":"charlie"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/update-user-to-group#","title":"Update User To Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturns full representation of a Jira group in JSON format.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/group#","title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"},"users":{"title":"Paged List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"start-index":{"type":"integer"},"end-index":{"type":"integer"},"items":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"additionalProperties":false,"required":["size","max-results","start-index","end-index"]},"expand":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if user requested an empty group name or the user already belongs to the group.
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user does not have administrator permissions.
- Status
404Returned if the requested group was not found or requested user was not found.
Remove user from groupDELETE /rest/api/2/group/user
Removes given user from a group.
Returns no content
Request
query parameters
parameter | type | description |
---|---|---|
groupname | string | A name of requested group. |
username | string | User to remove from a group |
Responses
- Status
200 - application/jsonIf the user was removed from the group.
- Status
400Returned if user requested an empty group name
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user does not have administrator permissions.
- Status
404Returned if the requested group was not found or the requested user wan not found
api/2/groups
REST endpoint for searching groups in a group picker
Find groupsGET /rest/api/2/groups/picker
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
parameter | type | description |
---|---|---|
query | string | a String to match groups agains |
exclude | string | |
maxResults | int | |
userName | string |
Responses
- Status
200 - application/jsonReturned even if no groups match the given substring
Example
{"header":"Showing 20 of 25 matching groups","total":25,"groups":[{"name":"jdog-developers","html":"<b>j</b>dog-developers"},{"name":"juvenal-bot","html":"<b>j</b>uvenal-bot"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/group-suggestions#","title":"Group Suggestions","type":"object","properties":{"header":{"type":"string"},"total":{"type":"integer"},"groups":{"type":"array","items":{"title":"Group Suggestion","type":"object","properties":{"name":{"type":"string"},"html":{"type":"string"},"labels":{"type":"array","items":{"title":"Group Label","type":"object","properties":{"text":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["ADMIN","SINGLE","MULTIPLE"]}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}
api/2/groupuserpicker
Find users and groupsGET /rest/api/2/groupuserpicker
Returns a list of users and groups matching query with highlighting. This resource cannot be accessed anonymously.
Request
query parameters
parameter | type | description |
---|---|---|
query | string | A string used to search username, Name or e-mail address |
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. |
showAvatar | boolean | If the user avatar should be returned or not |
fieldId | string | The custom field id, if this request comes from a custom field, such as a user picker. Optional. |
projectId | string | The list of project ids to further restrict the search This parameter can occur multiple times to pass in multiple project ids. Comma separated value is not supported. This parameter is only used when fieldId is present. |
issueTypeId | string | The list of issue type ids to further restrict the search. This parameter can occur multiple times to pass in multiple issue type ids. Comma separated value is not supported. Special values such as -1 (all standard issue types), -2 (all subtask issue types) are supported. This parameter is only used when fieldId is present. |
avatarSize | string | The size of the avatar to return. If showAvatar is false this parameter has no effect. Valid size values include 'xsmall', 'small', 'medium', 'large', 'xlarge', 'xxlarge' and 'xxxlarge'. The default 'xsmall' size will be returned if this parameter is omitted or an invalid value is provided. |
caseInsensitive | boolean | whether the search for groups should be case insensitive |
excludeConnectAddons | boolean Default: false | Boolean indicating whether Connect Add-on users and groups should be excluded from the search results |
Responses
- Status
200
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/users-and-groups#","title":"Users And Groups","type":"object","properties":{"users":{"title":"User Picker Results","type":"object","properties":{"users":{"type":"array","items":{"title":"User Picker User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"html":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}},"total":{"type":"integer"},"header":{"type":"string"}},"additionalProperties":false},"groups":{"title":"Group Suggestions","type":"object","properties":{"header":{"type":"string"},"total":{"type":"integer"},"groups":{"type":"array","items":{"title":"Group Suggestion","type":"object","properties":{"name":{"type":"string"},"html":{"type":"string"},"labels":{"type":"array","items":{"title":"Group Label","type":"object","properties":{"text":{"type":"string"},"title":{"type":"string"},"type":{"type":"string","enum":["ADMIN","SINGLE","MULTIPLE"]}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false}
api/2/issue
Create issuePOST /rest/api/2/issue
Creates an issue or a sub-task from a JSON representation.
You can provide two parameters in request's body:update
or fields
.
The fields, that can be set on an issue create operation, can be determined using the /rest/api/2/issue/createmeta resource.
If a particular field is not configured to appear on the issue's Create screen, then it will not be returned in the createmeta response.
A field validation error will occur if such field is submitted in request.
Creating a sub-task is similar to creating an issue with the following differences:
issueType
field must be set to a sub-task issue type (use/issue/createmeta
to find sub-task issue types), and- You must provide a
parent
field with the ID or key of the parent issue.
Request
query parameters
parameter | type | description |
---|---|---|
updateHistory | boolean Default: false | If set to true, then project an issue was created in is added to the current user's project history. Project history is shown under Projects menu in Jira. By default the project history is not updated. |
Example
{"update":{"worklog":[{"add":{"timeSpent":"60m","started":"2011-07-05T11:05:00.000+0000"}}]},"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_30000":["10000","10002"],"customfield_80000":{"value":"red"},"customfield_20000":"06/Jul/11 3:25 PM","customfield_40000":"this is a text field","customfield_70000":["jira-administrators","jira-software-users"],"customfield_60000":"jira-software-users","customfield_50000":"this is a text area. big text.","customfield_10000":"09/Jun/81"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-update#","title":"Issue Update","type":"object","properties":{"transition":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"update":{"type":"object","patternProperties":{".+":{"type":"array","items":{"title":"Field Operation","type":"object"}}},"additionalProperties":false},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
201 - application/json.Returns a link to the created issue.
Example
{"id":"10000","key":"TST-24","self":"http://www.example.com/jira/rest/api/2/issue/10000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-create-response#","title":"Issue Create Response","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"self":{"type":"string"},"postUpdate":{"$ref":"#/definitions/nested-response"},"transition":{"$ref":"#/definitions/nested-response"}},"definitions":{"nested-response":{"title":"Nested Response","type":"object","properties":{"status":{"type":"integer"},"errorCollection":{"title":"Error Collection","type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}},"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"status":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the input is invalid, e.g. missing required fields, invalid field values, etc.
Example
{"errorMessages":["Field 'priority' is required"],"errors":{}}
Create issuesPOST /rest/api/2/issue/bulk
Creates multiple issues or sub-tasks from a JSON representation, in a single bulk operation.
Creating a sub-task is similar to creating an issue - check Create issue section for details: {@link IssueResource#createIssue(boolean, IssueUpdateBean)}}Request
Example
{"issueUpdates":[{"update":{"worklog":[{"add":{"timeSpent":"60m","started":"2011-07-05T11:05:00.000+0000"}}]},"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_30000":["10000","10002"],"customfield_80000":{"value":"red"},"customfield_20000":"06/Jul/11 3:25 PM","customfield_40000":"this is a text field","customfield_70000":["jira-administrators","jira-software-users"],"customfield_60000":"jira-software-users","customfield_50000":"this is a text area. big text.","customfield_10000":"09/Jun/81"}},{"update":{},"fields":{"project":{"id":"1000"},"summary":"something's very wrong","issuetype":{"id":"10000"},"assignee":{"name":"jerry"},"reporter":{"name":"kosecki"},"priority":{"id":"20000"},"labels":["new_release"],"timetracking":{"originalEstimate":"15","remainingEstimate":"5"},"security":{"id":"10000"},"versions":[{"id":"10000"}],"environment":"environment","description":"description","duedate":"2011-04-16","fixVersions":[{"id":"10001"}],"components":[{"id":"10000"}],"customfield_30000":["10000","10002"],"customfield_80000":{"value":"red"},"customfield_20000":"06/Jul/11 3:25 PM","customfield_40000":"this is a text field","customfield_70000":["jira-administrators","jira-software-users"],"customfield_60000":"jira-software-users","customfield_50000":"this is a text area. big text.","customfield_10000":"09/Jun/81"}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issues-update#","title":"Issues Update","type":"object","properties":{"issueUpdates":{"type":"array","items":{"title":"Issue Update","type":"object","properties":{"transition":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"update":{"type":"object","patternProperties":{".+":{"type":"array","items":{"title":"Field Operation","type":"object"}}},"additionalProperties":false},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}}},"definitions":{"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
201 - application/json.Returns a link to the created issues.
Example
{"issues":[{"id":"10000","key":"TST-24","self":"http://www.example.com/jira/rest/api/2/issue/10000"},{"id":"10001","key":"TST-25","self":"http://www.example.com/jira/rest/api/2/issue/10001"}],"errors":[]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-create-response#","title":"Issue Create Response","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"self":{"type":"string"},"postUpdate":{"$ref":"#/definitions/nested-response"},"transition":{"$ref":"#/definitions/nested-response"}},"definitions":{"nested-response":{"title":"Nested Response","type":"object","properties":{"status":{"type":"integer"},"errorCollection":{"title":"Error Collection","type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}},"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"status":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if the input is invalid, e.g. missing required fields, invalid field values, etc.
Example
{"status":400,"elementErrors":{"errorMessages":["Field 'priority' is required"],"errors":{}},"failedElementNumber":3}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/bulk-operation-error-result#","title":"Bulk Operation Error Result","type":"object","properties":{"status":{"type":"integer"},"elementErrors":{"title":"Error Collection","type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}},"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"status":{"type":"integer"}},"additionalProperties":false},"failedElementNumber":{"type":"integer"}},"additionalProperties":false}
Get issueGET /rest/api/2/issue/{issueIdOrKey}
Returns a full representation of the issue for the given issue key.
The issue JSON consists of the issue key and a collection of fields. Additional information like
links to workflow transition sub-resources, or HTML rendered values of the fields supporting HTML rendering
can be retrieved with expand
request parameter specified.
The fields
request parameter accepts a comma-separated list of fields
to include in the response. It can be used to retrieve a subset of fields. By default all fields are returned in the response.
A particular field can be excluded from the response if prefixed with a "-" (minus) sign.
Parameter can be provided multiple times on a single request.
By default, all fields are returned in the response. Note: this is different
from a JQL search - only navigable fields are returned by default (*navigable
).
Request
query parameters
parameter | type | description |
---|---|---|
fields | string | Multi-value parameter defining the fields returned for the issue. By default, all fields are returned. Allowed values:
|
expand | string | Multi-value parameter defining the additional issue attributes to be included in the response. These attributes are not returned by default. Allowed values:
|
properties | string | Multi-value parameter defining the list of properties returned for the issue. Unlike
|
fieldsByKeys | boolean | If true then issue fields are referenced by keys instead of IDs. |
updateHistory | boolean | If set to true, adds the issue retrieved by this method to the current user's issue history.
Issue history is shown under Issues menu item in Jira, and is also used by |
Responses
- Status
200 - application/json.Returns a full representation of an issue in JSON format.
Example
{"expand":"renderedFields,names,schema,operations,editmeta,changelog,versionedRepresentations","id":"10002","self":"http://www.example.com/jira/rest/api/2/issue/10002","key":"EX-1","names":{"watcher":"watcher","attachment":"attachment","sub-tasks":"sub-tasks","description":"description","project":"project","comment":"comment","issuelinks":"issuelinks","worklog":"worklog","updated":"updated","timetracking":"timetracking"},"schema":{},"fields":{"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}]},"attachment":[{"id":10001,"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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:55.720+0000","size":23123,"mimeType":"image/jpeg","content":"http://www.example.com/jira/attachments/10000","thumbnail":"http://www.example.com/jira/secure/thumbnail/10000"}],"sub-tasks":[{"id":"10000","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/statuses/open.png","name":"Open"}}}}],"description":"example bug report","project":{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false},"comment":[{"self":"http://www.example.com/jira/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2/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/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:54.857+0000","updated":"2017-12-07T15:13:54.857+0000","visibility":{"type":"role","value":"Administrators"}}],"issuelinks":[{"id":"10001","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/statuses/open.png","name":"Open"}}}},{"id":"10002","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/statuses/open.png","name":"Open"}}}}],"worklog":[{"self":"http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","updated":"2017-12-07T15:13:55.764+0000","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.764+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}],"updated":1,"timetracking":{"originalEstimate":"10m","remainingEstimate":"3m","timeSpent":"6m","originalEstimateSeconds":600,"remainingEstimateSeconds":200,"timeSpentSeconds":400}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue#","title":"Issue","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"string"},"self":{"type":"string","format":"uri"},"key":{"type":"string"},"renderedFields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"properties":{"title":"Properties","type":"object","properties":{"properties":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"names":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"schema":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/json-type"}},"additionalProperties":false},"transitions":{"type":"array","items":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false}},"operations":{"title":"Opsbar","type":"object","properties":{"linkGroups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"editmeta":{"title":"Edit Meta","type":"object","properties":{"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false}},"additionalProperties":false},"changelog":{"title":"Changelog","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"histories":{"type":"array","items":{"title":"Change History","type":"object","properties":{"id":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"items":{"type":"array","items":{"title":"Change Item","type":"object","properties":{"field":{"type":"string"},"fieldtype":{"type":"string"},"fieldId":{"type":"string"},"from":{"type":"string"},"fromString":{"type":"string"},"to":{"type":"string"},"toString":{"type":"string"}},"additionalProperties":false}},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false},"versionedRepresentations":{"type":"object","patternProperties":{".+":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"additionalProperties":false},"fieldsToInclude":{"title":"Included Fields","type":"object"},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"definitions":{"field-meta":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"$ref":"#/definitions/json-type"},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]},"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false},"json-type":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"link-group":{"title":"Link Group","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"header":{"$ref":"#/definitions/simple-link"},"weight":{"type":"integer"},"links":{"type":"array","items":{"$ref":"#/definitions/simple-link"}},"groups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"simple-link":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}
- Status
404Returned if the requested issue was not found, or the user does not have permission to view it.
Delete issueDELETE /rest/api/2/issue/{issueIdOrKey}
Deletes an individual issue.
If the issue has sub-tasks you must set thedeleteSubtasks=true
parameter to delete the issue.
You cannot delete an issue without deleting its sub-tasks.Request
query parameters
parameter | type | description |
---|---|---|
deleteSubtasks | string | A |
Responses
- Status
400Returned if an error occurs.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the issue was successfully removed.
- Status
403Returned if the user does not have permission to delete the issue.
- Status
404Returned if the issue does not exist.
Edit issuePUT /rest/api/2/issue/{issueIdOrKey}
Edits the issue from a JSON representation.
The fields available for update can be determined using the /rest/api/2/issue/{issueIdOrKey}/editmeta resource.If a field is hidden from the Edit screen then it will not be returned by the editmeta resource. A field validation error will occur if such field is submitted in an edit request. However connect add-on with admin scope may override a screen security configuration. If an issue cannot be edited in Jira because of its workflow status (for example the issue is closed), then you will not be able to edit it with this resource. Field to be updated should appear either in
fields
or update
request's body parameter, but not in both. To update a single sub-field of a complex field (e.g. timetracking) please use the
update
parameter of the edit operation.
Using a "field_id": field_value
construction in the fields
parameter is a shortcut of "set" operation in the update
parameter.Request
query parameters
parameter | type | description |
---|---|---|
notifyUsers | boolean Default: true | Sends the notification email on issue update to all watchers. Admin or project admin permissions are required to disable the notification. |
overrideScreenSecurity | boolean Default: false | Allows update of the fields that are hidden from the issue's Edit screen. Only Connect add-on users with admin scope permission are allowed to use this flag. |
overrideEditableFlag | boolean Default: false | Updates the issue even if it is not editable (issue in status with jira.issue.editable set to false or missing). Only connect add-on users with admin scope permission are allowed to use this flag. |
Example
{"update":{"summary":[{"set":"Bug in business logic"}],"components":[{"set":""}],"timetracking":[{"edit":{"originalEstimate":"1w 1d","remainingEstimate":"4d"}}],"labels":[{"add":"triaged"},{"remove":"blocker"}]},"fields":{"summary":"This is a shorthand for a set operation on the summary field","customfield_10010":1,"customfield_10000":"This is a shorthand for a set operation on a text custom field"},"historyMetadata":{"type":"myplugin:type","description":"text description","descriptionKey":"plugin.changereason.i18.key","activityDescription":"text description","activityDescriptionKey":"plugin.activity.i18.key","actor":{"id":"tony","displayName":"Tony","type":"mysystem-user","avatarUrl":"http://mysystem/avatar/tony.jpg","url":"http://mysystem/users/tony"},"generator":{"id":"mysystem-1","type":"mysystem-application"},"cause":{"id":"myevent","type":"mysystem-event"},"extraData":{"keyvalue":"extra data","goes":"here"}},"properties":[{"key":"key1","value":"can be set at issue create or update time"},{"key":"key2","value":"and there can be multiple properties"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-update#","title":"Issue Update","type":"object","properties":{"transition":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"update":{"type":"object","patternProperties":{".+":{"type":"array","items":{"title":"Field Operation","type":"object"}}},"additionalProperties":false},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
400Returned if the issue update has failed.
- Status
204Returned if the issue was updated successfully.
- Status
403Returned if the user attempts disabling email notification or override screen security but doesn't have permission to do that.
AssignPUT /rest/api/2/issue/{issueIdOrKey}/assignee
Assigns the issue to the user.
Use this resource to assign issues for the users having "Assign Issue" permission, and not having the
"Edit Issue" permission.
If name
body parameter is set to "-1" then automatic issue assignee is used.
A name
set to null
will remove the assignee.
Request
Example
{"name":"harry"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user#","title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["active"]}
Responses
- Status
400Returned in case of problems with the provided user representation.
- Status
401Returned if the user does not have permission to assign the issue.
- Status
204Returned if the issue was successfully assigned.
- Status
404Returned if the issue or user does not exist.
Get edit issue metaGET /rest/api/2/issue/{issueIdOrKey}/editmeta
Returns the metadata for editing an issue.
The fields returned by editmeta resource are the ones shown on the issue's Edit screen. Fields hidden from the screen will not be returned unlessoverrideScreenSecurity
parameter is set to true.
If an issue cannot be edited in Jira because of its workflow status (for example the issue is closed), then no fields will be returned,
unless overrideEditableFlag
is set to true.Request
query parameters
parameter | type | description |
---|---|---|
overrideScreenSecurity | boolean Default: false | Allows retrieving edit metadata for the fields hidden on Edit screen. Only connect add-on users with admin scope permission are allowed to use this flag. |
overrideEditableFlag | boolean Default: false | Allows retrieving edit metadata for fields in non-editable status (jira.issue.editable flag set to false or missing). Only connect add-on users with admin scope permission are allowed to use this flag. |
Responses
- Status
200 - application/json.Returns a response containing a Map of FieldBeans for fields editable for the current user.
Example
{"fields":{"summary":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"name":"My Multi Select","key":"field_key","hasDefaultValue":false,"operations":["set","add"],"allowedValues":["red","blue"],"defaultValue":"red"}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/edit-meta#","title":"Edit Meta","type":"object","properties":{"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false}
- Status
403Returned if the user trying to override screen security doesn't have permission to do that.
- Status
404Returned if the requested issue is not found or the user does not have permission to view it.
NotifyPOST /rest/api/2/issue/{issueIdOrKey}/notify
Sends an email notification to the list of users defined in the request body parameters.
Request
Example
{"subject":"Duis eu justo eget augue iaculis fermentum.","textBody":"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.","htmlBody":"Lorem ipsum <strong>dolor</strong> 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.","to":{"reporter":false,"assignee":false,"watchers":true,"voters":true,"users":[{"name":"fred","active":false}],"groups":[{"name":"notification-group","self":"http://www.example.com/jira/rest/api/2/group?groupname=notification-group"}]},"restrict":{"groups":[{"name":"notification-group","self":"http://www.example.com/jira/rest/api/2/group?groupname=notification-group"}],"permissions":[{"id":"10","key":"BROWSE"}]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/notification#","title":"Notification","type":"object","properties":{"subject":{"type":"string"},"textBody":{"type":"string"},"htmlBody":{"type":"string"},"to":{"title":"To","type":"object","properties":{"reporter":{"type":"boolean"},"assignee":{"type":"boolean"},"watchers":{"type":"boolean"},"voters":{"type":"boolean"},"users":{"type":"array","items":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"groups":{"type":"array","items":{"$ref":"#/definitions/group"}}},"additionalProperties":false,"required":["reporter","assignee","watchers","voters"]},"restrict":{"title":"Restrict","type":"object","properties":{"groups":{"type":"array","items":{"$ref":"#/definitions/group"}},"permissions":{"type":"array","items":{"title":"Permission","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}},"definitions":{"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
400Returned if the request parameters fails validation, e.g. missing required fields, invalid values, etc.
- Status
204Returned if the email queueing was successful.
- Status
403Returned if outgoing emails are disabled OR no SMTP server is configured.
Get remote issue linksGET /rest/api/2/issue/{issueIdOrKey}/remotelink
Returns the remote issue links for the issue. This may be links to other Jira instances, web applications or web pages.
Request
query parameters
parameter | type | description |
---|---|---|
globalId | string | ID of the remote issue link to be returned. If null (not provided) all remote links for the issue are returned. For more details on Remote Issue Links fields refer to https://developer.atlassian.com/display/JIRADEV/Fields+in+Remote+Issue+Links |
Responses
- Status
200 - application/json.Returned if remote issue links information is retrieved successfully.
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"}}}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-remote-issue-link#","title":"List of Remote Issue Link","type":"array","items":{"title":"Remote Issue Link","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"globalId":{"type":"string"},"application":{"title":"Application","type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"relationship":{"type":"string"},"object":{"title":"Remote Object","type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"icon":{"$ref":"#/definitions/icon"},"status":{"title":"Status","type":"object","properties":{"resolved":{"type":"boolean"},"icon":{"$ref":"#/definitions/icon"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"definitions":{"icon":{"title":"Icon","type":"object","properties":{"url16x16":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"}},"additionalProperties":false}}}
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to view the remote issue links, or issue linking is disabled.
- Status
404Returned if the the issue or remote issue link does not exist.
Create or update remote issue linkPOST /rest/api/2/issue/{issueIdOrKey}/remotelink
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.
Request
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"}}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-issue-link-create-or-update-request#","title":"Remote Issue Link Create Or Update Request","type":"object","properties":{"globalId":{"type":"string"},"application":{"title":"Application","type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"relationship":{"type":"string"},"object":{"title":"Remote Object","type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"icon":{"$ref":"#/definitions/icon"},"status":{"title":"Status","type":"object","properties":{"resolved":{"type":"boolean"},"icon":{"$ref":"#/definitions/icon"}},"additionalProperties":false}},"additionalProperties":false}},"definitions":{"icon":{"title":"Icon","type":"object","properties":{"url16x16":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
200 - application/json.Returns a link to the created/updated remote issue link.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/issue/MKY-1/remotelink/10000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-issue-link-create-or-update-response#","title":"Remote Issue Link Create Or Update Response","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, etc.).
Example
{"errorMessages":[],"errors":{"title":"'title' is required."}}
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to create/update the remote issue link, or if issue linking is disabled.
Delete remote issue link by global idDELETE /rest/api/2/issue/{issueIdOrKey}/remotelink
Deletes the issue's remote link with the given global ID.
Request
query parameters
parameter | type | description |
---|---|---|
globalId | string | Global ID of a remote issue link to delete. |
Responses
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the remote issue link was removed successfully.
- Status
403Returned if the user does not have permission to delete the remote issue link, or if issue linking is disabled.
- Status
404Returned if the issue or remote issue link does not exist.
Get remote issue link by idGET /rest/api/2/issue/{issueIdOrKey}/remotelink/{linkId}
Returns the remote issue link by the given ID.
Responses
- Status
200 - application/json.Information on the remote issue link with the given ID.
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"}}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-issue-link#","title":"Remote Issue Link","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"globalId":{"type":"string"},"application":{"title":"Application","type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"relationship":{"type":"string"},"object":{"title":"Remote Object","type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"icon":{"$ref":"#/definitions/icon"},"status":{"title":"Status","type":"object","properties":{"resolved":{"type":"boolean"},"icon":{"$ref":"#/definitions/icon"}},"additionalProperties":false}},"additionalProperties":false}},"definitions":{"icon":{"title":"Icon","type":"object","properties":{"url16x16":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned 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.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to view the remote issue link, or if issue linking is disabled.
- Status
404Returned if the issue or remote issue link does not exist.
Update remote issue linkPUT /rest/api/2/issue/{issueIdOrKey}/remotelink/{linkId}
Updates a remote issue link from a JSON representation. Sets all fields without values provided to null.
Request
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"}}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-issue-link-create-or-update-request#","title":"Remote Issue Link Create Or Update Request","type":"object","properties":{"globalId":{"type":"string"},"application":{"title":"Application","type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false},"relationship":{"type":"string"},"object":{"title":"Remote Object","type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"summary":{"type":"string"},"icon":{"$ref":"#/definitions/icon"},"status":{"title":"Status","type":"object","properties":{"resolved":{"type":"boolean"},"icon":{"$ref":"#/definitions/icon"}},"additionalProperties":false}},"additionalProperties":false}},"definitions":{"icon":{"title":"Icon","type":"object","properties":{"url16x16":{"type":"string"},"title":{"type":"string"},"link":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
400Returned if the input is invalid, e.g. missing required fields, invalid values, etc.
Example
{"errorMessages":[],"errors":{"title":"'title' is required."}}
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the remote issue link was updated successfully.
- Status
403Returned if the user does not have permission to update the remote issue link, or if issue linking is disabled.
Delete remote issue link by idDELETE /rest/api/2/issue/{issueIdOrKey}/remotelink/{linkId}
Deletes the issue's remote link with the given ID.
Responses
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the remote issue link was removed successfully.
- Status
403Returned if the user does not have permission to delete the remote issue link, or if issue linking is disabled.
- Status
404Returned if the issue or remote issue link does not exist.
Do transitionPOST /rest/api/2/issue/{issueIdOrKey}/transitions
Performs the issue transition. While performing the transition you can modify other issue fields.
The fields that can be set on transiton, in eitherfields
or update
parameter can be determined
using the /rest/api/2/issue/{issueIdOrKey}/transitions?expand=transitions.fields resource.
If a field is not configured to appear on the transition screen, it will not be returned in the transition metadata. A field
validation error will occur if such field is submitted in issue transition request.Request
Example
{"update":{"comment":[{"add":{"body":"Bug has been fixed."}}]},"fields":{"assignee":{"name":"bob"},"resolution":{"name":"Fixed"}},"transition":{"id":"5"},"historyMetadata":{"type":"myplugin:type","description":"text description","descriptionKey":"plugin.changereason.i18.key","activityDescription":"text description","activityDescriptionKey":"plugin.activity.i18.key","actor":{"id":"tony","displayName":"Tony","type":"mysystem-user","avatarUrl":"http://mysystem/avatar/tony.jpg","url":"http://mysystem/users/tony"},"generator":{"id":"mysystem-1","type":"mysystem-application"},"cause":{"id":"myevent","type":"mysystem-event"},"extraData":{"keyvalue":"extra data","goes":"here"}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-update#","title":"Issue Update","type":"object","properties":{"transition":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"update":{"type":"object","patternProperties":{".+":{"type":"array","items":{"title":"Field Operation","type":"object"}}},"additionalProperties":false},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
400Returned if there is no transition specified.
- Status
204Returned if the transition was successful.
- Status
404Returned if the issue does not exist or the user does not have permission to view it.
Get transitionsGET /rest/api/2/issue/{issueIdOrKey}/transitions
Returns a list of transitions available for this issue for the current user.
Specifyexpand=transitions.fields
parameter to retrieve the fields required for a transition together with their types.
Fields metadata corresponds to the fields available in a transition screen for a particular transition.
Fields hidden from the screen will not be returned in the metadata.Request
query parameters
parameter | type | description |
---|---|---|
transitionId | string | |
skipRemoteOnlyCondition | boolean Default: false | Flag to skip evaluation of {@link RemoteOnlyCondition}. Can only be used by add-on users. |
Responses
- Status
200 - application/json.Returns all transitions available for the specified issue and the fields required to perform the transition.
Example
{"expand":"transitions","transitions":[{"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","statusCategory":{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/1","id":1,"key":"in-flight","colorName":"yellow","name":"In Progress"}},"hasScreen":false,"isGlobal":false,"isInitial":false,"isConditional":false,"fields":{"summary":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"name":"My Multi Select","key":"field_key","hasDefaultValue":false,"operations":["set","add"],"allowedValues":["red","blue"],"defaultValue":"red"}}},{"id":"711","name":"QA Review","to":{"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","statusCategory":{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/9","id":9,"key":"completed","colorName":"green"}},"hasScreen":true,"fields":{"summary":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"name":"My Multi Select","key":"field_key","hasDefaultValue":false,"operations":["set","add"],"allowedValues":["red","blue"],"defaultValue":"red"},"colour":{"required":false,"schema":{"type":"array","items":"option","custom":"com.atlassian.jira.plugin.system.customfieldtypes:multiselect","customId":10001},"name":"My Multi Select","key":"field_key","hasDefaultValue":false,"operations":["set","add"],"allowedValues":["red","blue"],"defaultValue":"red"}}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/transitions-meta#","title":"Transitions Meta","type":"object","properties":{"expand":{"type":"string"},"transitions":{"type":"array","items":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the requested issue is not found or the user does not have permission to view it.
Remove voteDELETE /rest/api/2/issue/{issueIdOrKey}/votes
Removes a current user's vote from an issue (aka "unvote").
Responses
- Status
204Empty response body is returned on success.
- Status
404Returned if the user cannot remove a vote for some reason. Possible reasons: the user did not vote on the issue, the user is the reporter, voting is disabled, the issue does not exist, etc.
Add votePOST /rest/api/2/issue/{issueIdOrKey}/votes
Adds a vote on the issue for a current user.
Responses
- Status
204Empty response body is returned on success.
- Status
404Returned if the user cannot vote for an issue for some reason. Possible reasons: the user is the reporter, the user does not have permission to vote, voting is disabled, the issue does not exist, etc.
Get votesGET /rest/api/2/issue/{issueIdOrKey}/votes
Returns voting data for an issue - whether the issue was voted for, total number of votes and users who voted for the issue.
Responses
- Status
200 - application/json.Voting data for the current issue.
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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/vote#","title":"Vote","type":"object","properties":{"self":{"type":"string","format":"uri"},"votes":{"type":"integer"},"hasVoted":{"type":"boolean"},"voters":{}},"additionalProperties":false,"required":["votes","hasVoted"]}
- Status
404Returned if the user does not have permission to view the issue or voting is disabled.
Get issue watchersGET /rest/api/2/issue/{issueIdOrKey}/watchers
Returns the list of watchers for the issue with the given key.
Responses
- Status
200 - application/json.Returns the list of watchers for the issue.
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}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/watchers#","title":"Watchers","type":"object","properties":{"self":{"type":"string"},"isWatching":{"type":"boolean"},"watchCount":{"type":"integer"},"watchers":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"additionalProperties":false,"required":["watchCount"]}
- Status
404Returned if the requested issue was not found, or the user does not have permission to view it.
Add watcherPOST /rest/api/2/issue/{issueIdOrKey}/watchers
Adds the user to the issue's watcher list.
Request
Example
"fred"
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
- Status
400Returned if there is a problem with the provided user representation.
- Status
401Returned if the user does not have permission to add watcher to the issue.
- Status
204Returned if the watcher was added successfully.
- Status
404Returned if either the issue or the user does not exist.
Remove watcherDELETE /rest/api/2/issue/{issueIdOrKey}/watchers
Removes the user from the issue's watcher list.
Request
query parameters
parameter | type | description |
---|---|---|
username | string |
Responses
- Status
400Returned if the
username
query parameter was not supplied.
- Status
401Returned if the user does not have permission to remove the issue's watcher.
- Status
204Returned if the watcher was removed successfully.
- Status
404Returned if the issue does not exist.
Get create issue metaGET /rest/api/2/issue/createmeta
Returns the metadata for creating issues. This includes the available projects, issue types, fields (with information whether those fields are required) and field types. Projects, in which the user does not have permission to create issues, will not be returned.
The fields in the createmeta response correspond to the fields on the issue's Create screen for the specific project/issuetype. Fields hidden from the screen will not be returned in the createmeta response. Fields will only be returned ifexpand=projects.issuetypes.fields
is set.
The results can be filtered by project and/or issue type, controlled by the query parameters.Request
query parameters
parameter | type | description |
---|---|---|
projectIds | string | Multi-value parameter defining project IDs to be used for the results filtering.
If not specified, all projects are returned.
This parameter can be specified multiple times on a request, and/or be a comma-separated list.
Specifying a project, which does not exist, or the user cannot create issues in it, is not an error, but
such project will not be returned in the results.
You can combine this parameter with |
projectKeys | string | Multi-value parameter defining project keys to be used for the results filtering.
If not specified, all projects are returned.
This parameter can be specified multiple times on a request, and/or be a comma-separated list.
Specifying a project, which does not exist or the user cannot create issues in it, is not an error, but
such project will not be returned in the results.
You can combine this parameter with |
issuetypeIds | string | Multi-value parameter defining issue type IDs to be used for the results filtering. If not specified, all issue types are returned. This parameter can be specified multiple times, and/or be a comma-separated list. Specifying an issue type that does not exist is not an error. |
issuetypeNames | string | Multi-value parameter defining issue type names to be used for the results filtering.
If not specified, all issue types are returned.
This parameter can be specified multiple times, but is NOT interpreted as a comma-separated list.
Specifying an issue type that does not exist is not an error.
You can combine this parameter with |
Responses
- Status
200 - application/json.Returns the metadata for creating issues.
Example
{"expand":"projects","projects":[{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example Project","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?pid=10000&avatarId=10011","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000&avatarId=10011","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000&avatarId=10011","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&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/issuetypes/bug.png","name":"Bug","subtask":false,"fields":{"issuetype":{"required":true,"name":"Issue Type","key":"issuetype","hasDefaultValue":false,"operations":["set"]}}}]}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/create-meta#","title":"Create Meta","type":"object","properties":{"expand":{"type":"string"},"projects":{"type":"array","items":{"title":"Create Meta Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string"},"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"issuetypes":{"type":"array","items":{"title":"Create Meta Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"},"expand":{"type":"string"},"fields":{"type":"object","patternProperties":{".+":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]}},"additionalProperties":false}},"additionalProperties":false,"required":["subtask"]}}},"additionalProperties":false}}},"additionalProperties":false}
- Status
403Returned if the user does not have permission to view any of the requested projects.
Get issue picker resourceGET /rest/api/2/issue/picker
Returns a list of suggested issues matching the auto-completion query for the user executing this request. This REST method checks the user's history and browsing context to return issue suggestions.
Request
query parameters
parameter | type | description |
---|---|---|
query | string | Query used to filter issue search results. |
currentJQL | string | JQL defining search context. Only issues matching this JQL query are included in the results. |
currentIssueKey | string | Key of the issue defining search context. The issue defining a context is excluded from the search results. |
currentProjectId | string | ID of a project defining search context. Only issues belonging to a given project are suggested. |
showSubTasks | boolean | Set to false to exclude subtasks from the suggestions list. |
showSubTaskParent | boolean | Set to false to exclude parent issue from the suggestions list if search is performed in the context of a sub-task. |
Responses
- Status
200 - application/json.Returns a list of issues matching the issue picker parameters.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-picker-result#","title":"Issue Picker Result","type":"object","properties":{"sections":{"type":"array","items":{"title":"Issue Section","type":"object","properties":{"label":{"type":"string"},"sub":{"type":"string"},"id":{"type":"string"},"msg":{"type":"string"},"issues":{"type":"array","items":{"title":"Issue Picker Issue","type":"object","properties":{"key":{"type":"string"},"keyHtml":{"type":"string"},"img":{"type":"string"},"summary":{"type":"string"},"summaryText":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}
api/2/issue/{issueIdOrKey}/attachments
Issue attachments
Add attachmentPOST /rest/api/2/issue/{issueIdOrKey}/attachments
Add one or more attachments to an issue.
This resource expects a multipart post. The media-type multipart/form-data is defined in RFC 1867. Most client libraries have classes that make dealing with multipart posts simple. For instance, in Java the Apache HTTP Components library provides a MultiPartEntity that makes it simple to submit a multipart POST.
In order to protect against XSRF attacks, because this method accepts multipart/form-data, it has XSRF protection on it. This means you must submit a header of X-Atlassian-Token: no-check with the request, otherwise it will be blocked.
The name of the multipart/form-data parameter that contains attachments must be "file"
A simple example to upload a file called "myfile.txt" to issue REST-123:
curl -D- -u admin:admin -X POST -H "X-Atlassian-Token: no-check" -F "file=@myfile.txt" http://myhost/rest/api/2/issue/TEST-123/attachments
Responses
- Status
200 - application/json
Example
[{"self":"http://www.example.com/jira/rest/api/2.0/attachments/10000","id":"10001","filename":"picture.jpg","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney"},"created":"2017-12-07T15:13:56.577+0000","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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney"},"created":"2017-12-07T15:13:56.577+0000","size":2460,"mimeType":"text/plain","content":"http://www.example.com/jira/attachments/10001","thumbnail":"http://www.example.com/jira/secure/thumbnail/10002"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-attachment#","title":"List of Attachment","type":"array","items":{"title":"Attachment","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"filename":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"size":{"type":"integer"},"mimeType":{"type":"string"},"content":{"type":"string"},"thumbnail":{"type":"string"}},"additionalProperties":false,"required":["size"]}}
- Status
413Returned if the attachment is too big.
- Status
403Returned if attachments is disabled or if you don't have permission to add attachments to this issue.
- Status
404Returned 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.
api/2/issue/{issueIdOrKey}/changelog
Get change logsGET /rest/api/2/issue/{issueIdOrKey}/changelog
Returns a paginated list of all updates of an issue, sorted by date, starting from the oldest.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | int | Page offset, ie. index of the first item returned in the page of results. Base index: 0. |
maxResults | int | Maximum number of items to return per page. See Pagination section for more details. |
Responses
- Status
200 - application/jsonreturns a collection of changelogs associated with the issue, with count and pagination information.
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/TT-1/changelog?startAt=2&maxResults=2","nextPage":"http://www.example.com/jira/rest/api/2/issue/TT-1/changelog?&startAt=4&maxResults=2","maxResults":2,"startAt":2,"total":5,"isLast":false,"values":[{"id":"10001","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney"},"created":"1970-01-18T06:27:50.429+0000","items":[{"field":"fields","fieldtype":"jira","fieldId":"fieldId","from":null,"fromString":"","to":null,"toString":"label-1"}]},{"id":"10002","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney"},"created":"1970-01-18T06:27:51.429+0000","items":[{"field":"fields","fieldtype":"jira","fieldId":"fieldId","from":null,"fromString":"label-1","to":null,"toString":"label-1 label-2"}]}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-change-history#","title":"Page of Change History","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Change History","type":"object","properties":{"id":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"items":{"type":"array","items":{"title":"Change Item","type":"object","properties":{"field":{"type":"string"},"fieldtype":{"type":"string"},"fieldId":{"type":"string"},"from":{"type":"string"},"fromString":{"type":"string"},"to":{"type":"string"},"toString":{"type":"string"}},"additionalProperties":false}},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}},"definitions":{"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
404Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.
api/2/issue/{issueIdOrKey}/comment
Add commentPOST /rest/api/2/issue/{issueIdOrKey}/comment
Adds a new comment to an issue.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | optional flags: renderedBody (provides body rendered in HTML) |
Example
{"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.","visibility":{"type":"role","value":"Administrators"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comment#","title":"Comment","type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
Responses
- Status
201Returned if add was successful
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2/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/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:54.857+0000","updated":"2017-12-07T15:13:54.857+0000","visibility":{"type":"role","value":"Administrators"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comment#","title":"Comment","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
Get commentsGET /rest/api/2/issue/{issueIdOrKey}/comment
Returns all comments for an issue.
Results can be ordered by the "created" field which means the date a comment was added.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | the page offset, if not specified then defaults to 0 |
maxResults | int | how many results on the page should be included. Defaults to 50. |
orderBy | string | ordering of the results. |
expand | string | optional flags: renderedBody (provides body rendered in HTML) |
Responses
- Status
200 - application/jsonreturns a collection of comments associated with the issue, with count and pagination information.
Example
{"startAt":0,"maxResults":1,"total":1,"comments":[{"self":"http://www.example.com/jira/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2/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/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:54.857+0000","updated":"2017-12-07T15:13:54.857+0000","visibility":{"type":"role","value":"Administrators"}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comments-with-pagination#","title":"Comments With Pagination","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"comments":{"type":"array","items":{"title":"Comment","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
404Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.
Update commentPUT /rest/api/2/issue/{issueIdOrKey}/comment/{id}
Updates an existing comment using its JSON representation.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | optional flags: renderedBody (provides body rendered in HTML) |
Example
{"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.","visibility":{"type":"role","value":"Administrators"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comment#","title":"Comment","type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
Responses
- Status
200Returned if update was successful
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2/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/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:54.857+0000","updated":"2017-12-07T15:13:54.857+0000","visibility":{"type":"role","value":"Administrators"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comment#","title":"Comment","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
Delete commentDELETE /rest/api/2/issue/{issueIdOrKey}/comment/{id}
Deletes an existing comment .
Responses
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
- Status
204Returned if delete was successful
Get commentGET /rest/api/2/issue/{issueIdOrKey}/comment/{id}
Returns a single comment.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | optional flags: renderedBody (provides body rendered in HTML) |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira comment in JSON format.
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/comment/10000","id":"10000","author":{"self":"http://www.example.com/jira/rest/api/2/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/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"created":"2017-12-07T15:13:54.857+0000","updated":"2017-12-07T15:13:54.857+0000","visibility":{"type":"role","value":"Administrators"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/comment#","title":"Comment","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
404Returned if the requested comment is not found, or the user does not have permission to view it.
api/2/issue/{issueIdOrKey}/properties
Get properties keysGET /rest/api/2/issue/{issueIdOrKey}/properties
Returns the keys of all properties for the issue identified by the key or by the id.
Responses
- Status
200 - application/jsonReturned if the issue was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the issue with given key or id does not exist, if the property with given key is not found, or if the user does not have permission to view the issue.
Delete propertyDELETE /rest/api/2/issue/{issueIdOrKey}/properties/{propertyKey}
Removes the property from the issue identified by the key or by the id. Ths user removing the property is required to have permissions to edit the issue.
Responses
- Status
204Returned if the issue property was removed successfully.
- Status
404Returned if the issue with given key or id does not exist, if the property with given key is not found, or if the user does not have permission to edit the issue.
Set propertyPUT /rest/api/2/issue/{issueIdOrKey}/properties/{propertyKey}
Sets the value of the specified issue's property.
You can use this resource to store a custom data against the issue identified by the key or by the id. The user who stores the data is required to have permissions to edit the issue.
Responses
- Status
200Returned if the issue property is successfully updated.
- Status
201Returned if the issue property is successfully created.
- Status
403Returned if the user does not have permission to edit the issue.
- Status
404Returned if the issue with given key or id does not exist, or if the user does not have permission to edit the issue.
Get propertyGET /rest/api/2/issue/{issueIdOrKey}/properties/{propertyKey}
Returns the value of the property with a given key from the issue identified by the key or by the id. The user who retrieves the property is required to have permissions to read the issue.
Responses
- Status
200 - application/jsonReturned if the issue property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
404Returned if the issue with given key or id does not exist, if the property with given key is not found, or if the user does not have permission to view the issue.
api/2/issue/{issueIdOrKey}/worklog
Get issue worklogGET /rest/api/2/issue/{issueIdOrKey}/worklog
Returns all work logs for an issue.
Note: Work logs won't be returned if the Log work field is hidden for the project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
Responses
- Status
200 - application/jsonreturns a collection of worklogs associated with the issue, with count and pagination information.
Example
{"startAt":0,"maxResults":1,"total":1,"worklogs":[{"self":"http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","updated":"2017-12-07T15:13:55.764+0000","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.764+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog-with-pagination#","title":"Worklog With Pagination","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"worklogs":{"type":"array","items":{"title":"Worklog","type":"object","properties":{"self":{"type":"string","format":"uri"},"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
404Returned if the issue with the given id/key does not exist or if the currently authenticated user does not have permission to view it.
Add worklogPOST /rest/api/2/issue/{issueIdOrKey}/worklog
Adds a new worklog entry to an issue.
Request
query parameters
parameter | type | description |
---|---|---|
notifyUsers | boolean Default: true | (optional) whether or not users should be notified by email, true by default |
adjustEstimate | string | (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
|
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" |
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
overrideEditableFlag | boolean Default: false | Updates the issue even if the issue is not editable due to being in a status with jira.issue.editable set to false or missing. Only connect add-on users with admin scope permission are allowed to use this flag. |
Example
{"comment":"I did some work here.","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.763+0000","timeSpentSeconds":12000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog#","title":"Worklog","type":"object","properties":{"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
Responses
- Status
201Returned if add was successful
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog#","title":"Worklog","type":"object","properties":{"self":{"type":"string","format":"uri"},"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
- Status
403Returned if the user does not have permission to add the worklog
Get worklogGET /rest/api/2/issue/{issueIdOrKey}/worklog/{id}
Returns a specific worklog.
Note: The work log won't be returned if the Log work field is hidden for the project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
Responses
- Status
200 - application/jsonReturned 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.
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","updated":"2017-12-07T15:13:55.764+0000","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.764+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog#","title":"Worklog","type":"object","properties":{"self":{"type":"string","format":"uri"},"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
404Returned if the work log with the given id does not exist or if the currently authenticated user does not have permission to view it.
Update worklogPUT /rest/api/2/issue/{issueIdOrKey}/worklog/{id}
Updates an existing worklog entry.
Note that:
- Fields possible for editing are: comment, visibility, started, timeSpent and timeSpentSeconds.
- Either timeSpent or timeSpentSeconds can be set.
- Fields which are not set will not be updated.
- For a request to be valid, it has to have at least one field change.
Request
query parameters
parameter | type | description |
---|---|---|
notifyUsers | boolean Default: true | (optional) whether or not users should be notified by email, true by default |
adjustEstimate | string | (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
|
newEstimate | string | (required when "new" is selected for adjustEstimate) the new value for the remaining estimate field. |
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
overrideEditableFlag | boolean Default: false | Updates the issue even if the issue is not editable due to being in a status with jira.issue.editable set to false or missing. Only connect add-on users with admin scope permission are allowed to use this flag. |
Example
{"comment":"I did some work here.","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.763+0000","timeSpentSeconds":12000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog#","title":"Worklog","type":"object","properties":{"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
Responses
- Status
200Returned if update was successful
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","updated":"2017-12-07T15:13:55.764+0000","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.764+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog#","title":"Worklog","type":"object","properties":{"self":{"type":"string","format":"uri"},"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
- Status
403Returned if the user does not have permission to update the worklog
Delete worklogDELETE /rest/api/2/issue/{issueIdOrKey}/worklog/{id}
Deletes an existing worklog entry.
Request
query parameters
parameter | type | description |
---|---|---|
notifyUsers | boolean Default: true | (optional) whether or not users should be notified by email, true by default |
adjustEstimate | string | (optional) allows you to provide specific instructions to update the remaining time estimate of the issue. Valid values are
|
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" |
overrideEditableFlag | boolean Default: false | Updates the issue even if the issue is not editable due to being in a status with jira.issue.editable set to false or missing. Only connect add-on users with admin scope permission are allowed to use this flag. |
Responses
- Status
400Returned if the input is invalid (e.g. missing required fields, invalid values, and so forth).
- Status
204Returned if delete was successful
- Status
403Returned if the user does not have permission to delete the worklog
api/2/issue/{issueIdOrKey}/worklog/{worklogId}/properties
Get properties keysGET /rest/api/2/issue/{issueIdOrKey}/worklog/{worklogId}/properties
Returns the keys of all properties for the worklog identified by the key or by the id.
Responses
- Status
200 - application/jsonReturned if the worklog was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the worklog key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the worklog.
- Status
404Returned if the worklog with given key or id does not exist or if the property with given key is not found.
Delete propertyDELETE /rest/api/2/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}
Removes the property from the worklog identified by the key or by the id. Ths user removing the property is required to have permissions to administer the worklog.
Responses
- Status
400Returned if the worklog key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the worklog property was removed successfully.
- Status
403Returned if the user does not have permission to edit the worklog.
- Status
404Returned if the worklog with given key or id does not exist or if the property with given key is not found.
Set propertyPUT /rest/api/2/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}
Sets the value of the specified worklog's property.
You can use this resource to store a custom data against the worklog identified by the key or by the id. The user who stores the data is required to have permissions to administer the worklog.
Responses
- Status
200Returned if the worklog property is successfully updated.
- Status
201Returned if the worklog property is successfully created.
- Status
400Returned if the worklog key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer the worklog.
- Status
404Returned if the worklog with given key or id does not exist.
Get propertyGET /rest/api/2/issue/{issueIdOrKey}/worklog/{worklogId}/properties/{propertyKey}
Returns the value of the property with a given key from the worklog identified by the key or by the id. The user who retrieves the property is required to have permissions to read the worklog.
Responses
- Status
200 - application/jsonReturned if the worklog property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the worklog key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the worklog.
- Status
404Returned if the worklog with given key or id does not exist or if the property with given key is not found.
api/2/issueLink
The Link Issue Resource provides functionality to manage issue links.
Link issuesPOST /rest/api/2/issueLink
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.
Request
Example
{"type":{"name":"Duplicate"},"inwardIssue":{"key":"HSP-1"},"outwardIssue":{"key":"MKY-1"},"comment":{"body":"Linked related issue!","visibility":{"type":"group","value":"jira-software-users"}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/link-issue-request#","title":"Link Issue Request","type":"object","properties":{"type":{"title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"}},"additionalProperties":false},"inwardIssue":{"$ref":"#/definitions/issue-ref"},"outwardIssue":{"$ref":"#/definitions/issue-ref"},"comment":{"title":"Comment","type":"object","properties":{"id":{"type":"string"},"author":{"$ref":"#/definitions/user"},"body":{"type":"string"},"renderedBody":{"type":"string"},"updateAuthor":{"$ref":"#/definitions/user"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}},"definitions":{"issue-ref":{"title":"Issue Ref","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"fields":{"title":"Fields","type":"object","properties":{"summary":{"type":"string"},"status":{"title":"Status","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"issuetype":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]},"priority":{"title":"Priority","type":"object","properties":{"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"user":{"title":"User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
Responses
- Status
201 - application/jsonif the issue link was created successfully.
- Status
400if 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.
- Status
401if the user does not have the link issue permission for the issue, which will be linked to another issue.
- Status
500if an error occurred when creating the issue link or the comment.
- Status
404If 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.
Get issue linkGET /rest/api/2/issueLink/{linkId}
Returns an issue link with the specified id.
Responses
- Status
200 - application/json
Example
{"id":"10001","type":{"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"},"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/statuses/open.png","name":"Open"}}},"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/statuses/open.png","name":"Open"}}}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link#","title":"Issue Link","type":"object","properties":{"id":{"type":"string"},"self":{"type":"string","format":"uri"},"type":{"title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"inwardIssue":{"$ref":"#/definitions/issue-ref"},"outwardIssue":{"$ref":"#/definitions/issue-ref"}},"definitions":{"issue-ref":{"title":"Issue Ref","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"self":{"type":"string","format":"uri"},"fields":{"title":"Fields","type":"object","properties":{"summary":{"type":"string"},"status":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"issuetype":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]},"priority":{"title":"Priority","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}
- Status
400If the specified issue link id is invalid.
- Status
401if the user does not have the link issue permission for the issue, which will be linked to another issue.
- Status
500if an error occurred when creating the issue link or the comment.
- Status
404If issue linking is disabled or it failed to find an issue link with the specified id. Either because none exists with this id, or the user doesn't have the permission to see one of the linked issues.
Delete issue linkDELETE /rest/api/2/issueLink/{linkId}
Deletes an issue link with the specified id. To be able to delete an issue link you must be able to view both issues and must have the link issue permission for at least one of the issues.
Responses
- Status 200 - application/json
- Status
400If the specified issue link id is invalid.
- Status
401if the user does not have the link issue permission for the source or destination issue of the issue link.
- Status
500if an error occurred when deleting the issue link or the comment.
- Status
204If it successfully deleted the issue link.
- Status
404If issue linking is disabled or it failed to find an issue link with the specified id. Either because none exists with this id, or the user doesn't have the permission to see one of the linked issues.
api/2/issueLinkType
Rest resource to retrieve a list of issue link types.
Get issue link typesGET /rest/api/2/issueLinkType
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.
Responses
- Status
200 - application/jsonReturns a list of all available issue link types.
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"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-types#","title":"Issue Link Types","type":"object","properties":{"issueLinkTypes":{"type":"array","items":{"title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if issue linking is disabled.
Create issue link typePOST /rest/api/2/issueLinkType
Create a new issue link type.
Request
Example
{"name":"Duplicate","inward":"Duplicated by","outward":"Duplicates"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-type#","title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonThe new issue link type has been created.
Example
{"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-type#","title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}
- Status
404Issue linking is disabled or you do not have permission to create issue link types.
Get issue link typeGET /rest/api/2/issueLinkType/{issueLinkTypeId}
Returns for a given issue link type id all information about this issue link type.
Responses
- Status
200 - application/jsonReturns the issue link type with the given id.
Example
{"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-type#","title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}
- Status
404Returned if issue linking is disabled or no issue link type with the given id exists.
Delete issue link typeDELETE /rest/api/2/issueLinkType/{issueLinkTypeId}
Delete the specified issue link type.
Responses
- Status
204
- Status
404Returned if issue linking is disabled or no issue link type with the given id exists.
Update issue link typePUT /rest/api/2/issueLinkType/{issueLinkTypeId}
Update the specified issue link type.
Request
Example
{"name":"Duplicate","inward":"Duplicated by","outward":"Duplicates"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-type#","title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200
Example
{"id":"1000","name":"Duplicate","inward":"Duplicated by","outward":"Duplicates","self":"http://www.example.com/jira/rest/api/2//issueLinkType/1000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-link-type#","title":"Issue Link Type","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"inward":{"type":"string"},"outward":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}
- Status
400Returned if the supplied id is not a number.
- Status
404Returned if issue linking is disabled or no issue link type with the given id exists.
api/2/issuesecurityschemes
REST resource that allows to view security schemes defined in the product.
Get issue security schemesGET /rest/api/2/issuesecurityschemes
Returns all issue security schemes that are defined.
Responses
- Status
200 - application/jsonReturned if the user has the administrator permission.
Example
{"issueSecuritySchemes":[{"self":"http://www.example.com/jira/rest/api/2/issuesecurityschemes/1000","id":1000,"name":"Default Issue Security Scheme","description":"Description for the default issue security scheme","defaultSecurityLevelId":10021}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/security-schemes#","title":"Security Schemes","type":"object","properties":{"issueSecuritySchemes":{"type":"array","items":{"title":"Security Scheme","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultSecurityLevelId":{"type":"integer"},"levels":{"type":"array","items":{"title":"Security Level","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have the administrator permission.
Get issue security schemeGET /rest/api/2/issuesecurityschemes/{id}
Returns the issue security scheme along with that are defined.
Responses
- Status
200 - application/jsonReturned if the user has the administrator permission or if the scheme is used in a project in which the user has the administrative permission.
Example
{"self":"http://www.example.com/jira/rest/api/2/issuesecurityschemes/1000","id":1000,"name":"Default Issue Security Scheme","description":"Description for the default issue security scheme","defaultSecurityLevelId":10021,"levels":[{"self":"http://www.example.com/jira/rest/api/2/securitylevel/10021","id":"10021","description":"Only the reporter and internal staff can see this issue.","name":"Reporter Only"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/security-scheme#","title":"Security Scheme","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultSecurityLevelId":{"type":"integer"},"levels":{"type":"array","items":{"title":"Security Level","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have the administrator permission and the scheme is not used in any project where the user has administrative permission.
api/2/issuetype
Get issue all typesGET /rest/api/2/issuetype
Returns a list of all issue types visible to the user
Responses
- Status
200 - application/jsonReturned if the issue type exists and is visible by the user.
Example
[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1},{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/1","id":"1","description":"A problem with the software.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/bug.png","name":"Bug","subtask":false,"avatarId":10002}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-issue-type#","title":"List of Issue Type","type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}}
Create issue typePOST /rest/api/2/issuetype
Creates an issue type from a JSON representation and adds the issue newly created issue type to the default issue type scheme.
Request
Example
{"name":"name","description":"description","type":"standard"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-create#","title":"Issue Type Create","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"type":{"type":"string","enum":["subtask","standard"]}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if the issue type was successfully created.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type#","title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}
- Status
400Returned if the request is invalid. This happens when the name is invalid or issue type is subtask on instance which has subtasks disabled.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer Jira.
- Status
409Returned if there already exists an issue type with the specified name.
Get issue typeGET /rest/api/2/issuetype/{id}
Returns a full representation of the issue type that has the given id.
Responses
- Status
200 - application/jsonReturned if the issue type exists and is visible by the user.
Example
{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type#","title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}
- Status
404Returned if the issue type does not exist, or is not visible to the user.
Delete issue typeDELETE /rest/api/2/issuetype/{id}
Deletes the specified issue type. If the issue type has any associated issues, these issues will be migrated to the alternative issue type specified in the parameter. You can determine the alternative issue types by calling the /rest/api/2/issuetype/{id}/alternatives resource.
Request
query parameters
parameter | type | description |
---|---|---|
alternativeIssueTypeId | string | the id of an issue type to which issues associated with the removed issue type will be migrated. |
Responses
- Status
400Returned if the request is invalid. It happens when there are associated issues with the issue type which is being removed, but it is impossible to migrate these issues to the alternative issue type.
- Status
401Returned if the user is not authenticated.
- Status
204 - application/jsonReturned if the issue type was successfully removed.
- Status
403Returned if the user does not have permission to administer Jira.
- Status
404Returned if the issue type which is supposed to be removed does not exist or the alternative issue type does not exist.
- Status
409Returned if the alternative issue type is invalid.
Update issue typePUT /rest/api/2/issuetype/{id}
Updates the specified issue type from a JSON representation.
Request
Example
{"name":"name","description":"description","avatarId":1}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-update#","title":"Issue Type Update","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"avatarId":{"type":"integer"}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturned if the issue type was successfully updated.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type#","title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}
- Status
400Returned if the request is invalid. This happens when the name is invalid or if the avatar with given id does not exist.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer Jira.
- Status
404Returned if the issue type to update does not exist.
- Status
409Returned if there already exists an issue type with the specified name.
Get alternative issue typesGET /rest/api/2/issuetype/{id}/alternatives
Returns a list of all alternative issue types for the given issue type id. The list will contain these issues types, to which issues assigned to the given issue type can be migrated. The suitable alternatives are issue types which are assigned to the same workflow, the same field configuration and the same screen scheme.
Responses
- Status
200 - application/jsonReturned if the issue type exists and is visible by the user.
Example
[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1},{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/1","id":"1","description":"A problem with the software.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/bug.png","name":"Bug","subtask":false,"avatarId":10002}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-issue-type#","title":"List of Issue Type","type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}}
- Status
404Returned if the issue type does not exist, or is not visible to the user.
Create avatarPOST /rest/api/2/issuetype/{id}/avatar2
Creates an avatar for an issue type, for a given issue type Id. The uploaded image will be cropped according to the crop parameters listed below. If no crop parameters are specified, the image will be cropped to a square. The square will originate at the top left of the image and the length of each side will be set to the smaller of the height or width of the image.
Request
query parameters
parameter | type | description |
---|---|---|
x | int | (optional) The X coordinate of the top-left corner of the crop region. Default: 0. |
y | int | (optional) The Y coordinate of the top-left corner of the crop region. Default: 0. |
size | int | (optional) The length of each side of the crop region. The crop region can only be a square. If omitted and the top-left corner is at (0,0), this defaults to either the height or width of the image, whichever is smaller. |
Responses
- Status
201 - application/jsonReturns created avatar.
Example
{"id":"1000","owner":"fred","isSystemAvatar":true,"isSelected":false,"isDeletable":false,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10040","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10040","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10040","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10040"},"selected":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/avatar#","title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}
- Status
400Returned if the cropping coordinates are invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer Jira.
- Status
404Returned if the issue type to update does not exist or if the request does not contain a valid XSRF token.
api/2/issuetype/{issueTypeId}/properties
This resource allows to store custom properties for issue types.
Get property keysGET /rest/api/2/issuetype/{issueTypeId}/properties
Returns the keys of all properties for the issue type identified by the id.
Responses
- Status
200 - application/jsonReturned if the issue type was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the issue type id is invalid.
- Status
404Returned if the issue type with given id does not exist or if the user does not have permissions to view this issue type.
Delete propertyDELETE /rest/api/2/issuetype/{issueTypeId}/properties/{propertyKey}
Removes the property from the issue type identified by the id. Ths user removing the property is required to have permissions to edit the issue type.
Responses
- Status
400Returned if the issue type id is invalid.
- Status
204Returned if the issue type property was removed successfully.
- Status
403Returned if the user does not have permission to delete the issue type property.
- Status
404Returned if the issue type with given id does not exist or if the property with given key is not found.
Set propertyPUT /rest/api/2/issuetype/{issueTypeId}/properties/{propertyKey}
Sets the value of the specified issue type's property.
You can use this resource to store a custom data against an issue type identified by the id. The user who stores the data is required to have permissions to edit an issue type.
Responses
- Status
200Returned if the issue type property is successfully updated.
- Status
201Returned if the issue type property is successfully created.
- Status
400Returned if the issue type id is invalid.
- Status
403Returned if the user does not have permission to modify the issue type property.
- Status
404Returned if the issue type with given id does not exist or if the user does not have permissions to edit this issue type.
Get propertyGET /rest/api/2/issuetype/{issueTypeId}/properties/{propertyKey}
Returns the value of the property with a given key from the issue type identified by the id. The user who retrieves the property is required to have permissions to view the issue type.
Responses
- Status
200 - application/jsonReturned if the issue type property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the issue type id is invalid.
- Status
403Returned if the user does not have permission to modify the issue type property.
- Status
404Returned if the issue type with given id does not exist or if the user does not have permissions to view this issue type.
api/2/jql/autocompletedata
Resource for auto complete data for searches.
Get auto completeGET /rest/api/2/jql/autocompletedata
Returns the auto complete data required for JQL searches.
Responses
- Status
200 - application/jsonThe auto complete data required for JQL searches.
Example
"{\"visibleFieldNames\": [{\"value\":\"affectedVersion\",\"displayName\":\"affectedVersion\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"=\",\"!=\",\"in\",\"not in\",\"is\",\"is not\",\"<\",\"<=\",\">\",\">=\"],\"types\":[\"com.atlassian.jira.project.version.Version\"]},{\"value\":\"assignee\",\"displayName\":\"assignee\",\"auto\":\"true\",\"orderable\":\"true\",\"searchable\":\"true\",\"operators\":[\"!=\",\"was not in\",\"not in\",\"was not\",\"is\",\"was in\",\"was\",\"=\",\"in\",\"changed\",\"is not\"],\"types\":[\"com.atlassian.crowd.embedded.api.User\"]}],\"visibleFunctionNames\": {\"value\":\"currentLogin()\",\"displayName\":\"currentLogin()\",\"types\":[\"java.util.Date\"]},{\"value\":\"currentUser()\",\"displayName\":\"currentUser()\",\"types\":[\"com.atlassian.crowd.embedded.api.User\"]}],\"jqlReservedWords\": \"empty\",\"and\",\"or\",\"in\",\"distinct\"]}"
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/auto-complete-response#","title":"Auto Complete Response","type":"object","properties":{"visibleFieldNames":{"type":"array","items":{"type":"string"}},"visibleFunctionNames":{"type":"array","items":{"type":"string"}},"jqlReservedWords":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
- Status
401Returned if the user is not authenticated.
- Status
500Returned if an error occurs while generating the response.
Get field auto complete for query stringGET /rest/api/2/jql/autocompletedata/suggestions
Returns auto complete suggestions for JQL search.
Request
query parameters
parameter | type | description |
---|---|---|
fieldName | string | the field name for which the suggestions are generated. |
fieldValue | string | the portion of the field value that has already been provided by the user. |
predicateName | string | the predicate for which the suggestions are generated. Suggestions are generated only for: "by", "from" and "to". |
predicateValue | string | the portion of the predicate value that has already been provided by the user. |
Responses
- Status
200 - application/jsonThe autocompletion suggestions for JQL search.
Example
{"results":[{"value":"ActiveObjects","displayName":"<b>Ac</b>tiveObjects (AO)"},{"value":"Atlassian Connect","displayName":"Atlassian Connect (<b>AC</b>)"},{"value":"Atlassian Connect in Jira","displayName":"Atlassian Connect in Jira (<b>AC</b>JIRA)"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/auto-complete-result-wrapper#","title":"Auto Complete Result Wrapper","type":"object","properties":{"results":{"type":"array","items":{"title":"Auto Complete Result","type":"object","properties":{"value":{"type":"string"},"displayName":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
api/2/licenseValidator
ValidatePOST /rest/api/2/licenseValidator
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
- Status
200 - application/jsonReturns an object containing any errors with validation.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/license-validation-results#","title":"License Validation Results","type":"object","properties":{"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"licenseString":{"type":"string"}},"additionalProperties":false}
api/2/mypreferences
Provide preferences of the currently logged in user.
Get preferenceGET /rest/api/2/mypreferences
Returns preference of the currently logged in user. Preference key must be provided as input parameter (key). The value is returned exactly as it is.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | - key of the preference to be returned. |
Responses
- Status
200 - application/jsonReturned if successful.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
- Status
404Returned if the key parameter is not provided or incorrect.
Set preferencePUT /rest/api/2/mypreferences
Sets preference of the currently logged in user. Preference key must be provided as input parameters (key). Value must be provided as POST body.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | - key of the preference to be set. |
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
- Status
204 - application/jsonReturned if the preference is set successfully.
- Status
404Returned if the key or value parameter is not provided or incorrect.
Remove preferenceDELETE /rest/api/2/mypreferences
Removes preference of the currently logged in user. Preference key must be provided as input parameters (key).
Request
query parameters
parameter | type | description |
---|---|---|
key | string | - key of the preference to be removed. |
Responses
- Status
204 - application/jsonReturned if the preference is removed successfully.
- Status
404Returned if the key parameter is not provided or incorrect.
Delete localeDELETE /rest/api/2/mypreferences/locale
Deletes the set locale of the currently logged in user, resetting it to default.
Responses
- Status
401Returned if the user is not logged in.
- Status
204 - application/jsonReturned if the locale is removed successfully.
Set localePUT /rest/api/2/mypreferences/locale
Sets the locale of the currently logged in user. Locale JSON must be provided as PUT body.
Request
Example
{"locale":"en_US"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/locale#","title":"Locale","type":"object","properties":{"locale":{"type":"string"}},"additionalProperties":false}
Example
{"locale":"en_US"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/locale#","title":"Locale","type":"object","properties":{"locale":{"type":"string"}},"additionalProperties":false}
Responses
- Status
400Returned if the locale is not provided or is invalid.
- Status
401Returned if the user is not logged in.
- Status
204 - application/jsonReturned if the locale is set successfully.
Get localeGET /rest/api/2/mypreferences/locale
Returns the locale of the currently logged in user. Returns the default locale for anonymous users.
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"locale":"en_US"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/locale#","title":"Locale","type":"object","properties":{"locale":{"type":"string"}},"additionalProperties":false}
api/2/myself
Currently logged user resource
Get userGET /rest/api/2/myself
Returns currently logged user. This resource cannot be accessed anonymously.
The resource accepts the expand
param that is used to include, hidden by default, parts of response. This can be used to include:
groups
- all groups, including nested groups, to which user belongsapplicationRoles
- application roles defines to which application user has access
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-user"},{"name":"jira-admin","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-admin"},{"name":"important","self":"http://www.example.com/jira/rest/api/2/group?groupname=important"}]},"applicationRoles":{"size":1,"items":[]},"expand":"groups,applicationRoles"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user#","title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["active"]}
- Status
401Returned if the current user is not authenticated.
api/2/notificationscheme
Get notification schemesGET /rest/api/2/notificationscheme
Returns a paginated list of notification schemes. In order to access notification scheme, the user is required to have permissions to administer at least one project associated with the requested notification scheme. Each scheme contains a list of events and recipient configured to receive notifications for these events. Consumer should allow events without recipients to appear in response. The list is ordered by the scheme's name. Follow the documentation of /notificationscheme/{id} resource for all details about returned value.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | the index of the first notification scheme to return (0 based). |
maxResults | int | the maximum number of notification schemes to return (max 50). |
expand | string |
Responses
- Status
200 - application/jsonPaginated list of notification schemes to which the user has permissions.
Example
{"maxResults":6,"startAt":1,"total":5,"isLast":false,"values":[{"expand":"notificationSchemeEvents,user,group,projectRole,field,all","id":10100,"self":"http://example.com/jira/rest/api/2/notificationscheme/10010","name":"notification scheme name","description":"description","notificationSchemeEvents":[{"event":{"id":1,"name":"Issue created","description":"Event published when issue is created"},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]},{"event":{"id":20,"name":"Custom event","description":"Custom event which is published together with issue created event","templateEvent":{"id":1,"name":"Issue created","description":"Event published when issue is created"}},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]}]}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-notification-scheme#","title":"Page of Notification Scheme","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Notification Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"notificationSchemeEvents":{"type":"array","items":{"title":"Notification Scheme Event","type":"object","properties":{"event":{"$ref":"#/definitions/notification-event"},"notifications":{"type":"array","items":{"title":"Notification","type":"object","anyOf":[{"$ref":"#/definitions/custom-field-value-notification"},{"$ref":"#/definitions/email-notification"},{"$ref":"#/definitions/group-notification"},{"$ref":"#/definitions/project-role-notification"},{"$ref":"#/definitions/role-notification"},{"$ref":"#/definitions/user-notification"}]}}},"additionalProperties":false}}},"additionalProperties":false}}},"definitions":{"custom-field-value-notification":{"title":"Custom Field Value Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"email-notification":{"title":"Email Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"emailAddress":{"type":"string"}},"additionalProperties":false},"group-notification":{"title":"Group Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"notification-event":{"title":"Notification Event","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"templateEvent":{"$ref":"#/definitions/notification-event"}},"additionalProperties":false},"project-role-notification":{"title":"Project Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"role-notification":{"title":"Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"}},"additionalProperties":false},"user-notification":{"title":"User Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}},"additionalProperties":false,"required":["maxResults","startAt"]}
Get notification schemeGET /rest/api/2/notificationscheme/{id}
Returns a full representation of the notification scheme for the given id. This resource will return a notification scheme containing a list of events and recipient configured to receive notifications for these events. Consumer should allow events without recipients to appear in response. User accessing the data is required to have permissions to administer at least one project associated with the requested notification scheme.
Notification recipients can be:
- current assignee - the value of the notificationType is CurrentAssignee
- issue reporter - the value of the notificationType is Reporter
- current user - the value of the notificationType is CurrentUser
- project lead - the value of the notificationType is ProjectLead
- component lead - the value of the notificationType is ComponentLead
- all watchers - the value of the notification type is AllWatchers
- configured user - the value of the notification type is User. Parameter will contain key of the user. Information about the user will be provided if user expand parameter is used.
- configured group - the value of the notification type is Group. Parameter will contain name of the group. Information about the group will be provided if group expand parameter is used.
- configured email address - the value of the notification type is EmailAddress, additionally information about the email will be provided.
- users or users in groups in the configured custom fields - the value of the notification type is UserCustomField or GroupCustomField. Parameter will contain id of the custom field. Information about the field will be provided if field expand parameter is used.
- configured project role - the value of the notification type is ProjectRole. Parameter will contain project role id. Information about the project role will be provided if projectRole expand parameter is used.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if the notification scheme exists and is visible for the user.
Example
{"expand":"notificationSchemeEvents,user,group,projectRole,field,all","id":10100,"self":"http://example.com/jira/rest/api/2/notificationscheme/10010","name":"notification scheme name","description":"description","notificationSchemeEvents":[{"event":{"id":1,"name":"Issue created","description":"Event published when issue is created"},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]},{"event":{"id":20,"name":"Custom event","description":"Custom event which is published together with issue created event","templateEvent":{"id":1,"name":"Issue created","description":"Event published when issue is created"}},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/notification-scheme#","title":"Notification Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"notificationSchemeEvents":{"type":"array","items":{"title":"Notification Scheme Event","type":"object","properties":{"event":{"$ref":"#/definitions/notification-event"},"notifications":{"type":"array","items":{"title":"Notification","type":"object","anyOf":[{"$ref":"#/definitions/custom-field-value-notification"},{"$ref":"#/definitions/email-notification"},{"$ref":"#/definitions/group-notification"},{"$ref":"#/definitions/project-role-notification"},{"$ref":"#/definitions/role-notification"},{"$ref":"#/definitions/user-notification"}]}}},"additionalProperties":false}}},"definitions":{"custom-field-value-notification":{"title":"Custom Field Value Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"email-notification":{"title":"Email Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"emailAddress":{"type":"string"}},"additionalProperties":false},"group-notification":{"title":"Group Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"notification-event":{"title":"Notification Event","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"templateEvent":{"$ref":"#/definitions/notification-event"}},"additionalProperties":false},"project-role-notification":{"title":"Project Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"role-notification":{"title":"Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"}},"additionalProperties":false},"user-notification":{"title":"User Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if expand is invalid.
- Status
401Returned if the user is not logged in.
- Status
404Returned if the notification scheme does not exist, or is not visible to the user.
api/2/permissionscheme
Get permission schemesGET /rest/api/2/permissionscheme
Returns a list of all permission schemes.
By default only shortened beans are returned. If you want to include permissions of all the schemes, then specify the permissions expand parameter. Permissions will be included also if you specify any other expand parameter.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"permissionSchemes":[{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-schemes#","title":"Permission Schemes","type":"object","properties":{"permissionSchemes":{"type":"array","items":{"title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if user is not logged in.
- Status
403Returned if user is not allowed to view permission schemes.
Create permission schemePOST /rest/api/2/permissionscheme
Create a new permission scheme. This method can create schemes with a defined permission set, or without.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | optional information to be expanded in the response: permissions, user, group, projectRole, field, all |
Example
{"name":"Example permission scheme","description":"description","permissions":[{"holder":{"type":"group","parameter":"jira-developers"},"permission":"ADMINISTER_PROJECTS"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if the scheme is created successfully.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description","permissions":[{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if expand or the permission scheme is invalid.
- Status
401Returned if the user is not logged.
- Status
403Returned if the user is not allowed to create permission schemes.
Get permission schemeGET /rest/api/2/permissionscheme/{schemeId}
Returns a permission scheme identified by the given id.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description","permissions":[{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if user is not logged in.
- Status
403Returned if user is not allowed to view permission schemes.
- Status
404Returned if the scheme doesn't exist.
Delete permission schemeDELETE /rest/api/2/permissionscheme/{schemeId}
Deletes a permission scheme identified by the given id.
Responses
- Status
401Returned if user is not logged in.
- Status
204 - application/jsonReturned if the permission scheme is successfully deleted.
- Status
403Returned if user is not allowed to delete permission schemes.
Update permission schemePUT /rest/api/2/permissionscheme/{schemeId}
Updates a permission scheme.
If the permissions list is present then it will be set in the permission scheme, which basically means it will overwrite any permission grants that existed in the permission scheme. Sending an empty list will remove all permission grants from the permission scheme.
To update just the name and description, do not send permissions list at all.
To add or remove a single permission grant instead of updating the whole list at once use the {schemeId}/permission/ resource.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Example
{"name":"Example permission scheme","description":"description","permissions":[{"holder":{"type":"group","parameter":"jira-developers"},"permission":"ADMINISTER_PROJECTS"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturned if the scheme is updated successfully.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description","permissions":[{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged.
- Status
403Returned if the user is not allowed to edit permission schemes.
- Status
404Returned if the permission is not found.
Get permission scheme grantsGET /rest/api/2/permissionscheme/{schemeId}/permission
Returns all permission grants of the given permission scheme.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"permissions":[{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}],"expand":"user,group,projectRole,field,all"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-grants#","title":"Permission Grants","type":"object","properties":{"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}},"expand":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if user is not logged in.
- Status
403Returned if user is not allowed to view permission schemes.
Create permission grantPOST /rest/api/2/permissionscheme/{schemeId}/permission
Creates a permission grant in a permission scheme.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | optional information to be expanded in the response: permissions, user, group, projectRole, field, all |
Example
{"holder":{"type":"group","parameter":"jira-developers"},"permission":"ADMINISTER_PROJECTS"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-grant#","title":"Permission Grant","type":"object","properties":{"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if the scheme permission is created successfully.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-grant#","title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if expand is invalid, or if same permission grant already exists.
- Status
401Returned if the user is not logged.
- Status
403Returned if the user is not allowed to edit permission schemes.
Delete permission scheme entityDELETE /rest/api/2/permissionscheme/{schemeId}/permission/{permissionId}
Deletes a permission grant from a permission scheme.
Responses
- Status
400Returned if permission grant with provided ID is not found in the provided permission scheme.
- Status
401Returned if the user is not logged.
- Status
204 - application/jsonReturned if the permission grant is deleted successfully.
- Status
403Returned if the user is not allowed to edit permission schemes.
Get permission scheme grantGET /rest/api/2/permissionscheme/{schemeId}/permission/{permissionId}
Returns a permission grant identified by the given id.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/permission/10000","holder":{"type":"group","parameter":"jira-developers","expand":"group"},"permission":"ADMINISTER_PROJECTS"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-grant#","title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if user is not logged in.
- Status
403Returned if user is not allowed to view permission schemes.
api/2/priority
Get prioritiesGET /rest/api/2/priority
Returns a list of all issue priorities.
Responses
- Status
200 - application/jsonReturned if the priorities exists and the user has permission to view it. Contains a full representation of the priority in JSON format.
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/priorities/major.png","name":"Major"},{"self":"http://www.example.com/jira/rest/api/2/priority/5","statusColor":"#cfcfcf","description":"Very little impact.","iconUrl":"http://www.example.com/jira/images/icons/priorities/trivial.png","name":"Trivial"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-priority#","title":"List of Priority","type":"array","items":{"title":"Priority","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}}
Get priorityGET /rest/api/2/priority/{id}
Returns an issue priority.
Responses
- Status
200 - application/jsonReturned if the issue priority exists and is visible by the user. Contains a full representation of the issue priority in JSON.
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/priorities/major.png","name":"Major"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/priority#","title":"Priority","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the issue priority does not exist or is not visible to the user.
api/2/project
Create projectPOST /rest/api/2/project
Creates a new project from a JSON representation.
Request
Example
{"key":"EX","name":"Example","projectTypeKey":"business","projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-project-management","description":"Example Project description","lead":"Charlie","url":"http://atlassian.com","assigneeType":"PROJECT_LEAD","avatarId":10200,"issueSecurityScheme":10001,"permissionScheme":10011,"notificationScheme":10021,"categoryId":10120}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-input#","title":"Project Input","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"projectTypeKey":{"type":"string"},"projectTemplateKey":{"type":"string"},"description":{"type":"string"},"lead":{"type":"string"},"url":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"avatarId":{"type":"integer"},"issueSecurityScheme":{"type":"integer"},"permissionScheme":{"type":"integer"},"notificationScheme":{"type":"integer"},"categoryId":{"type":"integer"}},"additionalProperties":false}
Responses
- Status
201 - application/json.Returned if the project was successfully created.
Example
{"self":"http://example/jira/rest/api/2/project/10042","id":10010,"key":"EX"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-identity#","title":"Project Identity","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"integer"},"key":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if the request is not valid and the project could not be created.
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have permission to create projects.
Get all projectsGET /rest/api/2/project
Returns all projects visible for the currently logged in user, ie. all the projects the user has either 'Browse projects' or 'Administer projects' permission. If no user is logged in, it returns all projects that are visible for anonymous users.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | Multi-value parameter defining request properties to expand in the response. These are not returned by default. Allowed values:
|
recent | int | Only projects recently accessed by the current user will be returned if this parameter is set. If no user is logged in, recently accessed projects will be returned based on current HTTP session. Maximum count is limited to the specified number, but no more than 20. |
Responses
- Status
200 - application/json.Returns a list of projects visible to the current user or with anonymous access.
Example
[{"self":"http://www.example.com/jira/rest/api/2/project/EX","id":"10000","key":"EX","name":"Example","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false},{"self":"http://www.example.com/jira/rest/api/2/project/ABC","id":"10001","key":"ABC","name":"Alphabetical","avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10001","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10001","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10001","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10001"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-project#","title":"List of Project","type":"array","items":{"title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"additionalProperties":false},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
Update projectPUT /rest/api/2/project/{projectIdOrKey}
Updates the details of an existing project.
Only non null values sent in JSON object will be updated in the project.
Values available for the assigneeType field are: "PROJECT_LEAD" and "UNASSIGNED".
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | The parameters to expand in a returned project. |
Example
{"key":"EX","name":"Example","projectTypeKey":"business","projectTemplateKey":"com.atlassian.jira-core-project-templates:jira-core-project-management","description":"Example Project description","lead":"Charlie","url":"http://atlassian.com","assigneeType":"PROJECT_LEAD","avatarId":10200,"issueSecurityScheme":10001,"permissionScheme":10011,"notificationScheme":10021,"categoryId":10120}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-input#","title":"Project Input","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"projectTypeKey":{"type":"string"},"projectTemplateKey":{"type":"string"},"description":{"type":"string"},"lead":{"type":"string"},"url":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"avatarId":{"type":"integer"},"issueSecurityScheme":{"type":"integer"},"permissionScheme":{"type":"integer"},"notificationScheme":{"type":"integer"},"categoryId":{"type":"integer"}},"additionalProperties":false}
Responses
- Status
201 - application/json.Returned if the project was successfuly updated.
Example
{"expand":"description,lead,issueTypes,url,projectKeys","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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000}],"issueTypes":[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1},{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/1","id":"1","description":"A problem with the software.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/bug.png","name":"Bug","subtask":false,"avatarId":10002}],"url":"http://www.example.com/jira/browse/EX","email":"from-jira@example.com","assigneeType":"PROJECT_LEAD","versions":[],"name":"Example","roles":{"Developers":"http://www.example.com/jira/rest/api/2/project/EX/role/10000"},"avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project#","title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the request is not valid and the project could not be updated.
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have permission to update project details.
- Status
404Returned if the project does not exist.
Delete projectDELETE /rest/api/2/project/{projectIdOrKey}
Deletes an existing project.
Responses
- Status
401Returned if the user is not logged in.
- Status
204 - application/json.Returned if the project was successfully deleted.
- Status
403Returned if the user does not have permission to delete the project.
- Status
404Returned if the project does not exist.
Get projectGET /rest/api/2/project/{projectIdOrKey}
Returns a full representation of a single project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | Multi-value parameter defining request properties to expand in the response. These are not returned by default. Allowed values:
|
Responses
- Status
200 - application/json.Returned if the project exists and the user has permission to view it.
Example
{"expand":"description,lead,issueTypes,url,projectKeys","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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000}],"issueTypes":[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1},{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/1","id":"1","description":"A problem with the software.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/bug.png","name":"Bug","subtask":false,"avatarId":10002}],"url":"http://www.example.com/jira/browse/EX","email":"from-jira@example.com","assigneeType":"PROJECT_LEAD","versions":[],"name":"Example","roles":{"Developers":"http://www.example.com/jira/rest/api/2/project/EX/role/10000"},"avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project#","title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
404Returned if the project was not found, or the user does not have permission to view it.
Update project avatarPUT /rest/api/2/project/{projectIdOrKey}/avatar
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/avatar#","title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}
Responses
- Status - application/json
Delete avatarDELETE /rest/api/2/project/{projectIdOrKey}/avatar/{id}
Deletes an avatar of a single project. It is only possible to delete custom avatars.
Responses
- Status
204 - application/json.Returned if the avatar was successfully deleted.
- Status
403Returned if the user does not have permission to delete the avatar.
- Status
404Returned if the avatar does not exist or the user does not have permission to delete it.
Create avatarPOST /rest/api/2/project/{projectIdOrKey}/avatar2
Creates an avatar for a single project. Use it to upload an image to be be set as a project's avatar. The uploaded image will be cropped according to the crop parameters defined in the request. If no crop parameters are specified, the image will be cropped to a square. The square will originate at the top left of the image and the length of each side will be set to the smaller of the height or width of the image.
Request
query parameters
parameter | type | description |
---|---|---|
x | int | (optional) X coordinate of the top-left corner of the crop region. Default: 0. |
y | int | (optional) Y coordinate of the top-left corner of the crop region. Default: 0. |
size | int | (optional) Length of each side of the crop region. The crop region can only be a square. If not provided, and the top-left corner is at (0,0), this defaults to either the height or width of the image, whichever is smaller. |
Responses
- Status
201 - application/json.Returns a successfully created avatar.
Example
{"id":"1000","owner":"fred","isSystemAvatar":true,"isSelected":false,"isDeletable":false,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10040","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10040","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10040","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10040"},"selected":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/avatar#","title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}
- Status
400Returned if the cropping coordinates are invalid.
- Status
403Returned if the currently authenticated user does not have permission to update project avatar or if the request does not contain a valid XSRF token.
- Status
404Returned if the project does not exist or currently authenticated user does not have permission to update project details.
Get all avatarsGET /rest/api/2/project/{projectIdOrKey}/avatars
Returns all project avatars visible for the currently logged in user. The avatars are grouped into system avatars and custom avatars.
Responses
- Status
200 - application/json.Returns an object containing the lists of custom an system avatars.
Example
{"system":[{"id":"1000","owner":"fred","isSystemAvatar":true,"isSelected":false,"isDeletable":false,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10040","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10040","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10040","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10040"},"selected":false}],"custom":[{"id":"1010","owner":"andrew","isSystemAvatar":false,"isSelected":false,"isDeletable":true,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10080","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10080","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10080","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10080"},"selected":false}]}
Schema
{"type":"object","patternProperties":{".+":{"type":"array","items":{"title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}}},"additionalProperties":false}
- Status
404Returned if the user does not have permission to view the project.
Get project components paginatedGET /rest/api/2/project/{projectIdOrKey}/component
Returns a paginated representation of all components existing in a single project.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | Page offset, ie. index of the first item returned in the page of results. Base index: 0. |
maxResults | int | Maximum number of items to return per page. See Pagination section for more details. Max: 50 |
orderBy | string | Ordering of the results by a given field from the following:
|
query | string |
Responses
- Status
200 - application/jsonReturns a single page of components.
Example
{"self":"http://www.example.com/jira/rest/api/2/project/PR/component?startAt=0&maxResults=2","nextPage":"http://www.example.com/jira/rest/api/2/project/PR/component?startAt=2&maxResults=2","maxResults":2,"startAt":0,"total":7,"isLast":false,"values":[{"issueCount":1,"self":"http://www.example.com/jira/rest/api/2/component/10000","description":"This is a Jira component","assigneeType":"PROJECT_LEAD","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"project":"HSP","projectId":10000,"isAssigneeTypeValid":false,"assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","name":"Component 1","id":"10000"},{"issueCount":5,"self":"http://www.example.com/jira/rest/api/2/component/10000","description":"This is a another Jira component","assigneeType":"PROJECT_LEAD","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"project":"PROJECTKEY","projectId":10000,"isAssigneeTypeValid":false,"assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","name":"PXA","id":"10050"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-component-with-issue-count#","title":"Page of Component With Issue Count","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Component With Issue Count","type":"object","properties":{"componentBean":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]},"issueCount":{"type":"integer"}},"additionalProperties":false,"required":["issueCount"]}}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
404Returned if the project was not found, or the user does not have permission to view it.
Get project componentsGET /rest/api/2/project/{projectIdOrKey}/components
Returns a full representation of all components existing in a single project.
Responses
- Status
200 - application/jsonReturned if the project exists and the user has permission to view its components.
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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000},{"self":"http://www.example.com/jira/rest/api/2/component/10000","id":"10050","name":"PXA","description":"This is a another Jira component","lead":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"PROJECTKEY","projectId":10000}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-component#","title":"List of Component","type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
- Status
404Returned if the project was not found, or the user does not have permission to view it.
Get all statusesGET /rest/api/2/project/{projectIdOrKey}/statuses
Returns a full representation of all issue types associated with a specified project, together with valid statuses for each issue type.
Responses
- Status
200 - application/json.Returned if the project exists and the user has permission to view it.
Example
[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","name":"Task","subtask":false,"statuses":[{"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"}]}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-issue-type-with-status#","title":"List of Issue Type With Status","type":"array","items":{"title":"Issue Type With Status","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"statuses":{"type":"array","items":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false,"required":["subtask"]}}
- Status
400Returned if the project was not found, or the user does not have permission to view it.
Update project typePUT /rest/api/2/project/{projectIdOrKey}/type/{newProjectTypeKey}
Updates project type of a single project.
Responses
- Status
200 - application/json.Returned if the project type was successfully updated.
Example
{"expand":"description,lead,issueTypes,url,projectKeys","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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=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","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"assigneeType":"PROJECT_LEAD","assignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"realAssigneeType":"PROJECT_LEAD","realAssignee":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},"isAssigneeTypeValid":false,"project":"HSP","projectId":10000}],"issueTypes":[{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/3","id":"3","description":"A task that needs to be done.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/task.png","name":"Task","subtask":false,"avatarId":1},{"self":"http://localhost:8090/jira/rest/api/2.0/issueType/1","id":"1","description":"A problem with the software.","iconUrl":"http://localhost:8090/jira/images/icons/issuetypes/bug.png","name":"Bug","subtask":false,"avatarId":10002}],"url":"http://www.example.com/jira/browse/EX","email":"from-jira@example.com","assigneeType":"PROJECT_LEAD","versions":[],"name":"Example","roles":{"Developers":"http://www.example.com/jira/rest/api/2/project/EX/role/10000"},"avatarUrls":{"48x48":"http://www.example.com/jira/secure/projectavatar?size=large&pid=10000","24x24":"http://www.example.com/jira/secure/projectavatar?size=small&pid=10000","16x16":"http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000","32x32":"http://www.example.com/jira/secure/projectavatar?size=medium&pid=10000"},"projectCategory":{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},"simplified":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project#","title":"Project","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"key":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"components":{"type":"array","items":{"title":"Component","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"lead":{"$ref":"#/definitions/user"},"leadUserName":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"assignee":{"$ref":"#/definitions/user"},"realAssigneeType":{"type":"string","enum":["PROJECT_DEFAULT","COMPONENT_LEAD","PROJECT_LEAD","UNASSIGNED"]},"realAssignee":{"$ref":"#/definitions/user"},"isAssigneeTypeValid":{"type":"boolean"},"project":{"type":"string"},"projectId":{"type":"integer"}},"additionalProperties":false,"required":["isAssigneeTypeValid"]}},"issueTypes":{"type":"array","items":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"url":{"type":"string"},"email":{"type":"string"},"assigneeType":{"type":"string","enum":["PROJECT_LEAD","UNASSIGNED"]},"versions":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}},"name":{"type":"string"},"roles":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"projectKeys":{"type":"array","items":{"type":"string"}},"projectCategory":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"projectTypeKey":{"type":"string"},"simplified":{"type":"boolean"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]},"user":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}
- Status
400Returned if the request is not valid and the project type could not be updated.
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have permission to update the project.
- Status
404Returned if the project does not exist.
Get project versions paginatedGET /rest/api/2/project/{projectIdOrKey}/version
Returns a paginated representation of all versions existing in a single project.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | Page offset, ie. index of the first item returned in the page of results. Base index: 0. |
maxResults | int | Maximum number of items to return per page. See Pagination section for more details. |
orderBy | string | Ordering of the results by a given field from the following:
|
expand | string | Multi-value parameter defining request properties to expand in the response. These are not returned by default. Allowed values:
|
Responses
- Status
200 - application/jsonReturns a single page of versions.
Example
{"self":"http://www.example.com/jira/rest/api/2/project/PR/version?startAt=0&maxResults=2","nextPage":"http://www.example.com/jira/rest/api/2/project/PR/version?startAt=2&maxResults=2","maxResults":2,"startAt":0,"total":7,"isLast":false,"values":[{"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"6/Jul/2010","projectId":10000},{"self":"http://www.example.com/jira/rest/api/2/version/10010","id":"10010","description":"Minor Bugfix version","name":"Next Version","archived":false,"released":false,"overdue":false,"projectId":10000}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-version#","title":"Page of Version","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
404Returned if the project was not found, or the user does not have permission to view it.
Get project versionsGET /rest/api/2/project/{projectIdOrKey}/versions
Returns a full representation of all versions existing in a single project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string | Set to |
Responses
- Status
200 - application/json.Returned if the project exists and the user has permission to view its versions.
Example
[{"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"6/Jul/2010","projectId":10000},{"self":"http://www.example.com/jira/rest/api/2/version/10010","id":"10010","description":"Minor Bugfix version","name":"Next Version","archived":false,"released":false,"overdue":false,"projectId":10000}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-version#","title":"List of Version","type":"array","items":{"title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}}
- Status
404Returned if the project was not found, or the user does not have permission to view it.
api/2/project/{projectIdOrKey}/properties
Get properties keysGET /rest/api/2/project/{projectIdOrKey}/properties
Returns the keys of all properties for the project identified by the key or by the id.
Responses
- Status
200 - application/jsonReturned if the project was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the project key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the project.
- Status
404Returned if the project with given key or id does not exist or if the property with given key is not found.
Delete propertyDELETE /rest/api/2/project/{projectIdOrKey}/properties/{propertyKey}
Removes the property from the project identified by the key or by the id. Ths user removing the property is required to have permissions to administer the project.
Responses
- Status
400Returned if the project key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the project property was removed successfully.
- Status
403Returned if the user does not have permission to edit the project.
- Status
404Returned if the project with given key or id does not exist or if the property with given key is not found.
Set propertyPUT /rest/api/2/project/{projectIdOrKey}/properties/{propertyKey}
Sets the value of the specified project's property.
You can use this resource to store a custom data against the project identified by the key or by the id. The user who stores the data is required to have permissions to administer the project.
Responses
- Status
200Returned if the project property is successfully updated.
- Status
201Returned if the project property is successfully created.
- Status
400Returned if the project key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer the project.
- Status
404Returned if the project with given key or id does not exist.
Get propertyGET /rest/api/2/project/{projectIdOrKey}/properties/{propertyKey}
Returns the value of the property with a given key from the project identified by the key or by the id. The user who retrieves the property is required to have permissions to read the project.
Responses
- Status
200 - application/jsonReturned if the project property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the project key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the project.
- Status
404Returned if the project with given key or id does not exist or if the property with given key is not found.
api/2/project/{projectIdOrKey}/role
Get project rolesGET /rest/api/2/project/{projectIdOrKey}/role
Returns all roles in the given project Id or key, with links to full details on each role.
Responses
- Status
200 - application/jsonReturns a map of the roles to URIs containing full details for each role. The project must exist and the user must have permission to view it.
Example
{"Administrators":"http://www.example.com/jira/rest/api/2/project/MKY/role/10002","Users":"http://www.example.com/jira/rest/api/2/project/MKY/role/10001","Developers":"http://www.example.com/jira/rest/api/2/project/MKY/role/10000"}
Schema
{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false}
- Status
404Returned if the project is not found, or the user does not have permission to view it.
Get project roleGET /rest/api/2/project/{projectIdOrKey}/role/{id}
Returns the details for a given project role in a project together with project role actors.
The project role actor can be either a user or a group. Note that the name of a user actor is the user key.
If you would like to check if a user belongs to the role you need to get all groups to which the user belongs
using /rest/user?userkey={userkey}&expand=groups
resource and check if there is a user actor with
the name same as the user key or if there is a group actor with the name as one of the group to which the user belongs.
Responses
- Status
200 - application/jsonReturns the role name, description, and project actors (users and groups) for the requested role. The project must exist and the user must have permission to view it.
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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the project or role is not found, or the user does not have permission to view it.
Set actorsPUT /rest/api/2/project/{projectIdOrKey}/role/{id}
Updates a project role to include the specified actors (users or groups).
Request
Example
{"id":10360,"categorisedActors":{"atlassian-user-role-actor":["admin"],"atlassian-group-role-actor":["jira-developers"]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role-actors-update#","title":"Project Role Actors Update","type":"object","properties":{"id":{"type":"integer"},"categorisedActors":{"type":"object","patternProperties":{".+":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturns the role name, description, and project actors (users and groups) for the requested role. The project must exist and the user must have permission to view it.
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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the actor could not be added to the project role
Add actor usersPOST /rest/api/2/project/{projectIdOrKey}/role/{id}
Adds an actor (user or group) to a project role.
Request
Example
{ "user" : ["admin"] } or
{ "group" : ["jira-developers"] }
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/actors-map#","title":"Actors Map","type":"object","properties":{"user":{"type":"array","items":{"type":"string"}},"group":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturns the role name, description, and project actors (users and groups) for the requested role. The project must exist and the user must have permission to view it.
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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the actor could not be added to the project role
Delete actorDELETE /rest/api/2/project/{projectIdOrKey}/role/{id}
Deletes actors (users or groups) from a project role.
- Delete a user from the role:
/rest/api/2/project/{projectIdOrKey}/role/{roleId}?user={username}
- Delete a group from the role:
/rest/api/2/project/{projectIdOrKey}/role/{roleId}?group={groupname}
Request
query parameters
parameter | type | description |
---|---|---|
user | string | the username to remove from the project role |
group | string | the groupname to remove from the project role |
Responses
- Status
204Returned if the actor was successfully removed from the project role.
- Status
404Returned if the project or role is not found, the user does not have permission to view it or does not have permission to modify the actors in the project role.
api/2/project/{projectIdOrKey}/roledetails
Get project rolesGET /rest/api/2/project/{projectIdOrKey}/roledetails
Returns all roles in the given project Id or key.
Responses
- Status
200 - application/jsonReturns a map of the roles to URIs containing full details for each role. The project must exist and the user must have permission to view it.
Schema
{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false}
- Status
404Returned if the project is not found, or the user does not have permission to view it.
api/2/project/{projectKeyOrId}/issuesecuritylevelscheme
Resource for associating permission schemes and projects.
Get issue security schemeGET /rest/api/2/project/{projectKeyOrId}/issuesecuritylevelscheme
Returns the issue security scheme for project.
Responses
- Status
200 - application/jsonReturned if the user has the administrator permission or if the scheme is used in a project in which the user has the administrative permission.
Example
{"self":"http://www.example.com/jira/rest/api/2/issuesecurityschemes/1000","id":1000,"name":"Default Issue Security Scheme","description":"Description for the default issue security scheme","defaultSecurityLevelId":10021,"levels":[{"self":"http://www.example.com/jira/rest/api/2/securitylevel/10021","id":"10021","description":"Only the reporter and internal staff can see this issue.","name":"Reporter Only"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/security-scheme#","title":"Security Scheme","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultSecurityLevelId":{"type":"integer"},"levels":{"type":"array","items":{"title":"Security Level","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the project is visible for user, but the user doesn't have administrative permissions
- Status
404Returned if the project does not exist, or is not visible to the user
api/2/project/{projectKeyOrId}/notificationscheme
Resource for associating notification schemes and projects.
Get notification schemeGET /rest/api/2/project/{projectKeyOrId}/notificationscheme
Gets a notification scheme associated with the project. Follow the documentation of /notificationscheme/{id} resource for all details about returned value.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if the notification scheme exists and is visible for the user
Example
{"expand":"notificationSchemeEvents,user,group,projectRole,field,all","id":10100,"self":"http://example.com/jira/rest/api/2/notificationscheme/10010","name":"notification scheme name","description":"description","notificationSchemeEvents":[{"event":{"id":1,"name":"Issue created","description":"Event published when issue is created"},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]},{"event":{"id":20,"name":"Custom event","description":"Custom event which is published together with issue created event","templateEvent":{"id":1,"name":"Issue created","description":"Event published when issue is created"}},"notifications":[{"id":1,"notificationType":"Group","parameter":"jira-administrators","group":{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"},"expand":"group"},{"id":2,"notificationType":"CurrentAssignee"},{"id":3,"notificationType":"ProjectRole","parameter":"10360","projectRole":{"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"},{"id":10241,"displayName":"Fred F. User","type":"atlassian-user-role-actor","name":"fred"}]},"expand":"projectRole"},{"id":4,"notificationType":"EmailAddress","parameter":"rest-developer@atlassian.com","emailAddress":"rest-developer@atlassian.com"},{"id":5,"notificationType":"User","user":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"expand":"user"},{"id":6,"notificationType":"GroupCustomField","parameter":"customfield_10101","field":{"id":"customfield_10101","key":"custom_fields_may_have_friendly_keys","name":"New custom field","custom":true,"orderable":true,"navigable":true,"searchable":true,"clauseNames":["cf[10101]","New custom field"],"schema":{"type":"project","custom":"com.atlassian.jira.plugin.system.customfieldtypes:project","customId":10101}},"expand":"field"}]}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/notification-scheme#","title":"Notification Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"notificationSchemeEvents":{"type":"array","items":{"title":"Notification Scheme Event","type":"object","properties":{"event":{"$ref":"#/definitions/notification-event"},"notifications":{"type":"array","items":{"title":"Notification","type":"object","anyOf":[{"$ref":"#/definitions/custom-field-value-notification"},{"$ref":"#/definitions/email-notification"},{"$ref":"#/definitions/group-notification"},{"$ref":"#/definitions/project-role-notification"},{"$ref":"#/definitions/role-notification"},{"$ref":"#/definitions/user-notification"}]}}},"additionalProperties":false}}},"definitions":{"custom-field-value-notification":{"title":"Custom Field Value Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false},"email-notification":{"title":"Email Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"emailAddress":{"type":"string"}},"additionalProperties":false},"group-notification":{"title":"Group Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}},"additionalProperties":false},"notification-event":{"title":"Notification Event","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"templateEvent":{"$ref":"#/definitions/notification-event"}},"additionalProperties":false},"project-role-notification":{"title":"Project Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}},"additionalProperties":false},"role-notification":{"title":"Role Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"}},"additionalProperties":false},"user-notification":{"title":"User Notification","type":"object","properties":{"id":{"type":"integer"},"notificationType":{"type":"string"},"parameter":{"type":"string"},"expand":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}},"additionalProperties":false}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user is allowed to access the project, but is not an administrator of the project or Jira and therefore can't see the notification scheme of the project.
- Status
404Returned if the notification scheme does not exist, or is not visible to the user
api/2/project/{projectKeyOrId}/permissionscheme
Resource for associating permission schemes and projects.
Assign permission schemePUT /rest/api/2/project/{projectKeyOrId}/permissionscheme
Assigns a permission scheme with a project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Example
{"id":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/id#","title":"Id","type":"object","properties":{"id":{"type":"integer"}},"additionalProperties":false}
Responses
- Status
200 - application/jsonShortened details of the newly associated permission scheme.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have permissions to edit project's permission schemes. In practice the user needs to be a Jira administrator.
- Status
404Returned if the project or permission scheme is not found.
Get assigned permission schemeGET /rest/api/2/project/{projectKeyOrId}/permissionscheme
Gets a permission scheme assigned with a project.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonThe associated permission scheme.
Example
{"id":10000,"self":"http://www.example.com/jira/rest/api/2/permissionscheme/10000","name":"Example permission scheme","description":"description"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/permission-scheme#","title":"Permission Scheme","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"name":{"type":"string"},"description":{"type":"string"},"permissions":{"type":"array","items":{"title":"Permission Grant","type":"object","properties":{"id":{"type":"integer"},"self":{"type":"string","format":"uri"},"holder":{"title":"Permission Holder","type":"object","properties":{"type":{"type":"string"},"parameter":{"type":"string"},"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"group":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false},"field":{"title":"Field","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"name":{"type":"string"},"custom":{"type":"boolean"},"orderable":{"type":"boolean"},"navigable":{"type":"boolean"},"searchable":{"type":"boolean"},"clauseNames":{"type":"array","items":{"type":"string"}},"schema":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false},"projectRole":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false},"permission":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the user is not logged in.
- Status
403Returned if the user does not have permissions to view the project's configuration. In practice the user needs to be a JRA administrator or the project's administrator to get the assigned permission scheme.
- Status
404Returned if the project is not found (or the user does not have permissions to view the project).
api/2/project/{projectKeyOrId}/securitylevel
Provide security level information of the given project for the current user.
Get security levels for projectGET /rest/api/2/project/{projectKeyOrId}/securitylevel
Returns all security levels for the project that the current logged in user has access to. If the user does not have the Set Issue Security permission, the list will be empty.
Responses
- Status
200 - application/jsonReturns a list of all security levels in a project for which the current user has access.
Example
{"levels":[{"self":"http://www.example.com/jira/rest/api/2/securitylevel/100000","id":"100000","description":"security description","name":"securityLevelName"},{"self":"http://www.example.com/jira/rest/api/2/securitylevel/100001","id":"100001","description":"another security description","name":"secret"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/security-list-level#","title":"Security List Level","type":"object","properties":{"levels":{"type":"array","items":{"title":"Security Level","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the project is not found or the user does not have permissions to browse it.
api/2/project/type
Get all project typesGET /rest/api/2/project/type
Returns all the project types defined on the Jira instance, not taking into account whether the license to use those project types is valid or not.
Responses
- Status
200 - application/jsonReturns a list with all the project types defined on the Jira instance.
Example
[{"key":"business","formattedKey":"Business","descriptionI18nKey":"Project type for business projects","icon":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzY2NjY2NiIgZD0iTTE2LDBDNy4yLDAsMCw3LjIsMCwxNmMwLDguOCw3LjIsMTYsMTYsMTZjOC44LDAsMTYtNy4yLDE2LTE2QzMyLDcuMiwyNC44LDAsMTYsMHogTTI1LjcsMjMNCgkJYzAsMS44LTEuNCwzLjItMy4yLDMuMkg5LjJDNy41LDI2LjIsNiwyNC44LDYsMjNWOS44QzYsOCw3LjUsNi42LDkuMiw2LjZoMTMuMmMwLjIsMCwwLjQsMCwwLjcsMC4xbC0yLjgsMi44SDkuMg0KCQlDOSw5LjQsOC44LDkuNiw4LjgsOS44VjIzYzAsMC4yLDAuMiwwLjQsMC40LDAuNGgxMy4yYzAuMiwwLDAuNC0wLjIsMC40LTAuNHYtNS4zbDIuOC0yLjhWMjN6IE0xNS45LDIxLjNMMTEsMTYuNGwyLTJsMi45LDIuOQ0KCQlMMjYuNCw2LjhjMC42LDAuNywxLjIsMS41LDEuNywyLjNMMTUuOSwyMS4zeiIvPg0KPC9nPg0KPC9zdmc+","color":"#FFFFFF"},{"key":"software","formattedKey":"Software","descriptionI18nKey":"Project type for software projects","icon":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzY2NjY2NiIgZD0iTTE2LDBDNy4yLDAsMCw3LjIsMCwxNmMwLDguOCw3LjIsMTYsMTYsMTZjOC44LDAsMTYtNy4yLDE2LTE2QzMyLDcuMiwyNC44LDAsMTYsMHogTTI1LjcsMjMNCgkJYzAsMS44LTEuNCwzLjItMy4yLDMuMkg5LjJDNy41LDI2LjIsNiwyNC44LDYsMjNWOS44QzYsOCw3LjUsNi42LDkuMiw2LjZoMTMuMmMwLjIsMCwwLjQsMCwwLjcsMC4xbC0yLjgsMi44SDkuMg0KCQlDOSw5LjQsOC44LDkuNiw4LjgsOS44VjIzYzAsMC4yLDAuMiwwLjQsMC40LDAuNGgxMy4yYzAuMiwwLDAuNC0wLjIsMC40LTAuNHYtNS4zbDIuOC0yLjhWMjN6IE0xNS45LDIxLjNMMTEsMTYuNGwyLTJsMi45LDIuOQ0KCQlMMjYuNCw2LjhjMC42LDAuNywxLjIsMS41LDEuNywyLjNMMTUuOSwyMS4zeiIvPg0KPC9nPg0KPC9zdmc+","color":"#AAAAAA"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-project-type#","title":"List of Project Type","type":"array","items":{"title":"Project Type","type":"object","properties":{"key":{"type":"string"},"formattedKey":{"type":"string"},"descriptionI18nKey":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}},"additionalProperties":false}}
Get project type by keyGET /rest/api/2/project/type/{projectTypeKey}
Returns the project type with the given key.
Responses
- Status
200 - application/jsonReturns a representation of the project type with the given id
Example
{"key":"business","formattedKey":"Business","descriptionI18nKey":"Project type for business projects","icon":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzY2NjY2NiIgZD0iTTE2LDBDNy4yLDAsMCw3LjIsMCwxNmMwLDguOCw3LjIsMTYsMTYsMTZjOC44LDAsMTYtNy4yLDE2LTE2QzMyLDcuMiwyNC44LDAsMTYsMHogTTI1LjcsMjMNCgkJYzAsMS44LTEuNCwzLjItMy4yLDMuMkg5LjJDNy41LDI2LjIsNiwyNC44LDYsMjNWOS44QzYsOCw3LjUsNi42LDkuMiw2LjZoMTMuMmMwLjIsMCwwLjQsMCwwLjcsMC4xbC0yLjgsMi44SDkuMg0KCQlDOSw5LjQsOC44LDkuNiw4LjgsOS44VjIzYzAsMC4yLDAuMiwwLjQsMC40LDAuNGgxMy4yYzAuMiwwLDAuNC0wLjIsMC40LTAuNHYtNS4zbDIuOC0yLjhWMjN6IE0xNS45LDIxLjNMMTEsMTYuNGwyLTJsMi45LDIuOQ0KCQlMMjYuNCw2LjhjMC42LDAuNywxLjIsMS41LDEuNywyLjNMMTUuOSwyMS4zeiIvPg0KPC9nPg0KPC9zdmc+","color":"#FFFFFF"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-type#","title":"Project Type","type":"object","properties":{"key":{"type":"string"},"formattedKey":{"type":"string"},"descriptionI18nKey":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}},"additionalProperties":false}
Get accessible project type by keyGET /rest/api/2/project/type/{projectTypeKey}/accessible
Returns the project type with the given key, if it is accessible to the logged in user. This takes into account whether the user is licensed on the Application that defines the project type.
Responses
- Status
200 - application/jsonReturns a representation of the project type with the given id
Example
{"key":"business","formattedKey":"Business","descriptionI18nKey":"Project type for business projects","icon":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4NCjwhLS0gR2VuZXJhdG9yOiBBZG9iZSBJbGx1c3RyYXRvciAxOC4xLjEsIFNWRyBFeHBvcnQgUGx1Zy1JbiAuIFNWRyBWZXJzaW9uOiA2LjAwIEJ1aWxkIDApICAtLT4NCjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iTGF5ZXJfMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiDQoJIHZpZXdCb3g9IjAgMCAzMiAzMiIgZW5hYmxlLWJhY2tncm91bmQ9Im5ldyAwIDAgMzIgMzIiIHhtbDpzcGFjZT0icHJlc2VydmUiPg0KPGc+DQoJPHBhdGggZmlsbD0iIzY2NjY2NiIgZD0iTTE2LDBDNy4yLDAsMCw3LjIsMCwxNmMwLDguOCw3LjIsMTYsMTYsMTZjOC44LDAsMTYtNy4yLDE2LTE2QzMyLDcuMiwyNC44LDAsMTYsMHogTTI1LjcsMjMNCgkJYzAsMS44LTEuNCwzLjItMy4yLDMuMkg5LjJDNy41LDI2LjIsNiwyNC44LDYsMjNWOS44QzYsOCw3LjUsNi42LDkuMiw2LjZoMTMuMmMwLjIsMCwwLjQsMCwwLjcsMC4xbC0yLjgsMi44SDkuMg0KCQlDOSw5LjQsOC44LDkuNiw4LjgsOS44VjIzYzAsMC4yLDAuMiwwLjQsMC40LDAuNGgxMy4yYzAuMiwwLDAuNC0wLjIsMC40LTAuNHYtNS4zbDIuOC0yLjhWMjN6IE0xNS45LDIxLjNMMTEsMTYuNGwyLTJsMi45LDIuOQ0KCQlMMjYuNCw2LjhjMC42LDAuNywxLjIsMS41LDEuNywyLjNMMTUuOSwyMS4zeiIvPg0KPC9nPg0KPC9zdmc+","color":"#FFFFFF"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-type#","title":"Project Type","type":"object","properties":{"key":{"type":"string"},"formattedKey":{"type":"string"},"descriptionI18nKey":{"type":"string"},"icon":{"type":"string"},"color":{"type":"string"}},"additionalProperties":false}
- Status
401A response status of 401 indicates that there is not a logged in user and therefore this operation can't be performed
- Status
404A response status of 404 indicates that the project type is not accessible for the logged in user
api/2/projectCategory
Get all project categoriesGET /rest/api/2/projectCategory
Returns all project categories
Responses
- Status
200 - application/jsonReturns a list of project categories.
Example
[{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"},{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10001","id":"10001","name":"SECOND","description":"Second Project Category"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-project-category#","title":"List of Project Category","type":"array","items":{"title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}}
- Status
500Returned if an error occurs while retrieving the list of projects.
Create project categoryPOST /rest/api/2/projectCategory
Create a project category via POST.
Request
Example
{"name":"CREATED","description":"Created Project Category"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if the project category is created successfully.
Example
{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10100","id":"10100","name":"CREATED","description":"Created Project Category"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if the caller is not logged in so does not have permission to create project categories.
- Status
403Returned if the caller is authenticated and does not have permission to create project categories (is not global admin).
- Status
409Returned if a project category with the given name already exists.
Get project category by idGET /rest/api/2/projectCategory/{id}
Contains a representation of a project category in JSON format.
Responses
- Status
200 - application/jsonReturned if the project category exists. Contains representation of a project category in JSON format.
Example
{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10000","id":"10000","name":"FIRST","description":"First Project Category"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the project category does not exist or the currently authenticated user does not have permission to view it.
Remove project categoryDELETE /rest/api/2/projectCategory/{id}
Delete a project category.
Responses
- Status
401Returned if the caller is not logged in so does not have permission to delete project categories.
- Status
204Returned if the project category is successfully deleted.
- Status
403Returned if the caller is authenticated and does not have permission to delete project categories (is not global admin).
- Status
404Returned if the project category does not exist or the currently authenticated user does not have permission to view it.
Update project categoryPUT /rest/api/2/projectCategory/{id}
Modify a project category 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.
Request
Example
{"name":"UPDATED","description":"Updated Project Category"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returned if the project category exists and the currently authenticated user has permission to edit it.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
- Status
201
Example
{"self":"http://www.example.com/jira/rest/api/2/projectCategory/10100","id":"10100","name":"UPDATED","description":"Updated Project Category"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-category#","title":"Project Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if the caller is not logged in so does not have permission to change project categories.
- Status
403Returned if the caller is authenticated and does not have permission to change project categories (is not global admin).
- Status
404Returned if the project category does not exist or the currently authenticated user does not have permission to view it.
api/2/projectvalidate
Get valid project keyGET /rest/api/2/projectvalidate/validProjectKey
Validates the project key and generated a valid project key if the supplied key is invalid.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | the project key |
Responses
- Status
200 - application/jsonReturns a String containing a valid project key.
Example
"VPNE"
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Get valid project nameGET /rest/api/2/projectvalidate/validProjectName
Validates a project name. If the name is invalid, an attempt is made to produce a valid name based on the supplied one. If no such valid name can be found, an empty string is returned.
Request
query parameters
parameter | type | description |
---|---|---|
name | string | the project name |
Responses
- Status
200 - application/jsonReturns a String containing a valid project name, or the empty string.
Example
"Valid Project Name Example"
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Get projectGET /rest/api/2/projectvalidate/key
Validates a project key.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | the project key |
Responses
- Status
200 - application/jsonReturns an ErrorCollection containing any validation errors for the project key.
Example
{"errorMessages":[],"errors":{"projectKey":"A project with that project key already exists."}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/error-collection#","title":"Error Collection","type":"object","properties":{"errorMessages":{"type":"array","items":{"type":"string"}},"errors":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"status":{"type":"integer"}},"additionalProperties":false}
api/2/reindex
REST resource for starting/stopping/querying indexing.
ReindexPOST /rest/api/2/reindex
Kicks off a reindex. Need Admin permissions to perform this reindex.
Note that some versions of Jira may no longer require manual reindexing. In this case, this resource will no-op: a 200 OK response code will returned along with "progress details" that indicate the work is complete (progress=100%). Subsequent GETs will return 404 to indicate no actua reindex has taken place.
In the case that an index is actually triggered, this call will be asynchronous: it will return 202 immediately and then the caller can call GET on the resource to track progress of the task.
Request
query parameters
parameter | type | description |
---|---|---|
type | string | Case insensitive String indicating type of reindex. If omitted, then defaults to BACKGROUND_PREFERRED. |
indexComments | boolean Default: false | Indicates that comments should also be reindexed. Not relevant for foreground reindex, where comments are always reindexed. |
indexChangeHistory | boolean Default: false | Indicates that changeHistory should also be reindexed. Not relevant for foreground reindex, where changeHistory is always reindexed. |
indexWorklogs | boolean Default: false | Indicates that changeHistory should also be reindexed. Not relevant for foreground reindex, where changeHistory is always reindexed. |
Responses
- Status
200 - application/jsonReturns a representation of the progress of the re-index operation.
Example
{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=10000","currentProgress":50,"currentSubTask":"Currently reindexing Change History","type":"FOREGROUND","submittedTime":"2017-12-07T15:13:54.778+0000","startTime":"2017-12-07T15:13:54.778+0000","finishTime":"2017-12-07T15:13:54.778+0000","success":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex#","title":"Reindex","type":"object","properties":{"progressUrl":{"type":"string"},"currentProgress":{"type":"integer"},"currentSubTask":{"type":"string"},"type":{"type":"string","enum":["FOREGROUND","BACKGROUND","BACKGROUND_PREFFERED","BACKGROUND_PREFERRED"]},"submittedTime":{"type":"string"},"startTime":{"type":"string"},"finishTime":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}
- Status
202 - application/jsonReturns a representation of the progress of the re-index operation.
Example
{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=10000","currentProgress":50,"currentSubTask":"Currently reindexing Change History","type":"FOREGROUND","submittedTime":"2017-12-07T15:13:54.778+0000","startTime":"2017-12-07T15:13:54.778+0000","finishTime":"2017-12-07T15:13:54.778+0000","success":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex#","title":"Reindex","type":"object","properties":{"progressUrl":{"type":"string"},"currentProgress":{"type":"integer"},"currentSubTask":{"type":"string"},"type":{"type":"string","enum":["FOREGROUND","BACKGROUND","BACKGROUND_PREFFERED","BACKGROUND_PREFERRED"]},"submittedTime":{"type":"string"},"startTime":{"type":"string"},"finishTime":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}
Get reindex infoGET /rest/api/2/reindex
Returns information on the system reindexes. If a reindex is currently taking place then information about this reindex is returned. If there is no active index task, then returns information about the latest reindex task run, otherwise returns a 404 indicating that no reindex has taken place.
Request
query parameters
parameter | type | description |
---|---|---|
taskId | long | the id of an indexing task you wish to obtain details on. If omitted, then defaults to the standard behaviour and returns information on the active reindex task, or the last task to run if no reindex is taking place. . If there is no reindexing task with that id then a 404 is returned. |
Responses
- Status
200 - application/jsonReturns a representation of the progress of the re-index operation.
Example
{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=10000","currentProgress":50,"currentSubTask":"Currently reindexing Change History","type":"FOREGROUND","submittedTime":"2017-12-07T15:13:54.778+0000","startTime":"2017-12-07T15:13:54.778+0000","finishTime":"2017-12-07T15:13:54.778+0000","success":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex#","title":"Reindex","type":"object","properties":{"progressUrl":{"type":"string"},"currentProgress":{"type":"integer"},"currentSubTask":{"type":"string"},"type":{"type":"string","enum":["FOREGROUND","BACKGROUND","BACKGROUND_PREFFERED","BACKGROUND_PREFERRED"]},"submittedTime":{"type":"string"},"startTime":{"type":"string"},"finishTime":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}
- Status
404Returned if there is no re-indexing task found
Reindex issuesPOST /rest/api/2/reindex/issue
Reindexes one or more individual issues. Indexing is performed synchronously - the call returns when indexing of the issues has completed or a failure occurs.
Request
query parameters
parameter | type | description |
---|---|---|
issueId | string | the IDs or keys of one or more issues to reindex. |
indexComments | boolean Default: false | Indicates that comments should also be reindexed. |
indexChangeHistory | boolean Default: false | Indicates that changeHistory should also be reindexed. |
indexWorklogs | boolean Default: false | Indicates that changeHistory should also be reindexed. |
Responses
- Status
200 - application/jsonReturns a representation of the progress of the re-index operation.
Example
{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=10000","currentProgress":50,"currentSubTask":"Currently reindexing Change History","type":"FOREGROUND","submittedTime":"2017-12-07T15:13:54.778+0000","startTime":"2017-12-07T15:13:54.778+0000","finishTime":"2017-12-07T15:13:54.778+0000","success":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex#","title":"Reindex","type":"object","properties":{"progressUrl":{"type":"string"},"currentProgress":{"type":"integer"},"currentSubTask":{"type":"string"},"type":{"type":"string","enum":["FOREGROUND","BACKGROUND","BACKGROUND_PREFFERED","BACKGROUND_PREFERRED"]},"submittedTime":{"type":"string"},"startTime":{"type":"string"},"finishTime":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}
Get reindex progressGET /rest/api/2/reindex/progress
Returns information on the system reindexes. If a reindex is currently taking place then information about this reindex is returned. If there is no active index task, then returns information about the latest reindex task run, otherwise returns a 404 indicating that no reindex has taken place.
Request
query parameters
parameter | type | description |
---|---|---|
taskId | long | the id of an indexing task you wish to obtain details on. If omitted, then defaults to the standard behaviour and returns information on the active reindex task, or the last task to run if no reindex is taking place. . If there is no reindexing task with that id then a 404 is returned. |
Responses
- Status
200 - application/jsonReturns a representation of the progress of the re-index operation.
Example
{"progressUrl":"/secure/admin/jira/IndexProgress.jspa?taskId=10000","currentProgress":50,"currentSubTask":"Currently reindexing Change History","type":"FOREGROUND","submittedTime":"2017-12-07T15:13:54.778+0000","startTime":"2017-12-07T15:13:54.778+0000","finishTime":"2017-12-07T15:13:54.778+0000","success":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex#","title":"Reindex","type":"object","properties":{"progressUrl":{"type":"string"},"currentProgress":{"type":"integer"},"currentSubTask":{"type":"string"},"type":{"type":"string","enum":["FOREGROUND","BACKGROUND","BACKGROUND_PREFFERED","BACKGROUND_PREFERRED"]},"submittedTime":{"type":"string"},"startTime":{"type":"string"},"finishTime":{"type":"string"},"success":{"type":"boolean"}},"additionalProperties":false,"required":["success"]}
- Status
404Returned if there is no re-indexing task found
api/2/reindex/request
REST resource for querying and executing reindex requests.
Process requestsPOST /rest/api/2/reindex/request
Executes any pending reindex requests. Returns a JSON array containing the IDs of the reindex requests that are being processed. Execution is asynchronous - progress of the returned tasks can be monitored through other REST calls.
Responses
- Status
200 - application/jsonReturns an array containing the reindex request IDs being processed.
Schema
{"type":"array","items":{"type":"integer"}}
Get progressGET /rest/api/2/reindex/request/{requestId}
Retrieves the progress of a single reindex request.
Responses
- Status
200 - application/jsonDetails and status of the reindex request.
Example
{"id":10500,"status":"PENDING","type":"IMMEDIATE","requestTime":"2017-12-07T15:13:54.755+0000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex-request#","title":"Reindex Request","type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["PENDING","ACTIVE","RUNNING","FAILED","COMPLETE"]},"type":{"type":"string","enum":["IMMEDIATE","DELAYED"]},"requestTime":{"type":"string"},"startTime":{"type":"string"},"completionTime":{"type":"string"}},"additionalProperties":false,"required":["id"]}
- Status
404Returned if no such reindex request exists.
Get progress bulkGET /rest/api/2/reindex/request/bulk
Retrieves the progress of a multiple reindex requests. Only reindex requests that actually exist will be returned in the results.
Request
query parameters
parameter | type | description |
---|---|---|
requestId | string | the reindex request IDs. |
Responses
- Status
200 - application/jsonDetails and status of the reindex request.
Example
{"id":10500,"status":"PENDING","type":"IMMEDIATE","requestTime":"2017-12-07T15:13:54.755+0000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/reindex-request#","title":"Reindex Request","type":"object","properties":{"id":{"type":"integer"},"status":{"type":"string","enum":["PENDING","ACTIVE","RUNNING","FAILED","COMPLETE"]},"type":{"type":"string","enum":["IMMEDIATE","DELAYED"]},"requestTime":{"type":"string"},"startTime":{"type":"string"},"completionTime":{"type":"string"}},"additionalProperties":false,"required":["id"]}
api/2/resolution
Get resolutionsGET /rest/api/2/resolution
Returns a list of all resolutions.
Responses
- Status
200 - application/jsonReturned if the resolutions exists and the user has permission to view them. Contains a full representation of the resolution in JSON format.
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/statuses/resolved.png","name":"Fixed"},{"self":"http://www.example.com/jira/rest/api/2/resolution/3","description":"This is what it is supposed to do.","name":"Works as designed"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-resolution#","title":"List of Resolution","type":"array","items":{"title":"Resolution","type":"object","properties":{"self":{"type":"string","format":"uri"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}}
Get resolutionGET /rest/api/2/resolution/{id}
Returns a resolution.
Responses
- Status
200 - application/jsonReturned if the resolution exists and the user has permission to view it. Contains a full representation of the resolution in JSON format.
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/statuses/resolved.png","name":"Fixed"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/resolution#","title":"Resolution","type":"object","properties":{"self":{"type":"string","format":"uri"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the resolution does not exist or the user does not have permission to view it.
api/2/role
Get project rolesGET /rest/api/2/role
Get all the ProjectRoles available in Jira. Currently this list is global.
Responses
- Status
200Returned if the user is authenticated
Example
{"name":"Developers","id":10360,"description":"A project role that represents developers in a project"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-project-role#","title":"List of Project Role","type":"array","items":{"title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}}
- Status
401Returned if you do not have permissions or you are not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
Create project rolePOST /rest/api/2/role
Creates a new ProjectRole to be available in Jira. The created role does not have any default actors assigned.
Request
Example
{"name":"MyRole","description":"role description"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/create-update-role-request#","title":"Create Update Role Request","type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returned if the user is authenticated
Example
{"name":"Developers","id":10360,"description":"A project role that represents developers in a project"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the request json does not have a name field or the name field is invalid (empty or starts or ends with whitespace)
- Status
401Returned if you are not logged in.
- Status
403Returned if you do not have permissions to create a role.
- Status
409Returned if a role with given name already exists.
Get project roles by idGET /rest/api/2/role/{id}
Get a specific ProjectRole available in Jira.
Responses
- Status
200Returned if the user is authenticated
Example
{"name":"Developers","id":10360,"description":"A project role that represents developers in a project"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if you do not have permissions or you are not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
Partial update project rolePOST /rest/api/2/role/{id}
Partially updates a roles name or description.
Request
Example
{"name":"MyRole","description":"role description"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/create-update-role-request#","title":"Create Update Role Request","type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returned if the update was successful
Example
{"name":"Developers","id":10360,"description":"A project role that represents developers in a project"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned when both name and description are not given or name field is invalid (empty or starts or ends with whitespace).
- Status
401Returned if the requesting user is not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
Fully update project rolePUT /rest/api/2/role/{id}
Fully updates a roles. Both name and description must be given.
Request
Example
{"name":"MyRole","description":"role description"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/create-update-role-request#","title":"Create Update Role Request","type":"object","properties":{"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returned if the update was successful
Example
{"name":"Developers","id":10360,"description":"A project role that represents developers in a project"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned when name or description is not given or the name field is invalid (empty or starts or ends with whitespace)
- Status
401Returned if the requesting user is not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
Delete project roleDELETE /rest/api/2/role/{id}
Deletes a role. May return 403 in the future
Request
query parameters
parameter | type | description |
---|---|---|
swap | long | if given, removes a role even if it is used in scheme by replacing the role with the given one |
Responses
- Status
400Returned if given role with given swap id does not exist.
- Status
401Returned if the requesting user is not logged in.
- Status
204Returned if the delete was successful.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
- Status
409Returned if the project role is used in schemes and roleToSwap query parameter is not given.
Get project role actors for roleGET /rest/api/2/role/{id}/actors
Gets default actors for the given role.
Responses
- Status
200Returned if the user is authenticated
Example
{"actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
401Returned if the requesting user is not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
Add project role actors to rolePOST /rest/api/2/role/{id}/actors
Adds default actors to the given role. The request data should contain a list of usernames or a list of groups to add.
Request
Example
{"user":["admin"]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/actor-input#","title":"Actor Input","type":"object","properties":{"user":{"type":"array","items":{"type":"string"}},"group":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
Responses
- Status
200Returned if the update was successful
Example
{"actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/project-role#","title":"Project Role","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"id":{"type":"integer"},"description":{"type":"string"},"actors":{"type":"array","items":{"title":"Role Actor","type":"object","properties":{"id":{"type":"integer"},"displayName":{"type":"string"},"type":{"type":"string"},"name":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if user and group are both given or none are given or group or user in their respective lists does not exist.
- Status
401Returned if the requesting user is not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
Delete project role actors from roleDELETE /rest/api/2/role/{id}/actors
Removes default actor from the given role.
Request
query parameters
parameter | type | description |
---|---|---|
user | string | if given, removes an actor from given role |
group | string | if given, removes an actor from given role |
Responses
- Status
200Returned if the update was successful.
Example
{"actors":[{"id":10240,"displayName":"jira-developers","type":"atlassian-group-role-actor","name":"jira-developers"}]}
- Status
400Returned if user and group are not given, both user and group are given or provided group or user does not exist.
- Status
401Returned if the requesting user is not logged in.
- Status
403Returned if the requesting user is not an admin or a sysadmin.
- Status
404Returned if the role with the given id does not exist.
api/2/screens
Get fields to addGET /rest/api/2/screens/{screenId}/availableFields
Gets available fields for screen. i.e ones that haven't already been added.
Responses
- Status
200List of available fields for screen
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-screenable-tab#","title":"List of Screenable Tab","type":"array","items":{"title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}}
- Status
400Returned if screen does not exist
- Status
401Returned if you do not have permissions
Get all tabsGET /rest/api/2/screens/{screenId}/tabs
Returns a list of all tabs for the given screen
Request
query parameters
parameter | type | description |
---|---|---|
projectKey | string | the key of the project; this parameter is optional |
Responses
- Status
200 - application/jsonContains a full representation of all visible tabs in JSON.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-screenable-tab#","title":"List of Screenable Tab","type":"array","items":{"title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}}
- Status
400Returned if screen does not exist
- Status
401Returned if you do not have permissions
Add tabPOST /rest/api/2/screens/{screenId}/tabs
Creates tab for given screen
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/screenable-tab#","title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200 - application/jsonNewly created tab in JSON.
Example
{"id":10000,"name":"Fields Tab"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/screenable-tab#","title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if screen does not exist or tab name is invalid
- Status
401Returned if you do not have permissions
Rename tabPUT /rest/api/2/screens/{screenId}/tabs/{tabId}
Renames tab on given screen
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/screenable-tab#","title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200 - application/jsonModified tab in JSON.
Example
{"id":10000,"name":"Fields Tab"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/screenable-tab#","title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if screen does not exist or tab name is invalid
- Status
401Returned if you do not have permissions
Delete tabDELETE /rest/api/2/screens/{screenId}/tabs/{tabId}
Deletes tab to give screen
Responses
- Status
201Successfully deleted tab
- Status
400Returned if screen or tab does not exist
- Status
401Returned if you do not have permissions
Get all fieldsGET /rest/api/2/screens/{screenId}/tabs/{tabId}/fields
Gets all fields for a given tab
Request
query parameters
parameter | type | description |
---|---|---|
projectKey | string | the key of the project; this parameter is optional |
Responses
- Status
200List of fields for given tab
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-screenable-tab#","title":"List of Screenable Tab","type":"array","items":{"title":"Screenable Tab","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"}},"additionalProperties":false}}
- Status
400Returned if screen or tab does not exist
- Status
401Returned if you do not have permissions
Add fieldPOST /rest/api/2/screens/{screenId}/tabs/{tabId}/fields
Adds field to the given tab.
Request
Example
{"fieldId":"summary"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/add-field#","title":"Add Field","type":"object","properties":{"fieldId":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Newly added field as json
Example
{"id":"summary","name":"Summary"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/screenable-field#","title":"Screenable Field","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if screen,tab or field does not exist.
- Status
401Returned if you do not have permissions
Remove fieldDELETE /rest/api/2/screens/{screenId}/tabs/{tabId}/fields/{id}
Removes field from given tab
Responses
- Status
201Successfully removed field from tab
- Status
400Returned if screen or tab does not exist
- Status
401Returned if you do not have permissions
Move fieldPOST /rest/api/2/screens/{screenId}/tabs/{tabId}/fields/{id}/move
Moves field on the given tab
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/move-field#","title":"Move Field","type":"object","properties":{"after":{"type":"string","format":"uri"},"position":{"type":"string","enum":["Earlier","Later","First","Last"]}},"additionalProperties":false}
Responses
- Status
201Successfully moved tab
- Status
400Returned if screen or tab does not exist. Or move cooridinates invalid.
- Status
401Returned if you do not have permissions
Move tabPOST /rest/api/2/screens/{screenId}/tabs/{tabId}/move/{pos}
Moves tab position
Responses
- Status
201Successfully moved tab
- Status
400Returned if screen or tab does not exist
- Status
401Returned if you do not have permissions
Add field to default screenPOST /rest/api/2/screens/addToDefault/{fieldId}
Adds field or custom field to the default tab
Responses
- Status
201Successfully added field to default screen / default tab
- Status
400Returned if screen, tab or field does not exist or field is already present on a selected tab
- Status
401Returned if you do not have administrator permissions
api/2/search
Resource for searches.
Search using search requestPOST /rest/api/2/search
Performs a search using JQL.
Request
Example
{"jql":"project = HSP","startAt":0,"maxResults":15,"fields":["summary","status","assignee"],"fieldsByKeys":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/search-request#","title":"Search Request","type":"object","properties":{"jql":{"type":"string"},"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"fields":{"type":"array","items":{"type":"string"}},"validateQuery":{"type":"string"},"properties":{"type":"array","items":{"type":"string"}},"fieldsByKeys":{"type":"boolean"}},"additionalProperties":false,"required":["fieldsByKeys"]}
Responses
- Status
200 - application/jsonReturns a JSON representation of the search results.
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"}],"warningMessages":["The value 'splat' does not exist for the field 'Foo'."]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/search-results#","title":"Search Results","type":"object","properties":{"expand":{"type":"string"},"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"issues":{"type":"array","items":{"title":"Issue","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"string"},"self":{"type":"string","format":"uri"},"key":{"type":"string"},"renderedFields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"properties":{"title":"Properties","type":"object","properties":{"properties":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"names":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"schema":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/json-type"}},"additionalProperties":false},"transitions":{"type":"array","items":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false}},"operations":{"title":"Opsbar","type":"object","properties":{"linkGroups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"editmeta":{"title":"Edit Meta","type":"object","properties":{"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false}},"additionalProperties":false},"changelog":{"title":"Changelog","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"histories":{"type":"array","items":{"title":"Change History","type":"object","properties":{"id":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"items":{"type":"array","items":{"title":"Change Item","type":"object","properties":{"field":{"type":"string"},"fieldtype":{"type":"string"},"fieldId":{"type":"string"},"from":{"type":"string"},"fromString":{"type":"string"},"to":{"type":"string"},"toString":{"type":"string"}},"additionalProperties":false}},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false},"versionedRepresentations":{"type":"object","patternProperties":{".+":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"additionalProperties":false},"fieldsToInclude":{"title":"Included Fields","type":"object"},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"additionalProperties":false}},"warningMessages":{"type":"array","items":{"type":"string"}},"names":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"schema":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/json-type"}},"additionalProperties":false}},"definitions":{"field-meta":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"$ref":"#/definitions/json-type"},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]},"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false},"json-type":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"link-group":{"title":"Link Group","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"header":{"$ref":"#/definitions/simple-link"},"weight":{"type":"integer"},"links":{"type":"array","items":{"$ref":"#/definitions/simple-link"}},"groups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"simple-link":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if there is a problem with the JQL query.
SearchGET /rest/api/2/search
Searches for issues using JQL.
Sorting:
the jql
parameter is a full JQL
expression which can include an ORDER BY
clause.
Fields:
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 fieldssummary,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
Properties:
The properties
param is similar to fields
and specifies a comma-separated list of issue
properties to include. Unlike fields
, properties are not included by default.
It is also not allowed to request all properties.
The number of different properties that may be requested in one query is limited to 5.
prop1,prop1
- includeprop1
andprop2
properties
Query Validation:
The validateQuery
param offers control over whether to validate and how strictly to treat the validation.
strict
- Strict validation: if any errors are found then a 400 will be returned with a list of all errors (and warnings).warn
- we validate, but all errors are demoted to warnings.none
- no validation is run.true
- deprecated. A legacy synonym for "strict".false
- deprecated. For legacy reasons this acts like "warn".
GET vs POST: If the JQL query is too large to be encoded as a query param you should instead POST to this resource.
Expanding Issues in the Search Result: It is possible to expand the issues returned by directly specifying the expansion on the expand parameter passed in to this resources.
For instance, to expand the "changelog" for all the issues on the search result, it is neccesary to specify "changelog" as one of the values to expand.
Request
query parameters
parameter | type | description |
---|---|---|
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). |
validateQuery | string Default: true | Whether to validate the JQL query and how strictly to treat the validation results. Supported values: "strict", "warn", "none" + legacy synonyms "true" and "false" |
fields | string | the list of fields to return for each issue. By default, all navigable fields are returned. |
expand | string | A comma-separated list of the parameters to expand. |
properties | string | the list of properties to return for each issue. By default no properties are returned. |
fieldsByKeys | boolean | if true then fields in issues will be referenced by keys instead of ids |
Responses
- Status
200 - application/jsonReturns a JSON representation of the search results.
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"}],"warningMessages":["The value 'splat' does not exist for the field 'Foo'."]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/search-results#","title":"Search Results","type":"object","properties":{"expand":{"type":"string"},"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"issues":{"type":"array","items":{"title":"Issue","type":"object","properties":{"expand":{"type":"string"},"id":{"type":"string"},"self":{"type":"string","format":"uri"},"key":{"type":"string"},"renderedFields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false},"properties":{"title":"Properties","type":"object","properties":{"properties":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"names":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"schema":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/json-type"}},"additionalProperties":false},"transitions":{"type":"array","items":{"title":"Transition","type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"to":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false},"hasScreen":{"type":"boolean"},"isGlobal":{"type":"boolean"},"isInitial":{"type":"boolean"},"isConditional":{"type":"boolean"},"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false},"expand":{"type":"string"}},"additionalProperties":false}},"operations":{"title":"Opsbar","type":"object","properties":{"linkGroups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"editmeta":{"title":"Edit Meta","type":"object","properties":{"fields":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/field-meta"}},"additionalProperties":false}},"additionalProperties":false},"changelog":{"title":"Changelog","type":"object","properties":{"startAt":{"type":"integer"},"maxResults":{"type":"integer"},"total":{"type":"integer"},"histories":{"type":"array","items":{"title":"Change History","type":"object","properties":{"id":{"type":"string"},"author":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]},"created":{"type":"string"},"items":{"type":"array","items":{"title":"Change Item","type":"object","properties":{"field":{"type":"string"},"fieldtype":{"type":"string"},"fieldId":{"type":"string"},"from":{"type":"string"},"fromString":{"type":"string"},"to":{"type":"string"},"toString":{"type":"string"}},"additionalProperties":false}},"historyMetadata":{"title":"History Metadata","type":"object","properties":{"type":{"type":"string"},"description":{"type":"string"},"descriptionKey":{"type":"string"},"activityDescription":{"type":"string"},"activityDescriptionKey":{"type":"string"},"emailDescription":{"type":"string"},"emailDescriptionKey":{"type":"string"},"actor":{"$ref":"#/definitions/history-metadata-participant"},"generator":{"$ref":"#/definitions/history-metadata-participant"},"cause":{"$ref":"#/definitions/history-metadata-participant"},"extraData":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}},"additionalProperties":false}}},"additionalProperties":false},"versionedRepresentations":{"type":"object","patternProperties":{".+":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"additionalProperties":false},"fieldsToInclude":{"title":"Included Fields","type":"object"},"fields":{"type":"object","patternProperties":{".+":{}},"additionalProperties":false}},"additionalProperties":false}},"warningMessages":{"type":"array","items":{"type":"string"}},"names":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"schema":{"type":"object","patternProperties":{".+":{"$ref":"#/definitions/json-type"}},"additionalProperties":false}},"definitions":{"field-meta":{"title":"Field Meta","type":"object","properties":{"required":{"type":"boolean"},"schema":{"$ref":"#/definitions/json-type"},"name":{"type":"string"},"key":{"type":"string"},"autoCompleteUrl":{"type":"string"},"hasDefaultValue":{"type":"boolean"},"operations":{"type":"array","items":{"type":"string"}},"allowedValues":{"type":"array","items":{}},"defaultValue":{}},"additionalProperties":false,"required":["required"]},"history-metadata-participant":{"title":"History Metadata Participant","type":"object","properties":{"id":{"type":"string"},"displayName":{"type":"string"},"displayNameKey":{"type":"string"},"type":{"type":"string"},"avatarUrl":{"type":"string"},"url":{"type":"string"}},"additionalProperties":false},"json-type":{"title":"Json Type","type":"object","properties":{"type":{"type":"string"},"items":{"type":"string"},"system":{"type":"string"},"custom":{"type":"string"},"customId":{"type":"integer"}},"additionalProperties":false},"link-group":{"title":"Link Group","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"header":{"$ref":"#/definitions/simple-link"},"weight":{"type":"integer"},"links":{"type":"array","items":{"$ref":"#/definitions/simple-link"}},"groups":{"type":"array","items":{"$ref":"#/definitions/link-group"}}},"additionalProperties":false},"simple-link":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"additionalProperties":false}
- Status
400Returned if there is a problem with the JQL query.
- Status
403Returned if the user does not have permission to search.
api/2/securitylevel
Get issuesecuritylevelGET /rest/api/2/securitylevel/{id}
Returns a full representation of the security level that has the given id.
Responses
- Status
200 - application/jsonReturned if the issue type exists and is visible by the user.
Example
{"self":"http://www.example.com/jira/rest/api/2/securitylevel/10021","id":"10021","description":"Only the reporter and internal staff can see this issue.","name":"Reporter Only"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/security-level#","title":"Security Level","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the issue type does not exist, or is not visible to the user.
api/2/serverInfo
Get server infoGET /rest/api/2/serverInfo
Returns general information about the current Jira server.
Request
query parameters
parameter | type | description |
---|---|---|
doHealthCheck | boolean |
Responses
- Status
200 - application/jsonReturns a full representation of the server info in JSON format
Example
{"baseUrl":"http://localhost:8080/jira","version":"5.0-SNAPSHOT","versionNumbers":[5,0,0],"buildNumber":582,"buildDate":"2017-12-07T15:13:53.234+0000","serverTime":"2017-12-07T15:13:53.234+0000","scmInfo":"1f51473f5c7b75c1a69a0090f4832cdc5053702a","buildPartnerName":"Example Partner Co.","serverTitle":"My Shiny New Jira Server"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/server-info#","title":"Server Info","type":"object","properties":{"baseUrl":{"type":"string"},"version":{"type":"string"},"versionNumbers":{"type":"array","items":{"type":"integer"}},"deploymentType":{"type":"string"},"buildNumber":{"type":"integer"},"buildDate":{"type":"string"},"serverTime":{"type":"string"},"scmInfo":{"type":"string"},"buildPartnerName":{"type":"string"},"serverTitle":{"type":"string"},"healthChecks":{"type":"array","items":{"title":"Health Check Result","type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"passed":{"type":"boolean"}},"additionalProperties":false}}},"additionalProperties":false}
api/2/settings
REST resource for changing the Jira system settings
Set base u r lPUT /rest/api/2/settings/baseUrl
Sets the base URL that is configured for this Jira instance.
Request
Example
http://jira.atlassian.com/
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Get issue navigator default columnsGET /rest/api/2/settings/columns
Returns the default system columns for issue navigator. Admin permission will be required.
Responses
- Status
200 - application/jsonReturns a list of columns for configured for the given user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-column-item#","title":"List of Column Item","type":"array","items":{"title":"Column Item","type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}}
- Status
500Returned if an error occurs while retrieving the column configuration.
- Status
403Returned if the user does not have admin permission
Set issue navigator default columnsPUT /rest/api/2/settings/columns
Sets the default system columns for issue navigator. Admin permission will be required.
Request
Responses
- Status
200Returned when the columns is saved successfully
- Status
500Returned if an error occurs while retrieving the column configuration.
api/2/status
Get statusesGET /rest/api/2/status
Returns a list of all statuses
Responses
- Status
200 - application/jsonReturns a list of all Jira issue statuses in JSON format, that are visible to the user.
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","statusCategory":{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/1","id":1,"key":"in-flight","colorName":"yellow","name":"In Progress"}},{"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","statusCategory":{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/9","id":9,"key":"completed","colorName":"green"}}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-status#","title":"List of Status","type":"array","items":{"title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}}
- Status
404Returned if the requested issue status is not found, or the user does not have permission to view it.
Get statusGET /rest/api/2/status/{idOrName}
Returns a full representation of the Status having the given id or name.
Responses
- Status
200 - application/jsonReturns a full representation of a Jira issue status in JSON format.
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","statusCategory":{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/1","id":1,"key":"in-flight","colorName":"yellow","name":"In Progress"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/status#","title":"Status","type":"object","properties":{"self":{"type":"string"},"statusColor":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"id":{"type":"string"},"statusCategory":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
- Status
404Returned if the requested issue status is not found, or the user does not have permission to view it.
api/2/statuscategory
Get status categoriesGET /rest/api/2/statuscategory
Returns a list of all status categories
Responses
- Status
200 - application/jsonReturns a list of all Jira issue status categories in JSON format, that are visible to the user.
Example
[{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/1","id":1,"key":"in-flight","colorName":"yellow","name":"In Progress"},{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/9","id":9,"key":"completed","colorName":"green"}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-status-category#","title":"List of Status Category","type":"array","items":{"title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}}
- Status
404Returned if no status categories are found, or the user does not have permission to view them.
Get status categoryGET /rest/api/2/statuscategory/{idOrKey}
Returns a full representation of the StatusCategory having the given id or key
Responses
- Status
200 - application/jsonReturns a full representation of a Jira issue status category in JSON format.
Example
{"self":"http://localhost:8090/jira/rest/api/2.0/statuscategory/1","id":1,"key":"in-flight","colorName":"yellow","name":"In Progress"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/status-category#","title":"Status Category","type":"object","properties":{"self":{"type":"string"},"id":{"type":"integer"},"key":{"type":"string"},"colorName":{"type":"string"},"name":{"type":"string"}},"additionalProperties":false}
- Status
404Returned if the requested issue status category is not found, or the user does not have permission to view it.
api/2/task
Resource to check the status of long-running asynchronous tasks.
Get task
experimentalGET /rest/api/2/task/{taskId}
Returns a task progress. When the task is finished, it will contain the result. The result may be an arbitrary JSON, its shape is different for each task type. Consult the documentation of the method that created the task to know what it is.
To access a task, you need to be its creator or a Jira admin. Otherwise a 403 response will be returned.
Responses
- Status
200 - application/jsonReturned if successful.
Example
{"self":"http://www.example.com/jira/rest/api/2/task/1","id":"1","description":"Task description","status":"COMPLETE","result":"the task result, this may be any JSON","submittedBy":10000,"progress":100,"elapsedRuntime":156,"submitted":1512659636733,"started":1512659636833,"finished":1512659636934,"lastUpdate":1512659636933}
Schema
{"title":"Task Progress","type":"object","properties":{"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"description":"Description of the task","type":"string"},"status":{"description":"Current status of the task","type":"string","enum":["ENQUEUED","RUNNING","COMPLETE","FAILED","CANCEL_REQUESTED","CANCELLED","DEAD"]},"message":{"description":"Message regarding the current progress","type":"string"},"result":{"description":"The eventual result, will be available when the task is finished successfully"},"submittedBy":{"description":"Id of the user that submitted the task","type":"integer"},"progress":{"description":"The progress percentage (from 0 to 100)","type":"integer"},"elapsedRuntime":{"description":"How much time did running the task take (so far, this is updated in real time), in milliseconds","type":"integer"},"submitted":{"description":"The timestamp of when the task was submitted","type":"string"},"started":{"description":"The timestamp of when the task was started","type":"string"},"finished":{"description":"The timestamp of when the task processing was finished","type":"string"},"lastUpdate":{"description":"The timestamp of when the task progress was last updated","type":"string"}},"additionalProperties":false,"required":["self","id","status","submittedBy","progress","elapsedRuntime","submitted","started","lastUpdate"]}
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permissions to access the task.
- Status
404Returned if the task does not exist or its trace has been already removed from the system.
Request cancel
experimentalPOST /rest/api/2/task/{taskId}/cancel
Requests that the task that corresponds to the given task id is cancelled.
Responses
- Status
202 - application/jsonReturned if successful.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/response#","title":"Response","type":"object"}
- Status
400Returned if the task with specified id can not be cancelled.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user is not authorized to cancel the task.
- Status
404Returned if the task does not exist, or its trace has been already removed from the system.
api/2/universal_avatar
Get avatarsGET /rest/api/2/universal_avatar/type/{type}/owner/{entityId}
Responses
- Status
200 - application/jsonReturns a map of system and custom avatar lists.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/avatars#","title":"Avatars","type":"object","properties":{"system":{"type":"array","items":{"$ref":"#/definitions/avatar"}},"custom":{"type":"array","items":{"$ref":"#/definitions/avatar"}}},"definitions":{"avatar":{"title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}},"additionalProperties":false}
- Status
404Returned if the icon type is invalid.
Store avatarPOST /rest/api/2/universal_avatar/type/{type}/owner/{entityId}
Creates an avatar for a given entity, for the given entity ID and type of entity. For example, you can create an avatar for an issue type, given the issue type Id. Uploading an avatar is supported for different types of entities across the Jira products. However, it is supported for the "project" and "issuetype" entity types for all Jira products. The uploaded image will be cropped according to the crop parameters listed below. If no crop parameters are specified, the image will be cropped to a square. The square will originate at the top left of the image and the length of each side will be set to the smaller of the height or width of the image.
Request
query parameters
parameter | type | description |
---|---|---|
x | int | (optional) The X coordinate of the top-left corner of the crop region. Default: 0. |
y | int | (optional) The Y coordinate of the top-left corner of the crop region. Default: 0. |
size | int | (optional) The length of each side of the crop region. The crop region can only be a square. If omitted and the top-left corner is at (0,0), this defaults to either the height or width of the image, whichever is smaller. |
Responses
- Status
201 - application/jsonReturns created avatar.
Example
{"id":"1000","owner":"fred","isSystemAvatar":true,"isSelected":false,"isDeletable":false,"urls":{"16x16":"http://localhost:8090/jira/secure/useravatar?size=xsmall&avatarId=10040","24x24":"http://localhost:8090/jira/secure/useravatar?size=small&avatarId=10040","32x32":"http://localhost:8090/jira/secure/useravatar?size=medium&avatarId=10040","48x48":"http://localhost:8090/jira/secure/useravatar?avatarId=10040"},"selected":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/avatar#","title":"Avatar","type":"object","properties":{"id":{"type":"string"},"owner":{"type":"string"},"isSystemAvatar":{"type":"boolean"},"isSelected":{"type":"boolean"},"isDeletable":{"type":"boolean"},"urls":{"type":"object","patternProperties":{"\\d\\dx\\d\\d":{"type":"string","format":"uri"}},"additionalProperties":false},"selected":{"type":"boolean"}},"additionalProperties":false,"required":["isSystemAvatar","isSelected","isDeletable","selected"]}
- Status
400Returned if the cropping coordinates are invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to upload an avatar for the given entity.
- Status
404Returned if the icon type is invalid or if the request does not contain a valid XSRF token.
Delete avatarDELETE /rest/api/2/universal_avatar/type/{type}/owner/{owningObjectId}/avatar/{id}
Deletes avatar
Responses
- Status
204Returns when avatar has been removed.
- Status
403Returned if the user does not have permission to upload an avatar for the given entity.
- Status
404Returned if the icon type is invalid or if the request does not contain a valid XSRF token.
api/2/user
Create user
experimentalPOST /rest/api/2/user
Create user. By default created user will not be notified with email. If password field is not set then password will be randomly generated.
Request
Example
{"name":"charlie","password":"abracadabra","emailAddress":"charlie@atlassian.com","displayName":"Charlie of Atlassian","applicationKeys":["jira-core"]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user-write#","title":"User Write","type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"password":{"type":"string"},"emailAddress":{"type":"string"},"displayName":{"type":"string"},"notification":{"type":"string"},"applicationKeys":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}
Responses
- Status
201Returned if the user was created.
Example
{"self":"http://www.example.com/jirahttp://www.example.com/jira/rest/api/2/user/charlie","key":"charlie","name":"charlie","emailAddress":"charlie@atlassian.com","displayName":"Charlie of Atlassian"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user#","title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["active"]}
- Status
400Returned if the request is invalid.
- Status
401Returned if the user is not authenticated.
- Status
500Returned if the user was not created because of other error.
- Status
403Returned if the caller user does not have permission to create the user.
Remove user
experimentalDELETE /rest/api/2/user
Removes user.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | the username |
key | string | user key |
Responses
- Status
400Returned if the request is invalid or some other server error occurred.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the user was deleted successfully.
- Status
403Returned if the caller does not have permission to remove the user.
- Status
404Returned if the caller does have permission to remove user but the user does not exist.
Get userGET /rest/api/2/user
Returns a user. This resource cannot be accessed anonymously.
The resource accepts the expand
param that is used to include, hidden by default, parts of response. This can be used to include:
groups
- all groups, including nested groups, to which user belongsapplicationRoles
- application roles defines to which application user has access
Request
query parameters
parameter | type | description |
---|---|---|
username | string | the username |
key | string | user key |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-user"},{"name":"jira-admin","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-admin"},{"name":"important","self":"http://www.example.com/jira/rest/api/2/group?groupname=important"}]},"applicationRoles":{"size":1,"items":[]},"expand":"groups,applicationRoles"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user#","title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["active"]}
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested user is not found.
Find bulk assignable usersGET /rest/api/2/user/assignable/multiProjectSearch
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
parameter | type | description |
---|---|---|
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. |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},{"self":"http://www.example.com/jira/rest/api/2/user?username=andrew","key":"andrew","accountId":"99:e2a16dd9-2ffb-4a4b-a9bd-bd1145a020ee","name":"andrew","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew"},"displayName":"Andrew Anderson","active":false}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-user#","title":"List of User","type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}}}
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested user is not found.
Find assignable usersGET /rest/api/2/user/assignable/search
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
parameter | type | description |
---|---|---|
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. |
actionDescriptorId | int |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-user"},{"name":"jira-admin","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-admin"},{"name":"important","self":"http://www.example.com/jira/rest/api/2/group?groupname=important"}]},"applicationRoles":{"size":1,"items":[]},"expand":"groups,applicationRoles"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-user#","title":"List of User","type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}}}
- Status
400Returned if no project or issue key was provided
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested user is not found.
Default columnsGET /rest/api/2/user/columns
Returns the default columns for the given user. Admin permission will be required to get columns for a user other than the currently logged in user.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | username |
Responses
- Status
200 - application/jsonReturns a list of columns for configured for the given user
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-column-item#","title":"List of Column Item","type":"array","items":{"title":"Column Item","type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}}
- Status
401Returned if the current user is not permitted to request the columns for the given user.
- Status
500Returned if an error occurs while retrieving the column configuration.
- Status
404Returned if the requested user is not found.
Reset columnsDELETE /rest/api/2/user/columns
Reset the default columns for the given user to the system default. Admin permission will be required to get columns for a user other than the currently logged in user.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | username |
Responses
- Status
401Returned if the current user is not permitted to request the columns for the given user.
- Status
500Returned if an error occurs while resetting the column configuration.
- Status
204Returned when the columns are reset successfully
Set columnsPUT /rest/api/2/user/columns
Sets the default columns for the given user. Admin permission will be required to get columns for a user other than the currently logged in user.
Request
Responses
- Status
200Returned when the columns is saved successfully
- Status
500Returned if an error occurs while retrieving the column configuration.
Get user groupsGET /rest/api/2/user/groups
Returns user's groups. This resource cannot be accessed anonymously.
The resource accepts the expand
param that is used to include, hidden by default, parts of response.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | the username |
key | string | user key |
Responses
- Status
200 - application/jsonReturns a full representation of user's groups in JSON format.
Example
{"name":"jira-administrators","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-administrators"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-group#","title":"List of Group","type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}
Find users with all permissionsGET /rest/api/2/user/permission/search
Returns a list of active users that match the search string and have all specified permissions for the project or issue.
This resource can be accessed by users with ADMINISTER_PROJECT permission for the project or global ADMIN or SYSADMIN rights.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | the username filter, list includes all users if unspecified |
permissions | string | comma separated list of permissions for project or issue returned users must have, see Permissions JavaDoc for the list of all possible permissions. |
issueKey | string | the issue key for the issue for which returned users have specified permissions. |
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. |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},{"self":"http://www.example.com/jira/rest/api/2/user?username=andrew","key":"andrew","accountId":"99:e2a16dd9-2ffb-4a4b-a9bd-bd1145a020ee","name":"andrew","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew"},"displayName":"Andrew Anderson","active":false}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-user#","title":"List of User","type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}}}
- Status
400Returned if no project or issue key was provided or when permissions list is empty or contains an invalid entry
- Status
401Returned if the current user is not authenticated.
- Status
403Returned if the current user does not have admin rights for the project.
- Status
404Returned if the requested issue or project is not found.
Find users for pickerGET /rest/api/2/user/picker
Returns a list of users matching query with highlighting. This resource cannot be accessed anonymously.
Request
query parameters
parameter | type | description |
---|---|---|
query | string | A string used to search username, Name or e-mail address |
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. |
showAvatar | boolean | |
exclude | string |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
{"users":[{"name":"fred","key":"fred","html":"fred@example.com","displayName":"Fred Grumble","avatarUrl":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred"}],"total":25,"header":"Showing 20 of 25 matching groups"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/user-picker-results#","title":"User Picker Results","type":"object","properties":{"users":{"type":"array","items":{"title":"User Picker User","type":"object","properties":{"name":{"type":"string"},"key":{"type":"string"},"html":{"type":"string"},"displayName":{"type":"string"},"avatarUrl":{"type":"string","format":"uri"}},"additionalProperties":false}},"total":{"type":"integer"},"header":{"type":"string"}},"additionalProperties":false}
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested user is not found.
Find usersGET /rest/api/2/user/search
Returns a list of users that match the search string and/or property. This resource cannot be accessed anonymously.
Request
query parameters
parameter | type | description |
---|---|---|
username | string | A query 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. |
includeActive | boolean | If true, then active users are included in the results (default true) |
includeInactive | boolean | If true, then inactive users are included in the results (default false) |
property | string | A query string used to search by property. Property key cannot contain dot or equal sign, value cannot be JSONObject. Example: for following property value: {"something":{"nested":1,"other":2}} you can search: propertyKey.something.nested=1 |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},{"self":"http://www.example.com/jira/rest/api/2/user?username=andrew","key":"andrew","accountId":"99:e2a16dd9-2ffb-4a4b-a9bd-bd1145a020ee","name":"andrew","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew"},"displayName":"Andrew Anderson","active":false}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-user#","title":"List of User","type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}}}
- Status
400Returned if username and property params are missing or property param is not valid. Example of valid params: propertyKey=value, propertyKey.path=value
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested user is not found.
Find users with browse permissionGET /rest/api/2/user/viewissue/search
Returns a list of active users that match the search string. This resource cannot be accessed anonymously and requires the Browse Users global permission. 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
parameter | type | description |
---|---|---|
username | string | the username filter, no users returned if left blank |
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. |
Responses
- Status
200 - application/jsonReturns a full representation of a Jira user in JSON format.
Example
[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":false},{"self":"http://www.example.com/jira/rest/api/2/user?username=andrew","key":"andrew","accountId":"99:e2a16dd9-2ffb-4a4b-a9bd-bd1145a020ee","name":"andrew","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=andrew","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=andrew","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=andrew","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=andrew"},"displayName":"Andrew Anderson","active":false}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-user#","title":"List of User","type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}}}
- Status
400Returned if no project or issue key was provided
- Status
401Returned if the current user is not authenticated.
- Status
404Returned if the requested issue or project is not found.
api/2/user/bulk
Bulk get users
experimentalGET /rest/api/2/user/bulk
Returns a list of users that match the query. This resource cannot be accessed anonymously.
Request
query parameters
parameter | type | description |
---|---|---|
startAt | long | the index of the first user to return (0-based) |
maxResults | int | the maximum number of users to return (defaults to 10). The maximum allowed value is 200. |
username | string | the usernames of the users to be returned |
key | string | the keys of the users to be returned |
Responses
- Status
200 - application/jsonReturns full representations of a Jira users in JSON format.
Example
{"maxResults":100,"startAt":0,"total":1,"isLast":true,"values":[{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[{"name":"jira-user","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-user"},{"name":"jira-admin","self":"http://www.example.com/jira/rest/api/2/group?groupname=jira-admin"},{"name":"important","self":"http://www.example.com/jira/rest/api/2/group?groupname=important"}]},"applicationRoles":{"size":1,"items":[]},"expand":"groups,applicationRoles"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-user#","title":"Page of User","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
400Returned if usernames and keys are both missing or both non-empty.
- Status
401Returned if the current user is not authenticated.
api/2/user/properties
Get properties keysGET /rest/api/2/user/properties
Returns the keys of all properties for the user identified by the key or by the id.
Request
query parameters
parameter | type | description |
---|---|---|
userKey | string | key of the user whose properties are to be returned |
username | string | username of the user whose properties are to be returned |
Responses
- Status
200 - application/jsonReturned if the user was found.
Example
{"keys":[{"self":"http://www.example.com/jira/rest/api/2/issue/EX-2/properties/issue.support","key":"issue.support"}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-properties-keys#","title":"Entity Properties Keys","type":"object","properties":{"keys":{"type":"array","items":{"title":"Entity Property Key","type":"object","properties":{"self":{"type":"string"},"key":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the user key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the user.
- Status
404Returned if the user with given key or id does not exist or if the property with given key is not found.
Delete propertyDELETE /rest/api/2/user/properties/{propertyKey}
Removes the property from the user identified by the key or by the id. Ths user removing the property is required to have permissions to administer the user.
Request
query parameters
parameter | type | description |
---|---|---|
userKey | string | key of the user whose property is to be removed |
username | string | username of the user whose property is to be removed |
Responses
- Status
400Returned if the user key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
204Returned if the user property was removed successfully.
- Status
403Returned if the user does not have permission to edit the user.
- Status
404Returned if the user with given key or id does not exist or if the property with given key is not found.
Set propertyPUT /rest/api/2/user/properties/{propertyKey}
Sets the value of the specified user's property.
You can use this resource to store a custom data against the user identified by the key or by the id. The user who stores the data is required to have permissions to administer the user.
Request
query parameters
parameter | type | description |
---|---|---|
userKey | string | key of the user whose property is to be set |
username | string | username of the user whose property is to be set |
Responses
- Status
200Returned if the user property is successfully updated.
- Status
201Returned if the user property is successfully created.
- Status
400Returned if the user key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to administer the user.
- Status
404Returned if the user with given key or id does not exist.
Get propertyGET /rest/api/2/user/properties/{propertyKey}
Returns the value of the property with a given key from the user identified by the key or by the id. The user who retrieves the property is required to have permissions to read the user.
Request
query parameters
parameter | type | description |
---|---|---|
userKey | string | key of the user whose property is to be returned |
username | string | username of the user whose property is to be returned |
Responses
- Status
200 - application/jsonReturned if the user property was found.
Example
{"key":"issue.support","value":{"hipchat.room.id":"support-123","support.time":"1m"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/entity-property#","title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}
- Status
400Returned if the user key or id is invalid.
- Status
401Returned if the user is not authenticated.
- Status
403Returned if the user does not have permission to browse the user.
- Status
404Returned if the user with given key or id does not exist or if the property with given key is not found.
api/2/user/search/query
Resource for searching for users using a structured query language
Search
experimentalGET /rest/api/2/user/search/query
Returns a list of users that match the search.
The language allows queries such as these:is assignee of PROJ
- returns user(s) that are assignees of at least one issue in project PROJis assignee of (PROJ-1, PROJ-2)
- returns user(s) that are assignees of the issues PROJ-1 and PROJ-2is reporter of (PROJ-1, PROJ-2)
- returns user(s) that are reporters of the issues PROJ-1 and PROJ-2[propertyKey].entity.property.path is "property value"
- returns users(s) with the specified entity property value
AND
and OR
operators can be used to form more complex queries, for instance:
is assignee of PROJ AND [propertyKey].entity.property.path is "property value"
Request
query parameters
parameter | type | description |
---|---|---|
query | string | The search query |
startAt | long | |
maxResults | int |
Responses
- Status
200 - application/jsonReturns Jira users matching the query
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/page-of-user#","title":"Page of User","type":"object","properties":{"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"},"maxResults":{"type":"integer"},"startAt":{"type":"integer"},"total":{"type":"integer"},"isLast":{"type":"boolean"},"values":{"type":"array","items":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]}}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false,"required":["maxResults","startAt"]}
- Status
400Returned if the query is invalid
- Status
401Returned if the current user is not authenticated
- Status
403Returned if the current user does not have the user picker permission
api/2/version
Create versionPOST /rest/api/2/version
Create a version via POST.
Request
Example
{"description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","userReleaseDate":"6/Jul/2010","project":"PXA","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
Responses
- Status
201 - application/jsonReturned if the version is created successfully.
Example
{"description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","userReleaseDate":"6/Jul/2010","project":"PXA","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the provided bean doesn't is missing required properties, contains two dates of the same type (e.g. "startDate" and "userStartDate"), or if it's otherwise invalid.
- Status
403Returned if the currently authenticated user does not have permission to edit the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Move versionPOST /rest/api/2/version/{id}/move
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
Request
Example
{"after":"http://www.example.com/jira/rest/api/2/version/10000"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version-move#","title":"Version Move","type":"object","properties":{"after":{"type":"string","format":"uri"},"position":{"type":"string","enum":["Earlier","Later","First","Last"]}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturned if the version exists and the currently authenticated user has permission to view it. Contains a full representation of the version moved.
Example
{"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"6/Jul/2010","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned 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.
Get versionGET /rest/api/2/version/{id}
Returns a project version.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string |
Responses
- Status
200 - application/jsonReturned if the version exists and the currently authenticated user has permission to view it. Contains a full representation of the version.
Example
{"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"6/Jul/2010","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Update versionPUT /rest/api/2/version/{id}
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.
Request
Example
{"self":"http://www.example.com/jira/rest/api/2/version/10000","id":"10000","description":"An excellent version","name":"New Version 1","archived":false,"released":true,"releaseDate":"2010-07-06","overdue":true,"userReleaseDate":"6/Jul/2010","projectId":10000}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
Responses
- Status
200Returned if the version exists and the currently authenticated user has permission to edit it.
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version#","title":"Version","type":"object","properties":{"expand":{"type":"string"},"self":{"type":"string","format":"uri"},"id":{"type":"string"},"description":{"type":"string"},"name":{"type":"string"},"archived":{"type":"boolean"},"released":{"type":"boolean"},"overdue":{"type":"boolean"},"userStartDate":{"type":"string"},"userReleaseDate":{"type":"string"},"project":{"type":"string"},"projectId":{"type":"integer"},"moveUnfixedIssuesTo":{"type":"string","format":"uri"},"operations":{"type":"array","items":{"title":"Simple Link","type":"object","properties":{"id":{"type":"string"},"styleClass":{"type":"string"},"iconClass":{"type":"string"},"label":{"type":"string"},"title":{"type":"string"},"href":{"type":"string"},"weight":{"type":"integer"}},"additionalProperties":false}},"remotelinks":{"type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}},"additionalProperties":false}
- Status
400Returned if the provided bean contains two dates of the same type (e.g. "startDate" and "userStartDate"), or if it's otherwise invalid.
- Status
403Returned if the currently authenticated user does not have permission to edit the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
DeleteDELETE /rest/api/2/version/{id}
Delete a project version.
Request
query parameters
parameter | type | description |
---|---|---|
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. |
Responses
- Status
204Returned if the version is successfully deleted.
- Status
403Returned if the currently authenticated user does not have permission to delete the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
MergePUT /rest/api/2/version/{id}/mergeto/{moveIssuesTo}
Merge versions
Responses
- Status
204Returned if the version is successfully deleted.
- Status
403Returned if the currently authenticated user does not have permission to delete the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Get version related issuesGET /rest/api/2/version/{id}/relatedIssueCounts
Returns a bean containing the number of fixed in and affected issues for the given version.
Responses
- Status
200 - application/jsonReturned if the version exists and the currently authenticated user has permission to view it. Contains counts of issues fixed in and affecting this version, custom fields connected to this version.
Example
{"self":"http://www.example.com/jira/rest/api/2/version/10000","issuesFixedCount":23,"issuesAffectedCount":101,"issueCountWithCustomFieldsShowingVersion":54,"customFieldUsage":[{"fieldName":"Field1","customFieldId":10000,"issueCountWithVersionInCustomField":2},{"fieldName":"Field2","customFieldId":10010,"issueCountWithVersionInCustomField":3}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version-issue-counts#","title":"Version Issue Counts","type":"object","properties":{"self":{"type":"string","format":"uri"},"issuesFixedCount":{"type":"integer"},"issuesAffectedCount":{"type":"integer"},"issueCountWithCustomFieldsShowingVersion":{"type":"integer"},"customFieldUsage":{"type":"array","items":{"title":"Version Usage In Custom Fields","type":"object","properties":{"fieldName":{"type":"string"},"customFieldId":{"type":"integer"},"issueCountWithVersionInCustomField":{"type":"integer"}},"additionalProperties":false,"required":["customFieldId","issueCountWithVersionInCustomField"]}}},"additionalProperties":false,"required":["issuesFixedCount","issuesAffectedCount","issueCountWithCustomFieldsShowingVersion"]}
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
DeletePOST /rest/api/2/version/{id}/removeAndSwap
Delete a project version.
Request
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/delete-and-replace-version#","title":"Delete And Replace Version","type":"object"}
Responses
- Status
204Returned if the version is successfully deleted.
- Status
403Returned if the currently authenticated user does not have permission to delete the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Get version unresolved issuesGET /rest/api/2/version/{id}/unresolvedIssueCount
Returns the number of unresolved issues for the given version
Responses
- Status
200 - application/jsonReturned if the version exists and the currently authenticated user has permission to view it. Contains counts of issues unresolved in this version.
Example
{"self":"http://www.example.com/jira/rest/api/2/version/10000","issuesUnresolvedCount":23,"issuesCount":30}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/version-unresolved-issue-counts#","title":"Version Unresolved Issue Counts","type":"object","properties":{"self":{"type":"string","format":"uri"},"issuesUnresolvedCount":{"type":"integer"},"issuesCount":{"type":"integer"}},"additionalProperties":false,"required":["issuesUnresolvedCount","issuesCount"]}
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Get remote version links by version idGET /rest/api/2/version/{versionId}/remotelink
Returns the remote version links associated with the given version ID.
Responses
- Status
200 - application/jsonReturned if the version exists and the currently authenticated user has permission to view it, which is restricted to those users with BROWSE permission for the project. Contains a full representation of the remote version links.
Example
{"links":[{"self":"http://www.example.com/version/10000/AnotherGlobalId","name":"Version 1","link":{ "globalId": "AnotherGlobalId", "myCustomLinkProperty": false, "colors": [ "cyan", "magenta", "yellow" ]}},{"self":"http://www.example.com/version/10000/SomeGlobalId","name":"Version 1","link":{ "globalId": "SomeGlobalId", "myCustomLinkProperty": true, "colors": [ "red", "green", "blue" ]}}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-entity-link#","title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Create or update remote version linkPOST /rest/api/2/version/{versionId}/remotelink
Create a remote version link via POST. The link's global ID will be taken from the JSON payload if provided; otherwise, it will be generated.
Request
Example
{"globalId":"SomeGlobalId","myCustomLinkProperty":true,"colors":["red","green","blue"],"notes":["Remote version links may take any well-formed JSON shape that is desired,","provided that they fit within the maximum buffer size allowed,","which is currently 32,768 characters."]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
- Status
201Returned if the version is created successfully. The document will has no content, and a {@code Location:} header contains the self-URI for the newly created link.
Example
Returned if the remote version link is created or updated successfully. The document has no content, and a
- Status
400Returned if the JSON payload is empty or malformed
- Status
403Returned if the currently authenticated user does not have permission to edit the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Delete remote version links by version idDELETE /rest/api/2/version/{versionId}/remotelink
Delete all remote version links for a given version ID.
Responses
- Status
204Returned if the remote version links are successfully deleted.
- Status
403Returned if the currently authenticated user does not have administrative rights to the project and thereby cannot delete remote links to the version.
- Status
404Returned if the version does not exist, the currently authenticated user does not have permission to view it, or the version does not have any remote links to delete
Get remote version linkGET /rest/api/2/version/{versionId}/remotelink/{globalId}
A REST sub-resource representing a remote version link
Responses
- Status
200 - application/jsonInformation on the remote version link (or links)
Example
{"self":"http://www.example.com/version/10000/SomeGlobalId","name":"Version 1","link":{ "globalId": "SomeGlobalId", "myCustomLinkProperty": true, "colors": [ "red", "green", "blue" ]}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/remote-entity-link#","title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}
- Status
404Returned if the version or remote version link does not exist or if the user does not have the BROWSE permission for the project that owns the specified version
Create or update remote version link with global idPOST /rest/api/2/version/{versionId}/remotelink/{globalId}
Create a remote version link via POST using the provided global ID.
Request
Example
{"globalId":"SomeGlobalId","myCustomLinkProperty":true,"colors":["red","green","blue"],"notes":["Remote version links may take any well-formed JSON shape that is desired,","provided that they fit within the maximum buffer size allowed,","which is currently 32,768 characters."]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/string#","title":"String","type":"string"}
Responses
- Status
201Returned if the remote version link is created or updated successfully. The document has no content, and a {@code Location:} header contains the self-URI for the newly created link.
- Status
400Returned if the JSON payload is empty or malformed
- Status
403Returned if the currently authenticated user does not have permission to edit the version.
- Status
404Returned if the version does not exist or the currently authenticated user does not have permission to view it.
Delete remote version linkDELETE /rest/api/2/version/{versionId}/remotelink/{globalId}
Delete a specific remote version link with the given version ID and global ID.
Responses
- Status
204Returned if the remote version link is successfully deleted.
- Status
403Returned if the currently authenticated user does not have administrative rights to the project and thereby cannot delete remote links to the version.
- Status
404Returned if the version does not exist, the currently authenticated user does not have permission to view it, or the version does not have a link for the given global ID
Get remote version linksGET /rest/api/2/version/remotelink
Returns the remote version links for a given global ID.
Request
query parameters
parameter | type | description |
---|---|---|
globalId | string | the global ID of the remote resource that is linked to the versions |
Responses
- Status
200 - application/jsonContains a list of remote version links. Any existing links that the user does not have permission to see will be filtered out. The user must have BROWSE permission for the project to see links to its versions.
Example
{"links":[{"self":"http://www.example.com/version/10000/SomeGlobalId","name":"Version 1","link":{ "globalId": "SomeGlobalId", "myCustomLinkProperty": true, "colors": [ "red", "green", "blue" ]}},{"self":"http://www.example.com/version/10101/SomeGlobalId","name":"Version 2","link":{ "globalId": "SomeGlobalId" }}]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-remote-entity-link#","title":"List of Remote Entity Link","type":"array","items":{"title":"Remote Entity Link","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"link":{}},"additionalProperties":false}}
api/2/workflow
REST resource for retrieving workflows.
Get all workflowsGET /rest/api/2/workflow
Returns a list of all workflows.
If the "workflowName" query parameter is provided then only one workflow will be returned (not as a list).
Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | Return just one workflow identified by this name. |
Responses
- Status
200 - application/jsonReturned if the currently authenticated user has administration permission. Contains a full representation of every workflow.
Example
[{"name":"classic workflow","description":"A classic Jira workflow","lastModifiedDate":"01-01-2011","lastModifiedUser":"admin","steps":5,"default":true}]
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/object#","title":"Object"}
- Status
401Returned if the current user does not have administration permissions.
Create propertyPOST /rest/api/2/workflow/transitions/{transitionId}/properties
Add a new property to a transition. Trying to add a property that already exists will fail.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | the name of the property to add. |
workflowName | string | the name of the workflow to use. |
workflowMode | string | the type of workflow to use. Can either be "live" or "draft". |
Example
{"value":"createissue"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200 - application/json
Example
{"key":"jira.i18n.title","value":"some.title","id":"jira.i18n.title"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if the request is invalid.
- Status
403Returned if the user does not have admin permission
Update propertyPUT /rest/api/2/workflow/transitions/{transitionId}/properties
Update/add new property to a transition. Trying to update a property that does not exist will result in a new property being added.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | the name of the property to add. |
workflowName | string | the name of the workflow to use. |
workflowMode | string | the type of workflow to use. Can either be "live" or "draft". |
Example
{"value":"createissue"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200 - application/json
Example
{"key":"jira.i18n.title","value":"some.title","id":"jira.i18n.title"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
- Status
400Returned if the request is invalid.
- Status
403Returned if the user does not have admin permission
- Status
304Returned if no changes were actually made by the request (e.g. updating a property to value it already holds).
Delete propertyDELETE /rest/api/2/workflow/transitions/{transitionId}/properties
Delete a property from the passed transition on the passed workflow. It is not an error to delete a property that does not exist.
Request
query parameters
parameter | type | description |
---|---|---|
key | string | the name of the property to add. |
workflowName | string | the name of the workflow to use. |
workflowMode | string | the type of workflow to use. Can either be "live" or "draft". |
Responses
- Status 200 - application/json
- Status
400Returned if the request is invalid.
- Status
403Returned if the user does not have admin permission
- Status
304Returned if no changes were actually made by the request (e.g. trying to delete a property that does not exist).
Get propertiesGET /rest/api/2/workflow/transitions/{transitionId}/properties
Return the property or properties associated with a transition.
Request
query parameters
parameter | type | description |
---|---|---|
includeReservedKeys | boolean | some keys under the "jira." prefix are editable, some are not. Set this to true in order to include the non-editable keys in the response. |
key | string | the name of the property key to query. Can be left off the query to return all properties. |
workflowName | string | the name of the workflow to use. |
workflowMode | string | the type of workflow to use. Can either be "live" or "draft". |
Responses
- Status
200 - application/json
Example
{"key":"jira.i18n.title","value":"some.title","id":"jira.i18n.title"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/property#","title":"Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-property#","title":"List of Property","type":"array","items":{"title":"Property","type":"object","properties":{"id":{"type":"string"},"key":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false}}
- Status
403Returned if the user does not have admin permission
api/2/workflowscheme
Create schemePOST /rest/api/2/workflowscheme
Create a new workflow scheme.
The body contains a representation of the new scheme. Values not passed are assumed to be set to their defaults.Request
Example
{"name":"New Workflow Scheme Name","description":"New Workflow Scheme Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId":"WorkflowName"}}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
Responses
- Status
201The newly created scheme.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
Get by idGET /rest/api/2/workflowscheme/{id}
Returns the requested workflow scheme to the caller.
Request
query parameters
parameter | type | description |
---|---|---|
returnDraftIfExists | boolean Default: false | when true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself. |
Responses
- Status
200 - application/jsonReturned if the scheme exists and the caller has permission to see it.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested scheme does not exist.
Delete schemeDELETE /rest/api/2/workflowscheme/{id}
Delete the passed workflow scheme.
Responses
- Status
400Returned if the requested scheme is active (i.e. being used by Jira).
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
204If the scheme was deleted.
- Status
404Returned if the requested scheme does not exist.
UpdatePUT /rest/api/2/workflowscheme/{id}
Update the passed workflow scheme.
The body of the request is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field. The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created and/or updated when the actual scheme cannot be edited (e.g. when the scheme is being used by a project). Values not appearing the body will not be touched.Request
Example
{"id":57585,"name":"Updated Workflow Scheme Name","description":"Updated Workflow Scheme Name","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId":"WorkflowName"},"updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
Responses
- Status
200The updated scheme.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested scheme does not exist.
Create draft for parentPOST /rest/api/2/workflowscheme/{id}/createdraft
Create a draft for the passed scheme. The draft will be a copy of the state of the parent.
Responses
- Status
201The newly created scheme.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
Delete defaultDELETE /rest/api/2/workflowscheme/{id}/default
Remove the default workflow from the passed workflow scheme.
Request
query parameters
parameter | type | description |
---|---|---|
updateDraftIfNeeded | boolean | when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project). |
Responses
- Status
200Returned on success.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the scheme does not exist.
Update defaultPUT /rest/api/2/workflowscheme/{id}/default
Set the default workflow for the passed workflow scheme.
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.Request
Example
{"workflow":"WorkflowName","updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default#","title":"Default","type":"object","properties":{"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200Returned on success.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the scheme does not exist.
Get defaultGET /rest/api/2/workflowscheme/{id}/default
Return the default workflow from the passed workflow scheme.
Request
query parameters
parameter | type | description |
---|---|---|
returnDraftIfExists | boolean Default: false | when true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself. |
Responses
- Status
200
Example
{"workflow":"WorkflowName"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default#","title":"Default","type":"object","properties":{"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned when the workflow scheme does not exist.
Get draft by idGET /rest/api/2/workflowscheme/{id}/draft
Returns the requested draft workflow scheme to the caller.
Responses
- Status
200 - application/jsonReturned if the scheme exists and the caller has permission to see it.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested draft scheme does not exist.
Delete draft by idDELETE /rest/api/2/workflowscheme/{id}/draft
Delete the passed draft workflow scheme.
Responses
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
204If the scheme was deleted.
- Status
404Returned if the requested draft scheme or parent scheme does not exist.
Update draftPUT /rest/api/2/workflowscheme/{id}/draft
Update a draft workflow scheme. The draft will created if necessary.
The body is a representation of the workflow scheme. Values not passed are assumed to indicate no change for that field.Request
Example
{"id":57585,"name":"Updated Workflow Scheme Name","description":"Updated Workflow Scheme Name","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId":"WorkflowName"},"updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
Responses
- Status
200The updated/created scheme.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested scheme does not exist.
Get draft defaultGET /rest/api/2/workflowscheme/{id}/draft/default
Return the default workflow from the passed draft workflow scheme to the caller.
Responses
- Status
200
Example
{"workflow":"WorkflowName"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default#","title":"Default","type":"object","properties":{"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned when the workflow scheme does not exist.
Delete draft defaultDELETE /rest/api/2/workflowscheme/{id}/draft/default
Remove the default workflow from the passed draft workflow scheme.
Responses
- Status
200Returned on success.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the scheme does not exist.
Update draft defaultPUT /rest/api/2/workflowscheme/{id}/draft/default
Set the default workflow for the passed draft workflow scheme.
Request
Example
{"workflow":"WorkflowName","updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/default#","title":"Default","type":"object","properties":{"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200Returned on success.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the scheme does not exist.
Get draft issue typeGET /rest/api/2/workflowscheme/{id}/draft/issuetype/{issueType}
Returns the issue type mapping for the passed draft workflow scheme.
Responses
- Status
200 - application/jsonReturned on success.
Example
{"issueType":"IssueTypeId","workflow":"WorkflowName"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-mapping#","title":"Issue Type Mapping","type":"object","properties":{"issueType":{"type":"string"},"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Delete draft issue typeDELETE /rest/api/2/workflowscheme/{id}/draft/issuetype/{issueType}
Remove the specified issue type mapping from the draft scheme.
Responses
- Status
200Returned on success.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Set draft issue typePUT /rest/api/2/workflowscheme/{id}/draft/issuetype/{issueType}
Set the issue type mapping for the passed draft scheme.
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.Request
Example
{"issueType":"IssueTypeId","workflow":"WorkflowName","updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-mapping#","title":"Issue Type Mapping","type":"object","properties":{"issueType":{"type":"string"},"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200Returned on success.
Example
{"id":17218781,"name":"Workflow Scheme Two","description":"Workflow Scheme Two Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"originalDefaultWorkflow":"ParentsDefaultWorkflowName","originalIssueTypeMappings":{"IssueTypeId":"WorkflowName2"},"draft":true,"lastModifiedUser":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","key":"fred","accountId":"99:27935d01-92a7-4687-8272-a9b8d3b2ae2e","name":"fred","emailAddress":"fred@example.com","avatarUrls":{"48x48":"http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred","24x24":"http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred","16x16":"http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred","32x32":"http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"},"displayName":"Fred F. User","active":true,"timeZone":"Australia/Sydney","groups":{"size":3,"items":[]},"applicationRoles":{"size":1,"items":[]}},"lastModified":"Today 12:45","self":"http://www.example.com/jira/rest/api/2/workflowscheme/17218781/draft"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Get draft workflowGET /rest/api/2/workflowscheme/{id}/draft/workflow
Returns the draft workflow mappings or requested mapping to the caller.
Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name. |
Responses
- Status
200 - application/jsonReturned on success.
Example
{"workflow":"WorkflowName","issueTypes":["IssueTypeId","IssueTypeId2"],"defaultMapping":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-mapping#","title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-workflow-mapping#","title":"List of Workflow Mapping","type":"array","items":{"title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or workflow does not exist.
Delete draft workflow mappingDELETE /rest/api/2/workflowscheme/{id}/draft/workflow
Delete the passed workflow from the draft workflow scheme.
Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the name of the workflow to delete. |
Responses
- Status
200The scheme with the workflow deleted.
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested scheme or workflow does not exist.
Update draft workflow mappingPUT /rest/api/2/workflowscheme/{id}/draft/workflow
Update the draft scheme to include the passed mapping.
The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field.Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the name of the workflow mapping to update. |
Example
{"workflow":"WorkflowName3","issueTypes":["IssueTypeId"],"updateDraftIfNeeded":true}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-mapping#","title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200The updated scheme.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
Get issue typeGET /rest/api/2/workflowscheme/{id}/issuetype/{issueType}
Returns the issue type mapping for the passed workflow scheme.
Request
query parameters
parameter | type | description |
---|---|---|
returnDraftIfExists | boolean Default: false | when true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself. |
Responses
- Status
200 - application/jsonReturned on success.
Example
{"issueType":"IssueTypeId","workflow":"WorkflowName"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-mapping#","title":"Issue Type Mapping","type":"object","properties":{"issueType":{"type":"string"},"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Delete issue typeDELETE /rest/api/2/workflowscheme/{id}/issuetype/{issueType}
Remove the specified issue type mapping from the scheme.
Request
query parameters
parameter | type | description |
---|---|---|
updateDraftIfNeeded | boolean | when true will create and return a draft when the workflow scheme cannot be edited (e.g. when it is being used by a project). |
Responses
- Status
200Returned on success.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Set issue typePUT /rest/api/2/workflowscheme/{id}/issuetype/{issueType}
Set the issue type mapping for the passed scheme.
The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.Request
Example
{"issueType":"IssueTypeId","workflow":"WorkflowName","updateDraftIfNeeded":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/issue-type-mapping#","title":"Issue Type Mapping","type":"object","properties":{"issueType":{"type":"string"},"workflow":{"type":"string"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200Returned on success.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or issue type does not exist.
Get workflowGET /rest/api/2/workflowscheme/{id}/workflow
Returns the workflow mappings or requested mapping to the caller for the passed scheme.
Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the workflow mapping to return. Null can be passed to return all mappings. Must be a valid workflow name. |
returnDraftIfExists | boolean Default: false | when true indicates that a scheme's draft, if it exists, should be queried instead of the scheme itself. |
Responses
- Status
200 - application/jsonReturned on success.
Example
{"workflow":"WorkflowName","issueTypes":["IssueTypeId","IssueTypeId2"],"defaultMapping":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-mapping#","title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-workflow-mapping#","title":"List of Workflow Mapping","type":"array","items":{"title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if either the requested scheme or workflow does not exist.
Delete workflow mappingDELETE /rest/api/2/workflowscheme/{id}/workflow
Delete the passed workflow from the workflow scheme.
Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the name of the workflow to delete. |
updateDraftIfNeeded | boolean | flag to indicate if a draft should be created if necessary to delete the workflow from the scheme. |
Responses
- Status
200The scheme with the workflow deleted.
- Status
401Returned if there is no user or if the user has not entered a websudo session.
- Status
404Returned if the requested scheme or workflow does not exist.
Update workflow mappingPUT /rest/api/2/workflowscheme/{id}/workflow
Update the scheme to include the passed mapping.
The body is a representation of the workflow mapping. Values not passed are assumed to indicate no change for that field. The passed representation can have its updateDraftIfNeeded flag set to true to indicate that the draft should be created/updated when the actual scheme cannot be edited.Request
query parameters
parameter | type | description |
---|---|---|
workflowName | string | the name of the workflow mapping to update. |
Example
{"workflow":"WorkflowName3","issueTypes":["IssueTypeId"],"updateDraftIfNeeded":true}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-mapping#","title":"Workflow Mapping","type":"object","properties":{"workflow":{"type":"string"},"issueTypes":{"type":"array","items":{"type":"string"}},"defaultMapping":{"type":"boolean"},"updateDraftIfNeeded":{"type":"boolean"}},"additionalProperties":false}
Responses
- Status
200The updated scheme.
Example
{"id":101010,"name":"Workflow Scheme One","description":"Workflow Scheme One Description","defaultWorkflow":"DefaultWorkflowName","issueTypeMappings":{"IsueTypeId2":"WorkflowName","IsueTypeId":"WorkflowName"},"draft":false,"self":"http://www.example.com/jira/rest/api/2/workflowscheme/101010"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/workflow-scheme#","title":"Workflow Scheme","type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string"},"defaultWorkflow":{"type":"string"},"issueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"originalDefaultWorkflow":{"type":"string"},"originalIssueTypeMappings":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"draft":{"type":"boolean"},"lastModifiedUser":{"title":"User","type":"object","properties":{"self":{"type":"string","format":"uri"},"key":{"type":"string"},"accountId":{"type":"string"},"name":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string","format":"uri"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"},"locale":{"type":"string"},"groups":{"$ref":"#/definitions/simple-list-wrapper"},"applicationRoles":{"$ref":"#/definitions/simple-list-wrapper"},"expand":{"type":"string"}},"additionalProperties":false,"required":["active"]},"lastModified":{"type":"string"},"self":{"type":"string","format":"uri"},"updateDraftIfNeeded":{"type":"boolean"},"issueTypes":{"type":"object","patternProperties":{".+":{"title":"Issue Type","type":"object","properties":{"self":{"type":"string"},"id":{"type":"string"},"description":{"type":"string"},"iconUrl":{"type":"string"},"name":{"type":"string"},"subtask":{"type":"boolean"},"avatarId":{"type":"integer"}},"additionalProperties":false,"required":["subtask"]}},"additionalProperties":false}},"definitions":{"simple-list-wrapper":{"title":"Simple List Wrapper","type":"object","properties":{"size":{"type":"integer"},"max-results":{"type":"integer"},"items":{"type":"array","items":{"title":"Group","type":"object","properties":{"name":{"type":"string"},"self":{"type":"string","format":"uri"}},"additionalProperties":false}}},"additionalProperties":false,"required":["size"]}},"additionalProperties":false}
- Status
401Returned if there is no user or if the user has not entered a websudo session.
api/2/worklog
Get ids of worklogs deleted sinceGET /rest/api/2/worklog/deleted
Returns worklogs id and delete time of worklogs that was deleted since given time. The returns set of worklogs is limited to 1000 elements. This API will not return worklogs deleted during last minute.
Request
query parameters
parameter | type | description |
---|---|---|
since | long Default: 0 | a date time in unix timestamp format since when deleted worklogs will be returned. |
Responses
- Status
200 - application/jsonReturns a JSON representation of the worklog changes.
Example
{"values":[{"worklogId":103,"updatedTime":1438013671562,"properties":[]},{"worklogId":104,"updatedTime":1438013672165,"properties":[]},{"worklogId":105,"updatedTime":1438013693136,"properties":[]}],"since":1438013671562,"until":1438013693136,"self":"http://www.example.com/jira/worklog/updated/updated/deleted?since=1438013671136&since=1438013693136&since=1438013671136","nextPage":"http://www.example.com/jira/worklog/updated/updated/deleted/deleted?since=1438013671136&since=1438013693136&since=1438013671136&since=1438013693136","lastPage":true}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog-changed-since#","title":"Worklog Changed Since","type":"object","properties":{"values":{"type":"array","items":{"title":"Worklog Change","type":"object","properties":{"worklogId":{"type":"integer"},"updatedTime":{"type":"integer"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}},"since":{"type":"integer"},"until":{"type":"integer"},"isLastPage":{"type":"boolean"},"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"}},"additionalProperties":false,"required":["isLastPage"]}
Get worklogs for idsPOST /rest/api/2/worklog/list
Returns worklogs for given worklog ids. Only worklogs to which the user has permissions, will be included in the result. The returns set of worklogs is limited to 1000 elements.
Request
query parameters
parameter | type | description |
---|---|---|
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
Example
{"ids":[1,2,5,10]}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog-ids-request#","title":"Worklog Ids Request","type":"object","properties":{"ids":{"type":"array","items":{"type":"integer"}}},"additionalProperties":false}
Responses
- Status
200 - application/jsonReturns a JSON representation of the search results.
Example
{"self":"http://www.example.com/jira/rest/api/2/issue/10010/worklog/10000","author":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"updateAuthor":{"self":"http://www.example.com/jira/rest/api/2/user?username=fred","name":"fred","displayName":"Fred F. User","active":false},"comment":"I did some work here.","updated":"2017-12-07T15:13:55.764+0000","visibility":{"type":"group","value":"jira-developers"},"started":"2017-12-07T15:13:55.764+0000","timeSpent":"3h 20m","timeSpentSeconds":12000,"id":"100028","issueId":"10002"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/list-of-worklog#","title":"List of Worklog","type":"array","items":{"title":"Worklog","type":"object","properties":{"self":{"type":"string","format":"uri"},"author":{"$ref":"#/definitions/user"},"updateAuthor":{"$ref":"#/definitions/user"},"comment":{"type":"string"},"created":{"type":"string"},"updated":{"type":"string"},"visibility":{"title":"Visibility","type":"object","properties":{"type":{"type":"string","enum":["group","role"]},"value":{"type":"string"}},"additionalProperties":false},"started":{"type":"string"},"timeSpent":{"type":"string"},"timeSpentSeconds":{"type":"integer"},"id":{"type":"string"},"issueId":{"type":"string"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false},"definitions":{"user":{"title":"User","type":"object","properties":{"self":{"type":"string"},"name":{"type":"string"},"key":{"type":"string"},"accountId":{"type":"string"},"emailAddress":{"type":"string"},"avatarUrls":{"type":"object","patternProperties":{".+":{"type":"string"}},"additionalProperties":false},"displayName":{"type":"string"},"active":{"type":"boolean"},"timeZone":{"type":"string"}},"additionalProperties":false,"required":["active"]}}}
- Status
400Returned if the request contains more than 1000 ids or is null
Get ids of worklogs modified sinceGET /rest/api/2/worklog/updated
Returns worklogs id and update time of worklogs that was updated since given time. The returns set of worklogs is limited to 1000 elements. This API will not return worklogs updated during last minute.
Request
query parameters
parameter | type | description |
---|---|---|
since | long Default: 0 | a date time in unix timestamp format since when updated worklogs will be returned. |
expand | string Default: | optional comma separated list of parameters to expand: properties (provides worklog properties). |
Responses
- Status
200 - application/jsonReturns a JSON representation of the worklog changes.
Example
{"values":[{"worklogId":103,"updatedTime":1438013671562,"properties":[]},{"worklogId":104,"updatedTime":1438013672165,"properties":[]},{"worklogId":105,"updatedTime":1438013693136,"properties":[]}],"since":1438013671562,"until":1438013693136,"self":"http://www.example.com/jira/worklog/updated?since=1438013671136","nextPage":"http://www.example.com/jira/worklog/updated/updated?since=1438013671136&since=1438013693136","lastPage":true}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/worklog-changed-since#","title":"Worklog Changed Since","type":"object","properties":{"values":{"type":"array","items":{"title":"Worklog Change","type":"object","properties":{"worklogId":{"type":"integer"},"updatedTime":{"type":"integer"},"properties":{"type":"array","items":{"title":"Entity Property","type":"object","properties":{"key":{"type":"string"},"value":{}},"additionalProperties":false}}},"additionalProperties":false}},"since":{"type":"integer"},"until":{"type":"integer"},"isLastPage":{"type":"boolean"},"self":{"type":"string","format":"uri"},"nextPage":{"type":"string","format":"uri"}},"additionalProperties":false,"required":["isLastPage"]}
- Status
401Returned if user is not logged in
auth/1/session
Implement a REST resource for acquiring a session cookie.
LoginPOST /rest/auth/1/session
Creates a new session for a user in Jira. Once a session has been successfully created it can be used to access any of Jira's remote APIs and also the web UI by passing the appropriate HTTP Cookie header.
Note that it is generally preferrable to use HTTP BASIC authentication with the REST API. However, this resource may be used to mimic the behaviour of Jira's log-in page (e.g. to display log-in errors to a user).
Request
Example
{"username":"fred","password":"freds_password"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/auth-params#","title":"Auth Params","type":"object","properties":{"username":{"type":"string"},"password":{"type":"string"}},"additionalProperties":false}
Responses
- Status
200Returns information about the caller's session if the caller is authenticated.
Example
{"session":{"name":"seraph.rememberme.cookie","value":"12345678901234567890"}}
Note that the response contains the
Set-Cookie
HTTP headers that must be honoured by the caller. If you are using a cookie-aware HTTP client then it will handle allSet-Cookie
headers automatically. This is important because setting the cookie from the response body alone may not be sufficient for the authentication to work.Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/auth-success#","title":"Auth Success","type":"object","properties":{"session":{"title":"Session Info","type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"additionalProperties":false},"loginInfo":{"title":"Login Info","type":"object","properties":{"failedLoginCount":{"type":"integer"},"loginCount":{"type":"integer"},"lastFailedLoginTime":{"type":"string"},"previousLoginTime":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
- Status
401Returned if the login fails due to invalid credentials.
- Status
403Returned if the login is denied due to a CAPTCHA requirement, throtting, or any other reason. In case of a 403 status code it is possible that the supplied credentials are valid but the user is not allowed to log in at this point in time.
- Status
409Returned if the login is denied due to an unverified email. The email must be verified by logging in to Jira through a browser and verifying the email.
Current userGET /rest/auth/1/session
Returns information about the currently authenticated user. If the caller is not authenticated they will get a 401 Unauthorized status code.
Responses
- Status
200
Example
{"self":"http://www.example.com/jira/rest/api/2.0/user/fred","name":"fred"}
Schema
{"id":"https://docs.atlassian.com/jira/REST/schema/current-user#","title":"Current User","type":"object","properties":{"self":{"type":"string","format":"uri"},"name":{"type":"string"},"loginInfo":{"title":"Login Info","type":"object","properties":{"failedLoginCount":{"type":"integer"},"loginCount":{"type":"integer"},"lastFailedLoginTime":{"type":"string"},"previousLoginTime":{"type":"string"}},"additionalProperties":false}},"additionalProperties":false}
- Status
401Returned if the caller is not authenticated.
LogoutDELETE /rest/auth/1/session
Logs the current user out of Jira, destroying the existing session, if any.
Responses
- Status
401Returned if the caller is not authenticated.
- Status
204Returned if the user was successfully logged out.