JQL Filters



General information

Available since v. 1.5.* - Added Pagination

Available since v. 1.22.* - Added parameter permissions 

Available since v. 1.23.* - Added Delete filter API

Available ONLY for JIRA administrators


Get all filters for user

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/filter/user/{JIRA_USER}
  • {JIRA_URL}/rest/extender/1.0/filter/user/{JIRA_USER}?permissions=true

where {JIRA_USER} is JIRA user name, like admin

Response format - JSON

Example

{
  "startAt" : 0,
  "maxResults" : 10,
  "total": 200,
  "filters": [
    {
      "owner": "admin",
      "query": "project = 10000 and statusCategory != Done and assignee = EMPTY ORDER BY priority desc",
      "name": "Open and unassigned (PROJA)",
      "id": "11000"
    },
    {
      "owner": "admin",
      "query": "project = PROJB AND stars = Done",
      "name": "Done issues in project B",
      "id": "11100"
  }]
}
{
  "startAt" : 0,
  "maxResults" : 10,
  "total": 200,
  "filters": [
    {
      "owner": "admin",
      "query": "project = 10000 and statusCategory != Done and assignee = EMPTY ORDER BY priority desc",
      "name": "Open and unassigned (PROJA)",
      "id": "11000",
      "permissions": {
        "isEmpty": false,
        "isGlobal": false,
        "isAuthenticated": false,
        "isPrivate": false,
        "permissionsMap": [
          {
            "hasViewRights": true,
            "hasEditRights": false,
            "id": 10200,
            "type": "project",
            "param1": "10100",
            "param2": null
          }
        ]
      }
    }
  ]
}

Parameters

  • permissions - optional - (true or empty) - response JSON show all filter permission


Get all filters

Method type - GET

URL:

  • {JIRA_URL}/rest/extender/1.0/filter/all
  • {JIRA_URL}/rest/extender/1.0/filter/all?permissions=true

Response format - JSON

{
  "startAt" : 0,
  "maxResults" : 10,
  "total": 200,
  "filters": [
    {
      "owner": "user2",
      "query": "project = PROJB AND stars = Done",
      "name": "Done issues in project B",
      "id": "11100"
      "permissions": {
        "isEmpty": false,
        "isGlobal": false,
        "isAuthenticated": false,
        "isPrivate": false,
        "permissionsMap": [
          {
            "hasViewRights": true,
            "hasEditRights": false,
            "id": 10200,
            "type": "project",
            "param1": "10100",
            "param2": "10002"
          },
          {
            "hasViewRights": true,
            "hasEditRights": true,
            "id": 10204,
            "type": "group",
            "param1": "ira-administrators",
            "param2": null
          }
        ]
      }
  }]
}

Parameters

  • permissions - optional - (true or empty) - response JSON show all filter permission


Delete filters

Method type - DELETE

URL: {JIRA_URL}/rest/extender/1.0/filter/delete

Request format - JSON

Response format - JSON

Example request:

{
	"filters": [
		"11",
		"10000",
		"10002",
		"10003",
		"10004",
		"10005"
	]
}
{
	"filters":["10000"]
}

Example response:

{
    "filterSkipped": [
        "11",
        "10003",
        "10004",
        "10005"
    ],
    "filterDeleted": [
        "10000",
        "10002"
    ]
}


Differences in this API between JIRA versions

Jira 7.2.X - 7.5.X
Jira 7.6.X - 7.11.X
Jira 7.12.X and later

Parameters not supported

  • hasViewRights

  • hasEditRights

  • isAuthenticated

Parameters not supported

  • hasViewRights

  • hasEditRights

All parameters supported


Pagination

This REST API uses pagination to improve performance for all Jira 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,
    "filters": [
        { /* 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. (default value - 1000)
  • total 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.

Example:

  • {JIRA_URL}/rest/extender/1.0/filter/all?startAt=10&maxResults=20
  • {JIRA_URL}/rest/extender/1.0/filter/all?maxResults=1000