List an Organization's Discover Saved Queries
GET /api/0/organizations/{organization_id_or_slug}/discover/saved/
Retrieve a list of saved queries that are associated with the given organization.
Path Parameters
organization_id_or_slug
(string)REQUIREDThe ID or slug of the organization the resource belongs to.
Query Parameters:
per_page
(integer)Limit the number of rows to return in the result. Default and maximum allowed is 100.
cursor
(string)A pointer to the last object fetched and its sort order; used to retrieve the next or previous results.
query
(string)The name of the Discover query you'd like to filter by.
sortBy
(string)The property to sort results by. If not specified, the results are sorted by query name.
Available fields are:
name
dateCreated
dateUpdated
mostPopular
recentlyViewed
myqueries
Scopes
You need to authenticate via bearer auth token.
<auth_token>
requires one of the following scopes:org:admin
org:read
org:write
curl https://sentry.io/api/0/organizations/{organization_id_or_slug}/discover/saved/ \ -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
[
{
"id": "1",
"name": "Transactions by Volume",
"projects": [],
"version": 2,
"queryDataset": "transaction-like",
"datasetSource": "unknown",
"expired": false,
"dateCreated": "2024-07-25T19:35:38.422859Z",
"dateUpdated": "2024-07-25T19:35:38.422874Z",
"environment": [],
"query": "",
"fields": [
"id",
"transaction",
"timestamp"
],
"widths": [],
"range": "24h",
"orderby": "-timestamp",
"yAxis": [
"count()"
],
"createdBy": {
"id": "1",
"name": "Admin",
"username": "admin",
"email": "admin@sentry.io",
"avatarUrl": "www.example.com",
"isActive": true,
"hasPasswordAuth": true,
"isManaged": false,
"dateJoined": "2021-10-25T17:07:33.190596Z",
"lastLogin": "2024-07-16T15:28:39.261659Z",
"has2fa": true,
"lastActive": "2024-07-16T20:45:49.364197Z",
"isSuperuser": false,
"isStaff": false,
"experiments": {},
"emails": [
{
"id": "1",
"email": "admin@sentry.io",
"is_verified": true
}
],
"avatar": {
"avatarType": "letter_avatar",
"avatarUuid": null,
"avatarUrl": "www.example.com"
}
}
},
{
"id": "2",
"name": "All Events",
"projects": [],
"version": 2,
"queryDataset": "discover",
"datasetSource": "unknown",
"expired": false,
"dateCreated": "2024-07-25T19:35:38.422859Z",
"dateUpdated": "2024-07-25T19:35:38.422874Z",
"environment": [],
"query": "transaction:/api/foo",
"fields": [
"transaction",
"project",
"count()",
"avg(transaction.duration)",
"p75()",
"p95()"
],
"widths": [],
"range": "24h",
"orderby": "-count",
"yAxis": [
"count()"
],
"createdBy": {
"id": "1",
"name": "Admin",
"username": "admin",
"email": "admin@sentry.io",
"avatarUrl": "www.example.com",
"isActive": true,
"hasPasswordAuth": true,
"isManaged": false,
"dateJoined": "2021-10-25T17:07:33.190596Z",
"lastLogin": "2024-07-16T15:28:39.261659Z",
"has2fa": true,
"lastActive": "2024-07-16T20:45:49.364197Z",
"isSuperuser": false,
"isStaff": false,
"experiments": {},
"emails": [
{
"id": "1",
"email": "admin@sentry.io",
"is_verified": true
}
],
"avatar": {
"avatarType": "letter_avatar",
"avatarUuid": null,
"avatarUrl": "www.example.com"
}
}
}
]