---
title: "Editor ad-hoc descriptor query"
method: POST
path: "/dashboards/{dashboard_id}/query"
tags: ["Dashboard v3"]
---

# Editor ad-hoc descriptor query

`POST /dashboards/{dashboard_id}/query`

## Request

- Base URL: `https://app.mammoth.io/api/v2`
- URL: `https://app.mammoth.io/api/v2/dashboards/{dashboard_id}/query`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-KEY` and API key in header `X-API-SECRET` and API key in header `X-WORKSPACE-ID`

Execute one ad-hoc QueryDescriptor against the dashboard's source. Editor-only AND requires dataview access — viewers are confined to persisted descriptors (ADR D3.2). No RLS is applied (creator semantics).

## Path parameters

- `dashboard_id` integer, required

## Request body

- AdhocQuerySpec: Editor ad-hoc descriptor query
  - `params` AdhocQueryParams, required
    - `descriptor` object, required: A QueryDescriptor payload (baked/1 vocabulary)

## Response `201`

Document created, URL follows

- AdhocQueryResponse
  - `job_id` integer, required
  - `descriptor_id` string, required: Content hash of the descriptor — the key its result lands under

## Other responses

- `202`: Ad-hoc descriptor submitted
- `400`: Bad request syntax or unsupported method
- `403`: Request forbidden -- authorization will not help

---

[API](https://skmtc.dev/mammoth/apis/mammoth-analytics.md) · [All operations](https://skmtc.dev/mammoth/apis/mammoth-analytics/llms.txt) · [OpenAPI document](https://skmtc.dev/mammoth/apis/mammoth-analytics/revisions/fe078afe239b?raw)
