Retrieve an Organization's Discover Saved Query

GET /api/0/organizations/{organization_id_or_slug}/discover/saved/{query_id}/

Retrieve a saved query.

Path Parameters

organization_id_or_slug (string)
REQUIRED

The ID or slug of the organization the resource belongs to.

query_id (integer)
REQUIRED

The ID of the Discover query you'd like to retrieve.

Scopes

<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/{query_id}/ \
 -H 'Authorization: Bearer <auth_token>'
RESPONSESCHEMA
{
  "id": "1",
  "name": "Transactions by Volume",
  "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"
    }
  }
}