Home/Atlassian REST API reference
Jira and Confluence Cloud REST API
List Jira filters and dashboards with the REST API
Saved filters are searched with GET /rest/api/3/filter/search and dashboards are listed with GET /rest/api/3/dashboard. The two use different envelopes: filters return values, dashboards return dashboards. By default a filter entry holds only id, name and self; jql and owner are behind expand.
Endpoints
| Method | Path | What it does |
|---|---|---|
GET | /rest/api/3/filter/search | Searches filters, paged. |
GET | /rest/api/3/dashboard | Lists dashboards, paged. |
GET | /rest/agile/1.0/board/{boardId}/configuration | Returns the filter reference of a board. |
Examples
GET /rest/api/3/filter/search
Searches filters with maxResults 2. One filter exists and it is the filter of a board.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'maxResults=2' \
'https://your-domain.atlassian.net/rest/api/3/filter/search'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/filter/search',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'maxResults': '2'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"maxResults": 2,
"total": 1,
"isLast": true,
"values": [
{
"expand": "description,owner,jql,viewUrl,searchUrl,favourite,favouritedCount,sharePermissions,editPermissions,isWritable,approximateLastUsed,subscriptions",
"id": "10099",
"name": "Filter for MOB board"
}
]
}Response headers
X-Ratelimit-Limit: 350Sent to Atlassian Cloud on .
GET /rest/api/3/dashboard
Lists dashboards. The result sits under dashboards and carries sharing and edit flags.
curl
curl -G \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
--data-urlencode 'maxResults=2' \
'https://your-domain.atlassian.net/rest/api/3/dashboard'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/api/3/dashboard',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
params={'maxResults': '2'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"startAt": 0,
"maxResults": 2,
"total": 1,
"dashboards": [
{
"id": "10000",
"isFavourite": false,
"name": "Default dashboard",
"sharePermissions": [
{
"id": 10000,
"type": "loggedin"
}
],
"isWritable": true,
"systemDashboard": true
}
]
}Sent to Atlassian Cloud on .
GET /rest/agile/1.0/board/{boardId}/configuration
A board points to its filter. Board WEB uses filter 10066.
curl
curl \
-u "you@example.com:$ATLASSIAN_API_TOKEN" \
-H 'Accept: application/json' \
'https://your-domain.atlassian.net/rest/agile/1.0/board/{boardId}/configuration'Python (requests)
import os
import requests
EMAIL = "you@example.com"
r = requests.get(
'https://your-domain.atlassian.net/rest/agile/1.0/board/{boardId}/configuration',
auth=(EMAIL, os.environ["ATLASSIAN_API_TOKEN"]),
headers={'Accept': 'application/json'},
)
print(r.status_code, r.text)Response: HTTP 200
{
"id": 67,
"name": "WEB board",
"type": "simple",
"filter": {
"id": "10066"
}
}Sent to Atlassian Cloud on .
How it behaves
- filter/search returned values with id, name and self and an expand string that lists description, owner, jql, viewUrl, searchUrl and more. Those fields were not in the entry.
- The dashboard list is wrapped in dashboards and has no isLast field. It reports startAt, maxResults and total.
- The one dashboard was the system Default dashboard, shared with loggedin users.
- Board WEB refers to filter 10066 in its configuration, but filter/search returned a single filter, 10099, so the board filter is not in that list.
Pitfalls
- Add expand=jql,owner when you need them. The default entry is only id, name and self.
- Code that reads values for filters must read dashboards for dashboards. Reusing one pager for both breaks.
- Do not expect every board filter in a filter search. Read the filter id from the board configuration instead.
Questions and answers
Why is a board's filter missing from filter search?
In the run above the board filter 10066 was absent from a search that returned only filter 10099. Read it through the board configuration.