Skip to content
atlassian-dc-mcp
Esc
↑↓navigate↵open⌘Jpreview

Get projects matching query

Returns a list of projects visible to the user where project name and/or key is matching the given query. Passing an empty (or whitespace only) query will match no projects. The project matches will contain a field with the query highlighted. The number of projects returned can be controlled by passing a value for ‘maxResults’, but a hard limit of no more than 100 projects is enforced. The projects are wrapped in a single response object that contains a header for use in the picker, specifically ‘Showing X of Y matching projects’ and the total number of matches for the query.

GET/api/2/projects/picker
Authorization
AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

or
AuthorizationBearer token · headerrequired

Personal Access Token — Administration > Profile > Personal Access Tokens

AuthorizationBasic auth · headerrequired

In order to use basic authorization, provide username:password Base64 encoded in the 'Authorization' header.

Query parameters
maxResultsinteger<int32>

Maximum number of matches to return. Zero means a default limit of 100 and negative numbers return no results.

default: 0
querystring

A sequence of characters expected to be found in the word-prefix of project name and/or key.

default: ""
allowEmptyQueryboolean

If true, and the query is empty, the method will return first results limited to the value of 'maxResults' or default limit of 100.

default: false
Responses
200

Returned even when no projects match the given query.

headerstring
projectsProjectPickerItem[]
Show properties
Array of ProjectPickerItem
avatarstring
htmlstring
idstring
keystring
namestring
totalinteger<int32>
Try it
Server
Authorization
Parameters
Request
curl -X GET 'http://jira.example.com/rest/api/2/projects/picker' \
  -H 'Authorization: Basic YOUR_CREDENTIALS' \
  -H 'Accept: application/json'
Response
{
  "header": "Showing 2 of 5 matching projects",
  "projects": [
    {
      "avatar": "http://www.example.com/jira/secure/projectavatar?size=xsmall&pid=10000",
      "html": "Example <strong>pro</strong>ject name (EXAM)",
      "id": "10000",
      "key": "EXAM",
      "name": "Example project name"
    }
  ],
  "total": 5
}

Was this page helpful?