Available since v. 1.5.*

  • Added Pagination

Available since v. 1.22.*

  • Added parameter permissions 

Available since v. 1.23.*

  • Added new api Delete filter API

Available since v. 3.6.*

  • Added new api Get all filters for inactive users

Available since v. 3.20.*

  • Added new api Changing the owner of filters

General information

note

Available ONLY for Jira Administrators

Available ONLY for Jira Administrators


Get all filters for user

Method type - 

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 - 

Example response

{
  "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 for inactive users

Method type - 

URL:

  • {JIRA_URL}/rest/extender/1.0/filter/inactiveUsers

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

Response format - 

Example response

{
  "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 - 

URL:

  • {JIRA_URL}/rest/extender/1.0/filter/all

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

Response format - 

Example response

{
  "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 - 

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"
    ]
}


Changing the owner of filters

Method type - 

URL: {JIRA_URL}/rest/extender/1.0/ownership/change

Request format - 

Example request

{
    "owner": "NEW_OWNER_USERNAME",
    "filters": [
      10001, 10000, 10003, 10005
    ]
}
{
    "owner": "NEW_OWNER_USERNAME",
    "filters": [
      10001
    ]
}

Response format - 

Example response

{
    "message": "We've changed the ownership of items - 1 filter",
    "status": "done"
}
note

You can change the owner of JQL filters dashboards and in one request

You can change the owner of JQL filters dashboards and in one request


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