# SlashObserve > Metrics, logs and traces on your own data, for humans and agents. Index: https://slashobserve.com/llms.txt # What is SlashObserve > What SlashObserve does, who it is for, how to try it in minutes, and what you run to host it. Source: https://slashobserve.com/docs/get-started/what-is-slashobserve/ · Markdown: https://slashobserve.com/docs/get-started/what-is-slashobserve/index.md SlashObserve is an open-source workspace for dashboards and investigations. You ask a question in plain language, and a built-in agent builds a dashboard that has been checked against your data. It reads the monitoring and logging systems you already run: Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch. ## Who it is for SlashObserve is for a team that runs one or more of those systems and wants to: - get a dashboard by describing it, then change it by talking to the agent; - investigate an incident together, and keep what the team learns on a page; - let an AI agent such as Claude Code work in the same workspace, through MCP or the CLI; - see who or what changed each dashboard, with every change saved as a version; - move dashboards over from Grafana. It does not send alerts, and it reads only the seven datasource types above; [Known limitations](/docs/get-started/known-limitations/) lists what to check before you adopt it. ## See it work On Home, type `checkout health by pod, last 6h` in the chat composer on the **Ask Observe Agent** tab, and the agent builds a dashboard. You refine it in plain language. Outside agents such as Claude Code connect over MCP, read the `/observe` guide that the server offers as an MCP prompt, and act as the person who connected them. To try it on your own machine with sample data, follow the [quick start](/docs/get-started/quick-start/). It needs Docker and git, plus a model API key if you want the agent to answer prompts. To import dashboards you already have, see [Switch from Grafana](/docs/use/switch-from-grafana/). ## Ask the agent where you are working The agent answers a question without changing the dashboard until you choose **Revise the dashboard**. You can ask in three places: - In a comment thread, by mentioning `@observe` or addressing the message to it, so the team reads the answer ([Comments, agent requests and versions](/docs/use/review/#ask-the-agent-from-a-comment)). - In a private chat in the dashboard's side pane, which only you and Admins read ([Chat and follow-ups](/docs/use/chat/#in-the-dashboards-chat-tab)). - By pointing at a spot on a panel in Ask mode, or by commenting on that spot in Comment mode. A spot is a point, a range, a row or a value ([Ask and comment on a dashboard](/docs/use/ask-and-comment/)). ## What you run SlashObserve is one container plus one Postgres database. - The container holds the Go server with the web UI embedded. It also holds `observe-agent`, the built-in agent, as a second binary that the server starts and supervises whenever a model provider is configured. - Postgres holds everything the server owns: - dashboards and their versions, observations and proposals, and comment threads; - the activity log, the inbox's read position and saved searches; - folders and their access lists, users and sessions, service accounts and key hashes, and connected agents; - webhooks and the agent request queue. - Your Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch servers stay where they are. SlashObserve only reads from them. You also need: - An OpenID Connect (OIDC) identity provider, so people can sign in with a browser. The demo stack uses Dex, a development-only provider. Without one, only service-account keys can sign in; see [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in). - Optionally, an LLM provider. Without one the server runs, but the built-in agent is off; see [LLM providers](/docs/connect/llm-providers/). The image is published as `ghcr.io/slashobserve/slashobserve`; see [Run your own deployment](/docs/get-started/install/). # Quick start > Run the demo stack with Docker Compose, sign in, open the provisioned dashboard and send your first prompt to the agent. Source: https://slashobserve.com/docs/get-started/quick-start/ · Markdown: https://slashobserve.com/docs/get-started/quick-start/index.md This page starts the SlashObserve demo on your own machine: the OpenTelemetry Astronomy Shop with its telemetry stores and a SlashObserve server that reads them. You sign in, see a dashboard that already holds live data, and ask the agent for a new one. The demo is for trying SlashObserve, not for production; for a real deployment, see [Run your own deployment](/docs/get-started/install/). ## What you need - Docker with Compose v2.24.4 or newer. - `git`, `curl`, `jq` and `openssl`. - About 4 GiB of free memory and 12 GB of disk for the images. - An Anthropic API key, so the agent can answer prompts. Without one the demo still starts, and you can look around. You do not need Go or Bun, because the stack pulls the published SlashObserve image instead of building it. The demo runs about thirty containers; [The demo](/docs/operate/demo/) has the measurements. ## Start the demo 1. Get the repository, which holds the Compose files and the configs they mount: ```sh git clone https://github.com/slashobserve/slashobserve && cd slashobserve ``` 2. Give the server your Anthropic key. The demo reads it from your shell: ```sh export SLASHOBSERVE_LLM_PROVIDER=anthropic export SLASHOBSERVE_LLM_API_KEY= ``` 3. Start the stack: ```sh make demo ``` The first run fetches the pinned release of the shop and pulls about 12 GB of images. The stack is healthy about a minute after that, and the command then prints the addresses: ```text The Astronomy Shop is running at http://localhost:58081 Its Jaeger UI is at http://localhost:58081/jaeger/ui and its feature flags at http://localhost:58081/feature/ SlashObserve is running at http://localhost:58080 Sign in as admin@example.com / password (Dex, development only) The service-account key is in /path/to/slashobserve/deploy/astronomy/.state/keys/astronomy.key ``` The command exits with an error when the stack is not healthy after 15 minutes. ## Sign in 1. Open http://localhost:58080. 2. Sign in as `admin@example.com` with the password `password`. The demo's Dex has three more people, `editor@example.com`, `commenter@example.com` and `viewer@example.com`, with the same password. They all start as Editors, and an Admin sets their roles on the People page. A person appears on that page only after their first sign-in, so sign in once as each of them, then sign back in as the Admin to change their roles. To give a role before the first sign-in, [invite](/docs/teams/people/#invite-people) the email with that role. ## Open the dashboard The shop's load generator sends traffic from the first minute. A few minutes after the start, the folder Demo holds **Astronomy Shop overview**. It shows traffic, errors and latency by service, orders and payments, the shop's database, its logs and traces. Until it appears, the stores are still filling; [The demo](/docs/operate/demo/#the-dashboard) says why. The stores start empty, so history builds up while the demo runs. A prompt that compares today with yesterday needs a day of running. ## Send a prompt 1. Sign-in opens [Home](/docs/use/home/). 2. On its **Ask Observe Agent** tab, type a prompt such as `checkout health by service, last hour` into the box. 3. Press Enter. The page switches to a conversation where you watch the agent build the dashboard. [Your first dashboard](/docs/get-started/first-dashboard/) walks through what you see and how to change the result. Once a dashboard exists, you can also ask the agent about it from the dashboard itself. Use its **Chat** tab, a comment thread, or **Ask** on a spot of a panel; see [Ask and comment on a dashboard](/docs/use/ask-and-comment/). ## Run without a model Leave the Anthropic settings unset and run `make demo`. The stack starts, but a prompt answers `503 agent_unavailable`. Home's **Ask Observe Agent** tab then says no model is connected and offers **Import from Grafana**, so you can look around before you add a key. To add a key later, export the settings and run `make demo` again, because the server reads them only when its container starts. ## Run with a local model The agent also runs on a model served on your own machine through any OpenAI-compatible server, such as Ollama. Set these before `make demo`: ```sh export SLASHOBSERVE_LLM_PROVIDER=openai export SLASHOBSERVE_LLM_BASE_URL=
export SLASHOBSERVE_LLM_MODEL= ``` [Local models](/docs/connect/local-models/) gives the address the demo's server container uses to reach it, the need for tool calling, and what to expect from a small model. ## Inject a fault To see the dashboards react to a failure, switch on one of the shop's feature flags and undo it afterwards: ```sh make demo-fault FLAG=paymentFailure VARIANT=50% make demo-fault-reset ``` `make demo-fault` with no flag lists every flag and its variants. [The demo](/docs/operate/demo/#faults) explains what each flag does to the shop. ## Use the demo from the CLI or the API The first start creates a service-account key with the Editor role for scripts, the CLI and MCP clients. `scripts/astronomy.sh key` prints the path of the file that holds it. ```sh export OBSERVE_SERVER=http://localhost:58080 export OBSERVE_TOKEN=$(cat "$(scripts/astronomy.sh key)") observe dashboards list ``` You see the dashboard **Astronomy Shop overview** in the folder Demo. [CLI](/docs/use/cli/#install) shows how to install `observe`. ## Add Elasticsearch and OpenSearch To see the shop's logs in Elasticsearch and OpenSearch too, run `make demo-search` instead of `make demo`. It builds the server image from your checkout, as `make demo-build` does. It also adds Elasticsearch 8 and OpenSearch 2, which the shop's collector feeds its logs, and the `es` and `os` datasources then answer. Without them those two datasources report that they are not answering, and nothing else depends on them. Each store is capped at 1 GiB of memory and the two images take about 3.5 GB on disk, so use this only when you want to look at them. `make demo-build` removes the two stores again, and `make demo-down` and `make demo-reset` remove them with the rest. ## Build the server from your checkout `make demo-build` starts the same stack with the server image built from your working tree, for people changing the code. The image is stamped with `git describe`, so Settings shows that version instead of `dev`. ## Stop or reset the demo ```sh make demo-down make demo-reset ``` `make demo-down` stops the stack and keeps its data. `make demo-reset` also drops the volumes and the flag state, so the next start begins empty. ## Fix ClickHouse staying unhealthy after an upgrade If ClickHouse stays unhealthy after an upgrade, an old demo volume predates the `slashobserve_ro` user or holds another password for it. Run `make demo-reset` to recreate the volumes. ## Reference ### What make demo runs `make demo` pulls the published SlashObserve image and starts it with the OpenTelemetry Astronomy Shop, Postgres, Dex, Prometheus, ClickHouse, Loki, Tempo and Jaeger. It then waits until they are healthy. The shop's addresses, the stores it feeds and the datasources the server reads are on [The demo](/docs/operate/demo/). | Address | What it is | | --- | --- | | http://localhost:58080 | The SlashObserve server. | | http://localhost:58081 | The shop. | | http://localhost:58081/jaeger/ui | The shop's Jaeger UI. | | http://localhost:58081/feature/ | The shop's feature flag UI. | Dex listens on port 55556. Set `SLASHOBSERVE_HOST_PORT`, `ASTRONOMY_SHOP_HOST_PORT` or `SLASHOBSERVE_DEX_HOST_PORT` to move a port. ### Model provider settings The stack passes these settings from your shell to the server container: - `SLASHOBSERVE_LLM_PROVIDER` - `SLASHOBSERVE_LLM_MODEL` - `SLASHOBSERVE_LLM_API_KEY` - `SLASHOBSERVE_LLM_BASE_URL` - `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` The other LLM settings are not forwarded. You can also put them in `deploy/astronomy/.env`, which Git ignores. Run `make demo` again after changing them. ### Limits of the demo Its Postgres password, Dex logins and OIDC client secret are fixed development values that anyone can read in this repository. Every port it publishes binds to 127.0.0.1, so keep it that way. Do not expose the demo on a cloud VM or any shared network. ### Commands | Command | What it does | | --- | --- | | `make demo` | Pulls the published image and starts the stack. | | `make demo-build` | Starts the stack with the server built from your checkout. | | `make demo-search` | Builds from your checkout and adds Elasticsearch and OpenSearch. | | `make demo-check` | Checks each datasource's health and reads one row of the shop's data from each. | | `make demo-fault` | Lists the shop's flags, or sets one with `FLAG` and `VARIANT`. | | `make demo-fault-reset` | Sets every flag back to its upstream variant. | | `make demo-down` | Stops the stack and keeps its data. | | `make demo-reset` | Stops the stack and drops its volumes and flag state. | # Run your own deployment > Pull the image and run SlashObserve against your own Postgres, identity provider and datasources. Source: https://slashobserve.com/docs/get-started/install/ · Markdown: https://slashobserve.com/docs/get-started/install/index.md This page shows how to run SlashObserve from its container image, against a Postgres database you own and an identity provider your team signs in with. To try it on your own machine first, use the [quick start](/docs/get-started/quick-start/) instead. SlashObserve is under active development, and releases before 1.0 can include breaking changes. A release that has any lists them under "Breaking changes" in the [changelog](https://github.com/slashobserve/slashobserve/blob/main/CHANGELOG.md). Read that part before you move to a newer version. ## Deploy with Docker You need Docker, a Postgres database and an OIDC client from your identity provider (its issuer URL, client ID and client secret). Register `/api/v1/auth/callback` as the client's redirect URI; [Sign-in with OIDC](/docs/connect/oidc/) has the rest of the setup. 1. Create a Postgres database and a user that owns it. The project tests against Postgres 18.6, and other versions are unverified. Check that `max_connections` allows the pool described under [Database connections](#database-connections). 2. Pull the image: ```sh docker pull ghcr.io/slashobserve/slashobserve:0.1.5 ``` 3. Write the settings to an env file such as `slashobserve.env`. Docker's `--env-file` takes `NAME=value` lines with no quoting. Replace each value in angle brackets with your own. ```text SLASHOBSERVE_DATABASE_URL=postgres://slashobserve:@:5432/slashobserve?sslmode=require SLASHOBSERVE_PUBLIC_URL=https://observe.example.com SLASHOBSERVE_OIDC_ISSUER_URL=https://idp.example.com SLASHOBSERVE_OIDC_CLIENT_ID=slashobserve SLASHOBSERVE_OIDC_CLIENT_SECRET= SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS=example.com SLASHOBSERVE_ADMIN_EMAILS=you@example.com SLASHOBSERVE_SECRET_KEY= SLASHOBSERVE_DATASOURCES_FILE=/etc/slashobserve/datasources.yaml SLASHOBSERVE_LLM_PROVIDER=anthropic SLASHOBSERVE_LLM_API_KEY= ``` Only the database URL, the public URL, the three OIDC settings and the allowed domains are required. [Settings in the example](#settings-in-the-example) says what each one does. 4. Optionally write a [datasources file](/docs/reference/datasources-file/), then start the container. An Admin can also add datasources in the app instead; see [Add datasources in the app](/docs/connect/datasources-in-the-app/). ```sh docker run -d --name slashobserve --restart unless-stopped \ -p 127.0.0.1:8080:8080 \ --env-file slashobserve.env \ -v "$PWD/datasources.yaml:/etc/slashobserve/datasources.yaml:ro" \ ghcr.io/slashobserve/slashobserve:0.1.5 ``` 5. Check that the server is ready: ```sh curl -fsS http://localhost:8080/readyz ``` A ready server answers `{"status":"ok","checks":{"database":"ok","migrations":"ok"}}`. 6. Open the public URL in a browser and sign in. With `SLASHOBSERVE_ADMIN_EMAILS` unset, the first person to sign in is the Admin. The example publishes the port on 127.0.0.1 only, and the server speaks plain HTTP. Serve the public URL from a reverse proxy that terminates TLS; see [Put TLS in front](/docs/operate/production/#put-tls-in-front). ## Choose an image tag Each release gets three tags: its full version such as `0.1.5`, its minor version such as `0.1`, and `latest`. A prerelease gets only its full version. Pin the full version. A new server applies database migrations when it starts, so the version you run should change only when you decide to upgrade. See [Upgrades and backups](/docs/operate/upgrades-and-backups/) before you do. ## Run your own build 1. Run `docker build -t slashobserve-server:local .` from the repository root. 2. Use `slashobserve-server:local` in place of the `ghcr.io` image name in the `docker run` command. ## Run with no browser sign-in A server that only scripts and benchmark harnesses use can leave out the OIDC settings and the allowed domains. Leave all three OIDC settings unset, because setting only some of them is refused at start. The settings that only browser sign-in reads are refused too, `SLASHOBSERVE_ADMIN_EMAILS` among them. [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in) has the details. ## Run without the built-in agent Leave `SLASHOBSERVE_LLM_PROVIDER` unset. The server then runs without the built-in agent. To turn the agent on, see [LLM providers](/docs/connect/llm-providers/). ## Install the CLI The `observe` command line client installs separately, with one line on macOS and Linux. See [CLI](/docs/use/cli/#install). ## Reference ### Settings in the example | Setting | Required | What it does | | --- | --- | --- | | `SLASHOBSERVE_DATABASE_URL` | Yes | The Postgres connection string. | | `SLASHOBSERVE_PUBLIC_URL` | Yes | The address people use to reach the server. | | `SLASHOBSERVE_OIDC_ISSUER_URL` | Yes | Your identity provider's issuer URL. | | `SLASHOBSERVE_OIDC_CLIENT_ID` | Yes | The OIDC client ID. | | `SLASHOBSERVE_OIDC_CLIENT_SECRET` | Yes | The OIDC client secret. | | `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` | Yes | The email domains that may sign in. | | `SLASHOBSERVE_ADMIN_EMAILS` | No | Addresses that become Admin. | | `SLASHOBSERVE_SECRET_KEY` | No | Encrypts the secrets the server stores. | | `SLASHOBSERVE_DATASOURCES_FILE` | No | The path of the datasources file in the container. | | `SLASHOBSERVE_LLM_PROVIDER` | No | Turns the built-in agent on. | | `SLASHOBSERVE_LLM_API_KEY` | With a provider | The key for the model provider. | [Configuration](/docs/reference/configuration/) lists every setting. #### Admin emails An address in `SLASHOBSERVE_ADMIN_EMAILS` counts only when your provider reports it as verified. See [Sign-in with OIDC](/docs/connect/oidc/) and [Roles](/docs/teams/roles/). #### Secret key `SLASHOBSERVE_SECRET_KEY` encrypts three kinds of stored value. These are the credentials of datasources added in the app, the tokens of Grafana connections and the signing secrets of webhooks. Keep the key with your backups, because the server cannot read those values after a restore without it. Without the key, saving one of them answers `409 secret_key_missing`. ### Database connections Each server process keeps a pool of at least 16 connections. The pool grows to 8 plus 2 for each agent worker when that is more, which is 24 with the default 8 workers. It grows to the CPU count when that is more still. A `pool_max_conns` setting in the database URL replaces that size. Set `max_connections` in Postgres to allow the pool for each server process. [Run more than one server](/docs/operate/scaling/#connections) counts the connections of a fleet. ### Startup behavior The server applies database migrations when it starts, so an empty database is enough. If it cannot connect to Postgres within 30 seconds, or any setting is invalid, it logs the problem and exits. `--restart unless-stopped` then retries. The server reports every problem it finds in the settings in one message. ### The container image The image runs as a non-root user and listens on `:8080`. Files you mount, such as the datasources file or a secret file, must be readable by that user. The image has a Docker health check that runs `slashobserve-server healthcheck`. That command requests `/readyz` on the configured `SLASHOBSERVE_HTTP_ADDR`. # Your first dashboard > Ask the agent for a dashboard on the demo stack, watch it work, open the result, ask for a change and set the time range. Source: https://slashobserve.com/docs/get-started/first-dashboard/ · Markdown: https://slashobserve.com/docs/get-started/first-dashboard/index.md This walkthrough has you ask the built-in agent for a dashboard, watch it build one from your datasources, and then change the result. It starts where the [quick start](/docs/get-started/quick-start/) stops: the demo runs at http://localhost:58080 and you are signed in as `admin@example.com`. The agent needs a model. You set `SLASHOBSERVE_LLM_PROVIDER` and `SLASHOBSERVE_LLM_API_KEY` before `make demo`. Without one, the chat shows "No model is connected to this server." and prompts get `503 agent_unavailable`; see [LLM providers](/docs/connect/llm-providers/). ## Ask for a dashboard 1. Open Home at `/`. Its **Ask Observe Agent** tab has a box with the placeholder "Ask a question or describe a dashboard, like: checkout health by pod, last 6h". Pressing `/` anywhere on the page moves focus to the box. 2. Type a prompt: ```text checkout health by service, last hour ``` 3. Press Enter, or choose **Send**. Shift+Enter starts a new line, and the Up arrow in an empty box recalls an earlier prompt. A prompt is 1 to 4000 characters. Under the box, a dot and a name mark each healthy datasource the agent may use, followed by the name of the model. In the demo the datasources are `prom` (Prometheus), `ch` (ClickHouse), `loki` (Loki), `tempo` (Tempo) and `jaeger` (Jaeger). Two more, `es` (Elasticsearch) and `os` (OpenSearch), appear when you started the stack with `make demo-search`. Under the box, **Example prompts** are buttons that send a ready-made prompt at once. There are at most four, and they follow your datasources and your role. An Editor or Admin sees prompts that build a dashboard, such as "Service health by pod, last 6h" or a request to add a row to a dashboard you can edit, and everyone sees up to two questions, such as "Which routes are slowest right now?". ## Watch the agent work The page switches to a conversation that shows your prompt. Below it, "Building the dashboard" and a progress list appear. A request that only asks a question shows "Working on your request" instead, and a revision shows "Revising" and the dashboard's title. Each line of the list is one phase of the work, built from the steps the server recorded: 1. Discovering: the agent lists datasources, metrics, labels, tables and schemas, and samples rows. 2. Checking queries and Running queries: it lints a draft query and runs it to see that it returns data. 3. Saving: it saves the draft, which runs every panel query again. 4. Repairing: it fixes a draft that the save rejected. A line names the tools its phase used, with a count when a tool ran more than once, such as "list_metrics 3". A phase with more than one step has a **Show N steps** button that lists each step's message, such as "Listed 12 metrics on prom". A phase that needed a fix gets a warning icon. While the agent writes, its latest text shows under the list, and "Running for" counts the time since the run started. The agent only works with names it discovered, so a wrong metric or label usually shows up here as a failed check followed by a repair. A save is refused when a panel's query is invalid or returns no data. The agent then repairs the draft and saves again, for a few repair rounds. If it still cannot save, the conversation ends with "The dashboard could not be built" and a **Try again** button. When the dashboard is saved, the progress list collapses into one line, such as "Ran 14 steps in 1m 12s for about $0.12, repaired 1 query". Open the line to see every step. The cost shows only when the model is priced. Below the line, a result card shows the dashboard title, how many panels it has and which datasources they use. Its footer reads "Saved as version 1", with when it was saved. ## Open the dashboard 1. Choose **Open dashboard** on the result card. The dashboard opens in the same tab, and its version button reads "Live · v1". 2. Choose **Activity** at the top right to open the activity card. It lists the saved version, with the agent's one-sentence summary, next to any comments and requests. A new dashboard goes into your My Dashboards, where only you can see it. In the Dashboards page's **Made by** column it shows "Observe Agent for" and your name. To share it, open **Share** and publish it to a folder where you have Edit; see [Folders](/docs/teams/folders/). ## Ask for a change 1. Go back to the conversation. The box now reads "Ask about" and the dashboard's title, and a note says "The dashboard changes only when you choose Revise the dashboard on an answer." 2. Ask for the change: ```text add a panel with memory usage by pod, and show the last 12h ``` 3. Read the answer. The agent answers in the chat and leaves the dashboard as it is. When a change fits, the answer ends with **Revise the dashboard** and a one-line description of the change. 4. Choose **Revise the dashboard**. The agent revises the latest version of the same dashboard instead of starting a new one, and keeps every panel you did not ask it to change. When the run finishes, the result card says "Saved as version 2". If you have the dashboard open, a toast says "Updated to version 2" and the page switches to it. Version 1 is kept. You can compare the two versions or restore the older one; see [Comments, agent requests and versions](/docs/use/review/). ## Ask about one spot, or ask in a comment You can ask without leaving the dashboard. 1. Choose **Ask** at the bottom of the screen, or press `a` with the pointer on no panel. 2. Click a spot on a panel, such as a point on a line, a row of a table or a stat's value. A small box opens there, and the answer arrives in it. The question is a turn of your private chat, which the dashboard's **Chat** tab shows too, and only you and Admins read it. **Comment**, or `c`, works the same way for a note the team reads, and a comment that mentions `@observe` asks the agent in the thread. [Ask and comment on a dashboard](/docs/use/ask-and-comment/) and [Comments, agent requests and versions](/docs/use/review/#ask-the-agent-from-a-comment) describe both. ## Change the time range The button at the top of the dashboard shows the current range, for example "Last 6 hours". 1. Open the button. 2. Pick a quick range such as "Last 1 hour" or "Yesterday", or type values into **From** and **To**. 3. Choose **Apply**. On a time series panel you can also drag across the chart to zoom to that range. The range, the refresh interval and the variable selections live in the page address, as `from`, `to`, `refresh` and `var-`. You can share a link that carries them, and nothing is saved to the dashboard. To change the saved default range for everyone, choose **Save as default** in the same box if you can edit the dashboard, or ask the agent in a follow-up, such as "make the default range the last 24 hours". ### What From and To accept **From** and **To** accept `now-6h`, `now/d`, `2026-10-17 09:00` and an epoch. - A typed date and time is read in the dashboard's time zone (UTC or the zone it names). When the dashboard follows the browser, it is read in the browser's zone. The box shows times in that same zone. - A number typed into the boxes is an epoch: 10 digits are read as seconds and 11 to 15 digits as milliseconds. A time before the year 2000 is refused with a message. - A `from` or `to` written in an address or a Spec is always milliseconds when it is all digits. ### Time zone and refresh The time zone box next to the range draws the dashboard's times in a zone you choose, such as UTC or `Asia/Tokyo`. It applies to you and to anyone who opens your link, because the address carries it as `tz`. A panel that sets its own zone keeps it, and choosing the dashboard's own zone restores it. The **Auto-refresh** menu next to **Refresh now** reloads the panels on an interval. A dashboard can set its own refresh choices and quick ranges, start on a refresh interval, or hide the time picker. Hiding the time picker also hides the time zone box, but not **Refresh now**. ### Variables If the dashboard has variables, a bar of selectors appears under the top row. A query or custom variable is a menu, with an All choice when the dashboard allows it, and a textbox variable is a text box. The agent adds variables only when the prompt asks for a breakdown people will filter, so a dashboard from the prompt above may have none. ### Chart hover **Chart hover** in the **More** menu chooses how hovering one time chart shows on the others. Cmd/Ctrl+O cycles through "This chart only", "Shared crosshair" and "Shared tooltip". The choice is not saved to the dashboard. A choice that differs from the dashboard's saved `cursorSync` goes into the address as `cursor`. ## Next steps - [Chat and follow-ups](/docs/use/chat/) explains what the agent does at each step and what it cannot do. - [Ask and comment on a dashboard](/docs/use/ask-and-comment/) covers asking about a spot, in a thread or in a private chat. - [Comments, agent requests and versions](/docs/use/review/) covers review, comparing versions and restoring. - [Edit a panel](/docs/use/edit-panel/) covers changing a query or a panel by hand. - [MCP](/docs/use/mcp/) and [CLI](/docs/use/cli/) build and edit dashboards from your own tools. - [Import Grafana dashboards](/docs/use/import-grafana/) brings in dashboards you already have. ## Reference ### Phases of a build | Phase | What the agent does | | --- | --- | | Discovering | Lists datasources, dashboards, metrics, labels, tables and schemas, samples rows and reads the dashboard it revises. | | Checking queries | Lints a draft query against its datasource, without running it. | | Running queries | Runs a query to see that it returns data. | | Saving | Saves the draft, which runs every panel query again. | | Repairing | Fixes a draft that the save rejected. | ### Keys on Home | Key | What it does | | --- | --- | | `/` | Moves focus to the box. | | Enter | Sends the prompt. | | Shift+Enter | Starts a new line. | | Up arrow | Recalls an earlier prompt when the box is empty. | # Known limitations > What SlashObserve does not do yet, so you can check it against your needs before you adopt it. Source: https://slashobserve.com/docs/get-started/known-limitations/ · Markdown: https://slashobserve.com/docs/get-started/known-limitations/index.md SlashObserve is pre-1.0. This page lists the gaps that most often decide whether it fits, so you can check them before you adopt it. ## Check these before you adopt it 1. Your data sits in one of seven datasource types: Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch or OpenSearch. 2. You do not need SlashObserve to send alerts. 3. Everyone who signs in may query every datasource that is open to everyone, and you accept that. 4. You can sign people in through OpenID Connect (OIDC), or use only service-account keys. 5. You can back up Postgres before each upgrade, because the dashboard format can change before 1.0. The sections below give the detail. ## Datasources SlashObserve reads seven datasource types: Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch. Elasticsearch and OpenSearch are logs datasources. The agent finds metrics, labels, tables, columns, log labels and trace attributes on these seven only. There is no InfluxDB, CloudWatch or SQL database datasource such as MySQL or PostgreSQL. A datasources file entry with any other `type` is refused, and so is a datasource of another type in the app. See [Datasources file](/docs/reference/datasources-file/). When you import a Grafana panel that queries another type, such as InfluxDB, it imports as a placeholder that says "Influxdb is not supported yet." and the datasource cannot be mapped. Tempo search builder queries and TraceQL metrics queries are dropped from an import by decision. Write the search as a TraceQL query instead. ## No alerting There are no alert rules, no contact points, no silences, no notifications and no Alertmanager integration, and none is built. Keep alerting where it runs today: Grafana alerting, or Prometheus rules with Alertmanager, which work without Grafana's dashboards. An alert list panel shows the firing and pending alerts that a Prometheus `ALERTS` query returns, and that is all it does with alerts. ## Who can query which datasource Datasources come from the server's [datasources file](/docs/reference/datasources-file/) or are [added in the app](/docs/connect/datasources-in-the-app/) by an Admin. By default, every signed-in person from Viewer up, and every service-account key, may run a query against any of them. They do it through the explore query that the logs page and the trace search use. A datasource can instead be set to `audience: admins`, and then only Admins and Admin keys can list or query it. There is no per-team or per-folder datasource permission. A restricted folder hides its dashboards, not the datasources they read (see [Folders and access](/docs/teams/folders/)). To keep a team away from data, give the datasource account only the access you want every person here to have. ### Admin-only data in agent answers A run keeps [Admin-only data](/docs/use/chat/#answers-that-read-admin-only-data) out of what others read, but only for what the run itself reads. The server cannot see two kinds of leak: - An Admin's own connected agent can read the audit trail outside a run and paste it into a run whose answer others read. - Content that leaves the server and comes back is not traced. An Admin who exports a dashboard that holds such an answer, or copies a panel out of it by hand, and imports or pastes it into a folder others read is not stopped. The server sees only a new dashboard. Runs from before the server traced Admin-only data are marked only when the audit trail recorded a query of theirs against the built-in audit trail or an app datasource set to `audience: admins`. These runs are not marked: - a run that only read content in a folder only Admins can read, because nothing recorded that read; - a run that queried a datasources file entry set to `audience: admins`; - a run whose audit events were already removed by the retention window. ## Sharing, snapshots and reports A public link opens one dashboard read-only and always shows its latest version, so there is no stored-data snapshot of a moment in time. See [Public links and TV mode](/docs/use/public-links/). Every response carries `X-Frame-Options: DENY` and `frame-ancestors 'none'`. So neither a dashboard nor a public link can be framed in another page, and there is no embeddable panel link. There are no scheduled reports, so nothing emails a dashboard on a schedule. For a screen that must stay current, use a public link or [TV mode](/docs/use/public-links/#show-it-on-a-wall). ## Exploring data The [logs page and the trace search](/docs/use/logs-and-traces/) have gaps. - The logs page reads Loki, ClickHouse, Elasticsearch and OpenSearch. - The trace search reads Tempo, Jaeger and ClickHouse. - A Jaeger datasource is searched by service, operation, tags and duration, not TraceQL, and has no trace statistics or trace comparison. - The [metrics page](/docs/use/metrics/) reads Prometheus. A SQL query on ClickHouse metrics runs in the panel editor's live preview; see [Edit a panel](/docs/use/edit-panel/). ## Sign-in needs an OIDC provider or keys People sign in through an OpenID Connect provider, and there are no local passwords. Browser sign-in needs the provider's issuer, client ID and client secret together, and an allowed email domain list; see [Sign-in with OIDC](/docs/connect/oidc/). The server refuses to start when only some of the provider settings are set, or when the domain list is missing. A server with none of the provider settings runs with no browser sign-in, and only service-account keys authenticate; see [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in). The demo stack includes Dex for browser sign-in, with fixed development logins. The CLI and MCP clients use service-account keys, which an Admin creates after signing in through OIDC. ## Grafana import The import reads dashboard JSON that you provide. It also fetches dashboards from a running Grafana, with their folders; see [Switch from Grafana](/docs/use/switch-from-grafana/). Panel types and options the ObserveSpec format cannot hold are reported at their path; see [Import Grafana dashboards](/docs/use/import-grafana/). The [import coverage table](https://slashobserve.com/grafana) on slashobserve.com shows which Grafana features map, change or wait. - Alert rules and annotation queries are not imported. The report marks them as excluded by decision, and a panel whose only report lines are such decisions still counts as imported. - A library panel imports as a normal panel when the export carries its definition, and as a placeholder when it does not. - A panel from a plugin imports as a placeholder. There is no shared panel object and no plugin mechanism, so SlashObserve draws the panel types it ships, and each dashboard holds its own copy of a panel. - Users, teams, folder permissions and playlists stay in Grafana; see [Switch from Grafana](/docs/use/switch-from-grafana/#what-maps-what-changes-and-what-waits). ## Wall screens TV mode is part of the signed-in app, so a wall screen signs in as someone who can view the dashboard. A public link's view has no TV mode and cannot cycle through rows or dashboards. See [Show it on a wall](/docs/use/public-links/#show-it-on-a-wall). ## The ObserveSpec format may change The dashboard format is ObserveSpec version `0`. Before 1.0 it can change between releases. An earlier change already rewrote every stored dashboard when the server started, so back up Postgres before you upgrade. See [Upgrades and backups](/docs/operate/upgrades-and-backups/). # Connect Prometheus > Add a Prometheus server as a datasource, set its authentication, check its health and run a first PromQL query, with the step, warnings and exemplars rules. Source: https://slashobserve.com/docs/connect/prometheus/ · Markdown: https://slashobserve.com/docs/connect/prometheus/index.md Connect a Prometheus server to run PromQL queries from dashboards, the Metrics page, the CLI and the agent. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect a Prometheus server 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names: ```yaml datasources: - uid: prom type: prometheus name: Prometheus prometheus: url: http://prometheus:9090 scrapeInterval: 15s ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck prom ``` The health check sends the query `1` to `/api/v1/query`. A 401 or 403 answer shows as "authentication failed (HTTP 401)". 4. Run a first query: ```sh observe metrics query 'up' --datasource prom --instant ``` You see one line per series with its labels and its value. The same query works on the [Metrics](/docs/use/metrics/) page, and `query_range` is the equivalent MCP tool. ## Connect a Prometheus that needs a login Reference a secret by variable name or by file, never by value. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml prometheus: url: https://prometheus.example.com bearerTokenEnv: SLASHOBSERVE_PROMETHEUS_TOKEN ``` For basic auth, give `basicAuth` with a `username` and one of `passwordEnv` or `passwordFile`. Basic auth and a bearer token cannot be combined. Other headers go under `headers`, or under `headersFromEnv` or `headersFromFile` when the value is a secret. A header name may appear in only one of the three, and `Authorization` is refused there. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. | | `scrapeInterval` | A Go duration, default `15s`. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `scrapeInterval`: - It feeds the `$__rate_interval` macro. - It is the smallest step of a range query that sets no `interval`. Details of `headers`: - `Content-Type`, `Accept`, `Host` and `Content-Length` are managed by the server and refused. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth`. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Step A range query asks for about as many points per series as its panel is wide in pixels. It never uses a step shorter than `scrapeInterval`, because a shorter step only repeats the same samples. Over the last hour at the default `15s`, that is at most 240 points per series, however wide the panel. A query's or panel's `interval` replaces the floor. `$__interval` and `$__rate_interval` follow the step the query ran with, which Inspect shows on its Query tab. The explore query API, `observe metrics query` and the `query_range` MCP tool ask for 200 points per series unless told otherwise. ### Warnings Thanos and Mimir answer with a `warnings` list when a store did not answer. SlashObserve marks that result partial, so `meta.partial` is true even when the result is empty. `meta.warning` carries the text, with a server address replaced by a generic line. The agent's query tools report the same text, so an empty answer is not read as "no data". ### Exemplars A time series or heatmap query with `exemplar: true` also asks Prometheus for exemplars over the same range, through `/api/v1/query_exemplars`. Prometheus returns them only when it runs with `--enable-feature=exemplar-storage` and the scraped application exposes them. SlashObserve keeps at most one exemplar per step, the one with the highest value, and at most 2,000 per query. If the exemplar request fails, the panel still shows its series. # Connect ClickHouse > Add a ClickHouse server as a datasource for logs, traces and metrics, with the read-only user it requires, a first SQL query and the tables the pages read. Source: https://slashobserve.com/docs/connect/clickhouse/ · Markdown: https://slashobserve.com/docs/connect/clickhouse/index.md Connect a ClickHouse server that holds OpenTelemetry data to search logs and traces with SQL and chart them in dashboards. SlashObserve queries ClickHouse only as a read-only user, so you create that user first. An Admin adds the entry to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect a ClickHouse server 1. Create the read-only user. Run these statements as a ClickHouse admin, with your own password: ```sql CREATE SETTINGS PROFILE IF NOT EXISTS slashobserve_ro_profile SETTINGS readonly = 2 CONST, max_execution_time = 30 MIN 1 MAX 300, max_result_rows = 10000 MIN 1 MAX 1000000, max_result_bytes = 104857600 MIN 1 MAX 1073741824, result_overflow_mode = 'throw' CONST; CREATE USER IF NOT EXISTS slashobserve_ro IDENTIFIED WITH sha256_password BY '' SETTINGS PROFILE 'slashobserve_ro_profile'; GRANT SELECT ON otel.* TO slashobserve_ro; ``` Grant `SELECT` only on the database that holds your OpenTelemetry tables. The demo defines the same user in `internal/datasource/clickhouse/testdata/readonly_user.sql`, with the development password `slashobserve`. 2. Put the password in the server's env file, for example `SLASHOBSERVE_CLICKHOUSE_PASSWORD=`. 3. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names: ```yaml datasources: - uid: ch type: clickhouse name: ClickHouse clickhouse: addr: clickhouse:9000 database: otel username: slashobserve_ro passwordEnv: SLASHOBSERVE_CLICKHOUSE_PASSWORD ``` 4. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 5. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck ch ``` A healthy datasource shows no failure. An unhealthy one shows why, such as "The ClickHouse user must be readonly = 2". 6. Run a first query: ```sh observe logs 'SELECT Timestamp, Body FROM otel_logs WHERE $__timeFilter(Timestamp) LIMIT 10' --datasource ch --from now-1h ``` You see up to 10 log lines with their time and message. Single quotes keep the shell from expanding `$__timeFilter`. The same SQL works on the [Logs page](/docs/use/logs-and-traces/#write-and-run-a-query). ## Fix an unhealthy ClickHouse datasource The health check pings the server, then checks the user. Two checks fail on a user that is too powerful, and the datasource shows as unhealthy: - The user is not `readonly = 2`. Use `2` rather than `1`, because the server sets per-query limits, and a user with `readonly = 1` is refused. - The user holds a grant that reaches outside systems. The message is "The ClickHouse user holds a grant that reaches outside systems; revoke it". The server checks with `CHECK GRANT` that the user holds neither `CREATE TEMPORARY TABLE` nor a read or write grant on a source such as `FILE`, `URL`, `REMOTE`, `S3` or `MYSQL`. That covers a grant given directly, through a role, or through `SOURCES` or `ALL`. ## Keep the digits of large numbers A result carries numbers as floating point, which holds integers exactly only up to 2^53. In a table, a column with an integer above 2^53 or a decimal whose whole part is above 2^53 comes back as a string column holding every digit. In a time series such a value is still plotted as a number, rounded, and the frame carries `meta.warning` saying so. Select the column as a string, for example `toString(id)`, to keep the digits in a series. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `addr` | Required. The native-protocol `host:port`. | | `database` | Default `otel`. | | `username` | Required. | | `passwordEnv`, `passwordFile` | Exactly one is required. | | `tls` | `true` connects over TLS 1.2 or newer. Default `false`. | A result over 32 MiB is refused as exceeding a limit, whatever the row limit. ### What the logs and trace pages read The logs page starts from a template over `otel_logs`, and the trace search reads `otel_traces`. Both are in the datasource's `database`, with the column names of the OpenTelemetry Collector's ClickHouse exporter: - For logs: `Timestamp`, `SeverityText`, `Body`, `ServiceName`, `TraceId`, `SpanId` and `LogAttributes`. - For traces: the same ids and service, plus `ParentSpanId`, `SpanName`, `SpanKind`, `Duration`, `StatusCode`, `StatusMessage`, `SpanAttributes`, `ResourceAttributes`, and the `Events` and `Links` nested columns. The services list reads the `ServiceName` column of whichever of the two tables the signal names. Metric names come from the `otel_metrics_*` tables. On the logs page, and in the SQL view of the trace search, you write the query as SQL. It must be one read-only `SELECT`. It must read the time range through a macro such as `$__timeFilter(Timestamp)`, which names the table's time column, because the server never reads a table beyond the range at the top of the page. [Logs and traces](/docs/use/logs-and-traces/#write-and-run-a-query) describes the rules and the errors. # Sign-in with OIDC > Connect an OpenID Connect identity provider so people can sign in to the web app, and decide which email addresses may sign in. Source: https://slashobserve.com/docs/connect/oidc/ · Markdown: https://slashobserve.com/docs/connect/oidc/index.md People sign in to SlashObserve through an OpenID Connect (OIDC) identity provider such as Dex, Keycloak, Okta or Microsoft Entra ID. There are no local passwords. A server with no identity provider has no browser sign-in and takes only service-account keys; see [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in). ## Connect an identity provider 1. In your provider, create a client for SlashObserve that uses the authorization code flow. Register the redirect URI `/api/v1/auth/callback`. 2. Set these variables on the server. Set all of the first three or none of them. ```text SLASHOBSERVE_OIDC_ISSUER_URL=https://idp.example.com SLASHOBSERVE_OIDC_CLIENT_ID= SLASHOBSERVE_OIDC_CLIENT_SECRET= SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS=example.com ``` `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` is required whenever sign-in is on, so a deployment is never open by accident. [Decide who may sign in](#decide-who-may-sign-in) explains its values. 3. Start the server. The log has `oidc login configured` with the issuer. 4. Open the web app and choose **Sign in**. Your provider asks you to authenticate, and you land back in SlashObserve signed in. The first person to sign in becomes an Admin unless a role setting decides otherwise; see [Roles](/docs/teams/roles/#how-a-role-is-decided). ## Decide who may sign in Set `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` to one of two things. - A comma-separated list of domains, such as `example.com,example.org`. A person may sign in when the provider says their email is verified and the email's domain is in the list. The match is exact, so `example.com` does not admit `sub.example.com`. - `*`, which allows every account the provider authenticates that has an email address, verified or not. The server logs the warning `all identity-provider accounts may sign in` at startup. Use it only when the provider is itself the access control, for example a private tenant. `*` cannot be combined with domains. A refused person returns to the sign-in page with "This account is not allowed to sign in." The log has `sign-in refused` with the `reason`, never the address. For `domain_not_allowed` and `email_unverified` it also logs the email's domain. The reasons are `domain_not_allowed`, `email_unverified`, `email_too_long` and `email_invalid`. A provider that sends no email address at all is refused whatever the setting. That case shows "Sign-in failed. Try again." and logs `sign-in failed` with `error_code` `email_missing`. An [invite](/docs/teams/people/#invite-people) does not change these rules. An email outside the list cannot be invited, and an invited role applies only to a first sign-in with a verified email. An Admin can also [deactivate](/docs/teams/people/#deactivate-a-person) a person. Their next sign-in is refused with "This account was deactivated by an Admin. Ask an Admin to reactivate it." ## Sign in when the server and browsers reach the provider differently If the server reaches the provider at another address than browsers do, for example by a Docker service name, set `SLASHOBSERVE_OIDC_INTERNAL_URL` to that origin. Only the server's own calls to the provider use it. The issuer and the browser redirects keep the public address. The demo stack does this: browsers use `http://localhost:55556/dex` and the server uses `http://dex:5556`. ## Check why sign-in fails The server fetches `/.well-known/openid-configuration` on the first sign-in attempt, not at startup. A provider that is down when the server boots does not stop it. While discovery fails, the sign-in page shows "The identity provider is unavailable. Try again shortly." and the log has `oidc discovery failed` with `error_code` `oidc_unavailable`. Calls to the provider time out after 10 seconds. Set `SLASHOBSERVE_OIDC_ISSUER_URL` to the issuer exactly as the provider reports it in its discovery document, because the server compares it exactly. ## Reference ### Settings | Variable | Default | Notes | | --- | --- | --- | | `SLASHOBSERVE_OIDC_ISSUER_URL` | none | Absolute `http` or `https` URL. | | `SLASHOBSERVE_OIDC_CLIENT_ID` | none | Set with the issuer and the secret, or not at all. | | `SLASHOBSERVE_OIDC_CLIENT_SECRET` | none | Set with the issuer and the client ID, or not at all. | | `SLASHOBSERVE_OIDC_INTERNAL_URL` | none | Origin the server uses for its own calls. | | `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` | none | Required with sign-in. Domains or `*`. | | `SLASHOBSERVE_AUTH_PROVIDER_NAME` | none | Up to 64 characters. | | `SLASHOBSERVE_SESSION_TTL` | `168h` | From 5 minutes to 720 hours. | | `SLASHOBSERVE_OIDC_GROUP_ROLES` | none | Maps groups to roles; see [Roles](/docs/teams/roles/). | With none of the issuer, client ID and client secret set, the server refuses to start if `SLASHOBSERVE_OIDC_INTERNAL_URL`, `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS`, `SLASHOBSERVE_ADMIN_EMAILS`, `SLASHOBSERVE_OIDC_GROUP_ROLES` or `SLASHOBSERVE_AUTH_PROVIDER_NAME` is set, because only browser sign-in reads them. Setting only some of the three is also refused. ### What the server asks the provider for The server uses the authorization code flow with PKCE (S256) and a nonce. It asks for the `openid`, `email` and `profile` scopes. It also asks for `groups` when the provider lists it in `scopes_supported`, so that `SLASHOBSERVE_OIDC_GROUP_ROLES` can map groups to roles. ### Details of the email rules Under a domain list, the provider must report the email as verified. Under `*`, an unverified email may sign in, but it never makes a person an Admin through `SLASHOBSERVE_ADMIN_EMAILS`. Such a sign-in logs the warning `admin email signed in unverified` with the person's user id. With a provider that does not send `email_verified`, give Admin through a group instead; see [Roles](/docs/teams/roles/#how-a-role-is-decided). ### Users and sessions Users are identified by the provider's issuer and subject, and are created on first sign-in. A session lasts `SLASHOBSERVE_SESSION_TTL` from sign-in. Set `SLASHOBSERVE_AUTH_PROVIDER_NAME` to the name people know the provider by. The web app shows it in the account menu, on the People page and in the access dialogs. **Settings** has a **Sign-in** card that shows the provider name, the identity provider, the allowed email domains and the session length, read-only. # LLM providers > Turn the built-in agent on with an Anthropic key or an OpenAI-compatible server, see what a run costs, and know what happens with no provider. Source: https://slashobserve.com/docs/connect/llm-providers/ · Markdown: https://slashobserve.com/docs/connect/llm-providers/index.md The built-in agent turns a prompt into a saved dashboard or an investigation by calling tools against your datasources. It needs a language model, which you connect by setting `SLASHOBSERVE_LLM_PROVIDER`. You pick Anthropic or any server that speaks the OpenAI Chat Completions API. ## Turn the agent on 1. Create an API key with your provider. 2. Set these variables on the server and restart it: ```text SLASHOBSERVE_LLM_PROVIDER=anthropic SLASHOBSERVE_LLM_API_KEY= ``` The default model is `claude-sonnet-5-5`. For an OpenAI-compatible server, see [Use an OpenAI-compatible server](#use-an-openai-compatible-server). 3. Check that the model is configured: ```sh observe doctor ``` The model check passes and shows the provider, the model and the effort, instead of failing with "no model is configured; prompts cannot run". 4. In the web app, open Home and use **Ask Observe Agent**. Without a model that tab says "No model is connected to this server." `GET /api/v1/agent` answers `available: true`. The agent sends what its tools return to the provider: datasource and metric names, label values, sampled rows and query results. Choose a provider whose data handling fits what your datasources contain. ## Use another Anthropic model Set `SLASHOBSERVE_LLM_MODEL`, for example `claude-opus-5-5` for harder prompts or `claude-haiku-5-5` for lower cost. The server does not check the model name. `SLASHOBSERVE_LLM_EFFORT` sets the effort level: `low`, `medium`, `high`, `xhigh` or `max`, and `medium` when unset. To read the key from a file, such as a Docker or Kubernetes secret, use `SLASHOBSERVE_LLM_API_KEY_FILE` instead. Set only one of the two. To send `anthropic` calls through a gateway, set `SLASHOBSERVE_LLM_BASE_URL` to its root without `/v1`, because the agent adds that path itself. ## Use an OpenAI-compatible server `openai` talks to any server that implements the Chat Completions API with tool calling. The model is required, because there is no safe default. ```text SLASHOBSERVE_LLM_PROVIDER=openai SLASHOBSERVE_LLM_MODEL= SLASHOBSERVE_LLM_API_KEY= ``` Leave `SLASHOBSERVE_LLM_BASE_URL` unset to use OpenAI. Set it to use another server, written as the server expects, so include `/v1`. For a local Ollama, which needs no key: ```text SLASHOBSERVE_LLM_PROVIDER=openai SLASHOBSERVE_LLM_MODEL=llama3.1 SLASHOBSERVE_LLM_BASE_URL=http://localhost:11434/v1 ``` The model must support tool calling. Inside a container, `localhost` is the container itself. Use an address the container can reach, such as `http://host.docker.internal:11434/v1` on Docker Desktop. The project does not vouch for any particular local model, and dashboard quality depends heavily on the model. [Local models](/docs/connect/local-models/) covers running the agent on a model you serve yourself. `SLASHOBSERVE_LLM_EFFORT` sets the reasoning effort sent with each call: `none`, `minimal`, `low`, `medium`, `high` or `xhigh`. Unset, nothing is sent and the server uses its own default. A reasoning model spends output tokens on reasoning before it answers, so a lower effort such as `low` can shorten each call on some gateways. A gateway that does not accept the parameter answers every call with a provider error, so unset the variable if that happens. ## Run the agent with no provider With `SLASHOBSERVE_LLM_PROVIDER` unset, the server starts normally and everything except the built-in agent works. You can still create and edit dashboards through the API. An agent of your own connects over [MCP](/docs/use/mcp/) and takes runs with its own model, so it needs no provider here. These behave differently without a provider: - The endpoints that start the built-in agent answer `503 agent_unavailable`. They are `POST /api/v1/observe` for a request the built-in agent would take, revision prompts, suggestions, health repairs and query drafts. - A message that mentions `@observe` is saved, and its `run_refusal` is `agent_unavailable`. - A comment sent with `request_revision` is saved and queues no revision. Turning the agent on later replays neither. - Home's **Ask Observe Agent** tab says no model is connected. - `GET /api/v1/agent` answers `available: false`, and `observe doctor` reports that no model is configured. ## Allow the agent's network calls The model calls come from `observe-agent`, the process the server starts whenever a provider is configured, not from the server itself. It calls `api.anthropic.com` for `anthropic` and `api.openai.com` for `openai`, over HTTPS, unless `SLASHOBSERVE_LLM_BASE_URL` names another server. The [outbound allowlist](/docs/operate/outbound-access/) does not cover these calls, so a firewall that restricts egress must allow the host. The server hands the process the provider settings, including the key, when it claims a run, so the process needs no settings of its own. It gives the process only `PATH`, `HOME` and `TZ` from its own environment. A proxy variable such as `HTTPS_PROXY` set on the server does not reach it, and neither do the provider's own variables such as `ANTHROPIC_API_KEY` or `OPENAI_BASE_URL`. Set every value through `SLASHOBSERVE_LLM_*`. A call that fails with a rate limit, a timeout, a server error or a dropped connection is tried up to 4 times with backoff, inside the request timeout. ## Run cost Every finished request reports `usage.cost_usd`, an estimate in US dollars of what the attempt that finished it cost. It comes from the token counts of the attempt's model calls and the server's price table, so it is not an invoice. A request that is retried after a lost lease reports the attempt that finished, not the sum of its attempts. The cost shows in these places: - The web app. - `observe status`. - The request's `usage`. - The `run.succeeded`, `run.failed` and `run.canceled` events of the [activity log](/docs/use/activity/). The Agents page adds up the recorded costs of each agent's runs over the last 7 days, and shows "Not priced" when a finished run has none. ### Price a model that is not in the table `SLASHOBSERVE_LLM_PRICES_FILE` replaces the whole table with a file of the same shape, so an OpenAI-compatible model can be priced. The file is not merged with the built-in table, so list every model you use. Each entry gives `input`, `output`, `cache_read` and `cache_write` rates, and an optional `match` list of name prefixes: ```yaml models: llama3.1: { input: 0.2, output: 0.6, cache_read: 0, cache_write: 0, match: [llama3.1] } ``` The server refuses to start when the file is unreadable, malformed, empty, has a negative rate, has an unknown field, lists a prefix twice, or holds more than one YAML document. It also refuses to start when `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` is set and the model has no price for every token class. ### The built-in price table The table lists these models, in US dollars per million tokens: | Model | Input | Output | Cache read | Cache write | | --- | --- | --- | --- | --- | | `claude-opus-5-5` | 4.00 | 20.00 | 0.20 | 5.00 | | `claude-sonnet-5-5` | 2.00 | 10.00 | 0.20 | 2.50 | | `claude-haiku-5-5` | 0.10 | 0.50 | 0.01 | 0.125 | A model is priced by its exact name, and otherwise by the longest listed prefix, so a dated id such as `claude-haiku-5-5-20261001` is priced too. A token class the model used that has no rate leaves the cost empty, never zero, and a model that is not in the table has no cost. The table holds one rate per token class and models no long-prompt pricing tier, so the cost of a model that has such a tier is underestimated above its threshold. It also holds a `replay` model, priced at zero, for the replay provider that tests use. ## Reference | Variable | Default | Notes | | --- | --- | --- | | `SLASHOBSERVE_LLM_PROVIDER` | unset | `anthropic`, `openai` or `replay`. Unset turns the agent off. | | `SLASHOBSERVE_LLM_MODEL` | `claude-sonnet-5-5` for `anthropic` | Required for `openai`. | | `SLASHOBSERVE_LLM_API_KEY` | none | Required for `anthropic`. | | `SLASHOBSERVE_LLM_API_KEY_FILE` | none | A file holding the key. Not with `SLASHOBSERVE_LLM_API_KEY`. | | `SLASHOBSERVE_LLM_BASE_URL` | the provider's own | Without `/v1` for `anthropic`, with it for `openai`. | | `SLASHOBSERVE_LLM_EFFORT` | `medium` for `anthropic` | Values depend on the provider. | | `SLASHOBSERVE_LLM_PRICES_FILE` | the built-in table | Replaces the price table. | The provider is lower-cased, so `Anthropic` works. A key file must be readable and not empty, and the server trims it. `SLASHOBSERVE_LLM_MAX_TOKENS`, `SLASHOBSERVE_LLM_REQUEST_TIMEOUT`, `SLASHOBSERVE_LLM_IDLE_TIMEOUT` and the other agent settings are in [Configuration](/docs/reference/configuration/). # Add datasources in the app > An Admin adds, tests, edits and removes datasources on the Datasources page, with the CLI or over HTTP, and decides who can query them, without editing a file or restarting the server. Source: https://slashobserve.com/docs/connect/datasources-in-the-app/ · Markdown: https://slashobserve.com/docs/connect/datasources-in-the-app/index.md A datasource is a connection to a system that holds your data, such as Prometheus or Loki. An Admin can add one in the web app, with no file to edit and no restart. The datasource answers queries as soon as it is saved, and other servers in a fleet pick it up within 10 seconds. ## Add a datasource 1. Sign in as an Admin and choose **Datasources** in the sidebar. 2. Choose **Add datasource**. 3. Fill in the form: - **Type**, one of Prometheus, Loki, Tempo, Jaeger, "ClickHouse, read only", Elasticsearch or OpenSearch. - **Id**, which dashboards use to refer to the datasource and which cannot change later. It starts with a letter or digit and has at most 40 letters, digits, `_` and `-`. - **Name**, shown in lists, at most 100 characters. It defaults to the id. - **Address**, as [Addresses](#addresses) describes. - Any **Credentials** the system needs. 4. Choose **Test connection**. A working address shows "Connected. Save to keep these settings." 5. Choose **Add datasource**. The new row appears with its status. 6. Run a first query with the link on the row: **Explore metrics**, **Explore logs** or **Search traces**, whichever fits the type. The CLI does the same. It reads a credential from a file or from standard input, never from an argument: ```sh printf '%s' "$TOKEN" | observe datasources add prom --type prometheus \ --address https://prometheus.example.com --bearer-token-file - observe datasources recheck prom observe metrics query 'up' --datasource prom --instant ``` Over HTTP, an Admin session or key posts the definition and its credentials: ```sh curl -fsS -X POST -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" "$OBSERVE_SERVER/api/v1/datasources" \ -d '{"uid":"prom","type":"prometheus","address":"https://prometheus.example.com","secrets":{"bearer_token":"..."}}' ``` The answer is `201` with the saved definition, `"source": "app"` and `secrets_set`, the names of the credentials that are set. ## Read the Datasources page The Datasources page is in the sidebar for Admins only. Each row shows these columns: - The name and id. - The type. - Where the datasource comes from: "From file", "Added in the app" or "Built in". - An **Only Admins** badge when only Admins can query it. - Its status. - How many dashboards use it. - When it was last checked. The page refreshes every 30 seconds. **Recheck** on a row runs a fresh health check at once. A row also links to the page that reads it: **Explore logs**, **Search traces** or **Explore metrics**. **Edit** and **Remove** appear only on datasources added in the app. A datasource from the file and the built-in audit trail show only **Recheck** and the links. The app reloads its datasource list every 15 seconds while any datasource is unhealthy. The sidebar and the Logs, Traces and Metrics source lists read that list, so a source that was still starting when the page loaded shows as available once it answers. ## Edit a datasource 1. On the Datasources page, choose **Edit** on the row. 2. Change the settings and choose **Test connection**. 3. Choose **Save**. The id and the type are fixed once a datasource is saved. A change to either is refused with `422 invalid_datasource`, so add a new datasource instead. Everything else can change, including the name. The form shows the common settings first. Under **Show advanced settings** it shows these: - The query timeout. - The limits on series, points, rows and concurrent queries. - The Grafana datasource ids. - For Elasticsearch and OpenSearch, the query language and the index fields that hold the message, level, service, trace id and span id. These are the same settings as in the [datasources file](/docs/reference/datasources-file/). From the CLI: ```sh observe datasources get prom observe datasources edit prom --address https://prom2.example.com --clear header:X-Org ``` `edit` changes only the settings you pass. Over HTTP, `PATCH /api/v1/datasources/{uid}` takes the same fields, and a field you leave out keeps its value. ## Test a connection before saving **Test connection** runs a health check against the values in the form, before anything is saved. When you edit, a credential you leave empty is taken from the saved datasource, so the test reflects what saving would do. A failed test shows the same fixed message and cause as the Datasources page. The check times out after 10 seconds. A test never changes the outbound allowlist. A domain that is not listed can be tested only while the allowlist is unlocked, and it is added when you save. From the CLI, `observe datasources test prom --saved --address https://prom2.example.com` starts from the saved datasource and changes only what the flags name. Without `--saved` it tests a draft you describe in full. Over HTTP, it is `POST /api/v1/datasources/test`, with `?base=` to start from a saved datasource. It answers `{"healthy": true}`, or `healthy: false` with a `message` and a `detail`. A test is recorded in the audit trail with the type, the host and the result. ## Remove a datasource 1. On the Datasources page, choose **Remove** on the row and confirm. 2. If a dashboard or saved search still uses the datasource, the removal is refused. Change those to another datasource first, then remove it. From the CLI, `observe datasources remove prom`. Over HTTP, `DELETE /api/v1/datasources/{uid}`. The refusal is `409 datasource_in_use`. It lists the users and counts as `hidden` the dashboards in folders you cannot see. Removing a datasource deletes its stored credentials for good, so add it again with the credentials to restore it. ## Make a datasource Admins only By default everyone from Viewer up can query a datasource added in the app. To limit it to Admins: 1. Edit the datasource and choose **Only Admins** under **Audience**. 2. Move any dashboard, observation or saved search that reads it into a folder only Admins can read. The save is refused until you do. 3. Save. From the CLI, `--audience admins` on `observe datasources add` or `edit`. Over HTTP, `"audience": "admins"` on `POST /api/v1/datasources` or `PATCH /api/v1/datasources/{uid}`. `"audience": "everyone"` opens it again, and a change that leaves the audience out keeps it. [Who can query it](#who-can-query-it) has the full rules, including what the server refuses and why. ## Fix a datasource that shows Unavailable A stored datasource that cannot load still appears, as Unavailable with the reason. Dashboards that use it fail with a clear message. These are the causes: - The secret key is missing or changed, or the sealed credentials cannot be read. Set `SLASHOBSERVE_SECRET_KEY` back to the key that sealed them, or edit the datasource and enter the credentials again. - A stored row no longer validates. Edit the datasource. - The address's domain is no longer allowed. The status is "The address is not allowed by the outbound allowlist". Allow the domain again or change the address. After the fix, choose **Recheck**. ## Reference ### Where a datasource comes from Entries in the [datasources file](/docs/reference/datasources-file/) show as "From file". The server reads them once at startup, and they are read-only in the app. Datasources added in the app show as "Added in the app". When a file entry and an app datasource share a uid, the file entry wins and the app one is refused at save time with `409 uid_taken`. Every server also has one built-in datasource, the audit trail. It shows as "Built in" with the **Only Admins** badge, with the uid `slashobserve-audit` and `source` `builtin` on `GET /api/v1/datasources`. Only Admins see it, and nobody can edit or remove it. `PATCH`, `DELETE` and `GET /api/v1/datasources/slashobserve-audit/config` answer `409 datasource_read_only`. A file entry with that uid stops the server at startup, and an app datasource with it is not loaded. [Audit queries](/docs/reference/audit-queries/#the-audit-datasource) describes what it answers. ### Who can query it A datasource added in the app is open to everyone from Viewer up by default. With the `admins` audience, only Admins and Admin keys can list, query or health-check it. Every other role, key and public link gets the same answer for it as for a datasource that does not exist. The audience is returned with the rest of the definition on `GET /api/v1/datasources/{uid}/config`, which only Admins can call. The Datasources page shows an **Only Admins** badge on a datasource with the `admins` audience. For an Admin, each row of the MCP tool `list_datasources` also carries `audience`. Other callers never see an `admins` datasource, so their rows leave it out. #### Where its content must live A dashboard, proposal, observation or saved search that reads an Admins-only datasource lives only in a [folder only Admins can read](/docs/teams/folders/). That counts these: - A panel or query that names the datasource. - A datasource variable whose default or fixed options name it. - A snapshot or RCA panel that read it when it was frozen, the datasource a variable picked included. Saving, importing, applying or proposing such content anywhere else is refused with `409 restricted_content`. The answer names the datasource and says to use a folder only Admins can read. Moving the content out to another kind of folder is refused the same way. Every version of a dashboard and every revision of its proposals count for a move, because the history stays readable. The same answer reaches the web app, the agent, MCP tools, the CLI, files applied with `observe dashboards apply`, the provisioning directory and the Grafana import. Content in any other folder is read as everyone reads it, by Admins too. A panel, variable, snapshot or RCA there never queries an Admins-only datasource, and a datasource variable with no default picks among the datasources everyone can query. Only content in a folder only Admins can read, the explore query, panel drafts and agent builds read with the Admin's own role. #### Making a datasource Admins only Changing the audience from `everyone` to `admins` is refused with `409 restricted_content` while such content sits in a folder other people can read. The answer has these fields: - `items` lists up to 20 of them outside people's My Dashboards, with their kind, id, title and folder, so an Admin can move them first. - `unlisted` and the message say how many more are not listed. - `hidden` counts the ones in people's My Dashboards, which only their owners can move or remove and an Admin cannot see. `observe datasources edit` prints the same list. Each server checks every app datasource that is already `admins` when it starts, for content left outside such folders from before this rule. It logs one warning per datasource, `admins only datasource read outside admins only folders`, and starts anyway. The warning has the datasource uid (`datasource_uid`) and the number of items in shared folders (`shared_items`) and in people's My Dashboards (`personal_items`), never their titles. ### Credentials A password, bearer token, API key or request header value is stored encrypted with `SLASHOBSERVE_SECRET_KEY` and is never shown again. The edit form shows only whether each one is set, and a field left empty keeps what is stored. **Clear** on a credential removes it, and **Keep** undoes the clear before you save. Every header value counts as a credential, so the app has no plain custom headers. Without `SLASHOBSERVE_SECRET_KEY` the server refuses to save credentials with `409 secret_key_missing`. A datasource with no credentials still saves. Over HTTP, `secrets` sets credentials and `clear_secrets` removes them. `clear_secrets` takes `password`, `bearer_token`, `api_key` or `header:`. The CLI takes `--clear` with the same names. Other names are refused with `422 invalid_datasource`. These limits apply to credentials, and a value over a limit or with a control character is refused with `422 invalid_datasource`: | Limit | Value | | --- | --- | | Request headers per datasource | 20 | | One credential or header value | 4096 bytes | | All credentials together | 60000 bytes | ### Addresses The address must pass the outbound allowlist, like a Grafana connection's. It must be an `http` or `https` URL with a host and no user info, or `host:port` for ClickHouse. The server refuses a link-local, unspecified or multicast IP address. It never connects to a link-local, cloud metadata or unspecified address, even when a name resolves to one. #### Details of the allowlist rules - A domain is added to the outbound allowlist when you save, if `SLASHOBSERVE_OUTBOUND_DOMAINS` does not lock the list. When it locks the list, a domain that is not on it is refused with `403 outbound_domain_not_allowed`. - A bare IP address or a single-label host cannot be listed. It is accepted only while the allowlist is unlocked. - Removing a datasource, or changing its address, takes its old domain off the allowlist when nothing else uses it and the list is unlocked. - The allowlist holds at most 100 domains, and adding one more is refused with `422 too_many_domains`. - The server checks the allowlist again every 10 seconds and when it starts. A datasource whose domain was removed shows Unavailable until the domain is allowed again or the address is changed. The same happens when `SLASHOBSERVE_OUTBOUND_DOMAINS` now locks the list and the address is an IP address or a single-label host. - The server holds at most 100 datasources added in the app, and the 101st is refused with `422 too_many_datasources`. ### CLI `observe datasources` has these commands for datasources added in the app. They need an Admin key, except `recheck`, which needs a Viewer key. | Command | What it does | | --- | --- | | `list` | Lists every datasource with its health. | | `get ` | Prints the saved definition. | | `add --type --address
` | Adds a datasource. | | `edit ` | Changes the settings you pass. | | `test [--saved]` | Checks a draft and saves nothing. | | `recheck ` | Runs a fresh health check. Viewer or higher. | | `remove ` | Removes the datasource. | `test` and `recheck` exit 1 when the datasource is unhealthy. #### Details of the flags - `--name`, `--audience` (`everyone` or `admins`) and `--address` apply to every type. - `--username` is the basic-auth user, or the ClickHouse user. - `--password-file`, `--bearer-token-file` and `--api-key-file` read a credential from a file, or from standard input with `-`. `--header NAME=FILE` sends header `NAME` with the value read from `FILE`. Only one flag can read standard input. - `--clear` takes `password`, `bearer_token`, `api_key` or `header:`, and repeats for several. - `--database` and `--tls` apply to ClickHouse. - `--tenant-id` is the Loki tenant, and `--scrape-interval` is the Prometheus scrape interval. - `--index`, `--time-field`, `--query-language` (`kql` or `lucene`) and the `--field-message`, `--field-level`, `--field-service`, `--field-trace-id` and `--field-span-id` settings apply to Elasticsearch and OpenSearch. - `--timeout`, `--max-series`, `--max-points`, `--max-rows` and `--max-concurrent-queries` set the query limits. - `--grafana-uid` names a Grafana datasource uid this one stands for on import, and repeats for several. `observe datasources add --help` lists them all. An agent over MCP can list datasources and recheck them, but cannot add, change or remove one. These routes are for Admins over HTTP and the CLI only. ### Audit log These events go to the [Audit log](/docs/use/activity/), with the name, the address's host and port and what changed: - `datasource.created`, `datasource.updated` and `datasource.deleted`. - `datasource.audience_changed`, written on its own for a change of the audience, with the audience before and after. In the audit trail it is `datasource.audience_change`. A credential and the address path are never recorded, only that credentials were replaced. Datasources from the datasources file are not recorded. # Connect Elasticsearch > Add an Elasticsearch cluster as a datasource for logs, with its index pattern, time field, field roles and authentication, a first query, and the rules for queries, aggregations, filters and paging. Source: https://slashobserve.com/docs/connect/elasticsearch/ · Markdown: https://slashobserve.com/docs/connect/elasticsearch/index.md Connect an Elasticsearch cluster to search its logs on the Logs page, chart document counts and aggregations in dashboards, and let the agent read them. SlashObserve supports Elasticsearch 8.x and 9.x. For an OpenSearch cluster use the [OpenSearch](/docs/connect/opensearch/) type instead, and the health check says so when the two are mixed up. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect an Elasticsearch cluster 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names. `index` is required and names the logs to search: ```yaml datasources: - uid: es type: elasticsearch name: Elasticsearch elasticsearch: url: http://elasticsearch:9200 index: logs-* ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck es ``` The [health check](#health) tells a wrong type, an unsupported version, an empty index pattern and a missing field apart. 4. Run a first query: ```sh observe logs 'error' --datasource es --from now-1h ``` You see up to 100 log lines that contain "error", oldest first, with their time, level, service and message. The same query works on the [Logs page](/docs/use/logs-and-traces/). ## Connect a cluster behind an API key Reference the key by variable name or by file, never by value. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml - uid: es type: elasticsearch name: Elasticsearch elasticsearch: url: https://elasticsearch.example.com:9200 index: logs-* apiKeyEnv: SLASHOBSERVE_ES_API_KEY ``` The key is sent as `Authorization: ApiKey`. An API key cannot be combined with `basicAuth` or a bearer token. For basic auth, give `basicAuth` with a `username` and one of `passwordEnv` or `passwordFile`. ## Search with KQL, Lucene or a Query DSL body A query takes one of three forms, chosen by its first characters. KQL is the default. A `lucene:` prefix chooses Lucene, and text that starts with `{` is a Query DSL body. [Queries](#queries) describes each form, what it returns and the variables and macros it takes. ## Chart aggregations A Query DSL body with `aggs` folds into series or a table, so a dashboard can chart counts, averages and percentiles. [Aggregations](#aggregations) lists what is supported. ## Pick the field that plays each role The server finds the message, level, service, trace id and span id fields by name. Set `fields` when your documents use other names. [Field roles](#field-roles) lists the names it tries. ## Find fields, values and services A query variable takes `label_values(field)` or `label_values(, field)`. [Variables and discovery](#variables-and-discovery) lists what the agent and the field browser can read. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. | | `index` | Required. One or more comma-separated index names, patterns, aliases or data streams. | | `timeField` | The `date` or `date_nanos` field that orders documents. Default `@timestamp`. | | `queryLanguage` | `kql` (default) or `lucene`. | | `fields` | Role overrides: `message`, `level`, `service`, `traceId` and `spanId`. | | `apiKeyEnv`, `apiKeyFile` | An API key from an environment variable or a file. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `index`: - Examples are `logs-*` and `logs-shop,logs-web-*`. - It must be narrower than `_all` and must not start with `-` or `_`. Details of `queryLanguage`: - It is the language of a query that carries no `kql:` or `lucene:` prefix. Details of `fields`: - Each value is a field name that must exist in the mapping, or the datasource is unhealthy. - See [Field roles](#field-roles). Details of `apiKeyEnv` and `apiKeyFile`: - The key is sent as `Authorization: ApiKey`. - It cannot be combined with `basicAuth` or a bearer token. Details of `headers`: - `Accept`, `Content-Type`, `Host` and `Content-Length` are managed by the server and refused. - `Authorization` is refused; use `basicAuth`, a bearer token or an API key. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth` or an API key. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Health The health check does these steps in order: - Reads the server's version and confirms that it is Elasticsearch 8.x or 9.x. - Confirms that the index pattern matches at least one index, alias or data stream. - Reads the field mapping. - Checks that the time field is a date and that every field named under `fields` exists. Each failure has its own message on the datasources page: | Failure | Message | | --- | --- | | The server is OpenSearch | The server is OpenSearch, configure it as type opensearch | | An unsupported version | The datasource version is not supported: Elasticsearch 8.x or 9.x, OpenSearch 2.x or 3.x | | An empty pattern | The index pattern matches no index | | A missing time field | The time field is missing or is not a date | | A missing role field | A configured field is missing from the mapping | ### Field roles The server reads the mapping of the index pattern through the field capabilities API, limited to indices with documents in the last 7 days, and keeps it for a minute. From it, five roles are resolved by the first field present in the mapping, unless `fields` names one: | Role | Candidates, in order | | --- | --- | | `message` | `message`, `body`, `body.text`, `log`, `msg`, `event.original` | | `level` | `log.level`, `severity.text`, `severity_text`, `level`, `severity`, `loglevel` | | `service` | `service.name`, `resource.service.name`, `resource.attributes.service.name`, `resource.attributes.service_name`, `service_name`, `app` | | `traceId` | `trace.id`, `traceId`, `trace_id`, `traceID` | | `spanId` | `span.id`, `spanId`, `span_id`, `spanID` | These cover ECS documents from Elastic Agent and Filebeat, the OpenTelemetry Collector's Elasticsearch exporter in both ECS and OTel modes, and OpenSearch's Simple Schema for Observability. ### Variables and discovery A query variable on an Elasticsearch datasource takes `label_values(field)` or `label_values(, field)`. The query can be in any of the three forms and narrows the values. The variable returns the field's values over the dashboard's time range, up to 10,000 of them, through a terms aggregation. A `text` field is read through its `.keyword` subfield, and a `text` field without one has no listable values. The agent and the field browser can list these: - The aggregatable fields, plus the `text` fields that have a `.keyword` subfield. - The values of one field over a time range. - Every mapped field with its kind: `keyword`, `text`, `number`, `date`, `date_nanos`, `boolean`, `ip`, `nested`, `flattened`, `object` or `other`. - The indices, aliases and data streams the pattern matches. - Up to 20 of the newest documents, with the resolved roles as columns. A field mapped differently across indices keeps the first type the server lists. Elasticsearch has no metric names, so the metric list is empty. The services list is the values of the `service` role field over a recent window. The logs page shows it for each source, and `observe datasources services` and the `list_services` tool print it. It is empty when no field plays that role. The trace id and span id roles are what `observe datasources trace-logs` and the `logs_for_trace` tool match to read the log lines of a trace. ### Queries A query takes one of three forms, chosen by its first characters: | Form | How it is chosen | What it is | | --- | --- | --- | | KQL | The default, or a `kql:` prefix. | The Kibana query language, compiled on the server to Query DSL. | | Lucene | A `lucene:` prefix, or `queryLanguage: lucene`. | The Lucene query string syntax, sent as a `query_string` query with `analyze_wildcard`. | | Query DSL | Text that starts with `{`. | A JSON search body. | Prefixes are case-insensitive, and an empty query matches every document. [What KQL leaves out](/docs/use/logs-and-traces/#query-languages-on-elasticsearch-and-opensearch) lists the KQL features the compiler does not take. A KQL query that finds nothing can come back with `meta.hint`, which says when a field it filters on holds the same value in other letters, as that section describes. The time range and any ad hoc filters wrap your query in a `bool` filter, in every form. Details of a Query DSL body: - Only `query`, `aggs`, `aggregations`, `size`, `sort`, `fields`, `_source` and `runtime_mappings` are accepted. Any other key is refused, so the body cannot widen the time range or the limits. - A script anywhere in the body is refused: `script`, `script_fields`, `script_score`, `scripted_metric` and the other script keys, including one inside `runtime_mappings`. - A field, a sort or an aggregation that is only named `script` is accepted. - So is the `script` of a `bucket_script` or `moving_fn` aggregation, which sees only the values of its buckets. What a query returns depends on its kind and form: - An instant query, such as the logs explorer's, returns log lines newest first as one frame. Its columns are `Time`, `TimeNs`, `Body`, `level`, `ID`, `Index`, `service`, `trace_id`, `span_id` and `Fields`. A role column is left out when no field plays that role, and `Fields` holds the remaining fields of the document as JSON. `TimeNs` is exact on a `date_nanos` time field, and on a `date` field it is the milliseconds the index stores, times one million. - A range query in KQL or Lucene counts documents over time: one series named `count`, with one point per step. On a dashboard whose `timezone` names a zone the buckets follow that zone, so a daily step starts at local midnight. - A Query DSL body with `aggs` runs with `size` forced to 0, and its result is folded into series or a table, whatever the kind. A body without `aggs` returns lines like an instant query, with `size` capped at the line limit. Lines are capped at 5,000 and at the query's row limit, whichever is lower, and `meta.truncated` says the cap was reached. `meta.rows_total` is the number of matching documents when Elasticsearch counted them exactly, which it does up to 10,000, and is left out beyond that. `meta.partial` says the cluster timed out or a shard failed. A range query is refused when its step would make more than 11,000 buckets or more points than the point limit. `$__from` and `$__to` expand to epoch milliseconds, `$__interval` to the step in seconds such as `300s`, and `$__range` as on Loki. Inside a quoted string, such as a Query DSL value, a variable is escaped for JSON, and a variable with several values needs a format such as `${var:pipe}`. Outside quotes, a variable with several values expands to a parenthesised list of quoted values joined with `OR`, which KQL and Lucene both read as an operator. ### Aggregations The server folds the result of `aggs` by walking it beside the request. It supports these aggregations: - Bucket aggregations: `date_histogram`, `auto_date_histogram`, `histogram`, `terms`, `multi_terms`, `filters`, `range`, `date_range` and `significant_terms`. A `histogram` is a time axis when its field is the time field, and otherwise numeric buckets in a table. - Metric aggregations: `avg`, `sum`, `min`, `max`, `value_count`, `cardinality`, `median_absolute_deviation`, `percentiles`, `stats`, `extended_stats`, `rate`, `bucket_script`, `derivative`, `cumulative_sum` and `moving_fn`. The shape of the result depends on the buckets: - When a time bucket aggregation appears anywhere in the nesting, the result is series. There is one series per metric and per combination of the other buckets' keys, labelled with the bucket field or the aggregation's name. A bucket with no metric under it gives a series named `count`, and percentiles add a `percentile` label. - With no time bucket, the result is one table. It has a column per bucket level, then `count`, then a column per metric, and a row per innermost bucket, capped at the row limit. These are refused: - More than one bucket aggregation at a level, and a time bucket inside another. - Any other aggregation, such as `top_hits` or `composite`, with `unsupported aggregation "x" (type y)`. - More series or points than the limits, with a limit error. ### Ad hoc filters Every ad hoc variable on an Elasticsearch datasource applies to its queries. Each operator becomes a clause: | Operator | Clause | | --- | --- | | `=` and `!=` | A `term`, or a `match_phrase` on a text field with no `.keyword` subfield. | | `=~` and `!~` | A case-insensitive `regexp`. | | `<` and `>` | A `range`. | A text field with a `.keyword` subfield is filtered through the subfield. Filters joined with OR become a `should` group. ### Lint The lint endpoint checks a query without running a search. KQL is compiled on the server and reports syntax errors and unknown fields (a warning). Lucene and the `query` part of a Query DSL body are checked with the cluster's validate API. A Query DSL body is also checked for JSON syntax and for keys that are not accepted. Each diagnostic carries the offsets of the text it concerns. ### Paging A query sent with `page_size` pages by offset. Any page can be asked for directly, the total is exact and no `next` cursor is returned. The last page that can be reached is set by the cluster's `index.max_result_window`, which the server reads with the mapping: 10,000 unless an index sets it lower. A page past the window is refused with "pages past 10,000 results are not available on this index; narrow the time range". The last reachable page already says it has no next page. A Query DSL body with `aggs` cannot be paged. # Connect Jaeger > Add a Jaeger server as a read-only datasource for traces panels, read by trace id or by a search of service, operation, tags and duration, with a first query and the rules for searches and discovery. Source: https://slashobserve.com/docs/connect/jaeger/ · Markdown: https://slashobserve.com/docs/connect/jaeger/index.md Connect a Jaeger server to open traces by id, search them by service, operation, tags and duration, and draw them as span trees in dashboards and on the Traces page. SlashObserve only reads from Jaeger: it never writes spans or settings to it. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. SlashObserve reads Jaeger 2.21 or later through its `/api/v3` query API, which the Jaeger v2 query service serves on port 16686 by default. An older Jaeger answers with a message that names the version needed. ## Connect a Jaeger server 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names: ```yaml datasources: - uid: jaeger type: jaeger name: Jaeger jaeger: url: http://jaeger:16686 ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck jaeger ``` The health check reads the list of services. 4. Run a first search: ```sh observe traces --query 'minDuration=0s' --datasource jaeger ``` You see a table of up to 100 traces, newest first, with each trace's start, service, span, duration, span count and error count. The `minDuration=0s` search filters nothing, because a query must have at least one byte. 5. Narrow it to one service: ```sh observe traces --query 'service=checkout error=true' --datasource jaeger --sort -duration ``` The same searches work on the [Traces page](/docs/use/logs-and-traces/). ## Connect a Jaeger behind a login Reference a secret by variable name or by file, never by value. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml - uid: jaeger type: jaeger name: Jaeger jaeger: url: https://jaeger.example.com basicAuth: username: reader passwordEnv: SLASHOBSERVE_JAEGER_PASSWORD ``` Basic auth and a bearer token cannot be combined. A path prefix in `url`, such as `/jaeger`, is kept. ## Search traces A query that is a trace id reads that trace, and any other query is a search of `key=value` pairs. [Queries](#queries) lists the keys, what a search returns and its limits. ## Find services and operations Jaeger has no query variables; use a custom or text box variable for trace ids or service names. [Variables and discovery](#variables-and-discovery) lists what the agent can read. ## Read service dependencies The datasource reads Jaeger's service dependency graph over a time range, as pairs of calling and called service with a call count. The graph comes from Jaeger's `/api/dependencies` endpoint, which the v3 API does not replace. No page shows it yet. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. A path prefix is kept. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `headers`: - `Accept`, `Host` and `Content-Length` are managed by the server and refused. - `Authorization` is refused; use `basicAuth` or a bearer token. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth`. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Queries A query that is a trace id, 32 or 16 hexadecimal characters, reads that trace and returns one row per span. The row has these fields, which the traces panel draws as a span tree: - `TraceId`, `SpanId`, `ParentSpanId`, `SpanName` and `ServiceName` - `StartTime` and `Duration` in nanoseconds - `StatusCode`, which is `Ok`, `Error` or `Unset`, and `StatusMessage` - `SpanAttributes` and `ResourceAttributes`, both JSON objects - `SpanKind`, `SpanEvents` and `SpanLinks` A trace with more spans than the datasource's row limit is cut at the limit and marked truncated. A trace Jaeger does not know returns no data. Any other query is a search: `key=value` pairs separated by spaces, over the dashboard's time range, such as `service=checkout operation="POST /pay" minDuration=500ms error=true`. An empty query lists the newest traces, but the query API and a panel need at least one byte, so write `minDuration=0s` to search with no filter. | Key | Meaning | | --- | --- | | `service` | The service name of a span. | | `operation` | The span name. | | `minDuration`, `maxDuration` | Bounds on a span's duration, as a Go duration such as `250ms` or `2s`. | | any other key | A span or resource tag compared for equality, such as `http.status_code=500` or `error=true`. | Quote a value that holds a space, as in `operation="GET /cart"`, and escape a quote inside it with a backslash. A key may appear once. Jaeger needs a service to search on an operation or a tag. So `operation` or any other key without `service` is refused with "tags need service=" before the search is sent. Jaeger's search has no regex, negation or comparison other than the two durations, so the search says what to filter on and the rest is read from the traces. A search returns one row per trace, newest first and at most the row limit. Each row has `TraceId`, `SpanName` and `ServiceName` of the root span, `StartTime`, `Duration` and the counts `Spans` and `Errors`. A search result names no spans, so its `SpanId` is the trace id and each trace shows as one bar. Details of search limits and paging: - Jaeger's search is bound by the start time of a trace, and the server asks for at most 10,000 traces. A page beyond that window is refused, and the message says to narrow the range or the search. - Jaeger has no offset, so a page asks again for the first traces up to the end of that page and keeps the last ones. - That is exact only where the storage returns the newest traces when it cuts a search at its depth. Elasticsearch, OpenSearch, Badger and the in-memory store do. - Cassandra and ClickHouse storage cut the search in no stated order. There the newest-first order, the row limit and the pages are approximate, and a page can repeat or skip a trace. Queries take dashboard variables and these macros: - `$__interval`, `$__range`, `$__from` and `$__to` - `$__dashboard` and the `$__user` macros A variable that holds a trace id works bare or in quotes. ### Variables and discovery Jaeger has no query variables. The agent can do these on Jaeger: - List the values of `service`, and of `operation` for one service when the metric is `service=checkout`. - Run `get_schema`, which lists every service with its span names, for at most 30 services and 50 span names each, and marks the list as cut when it is longer. Tags are free-form and cannot be listed. The services list reads Jaeger's list of services, which holds every service Jaeger retains, so the window of `list_services` and `observe datasources services` does not narrow it. The query editor's lint checks these: - Each pair has a key and a value. - A duration parses. - No key repeats. - An `operation` or tag comes with a `service`. ### Not covered - TraceQL, span metrics and any write to Jaeger are not available on a Jaeger datasource. - A datasource variable of type `datasource` cannot offer Jaeger datasources yet, so a panel names its Jaeger datasource by uid. - `trace_stats` and `compare_traces` read Tempo or ClickHouse only. # Connect Loki > Add a Loki server as a datasource for logs panels and log metrics, with its tenant and authentication, a first LogQL query, and the rules for queries and discovery. Source: https://slashobserve.com/docs/connect/loki/ · Markdown: https://slashobserve.com/docs/connect/loki/index.md Connect a Loki server to search logs on the Logs page, draw logs and log metrics in dashboards, and let the agent read them. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect a Loki server 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names: ```yaml datasources: - uid: loki type: loki name: Loki loki: url: http://loki:3100 ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck loki ``` The health check reads `/ready`. 4. Run a first query: ```sh observe logs '{service_name=~".+"}' --datasource loki --from now-15m ``` You see the newest lines of the last 15 minutes, oldest first, with their time, labels and message. The same query works on the [Logs page](/docs/use/logs-and-traces/). ## Connect a multi-tenant Loki behind a token Name the tenant and reference the token by variable name. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml - uid: loki type: loki name: Loki loki: url: https://loki.example.com tenantId: shop bearerTokenEnv: SLASHOBSERVE_LOKI_TOKEN ``` `tenantId` is sent as the `X-Scope-OrgID` header on every request. Leave it out for a Loki that runs with `auth_enabled: false`. For basic auth, give `basicAuth` with a `username` and one of `passwordEnv` or `passwordFile`. Basic auth and a bearer token cannot be combined. ## Write a log or metric query A query that starts with a stream selector, such as `{service_name="checkout"} |= "error"`, is a log query. Any other query, such as `sum by (service_name) (count_over_time({service_name=~".+"}[5m]))`, is a metric query. [Queries](#queries) lists what each one returns and which variables and macros it takes. ## Find labels, values and services A query variable on a Loki datasource takes `label_values(label)` or `label_values({selector}, label)`. From the CLI, `observe datasources labels`, `label-values` and `services` name what Loki holds. [Variables and discovery](#variables-and-discovery) lists what the agent can read. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. | | `tenantId` | Optional. Sent as the `X-Scope-OrgID` header. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `headers`: - `Accept`, `Host` and `Content-Length` are managed by the server and refused. - `X-Scope-OrgID` is set through `tenantId` and refused here. - `Authorization` is refused; use `basicAuth` or a bearer token. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth`. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Queries A log query returns one frame per stream, with the stream's labels and the fields `Time`, `Body` and `level`. The `level` field is present when the stream has a `level`, `lvl`, `severity_text`, `severity` or `detected_level` label. Lines come newest first, and one query returns at most the datasource's row limit or 5,000 lines, whichever is lower. Each line counts as one point against the points limit. Log patterns use Loki's pattern ingester (`pattern_ingester: enabled: true` in Loki's config) when it is enabled and the query is a bare stream selector. Otherwise the server samples the newest lines and computes the patterns itself. A metric query returns series with `Time` and `Value` fields, like a Prometheus query, and the series and points limits apply. Queries take dashboard variables, escaped for the place they appear in, as in PromQL. Inside a regex matcher several values become one alternation. The value All becomes `.+` inside the stream selector, because Loki refuses a selector whose every matcher can match an empty value. After the selector, in a label or line filter, All becomes `.*`, so lines without the label stay. A variable's own `allValue` replaces that text, so set it to `.+` there, never `.*`. Queries also take these macros, so `count_over_time({service_name="checkout"}[$__interval])` follows the panel's step: - `$__interval`, `$__interval_ms`, `$__range`, `$__range_s`, `$__range_ms`, `$__from` and `$__to` - `$__dashboard` and the `$__user` macros `$__rate_interval` is Prometheus only, because it depends on a scrape interval. ### Variables and discovery A query variable on a Loki datasource returns that label's values over the dashboard's time range. The agent can do these on Loki: - List label names and the values of one label, both optionally narrowed by a stream selector. - Sample up to 20 recent lines with their labels. - List the stream label keys of a scope with the number of streams that carry each. Loki has no metric names, so the metric list is empty. The services list takes the first of the labels `service_name`, `service`, `app` and `job` that has values over a recent window. The query editor's lint checks three things: - The query has a stream selector. - Brackets and quotes balance. - Every stage after `|` is a known parser, formatter or label filter. # Connect OpenSearch > Add an OpenSearch cluster as a datasource for logs, with its index pattern, time field, field roles and authentication, a first query, and the rules for queries, aggregations, filters and paging. Source: https://slashobserve.com/docs/connect/opensearch/ · Markdown: https://slashobserve.com/docs/connect/opensearch/index.md Connect an OpenSearch cluster to search its logs on the Logs page, chart document counts and aggregations in dashboards, and let the agent read them. SlashObserve supports OpenSearch 2.x and 3.x. For an Elasticsearch cluster use the [Elasticsearch](/docs/connect/elasticsearch/) type instead, and the health check says so when the two are mixed up. The two types share one adapter, so this page and the Elasticsearch page describe the same fields, roles and discovery. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect an OpenSearch cluster 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names. `index` is required and names the logs to search: ```yaml datasources: - uid: os type: opensearch name: OpenSearch opensearch: url: http://opensearch:9200 index: logs-* ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck os ``` The [health check](#health) tells a wrong type, an unsupported version, an empty index pattern and a missing field apart. 4. Run a first query: ```sh observe logs 'error' --datasource os --from now-1h ``` You see up to 100 log lines that contain "error", oldest first, with their time, level, service and message. The same query works on the [Logs page](/docs/use/logs-and-traces/). ## Connect a cluster behind a login Reference the password by variable name or by file, never by value. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml - uid: os type: opensearch name: OpenSearch opensearch: url: https://opensearch.example.com:9200 index: logs-* basicAuth: username: reader passwordEnv: SLASHOBSERVE_OS_PASSWORD ``` Basic auth, a bearer token and an API key cannot be combined. For an API key, give `apiKeyEnv` or `apiKeyFile`, and the key is sent as `Authorization: ApiKey`. Amazon OpenSearch Service domains that require AWS Signature Version 4 are not supported yet. Put a proxy that signs requests in front of the domain, or use a domain with basic auth through fine-grained access control. ## Search with KQL, Lucene or a Query DSL body A query takes one of three forms, chosen by its first characters. KQL is the default. A `lucene:` prefix chooses Lucene, and text that starts with `{` is a Query DSL body. [Queries](#queries) describes each form, what it returns and the variables and macros it takes. ## Chart aggregations A Query DSL body with `aggs` folds into series or a table, so a dashboard can chart counts, averages and percentiles. [Aggregations](#aggregations) lists what is supported. ## Pick the field that plays each role The server finds the message, level, service, trace id and span id fields by name. Set `fields` when your documents use other names. [Field roles](#field-roles) lists the names it tries. ## Find fields, values and services A query variable takes `label_values(field)` or `label_values(, field)`. [Variables and discovery](#variables-and-discovery) lists what the agent and the field browser can read. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. | | `index` | Required. One or more comma-separated index names, patterns, aliases or data streams. | | `timeField` | The `date` or `date_nanos` field that orders documents. Default `@timestamp`. | | `queryLanguage` | `kql` (default) or `lucene`. | | `fields` | Role overrides: `message`, `level`, `service`, `traceId` and `spanId`. | | `apiKeyEnv`, `apiKeyFile` | An API key from an environment variable or a file. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `index`: - Examples are `logs-*` and `logs-shop,logs-web-*`. - It must be narrower than `_all` and must not start with `-` or `_`. Details of `queryLanguage`: - It is the language of a query that carries no `kql:` or `lucene:` prefix. Details of `fields`: - Each value is a field name that must exist in the mapping, or the datasource is unhealthy. - See [Field roles](#field-roles). Details of `apiKeyEnv` and `apiKeyFile`: - The key is sent as `Authorization: ApiKey`. - It cannot be combined with `basicAuth` or a bearer token. Details of `headers`: - `Accept`, `Content-Type`, `Host` and `Content-Length` are managed by the server and refused. - `Authorization` is refused; use `basicAuth`, a bearer token or an API key. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth` or an API key. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Health The health check does these steps in order: - Reads the server's version and confirms that it is OpenSearch 2.x or 3.x. - Confirms that the index pattern matches at least one index, alias or data stream. - Reads the field mapping. - Checks that the time field is a date and that every field named under `fields` exists. Each failure has its own message on the datasources page: | Failure | Message | | --- | --- | | The server is Elasticsearch | The server is Elasticsearch, configure it as type elasticsearch | | An unsupported version | The datasource version is not supported: Elasticsearch 8.x or 9.x, OpenSearch 2.x or 3.x | | An empty pattern | The index pattern matches no index | | A missing time field | The time field is missing or is not a date | | A missing role field | A configured field is missing from the mapping | ### Field roles The server reads the mapping of the index pattern through the field capabilities API, limited to indices with documents in the last 7 days, and keeps it for a minute. From it, five roles are resolved by the first field present in the mapping, unless `fields` names one: | Role | Candidates, in order | | --- | --- | | `message` | `message`, `body`, `body.text`, `log`, `msg`, `event.original` | | `level` | `log.level`, `severity.text`, `severity_text`, `level`, `severity`, `loglevel` | | `service` | `service.name`, `resource.service.name`, `resource.attributes.service.name`, `resource.attributes.service_name`, `service_name`, `app` | | `traceId` | `trace.id`, `traceId`, `trace_id`, `traceID` | | `spanId` | `span.id`, `spanId`, `span_id`, `spanID` | These cover OpenSearch's Simple Schema for Observability (`body`, `severity.text`, `traceId`), ECS documents from Data Prepper and Fluent Bit, and the OpenTelemetry Collector's OpenSearch exporter. An OpenSearch `flat_object` field is reported with the kind `flattened`. ### Variables and discovery A query variable on an OpenSearch datasource takes `label_values(field)` or `label_values(, field)`. The query can be in any of the three forms and narrows the values. The variable returns the field's values over the dashboard's time range, up to 10,000 of them, through a terms aggregation. A `text` field is read through its `.keyword` subfield, and a `text` field without one has no listable values. The agent and the field browser can list these: - The aggregatable fields, plus the `text` fields that have a `.keyword` subfield. - The values of one field over a time range. - Every mapped field with its kind: `keyword`, `text`, `number`, `date`, `date_nanos`, `boolean`, `ip`, `nested`, `flattened`, `object` or `other`. - The indices, aliases and data streams the pattern matches. - Up to 20 of the newest documents, with the resolved roles as columns. A field mapped differently across indices keeps the first type the server lists. OpenSearch has no metric names, so the metric list is empty. The services list is the values of the `service` role field over a recent window. The logs page shows it for each source, and `observe datasources services` and the `list_services` tool print it. It is empty when no field plays that role. The trace id and span id roles are what `observe datasources trace-logs` and the `logs_for_trace` tool match to read the log lines of a trace. ### Queries A query takes one of three forms, chosen by its first characters: | Form | How it is chosen | What it is | | --- | --- | --- | | KQL | The default, or a `kql:` prefix. | The Kibana query language, compiled on the server to Query DSL. | | Lucene | A `lucene:` prefix, or `queryLanguage: lucene`. | The Lucene query string syntax, sent as a `query_string` query with `analyze_wildcard`. | | Query DSL | Text that starts with `{`. | A JSON search body. | Prefixes are case-insensitive, and an empty query matches every document. [What KQL leaves out](/docs/use/logs-and-traces/#query-languages-on-elasticsearch-and-opensearch) lists the KQL features the compiler does not take. A KQL query that finds nothing can come back with `meta.hint`, which says when a field it filters on holds the same value in other letters, as that section describes. The time range and any ad hoc filters wrap your query in a `bool` filter, in every form. Details of a Query DSL body: - Only `query`, `aggs`, `aggregations`, `size`, `sort`, `fields`, `_source` and `runtime_mappings` are accepted. Any other key is refused, so the body cannot widen the time range or the limits. - A script anywhere in the body is refused: `script`, `script_fields`, `script_score`, `scripted_metric` and the other script keys, including one inside `runtime_mappings`. - A field, a sort or an aggregation that is only named `script` is accepted. - So is the `script` of a `bucket_script` or `moving_fn` aggregation, which sees only the values of its buckets. What a query returns depends on its kind and form: - An instant query, such as the logs explorer's, returns log lines newest first as one frame. Its columns are `Time`, `TimeNs`, `Body`, `level`, `ID`, `Index`, `service`, `trace_id`, `span_id` and `Fields`. A role column is left out when no field plays that role, and `Fields` holds the remaining fields of the document as JSON. `TimeNs` is exact on a `date_nanos` time field, and on a `date` field it is the milliseconds the index stores, times one million. - A range query in KQL or Lucene counts documents over time: one series named `count`, with one point per step. On a dashboard whose `timezone` names a zone the buckets follow that zone, so a daily step starts at local midnight. - A Query DSL body with `aggs` runs with `size` forced to 0, and its result is folded into series or a table, whatever the kind. A body without `aggs` returns lines like an instant query, with `size` capped at the line limit. Lines are capped at 5,000 and at the query's row limit, whichever is lower, and `meta.truncated` says the cap was reached. `meta.rows_total` is the number of matching documents when OpenSearch counted them exactly, which it does up to 10,000, and is left out beyond that. `meta.partial` says the cluster timed out or a shard failed. A range query is refused when its step would make more than 11,000 buckets or more points than the point limit. `$__from` and `$__to` expand to epoch milliseconds, `$__interval` to the step in seconds such as `300s`, and `$__range` as on Loki. Inside a quoted string, such as a Query DSL value, a variable is escaped for JSON, and a variable with several values needs a format such as `${var:pipe}`. Outside quotes, a variable with several values expands to a parenthesised list of quoted values joined with `OR`, which KQL and Lucene both read as an operator. ### Aggregations The server folds the result of `aggs` by walking it beside the request. It supports these aggregations: - Bucket aggregations: `date_histogram`, `auto_date_histogram`, `histogram`, `terms`, `multi_terms`, `filters`, `range`, `date_range` and `significant_terms`. A `histogram` is a time axis when its field is the time field, and otherwise numeric buckets in a table. - Metric aggregations: `avg`, `sum`, `min`, `max`, `value_count`, `cardinality`, `median_absolute_deviation`, `percentiles`, `stats`, `extended_stats`, `rate`, `bucket_script`, `derivative`, `cumulative_sum` and `moving_fn`. The shape of the result depends on the buckets: - When a time bucket aggregation appears anywhere in the nesting, the result is series. There is one series per metric and per combination of the other buckets' keys, labelled with the bucket field or the aggregation's name. A bucket with no metric under it gives a series named `count`, and percentiles add a `percentile` label. - With no time bucket, the result is one table. It has a column per bucket level, then `count`, then a column per metric, and a row per innermost bucket, capped at the row limit. These are refused: - More than one bucket aggregation at a level, and a time bucket inside another. - Any other aggregation, such as `top_hits` or `composite`, with `unsupported aggregation "x" (type y)`. - More series or points than the limits, with a limit error. ### Ad hoc filters Every ad hoc variable on an OpenSearch datasource applies to its queries. Each operator becomes a clause: | Operator | Clause | | --- | --- | | `=` and `!=` | A `term`, or a `match_phrase` on a text field with no `.keyword` subfield. | | `=~` and `!~` | A case-insensitive `regexp`. | | `<` and `>` | A `range`. | A text field with a `.keyword` subfield is filtered through the subfield. Filters joined with OR become a `should` group. ### Lint The lint endpoint checks a query without running a search. KQL is compiled on the server and reports syntax errors and unknown fields (a warning). Lucene and the `query` part of a Query DSL body are checked with the cluster's validate API. A Query DSL body is also checked for JSON syntax and for keys that are not accepted. Each diagnostic carries the offsets of the text it concerns. ### Paging A query sent with `page_size` pages by offset. Any page can be asked for directly, the total is exact and no `next` cursor is returned. The last page that can be reached is set by the cluster's `index.max_result_window`, which the server reads with the mapping: 10,000 unless an index sets it lower. A page past the window is refused with "pages past 10,000 results are not available on this index; narrow the time range". The last reachable page already says it has no next page. A Query DSL body with `aggs` cannot be paged. # Connect Tempo > Add a Tempo server as a datasource for traces panels, read by trace id or by a TraceQL search, with its authentication, a first query and the rules for queries and discovery. Source: https://slashobserve.com/docs/connect/tempo/ · Markdown: https://slashobserve.com/docs/connect/tempo/index.md Connect a Tempo server to open traces by id, search them with TraceQL, and draw them as span trees in dashboards and on the Traces page. An Admin adds it to the datasources file, or in the app as [Add datasources in the app](/docs/connect/datasources-in-the-app/) describes. ## Connect a Tempo server 1. Add an entry to the [datasources file](/docs/reference/datasources-file/) that `SLASHOBSERVE_DATASOURCES_FILE` names: ```yaml datasources: - uid: tempo type: tempo name: Tempo tempo: url: http://tempo:3200 ``` 2. Restart the server. It reads the file once, at startup, and refuses to start when an entry is invalid. 3. Check the connection. The **Datasources** page shows the entry as "From file" with its health, and the CLI prints the same: ```sh observe datasources list observe datasources recheck tempo ``` The health check reads `/ready`. 4. Run a first search: ```sh observe traces --query '{ resource.service.name =~ ".+" }' --datasource tempo ``` You see a table of up to 100 traces, newest first, with the columns STARTED, SERVICE, SPAN, DURATION, SPANS and ERRORS. 5. The table has no id column. Get a trace id from the `TraceId` field of the same search with `--json`, or from the Traces page, then open that trace: ```sh observe traces 4bf92f3577b34da6a3ce929d0e0e4736 --datasource tempo ``` You see the trace as a span tree. The same queries work on the [Traces page](/docs/use/logs-and-traces/). ## Connect a Tempo behind a login Reference a secret by variable name or by file, never by value. The variable name must start with `SLASHOBSERVE_`, and it must not be one the server uses for its own configuration. It goes in the same env file as the server's other settings. ```yaml - uid: tempo type: tempo name: Tempo tempo: url: https://tempo.example.com basicAuth: username: reader passwordEnv: SLASHOBSERVE_TEMPO_PASSWORD ``` Basic auth and a bearer token cannot be combined. A multi-tenant Tempo takes its tenant as an `X-Scope-OrgID` header under `headers`. ## Find a trace by id or by TraceQL A query that is a trace id reads that trace, and any other query is a TraceQL search. [Queries](#queries) lists what each one returns, how long a search can run and which variables and macros it takes. ## Find tags and services Tempo has no query variables; use a custom or text box variable for trace ids or service names. [Variables and discovery](#variables-and-discovery) lists what the agent can read. ## Reference ### Fields Every entry also takes the [fields common to every datasource](/docs/reference/datasources-file/). | Field | Notes | | --- | --- | | `url` | Required. `http` or `https`, with a host, and no user info, query or fragment. | | `headers` | Plain request headers. Not for secrets. | | `headersFromEnv`, `headersFromFile` | Maps of header name to an environment variable name or a file path. | | `basicAuth` | `username` plus one of `passwordEnv` or `passwordFile`. The password is required. | | `bearerTokenEnv`, `bearerTokenFile` | A bearer token from an environment variable or a file. | Details of `headers`: - `Accept`, `Host` and `Content-Length` are managed by the server and refused. - `Authorization` is refused; use `basicAuth` or a bearer token. Details of `bearerTokenEnv` and `bearerTokenFile`: - They cannot be combined with `basicAuth`. The server does not follow redirects, so give the final address, and it refuses a response over 64 MiB. ### Queries A query that is a trace id, 32 or 16 hexadecimal characters, reads that trace and returns one row per span. The row has these fields, which the traces panel draws as a span tree: - `TraceId`, `SpanId`, `ParentSpanId`, `SpanName` and `ServiceName` - `StartTime` and `Duration` in nanoseconds - `StatusCode`, which is `Ok`, `Error` or `Unset` - `StatusMessage`, the text the span set with its status, such as "card declined", or empty - `SpanAttributes` and `ResourceAttributes`, both JSON objects A trace with more spans than the datasource's row limit is refused, and a trace Tempo does not know returns no data. Any other query is a TraceQL search, such as `{ resource.service.name = "checkout" && status = error }`, over the dashboard's time range. It returns one row per matching trace, newest first and at most the row limit. Each row has `TraceId`, `SpanName` and `ServiceName` of the root span, `StartTime` and `Duration`. A search result names no spans, so its `SpanId` is the trace id and each trace shows as one bar. Tempo refuses a search longer than its own maximum search duration, 168 hours by default. The server adds `with (most_recent=true)` to a search unless the query has its own `with` hints. On a long range it searches the newest hour first, then wider windows further back. It stops when the row limit is full or the query's time runs out, and in that case the traces found come back marked partial. [Logs and traces](/docs/use/logs-and-traces/#results) describes what the page shows. Queries take dashboard variables, escaped as in PromQL. A variable that holds a trace id goes in quotes, such as `"${trace_id}"`, because a bare trace id that starts with a digit is refused. Queries also take these macros: - `$__interval`, `$__interval_ms`, `$__range`, `$__range_s`, `$__range_ms`, `$__from` and `$__to` - `$__dashboard` and the `$__user` macros ### Variables and discovery Tempo has no query variables. The agent can do these on Tempo: - List tags, scoped as TraceQL writes them (`resource.service.name`, `span.http.method`, or an intrinsic such as `name` or `status`). - List the values of one tag, optionally narrowed by a TraceQL query. - Run `get_schema`, which lists every service with its span names and the attributes TraceQL can filter on. The services list reads the values of `resource.service.name` over a recent window. The query editor's lint accepts a trace id and checks that a TraceQL query has a spanset and that its brackets and quotes balance. # Local models > Run the agent on a model served on your own machine or network through an OpenAI-compatible server such as Ollama, and what to expect from a small model. Source: https://slashobserve.com/docs/connect/local-models/ · Markdown: https://slashobserve.com/docs/connect/local-models/index.md The built-in agent can use a model you serve yourself, so prompts and query results never leave your network. Use it when your data must stay on your side, or when you want to try the agent without a hosted account. Ollama, vLLM, llama.cpp's server and LM Studio all work if they implement the Chat Completions API with tool calling. The project does not vouch for any of them or for any model. ## Connect a local model 1. Start your model server and load a model that supports tool calling. With Ollama, for example, pull the model and keep Ollama running. 2. Set these variables on the SlashObserve server, with your model's name, and restart it: ```text SLASHOBSERVE_LLM_PROVIDER=openai SLASHOBSERVE_LLM_BASE_URL=http://localhost:11434/v1 SLASHOBSERVE_LLM_MODEL= ``` Use the name your model server lists. Leave `SLASHOBSERVE_LLM_API_KEY` unset when the server needs no key, as Ollama does. 3. Check that the server sees the model: ```sh observe doctor ``` The model check passes and shows the provider, the model and the effort. Without a model it fails with "no model is configured; prompts cannot run". 4. In the web app, open Home and use **Ask Observe Agent**, and name the metric, service or table you want so the model has less to find. The model calls come from the `observe-agent` process the server starts, so the server's host must be able to reach the model server's address. The [outbound allowlist](/docs/operate/outbound-access/) does not cover these calls, so the server needs a network path to the model server and nothing else. ## Run it with the demo From the demo stack, `localhost` is the server container itself, so point the base URL at the host's side of Docker: ```sh export SLASHOBSERVE_LLM_PROVIDER=openai export SLASHOBSERVE_LLM_BASE_URL=http://host.docker.internal:11434/v1 export SLASHOBSERVE_LLM_MODEL= make demo ``` `host.docker.internal` reaches the host on Docker Desktop. On a Linux Docker engine, use the host's address on the Docker bridge, such as `http://172.17.0.1:11434/v1`, and make the model server listen on it. Run `make demo` again after changing a variable. The demo forwards only `SLASHOBSERVE_LLM_PROVIDER`, `SLASHOBSERVE_LLM_MODEL`, `SLASHOBSERVE_LLM_API_KEY`, `SLASHOBSERVE_LLM_BASE_URL` and `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` from your shell. Any other LLM setting, such as `SLASHOBSERVE_LLM_EFFORT` or `SLASHOBSERVE_LLM_IDLE_TIMEOUT`, needs a line in the server's `environment` in `deploy/compose/compose.yaml`. ## Help a small or slow model Dashboard quality depends heavily on the model, and small models are much weaker at it than large hosted ones. Expect them to call tools with arguments that fail the checks, to stop before every planned panel is saved, or to answer in text instead of calling a tool. The server checks every save by running its queries, so a weak model produces fewer panels or a failed request, never a dashboard whose queries do not run. These changes help: - Give the model the largest context window the server allows, because the agent's instructions, tool definitions and tool results all go into it. With Ollama, set `OLLAMA_CONTEXT_LENGTH` before you start it. - Raise `SLASHOBSERVE_LLM_IDLE_TIMEOUT` for a model that takes longer than 180 seconds before its first token, or set it to `0` for no limit. - With both LLM timeouts and `SLASHOBSERVE_AGENT_RUN_TIMEOUT` at `0`, a model call that stalls runs until someone cancels the run, so keep at least one bound. - Set `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS=true` to see why a server refused a request; it adds the server's own error message to the log line of a failed call. - Name the metric, service or table in the prompt. ## Fix a run that fails with no_tool_call The agent works only through tools: it reads metrics, labels and rows with them and saves every panel with one. Its plain text is only the live text shown while it works, never a saved result. A model that answers in text instead of calling a tool saves nothing, and the request fails with `no_tool_call` or `no_progress`; [Read a turn](/docs/use/chat/#read-a-turn) lists the failure codes. To fix it: 1. Check that your model server lists the model as tool-capable. 2. Start the server with tool calling turned on, when it has such a switch. 3. Try a model that is better at tool calls. ## Cost of a local model A local model has no price in the built-in table, so the run cost shows as "Not priced". The server refuses to start when `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` is set and the model has no price. To price a local model, see [Price a model that is not in the table](/docs/connect/llm-providers/#price-a-model-that-is-not-in-the-table). ## Reference [Configuration](/docs/reference/configuration/#llm) lists every LLM setting, and [LLM providers](/docs/connect/llm-providers/) covers Anthropic and hosted OpenAI-compatible servers. ### Settings for a local server | Variable | Value for a local server | | --- | --- | | `SLASHOBSERVE_LLM_PROVIDER` | `openai`, the value for every OpenAI-compatible server, not only OpenAI's own. | | `SLASHOBSERVE_LLM_BASE_URL` | The server's API root. | | `SLASHOBSERVE_LLM_MODEL` | Required, because there is no safe default. | | `SLASHOBSERVE_LLM_API_KEY` | Unset for a server that needs no key. | | `SLASHOBSERVE_LLM_EFFORT` | Unset, unless the server accepts a reasoning effort. | | `SLASHOBSERVE_LLM_IDLE_TIMEOUT` | `180s` by default, `0` for none. | | `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` | `10m` by default, `0` for none. | | `SLASHOBSERVE_LLM_MAX_TOKENS` | `16000` by default. | | `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` | `false` by default. | Details of these settings: - The base URL is the part before `/chat/completions`, such as `http://localhost:11434/v1` for Ollama. It must be an absolute `http` or `https` URL, and it may have a path. It must not have a query, a fragment or user info, and the server refuses to start with one that does. - The provider name is not case sensitive. Leave the base URL unset to call OpenAI itself. - `SLASHOBSERVE_LLM_IDLE_TIMEOUT` retries a call that receives nothing from the server for that long. A call that fails with a rate limit, a timeout, a server error or a dropped connection is tried up to 4 times with backoff. - `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` bounds each call with its retries. - `SLASHOBSERVE_LLM_MAX_TOKENS` is the output cap of a call, `1024` to `64000`. After the first call of a run, calls are capped at half of it, but not below `8192`. A call that stops at that lower cap runs again with the full cap. ### How the agent calls the server - It calls the Chat Completions endpoint with streaming on and asks the server to include usage in the stream. - It sends the output cap as `max_completion_tokens`, not `max_tokens`. - It sends the tool definitions with every call and reads tool calls from the stream. - The model server needs to be reachable from the host that runs `observe-agent`; the server gives that process the model settings, including the key, when it claims a run. ### Effort `SLASHOBSERVE_LLM_EFFORT` is sent as the reasoning effort only when it is set. It must be one of `none`, `minimal`, `low`, `medium`, `high` or `xhigh`, in any case, or the server refuses to start. Unset, nothing is sent and the server uses its own default, which is what most local servers expect. The first call of a run that has saved nothing yet runs one step higher: `low` becomes `medium`, and `medium` becomes `high`. A server that does not accept the parameter answers every call with a provider error, so unset the variable if that happens. # Chat and follow-ups > Ask the agent for a dashboard or an answer in plain words, watch the build, read each turn, follow up, share answers, and find, rename, pin and delete your chats. Source: https://slashobserve.com/docs/use/chat/ · Markdown: https://slashobserve.com/docs/use/chat/index.md The chat on Home's **Ask Observe Agent** tab, and on the Ask page at `/ask`, turns a sentence into a saved dashboard or a written answer. The server runs the agent against your configured datasources and checks every query it writes. A request for a dashboard saves a new dashboard, and a question gets an answer in the chat. The chat needs a model; see [LLM providers](/docs/connect/llm-providers/). For a first run, follow [Your first dashboard](/docs/get-started/first-dashboard/). The same chat works from the CLI (`observe ""`), over MCP (`start_run`) and over HTTP (`POST /api/v1/observe`); [Use the chat from the CLI, MCP or HTTP](#use-the-chat-from-the-cli-mcp-or-http) shows each. ## Ask for a dashboard 1. On Home, open **Ask Observe Agent**, or open `/ask`. 2. Click the box that reads "Ask a question or describe a dashboard, like: checkout health by pod, last 6h" and press Enter. For example: `checkout p99 latency, last 6h`. Shift+Enter adds a line. 3. The chat opens at `/c/`. The status line reads "Working on your request", and the steps list what the agent is doing, such as "Listed 14 metrics on prom". 4. When the agent saves the first panel of a new dashboard, the page moves to the build page at `/b/`. Each accepted panel appears as soon as it is saved, and the status line reads "Building, 12 of 40 panels". 5. When the build ends, the chat shows a result card with the title, "N panels from ``" and "Saved as version 1". Choose **Open dashboard** to go to it. The dashboard goes to your My Dashboards, where only you see it until you publish it from its Share pane; see [Folders](/docs/teams/folders/). Name a folder in the request and the agent builds the dashboard there when you can create dashboards in that folder. If you cannot, or no folder has that name, the agent builds it in My Dashboards and the version summary says so. Move it from the dashboards list; see [Roles](/docs/teams/roles/). A dashboard has 2 to 8 panels unless you ask for another number. The agent adds variables only when the request asks for a breakdown people will filter on. It uses the time range you state ("last 6h" becomes `now-6h` to `now`), and otherwise the last hour. If the run stops early, the chat ends with "The dashboard could not be built" and a **Try again** button; [Read a turn](#read-a-turn) lists the causes. To bring a dashboard over without a model, use the **Import a dashboard** tab on Home, or the **Import from Grafana** link on the Ask page. Both open [Import Grafana dashboards](/docs/use/import-grafana/). With no model connected, the link sits under the "No model is connected to this server." note, and Home's **Ask Observe Agent** tab does not show it. ## Ask a question about your data A message that is not a request for a dashboard gets an answer instead. The agent reads the data and saves a short written answer in the chat. These get an answer: - a question about your data, such as "what logs are available?"; - a request to explain a dashboard or a panel, and a why question; - something outside the server's data; - the meaning of an observability term, such as "what does p99 mean", which gets a definition of two or three lines tied to your data. A request the server cannot do, such as an alert, a notification or a schedule, gets an answer that says so and what to ask for instead. It builds nothing. An answer stays in the chat, and no [observation](/docs/use/observations/) is created, until you choose **Create observation** on it. An `/investigate` request always opens an observation, and in a chat about an observation it writes into that observation. When there is none to write into, because no folder can take a new one or the one it names is full, the run's first step reads "No observation to write into; the answer stays on this run", and the answer stays in the chat like any other. An answer, the observation saved from it and a dashboard saved from it take a short title the agent writes, three to eight words. An answer without one is titled `Answer`, or `Finding` for an investigation, and never takes words from your message. A chat takes its title from the start of your message instead: its first line, cut at a word to 60 characters. For why a dashboard or a window looks wrong, use [Investigate](/docs/use/investigate/). ### What an answer offers An answer's actions sit in one row, each where it applies: - the evidence chip, which unfolds the panels behind the answer; - **Revise the dashboard**, on an answer about a dashboard; - **Create observation**, and once the answer is in an observation, **Pin to dashboard** and **Make a dashboard**, which shows only when the answer has evidence panels; - **Ask again**, and the **Answer actions** menu with **Copy answer**. **Copy answer** puts the answer's Markdown on the clipboard, and **Copy message** next to your own message copies the whole message, also when it is folded. **Ask again** under the latest answer of your own chat sends the same question once more, in the same chat or on the same dashboard. It is off while a run goes on. While a run works you see its live text, but the answer is written in one piece when the agent saves it, so there is nothing to copy until then. **Create observation** files the answer in the folder of the dashboard the chat was about, or in your My Dashboards, and the chat then links to the observation. Saving twice files it once. The answer keeps its card afterwards: the chip still unfolds the evidence, and the link under it reads **Open the observation**, or sits in the row when there is no evidence. An investigation's answer shows as the observation's finding instead, with its evidence open. ## Change a dashboard from an answer A message in a dashboard's chat is a question about that dashboard. It gets an answer in the chat and leaves the dashboard as it is, even when it asks for a change. The dashboard changes only when you choose **Revise the dashboard** on an answer. 1. Ask about the dashboard, for example in its **Chat** tab: "Add a latency row". 2. When a change fits, the answer offers it with **Revise the dashboard**. 3. Choose **Revise the dashboard**. The chat starts its next turn as a revision that applies that answer, so the server takes the answer's suggested change as its prompt. 4. The revision saves the result as the next version of the dashboard. The turn reads "Saved as version N". Once the change is asked for, or was already applied from that answer, the button reads **Revision asked for**, in the chat and in any thread the answer is in. It stays off until you reload the page. Asking again while that run is waiting or running, or after it succeeded, starts nothing more. While no model is connected, the button is off with "No model is connected to this server, so the agent cannot make this change." On a [starter dashboard](/docs/use/activity/#audit-folder) the answer keeps its suggested change without the button and offers **Duplicate**. On an answer about a dashboard, the evidence chip and **Revise the dashboard** work as in a [comment thread](/docs/use/review/#ask-the-agent-from-a-comment). You need Comment on the dashboard's folder, which Commenters, Editors and Admins have by default. With Comment but not Edit, a revise ends as a [proposal](/docs/concepts/proposals/) that someone with Edit merges. It does not need to have been your dashboard. See [Roles](/docs/teams/roles/). A revise works on the latest version of that dashboard. It keeps panel ids, positions and everything else you did not ask to change. It does not delete panels marked unverified unless you ask. It saves only after the same checks as a new dashboard. If someone saves a version while it works, it restarts once from the newest one. ### Change an existing dashboard from Home A request on Home builds a new dashboard and cannot change one that exists. When the agent finds exactly one dashboard you meant, its answer is followed by **Ask this on ``** and **Open dashboard**. **Ask this on `<title>`** asks the same prompt about that dashboard and opens it as a new chat. The agent answers there without changing the dashboard, and the change is made only when you choose **Revise the dashboard**, which shows when you can comment on the dashboard. Without Comment on that dashboard you get only **Open dashboard**, with the line "This request is about the dashboard `<title>`, where you cannot ask the agent." With Comment the line reads "This request is about the dashboard `<title>`. Ask there and the agent answers about it; a change it suggests is made only when you choose Revise the dashboard." When the agent finds none or several, the answer lists the candidates, and you open the one you mean and ask in its activity pane. ## Share an answer The **Answer actions** menu of your own answer has these choices: - **Show to everyone**, when the menu offers it, opens a thread on the dashboard with your question and the answer. - **Share to thread** adds both to an open thread you pick. - **Copy answer** copies the answer as Markdown. Only you see the two share choices; anyone else who reads the chat gets **Copy answer** alone. Once you share the answer, the menu has **Shared in the thread**, which opens that thread on the dashboard, and **Withdraw**. **Withdraw** makes the answer private again: it removes your question and the answer from the thread. It deletes the thread only when sharing opened it, so a thread you shared into keeps its other messages. Withdraw works only while every message in the thread is yours or the agent's reply to you. Once someone else wrote in it, the answer stays shared. After a withdraw you can share the answer again, which opens a new thread. Sharing an answer that is already shared, from another tab for example, adds nothing and says "This answer is already shared in its thread". In a chat about an observation the same menu shares into that observation's threads. **Show to everyone** also writes the answer onto the page, **Shared in the thread** opens the observation, and a withdraw takes the answer out of the observation again, so it is no longer read or listed through it. The blocks the share already wrote stay on the page until the observation's editors remove them like any other block. Once the answer is in an observation, the web app no longer offers to share it to a thread from the chat, because the observation is where the team reads it. An answer you shared before saving it keeps **Shared in the thread** and **Withdraw**. The exception is an answer to a question about an observation that you saved into another one: its menu still offers **Show to everyone** and **Share to thread** into the discussion of the observation it was about, and **Withdraw** after it. A saved answer to a question about a dashboard or an observation is read by the readers of the observation it was saved in, not by the readers of the dashboard or observation it was about. Sharing it afterwards writes its text onto the page of the observation it was about and posts it in that discussion. The answer stays in the observation it was saved in, also after a withdraw. Retrying it asks the same private question again in the same chat. ## Ask a follow-up Once the first dashboard exists, the box under the conversation reads "Ask about `<title>`", with the note "The dashboard changes only when you choose Revise the dashboard on an answer." A follow-up there, and **Ask again**, are questions about the dashboard: they get an answer and save no version. In a chat about an observation, a follow-up and **Ask again** ask about that observation the same way. Before that, when the agent answered a question instead of building, the box reads "Ask a follow-up, or describe a dashboard to build". The follow-up continues the same chat, below the earlier turns. In a chat with no dashboard, while the latest turn still runs, the box is disabled and the note under it reads "Wait for the answer, or cancel the run, then ask a follow-up." An empty follow-up says "Describe the change you want first." on a dashboard and "Ask a question or describe a dashboard first." without one. What a follow-up is about comes from the chat, so while the chat cannot be read the page shows "Could not load this request" with **Retry** and no box. A follow-up starts a fresh run that sees the datasources, your new message and the earlier turns of the conversation as context. Say what you want in the message itself all the same, for example "only 5xx" or "and yesterday?". The context helps with "and the same for latency", but it does not replace the dashboard definition. [Follow-ups](#follow-ups) has the exact context rules and the API fields. On a dashboard you can also ask from the side panel. [In the dashboard's Chat tab](#in-the-dashboards-chat-tab) and [From the dashboard's activity pane](#from-the-dashboards-activity-pane) describe the two places. [Ask mode](/docs/use/ask-and-comment/#ask-mode) asks about one spot of a panel as a turn of the chat open in the Chat tab, or of a new chat when none is open. Its answer and follow-ups show both in the box at that spot and in the Chat tab, and each follow-up there carries the same spot. ## Watch the build A large dashboard is not written in one model call. The agent builds it panel by panel. Every message opens its chat page at `/c/<request id>` first, because the agent decides only while it works whether the message is a question or a dashboard. The moment it saves the first panel of a new dashboard, the page moves to the build page at `/b/<request id>`. A question never shows the build page. Until the first panel is saved, the status line reads "Working on your request" and the steps list what the agent is doing. Opening `/b/<request id>` of a request that has not saved a panel yet, from a bookmark or a reload, takes you to its chat page instead of an empty canvas. While the agent keeps the message box disabled, the note under it says to wait for the answer or cancel the run. While the agent works, the Working row shows what it is writing: one short sentence before a group of tool calls, saying what it is about to do and why. The running entry in a dashboard's activity pane shows the same text. That text is live only: the server keeps the last 2,000 characters in memory while the run works and drops them when the run ends, so only the saved dashboard or finding stays. Between two messages of the agent's live text there is a blank line. Outside the browser, `observe status` prints it as a `Live text` section and `get_run` over MCP returns it as `live_text`; see [CLI](/docs/use/cli/#follow-ups-and-waiting) and [MCP](/docs/use/mcp/). Only you, and read only an Admin, can watch your build. Nothing appears in the dashboards list, a folder or the version history until the agent finishes. Anyone else, and anyone who can no longer view the dashboard you are revising, gets "Only the person who asked can watch this build." [Who reads a chat](#who-reads-a-chat) lists the other messages a reader can see in its place. The build page shows the chat beside the build. On a screen wider than 1200 px the chat is a pane on the left, which you can widen or narrow by dragging its edge or with the arrow keys on the handle. On a smaller screen the chat sits below the build. The pane holds the conversation with the status line, **Cancel run**, and, when the agent stops, **Save what was built** and **Continue**. Its **Open the chat page** link opens the full chat page at `/c/<request id>`. The dashboard is saved once, as one version. The build page then opens it with the chat in the Chat tab of its side panel. On the chat page, a card above the steps shows the same status line with thumbnails of the most recent rows and panels built so far, and an **Open build** link. When the agent stops, the card keeps the thumbnails and offers **Save what was built** and **Continue**. In the pane beside a build, the card leaves out the link and the thumbnails, because the build is already on screen. On the dashboard page, the running entry shows the same status line and, for you, an **Open chat** link that opens the request's chat in the Chat tab of the side panel. Every turn of the conversation keeps its card and buttons for as long as the build is kept, not only the latest ones. ### Queue position While a request waits for the agent, its status line reads "Queued, position 3". The position counts the requests ahead of it in the order the agent picks them up. It can change if a request is skipped, because a dashboard runs one revision at a time and a request whose dashboard is busy waits for it. The line is the same everywhere a queued request is shown: in the conversation, in the chat pane of its build page and in the dashboard's running entry. ### Cancel a run While a request is queued or running, **Cancel run** stops it. Only the person who asked sees it; an Editor or Admin cannot cancel someone else's request. From the CLI, `observe cancel <request-id>` does the same, and over MCP it is `cancel_run`. A queued request stops at once. A running one shows "Canceling" and stops within a few seconds, once the call the agent is making returns. If its worker is gone, the request ends canceled at once instead. The request ends as failed with the code `canceled` and keeps what was built, so you can save or continue it. If the agent had already saved the finished dashboard, the request counts as succeeded and the cancel changes nothing. The chat shows a canceled run as a calm "You stopped this run" with what to do next, not as a failure. The chat lists, History included, say "Stopped" with "Canceled before anything was built" or how far it got, instead of a red error. Other people's follow-ups on the same dashboard wait behind a run until it ends. A run that goes nowhere holds them back until its owner cancels it or one of its limits stops it. ### Save what was built If the agent stops before it finishes, the build page keeps what was built for 7 days. Choose **Save what was built** to keep it: - for a new dashboard it becomes version 1 in the folder the request named, or in your My Dashboards; - for a follow-up it becomes the next version of the dashboard when nobody has saved a version since the build started. When someone has, the build cannot be saved and the page says so; open the dashboard and ask again. You need Edit access to the target, and the request stays marked as failed. Once the build is saved, the build page opens the dashboard. The chat keeps the result card with "5 of 8 panels, saved before the run finished" when the plan is known. The status line says "Saved part of the dashboard" instead of "Stopped". **Add the missing panels** asks the agent for the rest as a follow-up on that dashboard. The button shows only on the newest turn of the chat, so once you have asked for the rest, or anything else, the earlier card no longer offers it. ### Continue a stopped build **Continue** on a stopped build starts a new run that picks up from the panels already built. 1. Choose **Continue**. A form opens with an optional note for the agent, such as "skip the network rows" or "use the prod datasource". 2. Write the note, or leave it blank to send none. 3. Choose **Continue build**. The new turn appears below the old one, marked "Continues an earlier run" with your note under it, and the stopped turn says "Continued in a new run". The agent sees the note in every start of that run, including a restart after a server shutdown. A new dashboard continues on its own page, and a follow-up continues in the same conversation. From the CLI, `observe continue <request-id>` does the same. The note follows the prompt rule: 1 to 4000 characters, with no control or bidirectional-text characters. The form shows "Use at most 4000 characters." when it is too long. Only the person who asked can continue a build, and it needs the same access as starting a run. A build can be continued once, and not after you saved it. **Save what was built** and **Continue** exclude each other: whichever you choose first wins, and the other says it can no longer be done. A follow-up whose dashboard got a newer version since the build started cannot be continued. The page says "Someone saved a newer version after this build started, so it can't be continued. Open the dashboard and ask again." A continued run counts toward the same limits as a new request. When the agent lowers the number of panels it planned after you continue, the finished turn says so, for example "Planned 6 panels, built 3." ## Read a turn While a run works, its turn lists the steps as a timeline, one line per phase in a row. The phases are Discovering, Checking queries, Running queries, Saving and Repairing. Each line names the tools the phase used, with a count when a tool ran more than once, such as "list_metrics 3, get_schema 1". A phase with more than one step has a **Show N steps** button that lists each step's message. Saving always lists its messages, because they name the panels, such as "Saved panel 3 of 8: p95 latency". A phase that needed a fix is marked with a warning icon. Under the timeline, "Running for 1m 12s" counts the time since the run started. When the run ends, the timeline collapses into a line such as "Ran 14 steps in 1m 12s for about $0.12, repaired 1 query". Open it to see every step again. The cost is the server's estimate from its price table, and it shows only when the model is priced. Only the server's step messages and errors are shown, and the answer the agent saved, which an investigation also writes into its observation. Every request has an id, shown as "Request" and its first eight characters at the bottom of the conversation. Quote it when you report a problem. The page keeps polling the server, also while its browser tab is in the background, so a finished run leaves "Running" without a reload. It shows "Reconnecting..." after two failed polls, and "Progress stopped updating." with a **Retry** button when polling stalls. The run itself goes on server-side either way. ### When a run fails A failed request shows "The dashboard could not be built" (or "The dashboard could not be updated" for a follow-up). Below it you see what the failure means, the reason the server stored, and what to do next. The advice to save or continue a build shows only while a build is left to save or continue. Otherwise the last column reads "Try again." or "Try again with a narrower prompt.", and for `budget_exhausted` "Ask an admin about the limit, or try again." A run you stopped shows "You stopped this run" instead. | Code | What it means | What to do | | --- | --- | --- | | `run_timeout` | The run reached the server's time limit. | Try again with a narrower prompt, or continue the build. | | `call_timeout` | A model call took too long to answer. | Try again. | | `rate_limited` | The model provider is limiting requests from this server. | Wait a minute, then try again. | | `provider_error` | The model provider answered with an error. | Try again, and ask an admin to check the provider if it keeps failing. | | `output_limit` | The model's answer was cut off at its output limit. | Try again and ask for fewer panels. | | `no_tool_call`, `no_progress` | The agent stopped making progress. | Try again and name the metric, service or table you want. | | `validation_exhausted`, `check_failed` | The agent could not get its queries past the checks. | Try again and name the metric, service or table you want, or ask for those panels one at a time. | | `refused` | The model declined the request. | Rephrase the prompt. | | `conflict` | Someone saved a newer version while the agent worked. | Open the dashboard and ask again. | | `canceled` | The run was canceled. | Save what was built, continue it, or try again. | | `requester_forbidden`, `requester_gone` | You no longer have access to this dashboard. | Ask an admin for Edit access. | | `crashed`, `lease_expired` | The server stopped while it ran this request. | Try again. | | `no_finding` | The agent ended without writing a finding. | Ask a narrower question, with the service and the time range. | | `budget_exhausted` | The run reached the server's cost limit. | Save what was built or continue it, or ask an admin about the limit. | | `agent_unavailable` | No outside agent took this run within 10 minutes. | Check that the agent is connected and asking for work, then try again. | | `agent_failed` | The outside agent said it could not finish the run. | Read its message, then try again. | For `validation_exhausted` and `check_failed`, the reason names the panels that kept failing. A code not in the table shows the server's reason alone. The states a run moves through, and what each allows, are in [States](/docs/reference/states/). ### Try a failed run again **Try again** starts a new request with the same prompt. When the request already has a dashboard, an **Open dashboard** button is shown next to it. The button shows only while the run's `allowed_actions` include `retry`, because the server decides whether this run may be tried again (`POST /observe/{id}/retry`). The new run is yours, whoever started the one you retry. You can try your own failed or stopped run again once. The old turn then reads "Tried again in a new run" with a link to the new one, its `retried_by`. A second retry is refused with 409 `invalid_transition`, and a **Continue** of the old build with 409 `not_continuable`, instead of starting a duplicate. Someone else who retries your run starts a request of their own, which leaves your turn and your retry as they were. When the person who asked retries, the new request stays in the same chat, so the chat lists keep one row for it. Anyone who can see a finished request and may start that kind of request can run it again, over the API with `POST /observe/{id}/retry` or with `observe retry`. The exception is a request they read `redacted`: its words stay the requester's, so it offers them no retry and the call answers 409 `invalid_transition`. A retry points at the same panel, spot or block as the request it retries. Someone else's retry of a private ask, and a retry of a thread question by someone who cannot comment in that thread, points at nothing. A retried investigation writes into the same observation when the person retrying may comment on it, and otherwise into a new one; see [Observations](/docs/use/observations/#investigations-write-into-an-observation). A run that a server shutdown interrupts goes back to the queue and starts again, and one that a crash interrupts gets one more attempt. ## Find, rename, pin and delete your chats Home's **Recent chats** lists the five chats you asked in most recently, and **All chats** opens the Chats page at `/chats`. The Ask page's Recent chats shows the same rows. A chat is one row however many turns it has: its title, how many turns it has, and the dashboard it is about, if any, with the time of its last message. On the Chats page: 1. Open `/chats`. A table lists all your chats with the columns Chat, Dashboard, Turns and Last message. The chats you pinned come first, then the rest, each part with the chat asked in most recently first. 2. Search to find chats whose title or any of whose prompts contains the text, ignoring case. **Dashboard** keeps the chats about one dashboard. 3. Open a row's menu to **Rename**, **Pin** or **Delete** the chat. The menu shows when you point at the row or focus it, and always on a touch device. Older chats load as you scroll, and the order holds as they load. The list ends with how many chats it shows; while older chats are still to load it says "so far". A chat about no dashboard, or about one that was deleted, reads "No dashboard". One about a dashboard you cannot see reads "A dashboard you cannot see". That includes one in another person's My Dashboards in the Everyone list. Admins also get **Mine** and **Everyone**. Everyone lists every person's chats with who started each one, by their last message only. It opens someone else's chat read only, with no composer and no actions, and its rows have no menu. The actions apply to the whole chat: - **Rename** changes the chat's title. It turns the row into a title box, on the Chats page and in the History list: Enter saves, Escape cancels, and an empty title goes back to the short title taken from the prompt. A title is at most 120 characters. - **Pin** keeps the chat ahead of the rest, and **Unpin** puts it back. - **Delete** archives the chat with every turn in it, and keeps the rows, marked archived. The dialog asks "Delete this chat?" and says how many messages go. After **Delete chat**, the chat leaves your chat lists for good. The chat page still opens from its link. The Delete dialog says what stays, depending on what the chat left: - "The dashboard it made stays." - "The answer stays in the observation "`<title>`", which is not deleted." - "The answer stays on the chat page, which still opens from its link." for an answer not saved as an observation. - "The panel suggestion stays." or "The proposal stays." - "Nothing else is removed." A conversation of several messages says how many messages go and names what they saved, such as `What they saved stays: the dashboard "Checkout health" and the observation "Slowest routes".`. It says "Nothing else is removed." when they saved nothing. The Delete dialog also shows an unchecked **Also delete the observation "`<title>`"** for each observation the chat saved that you may delete. That needs Manage on its folder, or Edit if you started the observation. Checked, the dialog says the observation is deleted for everyone, with its blocks, discussion and published RCA revisions, and **Delete chat and observation** deletes it first and then deletes the chat. The two differ: the chat only leaves your lists and still opens from its link, while the observation is gone for good and cannot be undone. If the observation cannot be deleted, the chat is kept and the dialog says why. Only the person who started a chat can rename, pin or delete it, or ask in it. An Admin who can read the chat gets 403 with the code `chat_read_only` from those actions and from a request naming its `chat_id`. Anyone who cannot read it gets 404. The **History** button beside a chat lists older chats and Grafana imports. Its search box finds chats whose title, prompt or answer contains the text, ignoring case. Chats you pinned come first under "Pinned", most recently pinned first. The rest are grouped by the dashboard they are about, with "No dashboard" for chats that never got one and "A dashboard you cannot see" for one you lost access to. History says for each chat its state (Running, Stopped or Done) and then what it left behind: - "Saved `<dashboard>`" or "Revised `<dashboard>`"; - "Saved part of `<dashboard>`" for a build that stopped and was saved in part; - "Answered, no dashboard" when you asked for a dashboard and the agent only answered; - "Answered, dashboard unchanged" for a question about a dashboard; - "Suggested a panel" or "Opened a proposal" for a run that ended on a suggested panel or a proposal; - "Answered in `<title>`", with the observation it was saved to, for an investigation, as long as you can open that observation's folder; - "Saved an observation" for the same case when you cannot see its title; - "Answered, no observation" for an investigation whose answer stayed in the chat; - "Nothing saved". ## Use the chat from the CLI, MCP or HTTP Send a prompt from a terminal with `observe`: ```sh observe "checkout p99 latency, last 6h" ``` It prints a line for each panel the build adds, as `Panel 3 of 8: Checkout p99 (timeseries)`, and ends with `Saved version 1 https://observe.example.com/d/<dashboard id>/<slug>`. When the output is not a terminal, `Saved version 1` goes to the error stream and only the address to the output. With `--quiet`, only the address is printed. [CLI](/docs/use/cli/#send-a-prompt) has the flags, such as `--dashboard`, `--revise`, `--chat` and `--new-chat`. Over MCP, `start_run` asks the agent and returns the run at once, and `get_run` follows it. Over HTTP, `POST /api/v1/observe` answers 202 with the request, and `GET /api/v1/observe/{id}` shows its state: ```sh curl -fsS -X POST "$OBSERVE_SERVER/api/v1/observe" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"prompt": "checkout p99 latency, last 6h"}' ``` The CLI and MCP also manage chats and requests: | Task | Web app | CLI | MCP | | --- | --- | --- | --- | | List chats | Chats page | `observe chats list` | `list_chats` | | Read a chat | Chat page | `observe chats show <chat-id>` | `get_chat` | | Pin or unpin | Chat menu | `observe chats pin`, `observe chats unpin` | `pin_run`, `unpin_run` | | Rename | Chat menu | `observe requests rename` | `rename_run` | | Delete (archive) | Chat menu | `observe chats archive`, `observe requests archive` | `archive_run` | | Create observation | **Create observation** | `observe save-answer <request-id>` | `save_run_answer` | | Cancel | **Cancel run** | `observe cancel` | `cancel_run` | | Retry | **Try again** | `observe retry` | `retry_run` | The MCP tools and `observe requests rename` act on one request. Pass the id of the chat's first request to act on the whole chat. `observe chats pin`, `unpin` and `archive` take the chat id. To list single requests rather than chats, use `observe requests list` or the MCP tool `list_runs`. See [CLI](/docs/use/cli/#your-requests) and [MCP](/docs/use/mcp/). ## Reference ### Start a chat in detail Type into the box and press Enter. Its visible hint is "Ask a question or describe a dashboard, like: checkout health by pod, last 6h", and its accessible name is "Message the agent". Shift+Enter adds a line, and on a touch device Enter adds a line and the arrow button sends. Inside the box a line says so ("Enter sends. Shift+Enter adds a new line. Up arrow recalls an earlier prompt. Type a slash for commands."); on a touch device it is not shown. Pressing `/` outside a text field moves the cursor to the box. #### Prompt rules - A prompt is 1 to 4000 characters, at least one of them visible, and cannot contain control or bidirectional-text characters; see [Text rules](/docs/reference/text-rules/). - The box shows "Ask a question or describe a dashboard first." when it is empty and "Use at most 4000 characters." when it is too long. - From 3600 characters a counter such as "3650 of 4000" appears in the box's footer, and turns red with "too long" past 4000. - A long message of yours, over 600 characters or 6 lines, is shown cut to 6 lines in the conversation with a **Show the whole message** button. - The up arrow, with the cursor at the start of the box, recalls your earlier prompts, newest first, and the down arrow steps back toward what you were typing. The last 20 prompts are kept in this browser only, never on the server. #### Links that fill the box An address of `/ask?prompt=<text>` opens the box with that text already in it, up to 4000 characters, and sends nothing until you do. `/?prompt=<text>` redirects there. Links inside the app that ask the agent about something use it. Adding `dashboard=<id>` (a dashboard id) to a link that has `prompt` puts that dashboard in the box as a chip, so the send asks about it. The agent answers without changing the dashboard, and when a change fits, the answer offers it with **Revise the dashboard**. The chip appears for a dashboard you can comment on, because asking about one needs Comment. The box stays closed for a moment while the dashboard is looked up, so a prompt is never sent before the chip is there. For a dashboard you cannot comment on, the box says "You cannot ask about `<title>`, because you cannot comment on it; this message asks without it." #### Slash commands A slash command at the start of the box changes what the send does. Type the command and a space, and it turns into a chip above the box. | Command | Chip | What the send does | | --- | --- | --- | | `/investigate` | Investigate | Asks a question and answers in an observation, see [Investigate](/docs/use/investigate/). | | `/import` | Import | Imports a Grafana dashboard from a link or its JSON. | - While you type a command, a line under the box lists the matching commands and says "Type a space after the command to use it." - Remove the chip with its button, or press Backspace in the empty box. - In a chat that already has a dashboard, a send without a command asks about that dashboard. - `/import` works only in the chat, and no command works in a dashboard's activity pane. - `/investigate` is offered to Editors and Admins only, because starting an investigation needs the Editor role. - In a chat about a dashboard, a second chip names that dashboard. #### Footer, chips and examples - The footer shows the model and, when the server sets one, its effort, for example "claude-haiku-5-5, medium effort". The model comes from the server's configuration and cannot be picked in the chat box. - While one of your runs in the chat is queued or running, a square stop button, labelled "Stop the run", sits next to the send button and cancels it; see [Cancel a run](#cancel-a-run). - The chips under the box list the healthy datasources. The agent can only query datasources the server has configured; see [Prometheus](/docs/connect/prometheus/), [ClickHouse](/docs/connect/clickhouse/), [Loki](/docs/connect/loki/), [Tempo](/docs/connect/tempo/) and [Jaeger](/docs/connect/jaeger/). - Without a model the box is replaced by "No model is connected to this server." On the Ask page the note holds the **Import from Grafana** link, and Home's **Ask Observe Agent** tab does not show it. - Under the example prompts, the Ask page at `/ask` lists your saved prompts and those shared with everyone. Typing `/` at the start of an otherwise one-line box opens a picker for them; see [Saved prompts](/docs/teams/saved-prompts/). The example prompts under the box are built from your datasources and dashboards, at most four of them. Editors and Admins are offered dashboard prompts, and everyone is offered up to two questions, such as "Which services had the most errors in the last hour?" or "Which routes are slowest right now?". With Prometheus and a dashboard you can edit, the first dashboard prompt adds a latency row to one you changed, or else to the first one you can edit. The others start a new dashboard, such as "Service health by pod, last 6h" with Prometheus or "Error logs by service, last hour" with Loki or ClickHouse. Choosing a new-dashboard example sends it at once. Choosing the latency-row example sends nothing: it opens the box with the text and the dashboard's name as a chip, so you can check or remove the target, edit the text and press Enter. A dashboard you can only view is never offered. #### Limits on requests Each person may have 3 chat requests queued or running that are not about a dashboard or an observation, and the instance 20. These are a new dashboard, a question, and a follow-up in a chat with no dashboard. Revisions and questions about a dashboard do not count. Past that the server answers `429` with `too_many_requests` or `agent_busy`; wait for a request to finish. For `agent_busy` the box shows "The agent is busy with other requests; try again in a moment." An investigation has its own cap of 3 per person and 10 on the instance, with the same codes. Requests that change one dashboard run one at a time, and up to 5 can be queued or running. A sixth is refused with `429 too_many_revisions`. ### What the agent does The agent is a loop of model calls and tool calls run by the server. It does not see your browser, and it can only act through its tools. Its instructions hold the Spec guide, the schema and an example. They tell it to use only the datasources it is given and only the metric, label, table and column names it discovered, so it does not invent names. If the prompt itself contains a Grafana dashboard JSON, the agent imports it with the importer instead of rewriting it, which ends the run like a save. This works for a new dashboard only, and the JSON has to fit in the 4000 characters of the prompt. Its order of work is: 1. Pick a datasource, then discover what exists: list datasources, metrics, labels and label values on Prometheus, and tables, schemas and sample rows on ClickHouse. For Loki, Tempo, Jaeger, Elasticsearch and OpenSearch the discovery tools list label names and values, services and span names, tables and fields. 2. Draft the dashboard as an ObserveSpec document. 3. Lint every new or changed query against its datasource. 4. Optionally run a query to see its data. 5. Save. The conversation shows these as phases, each with a message from the server: | Phase | Examples of what you see | | --- | --- | | Discovering | "Listed 14 metrics on prom", "Read the otel_logs schema on ch" | | Checking queries | "Checked a query on prom: 0 errors" | | Running queries | "Ran a query on prom: ..." | | Saving | "Saved version 1" | | Repairing | "Save rejected: 2 issues (...)" | #### Saves and repairs A save is the real check. A full save runs every panel query, and an `update_panels` save runs only the panels and variables it changed, unless it changes the time range, which runs every query. Either rejects a panel whose query is invalid or returns no data, except for alert list panels and panels over the built-in audit datasource, which can be quiet. The rejection comes back to the agent with the problem for each panel, and the agent fixes the draft and saves again. The agent may repair after a rejection, but the third rejected save in a row stops the run and the request fails. A save that finishes the dashboard ends the run. The server writes the version summary from the finished build, not from the agent's last save: - A new dashboard reads `Built the dashboard with 6 panels: "A", "B", "C", "D" and 2 more.` - A revision lists what changed since the version it started from, such as `Added "p99 latency"; renamed "Orders" to "Orders (agent)"; changed the description.` - When the build ends up identical to an earlier version, such as after "undo that", the version is a restore. Its summary reads `Restored version 3 (removed "p99 latency").` and the history marks it as restored from that version. - A build that changed nothing keeps the sentence the agent wrote. #### Limits on a run Queries the agent runs while drafting are capped at 15 seconds, 200 series, 100,000 points and 1,000 rows, so a heavy query may fail where the saved panel would work. A run has no cap on model calls and no time limit by default. It stops after three rejected saves in a row, when it stops making progress, or when the person who asked cancels it. Reading past six model calls without a save, or repeating a save, are examples of no progress. An administrator can set a time limit and a cost limit (`SLASHOBSERVE_AGENT_RUN_MAX_COST_USD`), and a run stops when it reaches either. When a run stops early, the conversation ends with "The dashboard could not be built" and a **Try again** button; when it kept a build, you can also continue it. When the agent answers a question after its reads were refused at its limit of model calls, the answer ends with a line saying reading stopped early and the counts may be partial. The limit is six calls for a message in a chat with no dashboard or observation and for a revision. It is twelve for an investigation and for a question about a dashboard or an observation, unless `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` (6 to 60) sets another number for those. When a read timed out, its datasource did not answer or the server was too busy to ask it, and no later read of the same kind on that datasource succeeded, the answer ends with a line naming each datasource it could not check and why. A timeout is never read as no data. An answer reads deploy markers as you before it says there was no deploy, so a question such as when checkout last deployed is answered from them. Times in an answer are in your browser's time zone with its label, such as 19:52 IST, because the chat sends that zone with each request. ### Follow-ups A follow-up is a continuation of the chat. The agent starts a fresh run that sees the datasources, your new message and, as context, the earlier turns of the conversation. Each earlier turn is the question with the answer it got, or "Saved version N of the dashboard: ..." for a turn that saved a version. The agent gets the last 6 earlier turns of the chat that succeeded, each prompt cut to 600 characters and each answer to 1200, and at most 8000 characters in all, dropping the oldest first. For a chat about a dashboard these are the earlier turns of that dashboard chat. For a chat with no dashboard they are the earlier turns of that chat. Turns of one chat run one at a time in the order they were sent. The earlier turns are read when a turn starts running, so a follow-up sent while the last one still runs sees its answer. #### Chat fields in the API - `POST /observe` takes `chat_id` to ask the next turn of one of your chats. - `kind` `revise` with `dashboard_id` changes that dashboard; an `ask`, the default, only answers about it. - Every request carries its `chat_id`, the id of the chat's first request. - Without `chat_id` a new chat starts, except a `revise` on a dashboard, which joins your latest chat on that dashboard unless `new_chat` is true. `new_chat` matters only for a `revise` on a dashboard, because a private ask already starts its own chat. - `client_id`, a UUID the client picks once per message, makes a resend safe. The same `client_id` answers with the request it started and `replayed: true`. - A request an ask in a thread started belongs to no chat: its `chat_id` is null and `GET /chats/{id}` has nothing to open for it. A further ask in the same thread is another request in that thread, which sees the thread's earlier messages. - `GET /chats` lists your chats, `GET /chats/{id}` reads one with every turn, and `DELETE /chats/{id}` archives it with its turns. - A chat is pinned with `PATCH /observe/{id}` on its first request, which MCP `pin_run` and `unpin_run` call. ### In the dashboard's Chat tab A dashboard's side panel has a **Chat** tab next to **Activity**, which shows your own chats about that dashboard. It opens your latest chat about the dashboard and names it in the address as `tab=chat&chat=<chat id>`, so the chat stays open when a turn in another chat makes that one the latest. - The select at its top lists up to 50 of your chats on this dashboard, newest first, each with the time of its last message and its number of turns. - **All your chats** opens the Chats page filtered to this dashboard. - **New chat** clears the conversation and shows an empty box, with `chat=new` in the address, so the browser's Back returns to the chat you left. The chat your first message lands in then takes its place in the address. - The first message after **New chat** is a question about the dashboard and starts a new chat, which the tab then shows. The note under the box says "Only you and Admins can see this chat." - A chat that is about another dashboard, or about none, opens read only, with a link to continue it on its chat page. While the chat has one turn, yours and finished, above the box the tab offers up to two suggested follow-ups. They are the questions Home suggests for your datasources, such as "Which routes are slowest right now?". Choosing one asks it about the dashboard in the same chat, without leaving the dashboard, and the suggestions go once the chat has a second turn. They show when you can ask the agent and are not shown on the chat page. ### From the dashboard's activity pane You can also send a follow-up from the dashboard's activity pane. 1. Write the change in "Comment or request". 2. Either mention `@observe`, or choose the "To: everyone here" chip above the box so it reads "To: Observe Agent". 3. Send. To ask inside a comment thread, choose **Reply** on it. The same box shows "Replying in" and the panel or dashboard, and the send goes to that thread. The up arrow recalls your earlier prompts there too, and the footer shows the model. These requests carry on in the activity pane; see [Comments, agent requests and versions](/docs/use/review/). In the conversation, a turn sent from the dashboard shows "Sent from the dashboard". While a request runs, its entry in the activity pane shows the latest three phases of its timeline, with **Show all steps** for the rest, how long it has been running, and **Cancel run** for the person who asked. While your own request runs, the same stop button sits next to the send button. When the request saves a version, its entry reads "Saved as version N" with a link to the change between that version and the one before, and says how long the run took. The dashboard reloads the new version, and panels the version added fade in once. ### Who reads a chat Most requests you send are turns of a chat that only you and Admins can read; the exceptions are the shared requests listed below. These are private, so only you and Admins read them, and for anyone else they do not exist: - a request with neither a dashboard nor an observation; - a question about a dashboard or an observation asked in a chat, in the dashboard's Chat tab or with [Ask mode](/docs/use/ask-and-comment/#ask-mode). For a chat on a dashboard, you read the answer only while you can still open that dashboard. These are shared work that anyone who can see the dashboard reads: - a request in a dashboard's comment thread; - an investigation on a dashboard; - a request that revises the dashboard. An investigation or an ask in the thread of an observation is read by anyone who can read the observation. Readers of shared work read that one request only. Its `chat_id` is null for them, the first request of a chat shows them its own title rather than the chat's name, and the rest of the chat stays yours. That includes the earlier questions the agent was given. An Admin reads another person's chat read only. For anyone who is not an Admin, a chat that does not exist, or that someone else asked, shows one message on `/c/<request id>` and on `/b/<request id>`: "You can't open this chat. It does not exist, or only the person who asked and workspace admins can open it." An Admin who opens someone else's chat whose answer sits in an observation in a folder the Admin cannot see, such as that person's My Dashboards, reads "The answer is saved in an observation in a folder you cannot see." An answer that was never saved as an observation is hidden the same way when the chat is about a dashboard you cannot open. The chat then reads "The answer is about a dashboard you cannot open." #### Redacted requests Unless it is an investigation, a question asked in a thread, which belongs to no chat, or an answer you shared into a thread they can read, a reader of shared work also reads it without your words. Its `title`, `prompt`, step messages, `live_text`, `continue_note` and `error` are empty and `redacted` is true. Its state, times, your name, its kind, its `failure_code` and the version it saved stay. The dashboard's revision list shows its `prompt`, `continue_note` and `error` empty the same way. In the web app such a run reads "Asked in a private chat" where its message would be, in its page and browser tab title and in the dashboard's activity. Its steps show without their messages, and while it runs the dashboard's activity names its current phase instead of its latest step. Its page is read only: it offers nothing to copy, retry or ask again, and has no message box. #### Audit events for reads Every read of a chat or a request, yours included, is recorded in the audit trail, in the web app, over MCP and with the CLI. It is recorded as `chat.view` or `run.view` with the owner's id as `owner_id`. A list of chats or requests is recorded as one `chat.list` or `run.list` with `scope` (`mine` or `all`, and `dashboard` for the list of a dashboard's requests) in its data, never one event per row. Each is recorded once per reader and chat, request or list in 10 minutes, so a page that polls adds no events. A refused read is recorded every time. ### Answers that read Admin-only data A run reads a datasource only Admins can query, such as the [audit trail](/docs/reference/audit-queries/), only when everyone who reads what the run writes is an Admin. That is an Admin's private chat, or a thread, dashboard, observation or build in a folder only Admins can read. Any other run, an Admin's included, is not offered those datasources, and a query on one answers `admins_only_datasource` with where the data can be read. The same holds for what is stored in a folder only Admins can read. A run that writes where others read sees no such folder, so its dashboards, panels, annotations and observations answer `not_found`, and they are left out of its lists. A run that may read them is marked when a tool returns one: reading a dashboard, its panels or its annotations, or reading an observation. Reading the dashboard or observation the run is about is not counted, for an ask and an investigation as for a revision or a suggestion. What the run learns there goes wherever that dashboard or observation goes. Its panel data still counts when it comes from a datasource only Admins can query. The observation an ask's answer was saved into is not what that ask is about, so a later attempt of the ask that reads it there is counted. Lists of dashboards, folders and observations show titles only. In an Admin's run they leave out what is in folders only Admins can read, with this exception: - the built-in Audit folder and its starter dashboards, what the run is about, and what is in the folders it writes to. The Audit exception applies to the dashboards and folders lists only, because the observations list has no built-in Audit exception. The lists say how many they left out and mark nothing. `include_restricted: true` lists those too and marks the answer. A run that writes where others read lists none of them and refuses `include_restricted`. #### What is marked restricted An answer whose run read such a datasource or such content is marked `restricted`. So is a run that starts from one, because it carries that answer as context: - a later turn of the same chat; - an ask in a thread that holds one; - an apply of one; - a continuation of a restricted run; - a run about a dashboard or observation that holds one. #### Where a restricted answer can go A restricted answer stays where only Admins read it. These are each refused with `409 restricted_answer` unless the place is in a folder only Admins can read, and the message says why: - sharing it in a thread or onto a page; - saving it as an observation; - pinning it, or making it a dashboard; - applying its suggested change; - saving its build, and proposing its build as a change. The same refusal reaches MCP tools and the CLI. #### Answers about Admin-only content An answer about a dashboard or observation that sits in a folder only Admins can read is kept the same way when the answer is placed, even when its run read nothing only Admins can query. It may go into that dashboard's or observation's own threads and page, or into a folder only Admins can read. It is refused with `409 restricted_answer` anywhere else, and saving it as an observation files it in that folder. The observation an ask's answer was saved into is not what the ask is about, so its folder keeps nothing. The observation an investigation opened for itself does keep its answer. A run that starts from such an answer in any of those ways is marked `restricted` too, unless it is about that same dashboard or observation, for example a later turn of the chat on a dashboard in General. What it was placed in then holds it as it would hold a restricted answer. That content moves, is copied and has its folder opened only as [Folders](/docs/teams/folders/) describes, except the dashboard or observation the answer is about, which moves freely. Once the dashboard or observation has moved to a folder others read, nothing is refused. Deleting the dashboard or observation while it is in a folder only Admins can read, or deleting a run whose answer is kept this way, does not free what was placed from the answer. Each dashboard and observation it was placed in keeps holding it. A run about a dashboard that files into an observation, both in folders only Admins can read, makes each of them hold the other's answer, so neither moves out on its own. To free them, delete that run's reply, block or pin from one of them, then move that one out first and the other after it. #### Who can read a restricted run A run asked in a thread that ends with a `restricted` answer, when people who are not Admins read that thread, replies there with a fixed text that says the answer is not shown. Only whoever asked and Admins read it, in the run. A `restricted` run, and a run whose answer is kept for what it is about, answers `404 not_found` to anyone who is neither its requester nor an Admin. That holds wherever a run is returned, and the revision history leaves it out for them, until nothing keeps it any more. Its finding says `restricted` for as long. Saving a restricted answer as an observation files it in the first folder only Admins can read among these: 1. the folder of the dashboard it was about; 2. the folder of the observation its run files into; 3. the folder of the observation it was asked about. Else it files in the built-in Audit folder (see [Audit folder](/docs/use/activity/#audit-folder)). When the Audit folder is not Admins only either, the save is refused. Withdrawing a share works as for any other answer, and who can read a chat does not change. ### One title for a chat and its observation A chat with no dashboard and exactly one observation made from it shares its title with that observation. The observation is made by **Create observation** or by an investigation that opened it. Renaming the chat renames the observation, and renaming the observation renames the chat. This holds in the web app, the API, the CLI and MCP alike, and both lists show the new title at once. - When you may not edit the observation, the chat is still renamed and a note says "The observation made from this chat keeps its title, because you cannot edit it." An observation you cannot open is left alone and never named. - When someone other than the person who started the chat renames the observation, the chat keeps its title and the note says so. - Titles stay apart for a chat with two or more observations, a chat on a dashboard, a later turn's own title, and an observation not made from a chat. Over MCP, `chat_rename` in the result of `update_observation` is `renamed`, or `kept` when the chat's title was left as it is. `rename_run` on that chat's first run renames the observation and answers `observation_rename` the same way. ### What the agent cannot do - **Use a datasource that is not configured or not healthy**, or names it did not discover. - **Change a dashboard you cannot edit.** It cannot reach folders you have no Edit access to. - **Change an existing dashboard from Home.** A request on Home builds a new dashboard; [Change an existing dashboard from Home](#change-an-existing-dashboard-from-home) says where to ask instead. - **Add panels with no data.** The save refuses them, and the agent does not create placeholders. - **Make the same choices every time.** Results depend on the model; a clearer prompt with the metric, service or time range you want gives better dashboards. To work on a dashboard in your own editor and model, use [MCP](/docs/use/mcp/) or the [CLI](/docs/use/cli/). To change one panel by hand, see [Edit a panel](/docs/use/edit-panel/). # Ask and comment on a dashboard > Ask the agent in a comment thread, in a private chat or by pointing at a spot on a panel, and comment on a spot, with the Select, Comment and Ask tool bar, the A and C keys, pins, what a click can name, private asks and sharing an answer. Source: https://slashobserve.com/docs/use/ask-and-comment/ · Markdown: https://slashobserve.com/docs/use/ask-and-comment/index.md A dashboard offers three ways to put a question to the agent and one way to leave a note for the team on a precise spot. This page covers the canvas: the **Select**, **Comment** and **Ask** tool bar, the spots a click can name, the pins that mark them and the boxes that open there. The thread and the chat have their own pages, linked below, and an [observation](/docs/use/observations/#comment-and-ask-on-the-blocks) has the same modes on its blocks. Commenting and asking need Comment on the dashboard's folder, so the tool bar is hidden for a Viewer, and asking needs a model on the server. ## Which one to use | You want to | Use | Who reads it | | --- | --- | --- | | Ask the team, and the agent when you want it to answer in front of them | A comment thread, in the **Activity** tab of the side pane or on a spot with Comment mode. | Everyone who can read the thread. | | Ask about the dashboard in a conversation of your own | The **Chat** tab of the side pane. | You and Admins. | | Ask about one part of one panel | Ask mode, the **Ask** button of a panel or the `a` key. | You and Admins, until you share the answer into a thread. | A comment thread asks the agent when its message mentions `@observe` or its "To:" chip reads "To: Observe Agent". A reply in a thread that already has an agent asks it again, unless the reply mentions a person or goes to everyone. [Ask the agent from a comment](/docs/use/review/#ask-the-agent-from-a-comment) describes the rule in full, the answer card and **Revise the dashboard**. A private chat starts from the **Chat** tab, or from **New chat** in it; see [In the dashboard's Chat tab](/docs/use/chat/#in-the-dashboards-chat-tab). The answer to a question never changes the dashboard until someone chooses **Revise the dashboard** on it. ## Comment on a spot 1. Choose **Comment** in the tool bar at the bottom of the screen, or press `c` with the pointer on no panel. The line beside the bar reads "Click a spot on a panel to comment on it. Esc returns to Select." 2. Move the pointer over a panel. The part under it is outlined: the point, series, bar, row, cell or value the click would name, or the whole panel when the panel type cannot name one. 3. Click. A small composer opens at that spot, with chips naming the panel and the part you clicked. 4. Write the comment and post it. It is saved as a thread on that part of the panel, and a pin marks the spot. The composer sends like the Activity box, and its "To:" chip decides whether the agent reads the comment. A comment that mentions no agent goes to the team and starts nothing. Comment mode stays on for the next comment until you choose **Select**, press `Esc` or press `c` again. Other ways to comment: - Drag across the time axis of a time series, heatmap, state timeline or status history to comment on the range you dragged over. - Click a panel's title bar to comment on its title. - With the pointer over a panel or a panel selected, press `c`, choose **Comment** in the panel's menu or use its header button, to comment on the whole panel. Tabbing to the title and pressing Enter does the same. - In the full-size view and TV mode there is no canvas to point at, so **Comment** opens the **Activity** tab of the side pane, scoped to the panel. ### Comment mode Details of Comment mode: - The pointer becomes a dark comment marker whose bottom left tip is the spot a click lands on. - The chips are short: a time reads "22 Nov 08:54:11 UTC", a range on one day names the day once, as in "Range 22 Nov 08:54:11 to 09:11:32 UTC", and pointing at a chip shows the full text. - The composer closes when you post or press `Esc`. - Once you have typed, `Esc`, **Select** or another tool first asks "Discard your draft?", and **Keep editing** keeps the text. - A click outside closes the composer only while it is empty. Once you have typed, it stays open, and a click on another spot or on a pin leaves it as it is. - While the layout has unsaved moves the composer is hidden, and it comes back with your text once the moves are saved or discarded. - In the table view of a panel that is not a table, a click or drag in Comment mode comments on the whole panel. - The copies of a repeated panel take no canvas comments. Comment mode does nothing on a copy, **Comment** or `c` on a copy starts the comment in the activity pane, and pins show only on the first panel. ## Ask about a spot 1. Choose **Ask** in the tool bar, or press `a` with the pointer on no panel. 2. Click a spot on a data panel. A small box opens there with chips naming the panel, the part you clicked, the value under the pointer and the time window. 3. Type the question and send it. The agent gets your question with all of those chips. 4. Read the answer in the same box. It shows "Waiting for a free agent" while the question is queued, "Looking into it" while it runs and "Revising the dashboard" for a revision. 5. Ask a follow-up in the box under the answer, which continues the same chat about the same spot. The answer card has the **Answer actions** menu, an evidence chip when the answer has evidence panels, and **Revise the dashboard** when the agent suggested a change, which then reads **Revision asked for**. Only **Revise the dashboard** changes the dashboard, and the line under it says that a revision is visible to everyone who can see the dashboard. Other ways to ask: - Drag across the time axis of a panel that takes a range to ask about the range you dragged over. - With the pointer over a panel or a panel selected, press `a`, choose **Ask** in the panel's menu or use its header button, to ask about the whole panel. - In the full-size view and TV mode, **Ask** opens the **Chat** tab with a chip naming the panel, so the question is about that panel until you remove the chip. ### Ask mode Details of Ask mode: - The pointer carries a teal marker with the slash in place of the dark one, and the line beside the tool bar reads "Click a spot on a panel to ask the agent about it. Esc returns to Select." - The question is a turn of the dashboard's current chat, or of a new chat that becomes the current chat when there is none. The current chat is the one you last opened in the Chat tab or asked in on the canvas. - Asking on the canvas never opens a closed side pane. When the pane shows Activity or Chat it switches to that chat, and the Chat tab shows it whenever you open it later. - The same turns show in the Chat tab. - When no model is connected the box says so and cannot send, and while you view an older version it asks you to open the latest one first. - The box closes on `Esc`, and once the question is sent also on its **Close** button, and the focus goes back to where it was. With a typed question it first asks "Discard your draft?". - A click outside closes it only while it is empty. Once you have typed a question, it stays open with your text, and a click on another spot or on a pin leaves it as it is. - While the layout has unsaved moves the box is hidden, and it comes back with your text once the moves are saved or discarded. - In the table view of a panel that is not a table, a click or drag in Ask mode asks about the whole panel. - The copies of a repeated panel take no canvas questions: Ask mode does nothing on a copy, and **Ask** or `a` on a copy opens the dashboard's Chat tab on that panel. ## Use the tool bar At the bottom of the screen a tool bar offers **Select**, **Comment** and **Ask**. A line beside the bar, or below it when the row wraps, says what a click does while a mode is on. - **Select** is the default: a click selects a panel, as [Select a panel](/docs/use/web/#select-a-panel) describes. - **Comment** and **Ask** turn on [Comment mode](#comment-mode) and [Ask mode](#ask-mode). - Each mode stays on until you choose **Select**, press `Esc` or press its key again. - Both are greyed while you have unsaved layout changes. - **Ask** shows only when a model is connected, and only a data panel can be asked about: a text panel takes comments but no questions. - The bar is hidden on a phone, in TV mode, while a panel is open in the editor and when you cannot comment. `Esc` closes Inspect first, then the full-size view, then TV mode and full screen, then leaves Comment or Ask mode for **Select**, and then clears the selected panel. [Keyboard shortcuts](/docs/use/keyboard-shortcuts/) lists the keys. The two icon buttons in a panel's header are named "Comment on `<title>`" and "Ask about `<title>`". They show when you hover the panel, and hide while it is selected or too narrow to hold them. The panel's menu and the toolbar above a selected panel have the same two actions. Each box resizes on a narrow screen and by hand: - The composer and the ask box fit the window on a narrow screen. - Drag the handle in their bottom right corner to resize, or focus it and press the arrow keys (Shift for larger steps). - Each box opens at the size you last gave it in this browser, and a double-click on the handle returns it to its default size. ## Comment pins A thread on a part of a panel shows as a pin with its author's mark at the spot it names. A pin follows its data: when the series, bar or row moves, the pin moves with it. A resolved thread's pin is grey. To read a thread, choose its pin, or Tab to it and press Enter. The thread opens with its replies, and you reply in place. Pins that would overlap stack into one marker with their count. Choose it for a list of those threads, and choose one to read it, with a button back to the list. Details of when a pin is drawn: - Pins show only the threads you can read, to people who can comment. - Pins are not drawn in print, in a panel image, in TV mode, in the full-size view or in the panel editor. - A pin on a moment, a point or a range outside the shown time range is not drawn until the range shows it again. A range partly in view keeps its pin on the part that shows. - A pin on a series hidden in the legend is not drawn. While the panel shows an error, is loading or is in its table view, only pins on its title are drawn. - When the series, row or cell is no longer on the panel while its time is in view, for example after a filter changed, the pin stays where it was placed and is faded. Its thread says that its data is no longer on the panel. - A table row, log line, span or alert that is on the panel but scrolled out of view, or a table row on another page, points at the bottom edge of the panel. Opening its pin scrolls or pages the panel to it. - A pin on a panel that shows no data is drawn faded. ## Keep a question private or share it The ask box says "Only you and Admins can see this.", because a question asked on the canvas is a turn of your own chat. Nobody else reads the question or the answer, and the answer card's menu has no **Show to everyone**. To share an answer, open the **Answer actions** menu and choose **Share to thread**. It adds your question and the answer to an open thread on the dashboard, where everyone who can read the thread sees it, until you choose **Withdraw**. [Follow-ups](/docs/use/chat/#follow-ups) describes who reads a chat and what an Admin sees. Each spot you asked about shows a teal pin that only you see, named "Your question on" and the spot. Choose it, or Tab to it and press Enter, to open the box on that chat again. Details of your question pins: - Your pins that would overlap stack into one teal marker with their count, "N of your questions here", which lists them; choose one to open its box. - Pins are drawn for your newest 100 questions on the dashboard that name a spot. - A Viewer, who cannot ask, loads none. - An Admin reading your chat does not see your pins. - An answer you share into a thread also shows that thread's pin for everyone. ## Reference ### What a click can name Each panel type names the finest part of itself that it draws, and a pin follows that part when the data moves. | Panel | A click names | The pin follows | | --- | --- | --- | | Time series | A point on a line, a line, a moment in time, or a dragged range | The series and the time, or the range | | Bar chart | A bar, a stacked segment or a category | The category and the series | | Histogram | A bucket | The bucket's edges | | Heatmap | A cell, or a dragged range of time | The cell's time step and bucket, or the range | | Pie chart | A slice | The slice's name | | Stat, Gauge, Bar gauge | The value under the pointer | The value's series | | Table | A row, with the value under the pointer shown as a chip, or a column header | The row's identifying cells, or the column | | State timeline, Status history | A state at a time, a row, or a dragged range of time | The row and the time, or the range | | Logs | A log line | The line | | Traces | A span | The span | | Alert list | An alert, in the list view | The alert's name and labels | | Canvas | An element | The element, the topmost one where drawings overlap | A canvas element panned out of view, and a row on another page of a state timeline, count as gone. The panel types not listed, and the alert list's count view, have nothing finer than the whole panel, so a click there comments on the spot you clicked and the whole panel is outlined. The stored spot is the thread's anchor, for example a point, a range, a row or a value, with the place of the click on the panel. A thread or a question with an anchor says it in words, such as "the row payments, authorize_card", wherever it shows, and the agent is told the same sentence. ### Anchors over MCP and the CLI An agent or a script points at a spot with an anchor. It is a JSON object with a `kind`, the fields that kind needs and `pos`, the place on the panel as `x` and `y` between 0 and 1. An anchor may also carry `shown`, the words the person saw, and `window`, the time window they saw. An anchor over 1536 bytes once encoded is refused. The kinds are `time`, `range`, `series`, `point`, `row`, `column`, `cell`, `bar`, `segment`, `heat_cell`, `slice`, `value`, `log_line`, `span`, `element`, `text`, `title`, `variable` and `position`. | Kind | Needs | | --- | --- | | `time` | `from` | | `range` | `from` and `to`, with `to` not before `from` | | `series` | `series`, a map of label to value | | `point` | `series` and `from` | | `row` | `row`, a map of label to value, and optionally `quote` | | `value` | nothing, and optionally `series` | | `position`, `title` | nothing | `start_run` and `create_comment` over MCP take it as `anchor`, and `list_comments`, `list_runs` and `get_run` give it back; [MCP](/docs/use/mcp/) lists the tools. `--at` takes it in the CLI, on [`observe` with a prompt](/docs/use/cli/#send-a-prompt), on `observe investigate` and on [`observe comments add`](/docs/use/cli/#comments). The CLI also takes short forms such as `row:service=payments,span=authorize_card` and `range:23:50Z..23:58Z` in place of the JSON. ## Related pages - [Comments, agent requests and versions](/docs/use/review/) for threads, the answer card, resolving and versions. - [Chat and follow-ups](/docs/use/chat/) for the chat and the Chat tab. - [Observations](/docs/use/observations/#comment-and-ask-on-the-blocks) for the same modes on blocks. - [Keyboard shortcuts](/docs/use/keyboard-shortcuts/) for `a`, `c` and `Esc`. - [Roles](/docs/teams/roles/) for who may comment and ask. # Comments, agent requests and versions > Review a dashboard with comments, send changes to the agent, and compare or restore saved versions. Source: https://slashobserve.com/docs/use/review/ · Markdown: https://slashobserve.com/docs/use/review/index.md Every dashboard keeps its comments, the requests people sent to the agent and its saved versions in one place, the **Activity** tab of its side panel. Use it to discuss a panel with your team, to ask the agent a question, and to compare or restore an earlier version. Versions are immutable and linear. Each save adds the next version number, and nothing edits or deletes an earlier one. ## Comment on a panel and ask the agent 1. Choose **Activity** at the top right of a dashboard. The side panel opens, and the button shows the number of open comments. 2. At the bottom of the card, pick a panel in **On**, or leave "The whole dashboard". 3. Type in the box labelled "Comment or request" and press Enter. You see your comment at the bottom of the timeline. 4. To ask the agent instead, mention it, for example `@observe why did the error rate rise at 09:12?`. The send button now reads "Send and ask Observe Agent". 5. Wait for the answer. It arrives as a reply in the same thread, and the line under your message says "Observe Agent is working on it" while it runs. 6. Choose **Resolve** on the thread when the question is settled. A comment that mentions no agent goes to the team and starts nothing. The agent changes nothing when you ask a question; it reads the dashboard and its data and answers in the thread. [Ask the agent from a comment](#ask-the-agent-from-a-comment) has the details, including how to turn an answer into a change. From a terminal or an agent, `observe comments` and the comment tools of [MCP](/docs/use/mcp/) do the same work. ## Open the Activity tab Choose **Activity** at the top right of a dashboard to open the side panel. The side panel has two tabs, **Chat** and **Activity**, and the address keeps the open one as `tab=chat` or `tab=activity`. The Chat tab is described in [Chat with the agent](/docs/use/chat/#in-the-dashboards-chat-tab). ## Delete a dashboard Deleting the dashboard deletes its versions, comments, agent requests and import record with it, for everyone, and cannot be undone. **Delete dashboard...** is in the dashboard's **More** menu and in the row menu on the Dashboards page. It asks for confirmation and needs Edit on the folder. `observe dashboards delete` does the same from the [CLI](/docs/use/cli/). Anyone with the dashboard open sees a toast saying that it was deleted. ## The activity timeline The Activity tab holds comments, agent requests, proposals, annotations and saved versions. Entries are sorted by time and grouped under a heading for each day ("Today", "Yesterday" or a date). Each shows its author's mark and the time of day, such as 14:32, or "Just now" for the first minute. Hover the time for the full date. Two menus filter the list. **Show** switches between Everything, Open comments and Changes only, and **Panel** narrows it to one panel. An empty list says "No activity yet." and suggests commenting on a panel from its menu or writing below. Filters that match nothing say "No activity matches these filters." The entries come in six kinds. ### Comment threads A thread shows the author's name with no verb and, when the comment is about a panel, "on `<panel>`". The name is the same label versions use. A comment written through an MCP client reads "Ishan (via Claude Code)", and a thread the agent resolved after a request reads "Resolved by Observe Agent for Ishan". - Choosing the panel name scrolls to the panel and highlights it. - A comment on a panel that no longer exists reads "on a removed panel". - Replies sit under the first message, each with its author's name and no verb. An agent's reply speaks as the agent, such as "Observe Agent for Ishan". - A message that arrives while the card is open slides in, and the ones already there stay put. ### Agent requests An agent request sent from a comment shows inside its thread, as one status line per run under the message that asked. - "Observe Agent is working on it · View the run" while it works. - "`<name>` was asked" for a connected agent. - The agent's reply once it ends. **View the run** opens the run's conversation at `/c/<id>`, and the built-in agent's reply carries the same link. A request that no loaded thread holds shows "`<name>` asked the agent" and one of these states: - "Sent to the agent". - "Resolved by version N". - "Proposal opened, waiting for an Editor". - "Finished, nothing changed". - "The agent could not finish: `<reason>`". A request from someone else's private chat reads "Asked in a private chat" in place of its message. A run by someone who cannot edit ends in a [proposal](/docs/concepts/proposals/), and its status links to the proposal and follows it: "Proposal merged as version N" or "Proposal discarded". While the agent works, the entry reads "Agent is working on it" with its latest step and the step number. It reads "Queued, position N" while it is queued, and "Canceling" after its requester cancels it. **Details** opens the full conversation at `/c/<id>` in a new tab. ### Versions A version shows who saved as their label and "saved", such as "Ishan saved", "Ishan (via Claude Code) saved" or "Observe Agent for Ishan saved". Then it shows "Version N" with its summary, or "No summary". **See changes** opens the comparison with the previous version, on the dashboard's version history page at `/d/<dashboard id>/versions`, headed "Versions of `<title>`". A version saved by merging a proposal adds "Proposed by `<name>`, merged by `<name>`". The card loads the 50 newest versions first. When the dashboard has more, **Load older versions** at the top of the list adds the next 50 and moves focus to the oldest version it added. The button shows while the filters keep versions in the list, so it is hidden under **Open comments** and when a panel is chosen. ### Imports An import shows "`<label>` imported this dashboard from Grafana", where the label is the importer's, such as "Ishan" or "Ishan (via Claude Code)". It shows the conversion counts. It lists the panels that are still unverified in the latest version with the reason each failed, and an **Ask the agent to fix** button where you may send requests. See [Import Grafana dashboards](/docs/use/import-grafana/). ### Proposals A proposal shows "`<name>` proposed a change" for each open proposal, with its title and a **Review** link to the proposal page. A merged one shows on its version instead. ### Annotations An annotation shows "`<name>` added an annotation", with its text and tags, and "on `<panel>`" when it belongs to a panel. The card lists the 50 newest annotations of the dashboard. ## Comment on a panel or the dashboard At the bottom of the card, the form "Add to the activity" has an **On** menu with "The whole dashboard" and every panel title, and a box labelled "Comment or request". Write the comment and press Enter, or choose **Send** (the up arrow). Shift+Enter adds a line, and Cmd+Enter (Ctrl+Enter elsewhere) also sends. On a touch device Enter adds a line and **Send** sends. Every comment box says how to send under it: "Enter to send, Shift+Enter for a new line.", or "Tap the arrow to send." on a touch screen. The same keys work in an observation's discussion, in the inbox, in replies and in the edit box. Above the box, a "To:" chip says who reads the message and a "Visible to:" chip says who sees it. A comment that mentions no agent reads "To: everyone here", goes to the team and starts nothing. Choose the chip to send it to the agent instead, and choose it again to go back. A mention of an agent turns the chip to that agent's name. A comment is 1 to 4000 characters, counted without the spaces around it. From 3600 a counter such as "3650 of 4000" appears under the box. Past 4000 it turns red with "too long", and sending then says "Use at most 4000 characters." A comment is attached to the latest version when you write it. A comment that mentions no agent never asks an agent to do anything. ### Start from a panel To start from a panel, do any of these: - Hover the panel and choose **Comment** in its header. - Press `c` while the pointer is over it. - Open its menu ("Panel menu: `<title>`") and choose **Comment**. - Choose **Comment** in the toolbar of the selected panel. On the dashboard each opens a small composer on the panel, and the comment is saved as a thread on the whole panel. In the full-size view and TV mode the card opens scoped to that panel with the cursor in the box instead. In the full-size view and TV mode, press `c` outside a field to open the pane and put the cursor in this box. Elsewhere on the dashboard `c` turns on Comment mode, described in [Ask and comment on a dashboard](/docs/use/ask-and-comment/#comment-mode). **Ask**, in the header, on `a` or in the same menu, is available on a data panel when you can comment and a model is connected. It opens the [ask box](/docs/use/ask-and-comment/#ask-mode) on the whole panel, a private question in your chat rather than a thread. In the full-size view and TV mode it opens the dashboard's Chat tab with the panel as the question's target. A panel with open comments shows a badge, "N open comments on `<title>`". ### Who can comment Commenting needs the Comment level on the dashboard's folder: the Commenter role or higher, or a Comment entry or higher on the folder. Without it you see "You can view dashboards in `<folder>`. To comment, ask the people who manage this folder for Comment access." **Request comment access** sends them that request, with an optional note, through their inbox; see [Ask for comment access](/docs/teams/folders/#ask-for-comment-access). With Comment but not Edit you see "You can view and comment in `<folder>`. What the agent changes for you reaches the dashboard as a proposal that someone with Edit on this folder merges." See [Roles](/docs/teams/roles/) and [Folders](/docs/teams/folders/). ## Edit a comment and mention people Each message you may change has a menu, **Comment actions** (**Thread actions** on the first message of a thread). It shows when you hover or focus the message, and always shows on a touch screen. Your own comments and replies have **Edit** in it while you can still comment on the dashboard. **Edit** opens the text in place. **Save**, Enter or Cmd+Enter (Ctrl+Enter elsewhere) keeps the change, Shift+Enter adds a new line, and **Cancel** or Escape drops it. An edited comment shows "edited" beside its time. Saving the text unchanged does nothing. An agent's reply, such as "Saved version 3 of this dashboard.", has no **Edit** for anyone, including the person who asked for it. The server refuses an edit of one with 403 `not_author`. Editing never reopens a resolved thread and never changes who wrote the comment. ### Mention a person or an agent The @ button next to a comment box, or typing `@` at the start of the box or after a space, opens a list. It holds the built-in agent (Observe Agent, `@observe`), your own connected agents and the people who can see what the comment is about. It works in the Activity box, in thread replies, in an observation's discussion and in the edit box. A button press opens a search field for a name or an email. When you type `@`, the letters you type stay in the box and narrow the list. The arrow keys move through it, Enter picks the highlighted entry in place of what you typed, and Escape closes it. The first entry is highlighted once you have typed a letter, so on a bare `@` the list does not take Enter. The list closes when nothing matches. A picked person shows in the box as `@Name`, and the comment is stored and shown with the mention. Someone who cannot see the dashboard, observation or proposal is not offered. Mentioning one is refused with 422 `invalid_mention`, as is a person who does not exist. The list of people comes from the server (`GET /api/v1/threads/mentionable`), at most 20 at a time. The form at the bottom of the card offers the people who can see the dashboard as well as the agents. An agent over MCP or the CLI lists them with `list_mentionable_people` or `observe comments people`. A person is stored as `@[Name](user:<id>)` and a connected agent as `@[Name](grant:<id>)`. Both show as "@Name" once the comment is saved, using the name the server has. A comment can contain at most 20 mentions, and a repeated mention counts each time. A mention of a person is recorded, appears in the [activity log](/docs/use/activity/) and reaches that person's [Inbox](/docs/use/inbox/). A mention of an agent starts a run only when you send the comment from a composer that asks the agent, as described under [Ask the agent from a comment](#ask-the-agent-from-a-comment). ### How comments render A comment written by a person renders Markdown: bold, italic, code, lists, quotes, tables and links. Links open in a new tab and only `http`, `https` and `mailto` links work. Raw HTML and images are not rendered. Text an agent wrote, a reply from a run or a message from a connected agent or service account, is always shown as plain text. ## Delete a comment You can delete your own comment or reply while you can still comment. **Delete** in the message's menu asks for confirmation. The dialog reads "Delete this comment?", or "Delete this thread?" when it removes the whole thread, and says it cannot be undone. **Delete** is in the menu of comments in the Activity card, in an observation's discussion and in the Inbox pane. - The first comment of a thread can be deleted only while nobody else has written in the thread, and deleting it deletes the thread. - Someone with Manage on the folder can delete any comment, including an agent's reply and the first comment of a thread that others have answered, which deletes the thread. - Nobody else can delete an agent's reply. An agent's reply that someone deleted is not posted again when its run is retried. The server refuses anything else with 403 `not_author`, and `observe comments delete` does the same from the [CLI](/docs/use/cli/). A deletion is recorded in the [activity log](/docs/use/activity/) as `thread.deleted`. ## Ask the agent from a comment Mention one agent in a comment and send it. The send button then reads "Send and ask Observe Agent" (or the connected agent's name), and the agent gets a run for that message. Asking needs Comment on the dashboard's folder. Only a thread on a dashboard or an observation can ask the agent. A thread whose agent is someone else's connected agent saves your message and starts no run. The agent answers in the thread and changes nothing: it reads the latest version, your message and the panel you chose, and its data. It saves no version and opens no observation. ### From the form Write your question, mention `@observe`, and send. Pick a panel in **On** to tell the agent which panel you mean. The comment is attached to the latest version and the panel you chose. ### From a thread 1. Choose **Reply** on a comment. The box at the bottom of the card shows "Replying in" and the panel or dashboard, and **On** hides. 2. Write the instruction with the mention, and send. The box stays in the thread, so the next message goes there too until you remove the "Replying in" chip. The agent gets the earlier messages of the thread as context, the last 20 and at most 8000 characters. The agent you asked becomes the thread's agent, so a later reply in the thread asks it again without a mention. A reply that mentions a person goes to the team and starts nothing, and the thread keeps its agent for the next reply. A message someone sent to everyone, by turning the "To:" chip or through the API, MCP or the CLI, turns the thread's agent off until a message asks an agent again. ### What you see while it runs Under the form the card says "Observe Agent is working on it" with a link to the run, "`<name>` was asked" for a connected agent, or why no run started. One reason is that the dashboard already has 5 runs waiting. The comment is saved in every case, and a refusal never loses it. When the run ends, its answer arrives as a reply in the same thread. It comes from "Observe Agent for `<your name>`" or, for a connected agent, "`<your name>` (via `<client>`)". A run started from a mention never resolves or reopens the thread. Only a revision started over the API with `comment_id` resolves the thread when it saves a version. **Revise the dashboard** on an answer posts its result in the thread and leaves the thread as it was. A discussion entry reads "asked the agent" only when the message started a run. A message that mentions an agent but started none, such as a comment for everyone, reads "mentioned the agent". A message can mention one agent when it asks for a run: with two, the form says "Mention one agent per message" and does not send. ### When a mention does not start a run A mention does not start a run, and the form says why, when: - you are viewing an older version: "You are viewing an older version. Open the latest version to send this to the agent."; - you are editing the layout: "Finish editing the layout to send this to the agent." When the server has no model, the box reads "Leave a comment for the team and Claude Code". A comment that mentions `@observe` is saved with a line saying no run started. An external agent can pick the comment up over [MCP](/docs/use/mcp/). ### Read and use the answer When the run left an answer, the reply shows it as an answer card: the answer, and a chip such as "2 evidence panels" that unfolds the evidence panels in place and folds them again. The reply itself reads "Answered.", and the answer shows under it in the thread, so everyone who can read the thread reads what was found without opening the run. When the answer suggests a change to the dashboard, every reader sees "Suggested change: `<change>`". Someone who may reply in the thread also gets **Revise the dashboard**. It posts "Revise the dashboard: `<change>`" in the thread as you and starts a run, yours and taken by the agent that answered. That run saves a new version when you can edit the dashboard, and opens a proposal when you can only comment. Once the change is asked for, or was already applied from that answer, the button reads **Revision asked for** and is off until you reload the page. Asking again while that run is waiting or running, or after it succeeded, posts nothing more. A refusal, such as five revisions already waiting on the dashboard, shows the server's reason and leaves the button as it was. The button is off in these cases: - A message to the agent could not be sent because you are viewing an older version or editing the layout. It shows the same reason as the form below. - The server has no model and the built-in agent answered. It shows "No model is connected to this server, so the agent cannot make this change." On a [starter dashboard](/docs/use/activity/#audit-folder), and for anyone who can no longer comment on the dashboard, the answer keeps its suggested change without **Revise the dashboard**. A starter adds "This starter dashboard is kept current by SlashObserve releases, so it cannot be edited. Duplicate it to get a copy you can change." with **Duplicate**, which opens the same dialog as the dashboard menu. A revision the server still refuses as `provisioned` shows "This starter dashboard is kept current by SlashObserve releases, so it cannot be edited." ### Keep the answer as an observation The person who asked gets **Create observation**, which saves the answer as an observation and opens it. In the web app it sits beside the chip when the agent marked the answer worth keeping and it is not yet in an observation. Otherwise it sits under the evidence once you unfold it. `observe save-answer` and `save_run_answer` save it whichever way the web app shows it. A question asked in an observation's discussion writes nothing on that observation's page, so its **Create observation** files a new observation, and the reply in the discussion stays. An answer already in an observation links to it with **Open the observation**. When the asker later saves that answer as an observation, everyone who can read the thread still opens it from the thread, and someone who cannot see the new observation reads the answer without it. ## Share a link **Share** in the dashboard's top row opens a Share pane in the same card. - "Link to this dashboard" copies the address of the dashboard. It carries the time range and the variable values you are looking at, and each has a checkbox to leave it out. - "Link to one panel" picks a data or text panel by title and copies a link that opens the dashboard with that panel focused, expanding its row if the row is collapsed. - "Who has access" says "Everyone, by role" for an open folder, or lists the people and groups of a restricted one, with the instance Admins who always have access. A link grants nothing. The person who opens it signs in, and sees "Dashboard not found" when the dashboard's folder is not open to them, the same page as for a link with a wrong id. People who can manage a folder other than General also get a **Manage folder access** button. Everyone else sees who can add people and create public links, namely the people who manage that folder; see [Folders](/docs/teams/folders/). ## See which threads are unread A thread that holds something you have not read shows a small dot before its author's name. It is unread when someone else wrote in it, or the agent answered a request you made in it, after you last opened it, answered in it or joined. Your own messages never make a thread unread, and threads written before your account existed do not count. Click the dot, or click or focus anywhere in the thread, and it counts as read for you alone. Answering in a thread marks it read too. Over the API each thread and comment carries `unread`, and `list_comments` shows it on the first comment of each thread. `POST /api/v1/threads/{thread_id}/read` marks one read for a person, and a service-account key never has unread threads. ## See who else is viewing While a dashboard is open, the header shows "Also viewing" with the names of the other people who have it open. It lists up to three names and a count for the rest, and is empty when nobody else is there. Anyone who can view the dashboard sees the names, and a person counts for 45 seconds after their open page last reported in. Over the API, `GET /api/v1/dashboards/{id}/viewers` returns the list. `list_dashboard_viewers` returns it over MCP, and `observe dashboards viewers <dashboard-id>` prints it. A service-account key never counts as a viewer. ## Resolve and reopen a thread A thread has **Resolve** and, once resolved, **Reopen**. A resolved thread folds to its first line with the number of replies, such as "2 replies". **Show thread** unfolds it and **Hide thread** folds it again. The buttons are hidden while a request tied to the thread is waiting or running. A resolved thread reads "Resolved by version N" when the agent or an MCP client resolved it with the version that fixed it, and "Resolved by `<name>`" when a person did. With no model on the server, an open thread reads "Open, waiting for `<client>`", so the person or tool that will act on it is clear. Resolving and replying need the same access as commenting. A Commenter sees **Resolve** only on a thread they started, and the server refuses any other with 403 `not_starter`. An Editor or an Admin resolves any thread, and every commenter may reopen one. Over the API and MCP each thread carries `allowed_actions`, the actions the caller may take now (`reply`, `resolve` or `reopen`). It is empty for someone who may not comment, and leaves out `resolve` for a Commenter on a thread they did not start; see [States](/docs/reference/states/). A thread can also be on a [proposal](/docs/concepts/proposals/), written `proposal:<id>` as the target of the threads API. It has no panel or version and follows the proposal's dashboard: View reads it and Comment writes to it. ## Switch between versions The version button in the dashboard's top row reads "Live · v3" when you are on the latest version and "v2 of 3" when you have pinned an older one. "Live" becomes "Connecting" or "Reconnecting" while the page has no connection for live updates. A dashboard in a background tab lets go of that connection after 15 seconds and catches up with what changed when you return to it. When someone moves the dashboard into a folder you cannot open, the page shows "Dashboard not found" as soon as that connection ends. Choose the button to see the five newest versions, each with its number, summary, author and time, and "Latest" on the newest. Picking one pins it in the page address as `version=2`, so a link shares exactly that version. While a version is pinned, the dashboard is read-only: you cannot edit the layout or a panel, and you cannot send changes to the agent. Open the latest version first. When someone saves a newer version, a toast reads "Version N is available" with **View latest**. On the latest version the page switches by itself and says "Updated to version N". ### Open the version history **Compare versions** in the menu opens the history page, `/d/<id>/versions`, headed "Versions of `<title>`". It lists every version in a table with Version, Summary, Author, Saved and Actions, 50 at a time with **Load more**. Badges mark "Latest" and "Restored from v2" for a version created by a restore. **View** opens the dashboard at that version. ## Compare two versions 1. Open the history page and choose **Compare** on a row. It compares that version with the one before it, and version 1 compares against "an empty dashboard". 2. To pick another pair, use the **From** and **To** menus in the section "Changes from v2 to v3". "Empty dashboard" is available under **From**. The page asks you to pick an older version on the left when From is not earlier than To, and says "No differences" when the two are equal. Changes are grouped by the dashboard, then each panel and variable. A row is Added, Removed, Changed or Reordered, and a changed value shows its Before and After. **Show all** expands a long one. ## Restore a version 1. Choose **Restore** on any row except the latest. It needs Edit on the dashboard's folder. 2. Read the dialog "Restore version N?", which says "This saves a new version X with the dashboard exactly as it was in version N. Nothing is deleted." 3. Confirm. A new latest version is added with the summary "Restore version N", the toast reads "Restored version N as version M", and you return to the dashboard. Restore is a copy, not a rewind. The server checks that the old Spec is valid and that its datasource references still exist, but it does not run the panel queries again. A restored panel can therefore show no data if its datasource has changed since, and panels already marked unverified stay so. If someone saved a newer version while the dialog was open, it says "Version M was saved meanwhile." and the button changes to "Restore on top of version P". ## Related pages - [Chat and follow-ups](/docs/use/chat/) for what the agent does with a request. - [Edit a panel](/docs/use/edit-panel/) to fix a panel by hand, which also saves a version. - [MCP](/docs/use/mcp/) for agents that read and resolve comments from outside. - [Agents](/docs/use/agents/) for handing a comment to a connected agent and choosing whether it saves or proposes. - [Proposals](/docs/concepts/proposals/) for a change that waits for someone to merge it. # Edit a panel > Change a panel's queries, settings or JSON in the panel editor and save the result as a new version. Source: https://slashobserve.com/docs/use/edit-panel/ · Markdown: https://slashobserve.com/docs/use/edit-panel/index.md The panel editor changes one panel by hand and saves the dashboard as a new version. Use it when you know the change you want, or when the agent's panel is close but not right. For a broader change, ask the agent as described in [Chat and follow-ups](/docs/use/chat/). What you edit is a draft, and nothing changes for anyone until you save. ## Change a panel 1. Open the panel's menu ("Panel menu: `<title>`") and choose **Edit**. The **Activity** card turns into the editor, headed "Edit `<panel title>`" with the line "A draft. Nothing changes until you save." 2. Change the query, the title or a setting. The preview above the query runs your draft on the real datasource as you type. 3. Check the footer, which states what you changed, such as "2 changes: query, title". 4. Choose **Save as version N**. You see the toast "Saved version N" and return to the timeline. Editing a panel needs Edit on the dashboard's folder; see [Who can edit](#who-can-edit). A Commenter can open the editor too and send the change as a proposal. From a terminal or an agent, `observe dashboards panels <dashboard-id> --summary <text> --file <patch.json>` and the `update_panels` MCP tool save the same kind of change, and the HTTP route is `POST /api/v1/dashboards/{id}/panels`. [CLI](/docs/use/cli/) describes the patch file. ## Open the editor Open a panel's menu and choose **Edit**. The address gains `panel=<id>` and `edit=query`, so you can bookmark it. **Close panel** or **Back to activity** returns to the timeline. When the dashboard and the editor do not fit side by side, the editor opens as a sheet over the bottom of the screen. On a phone the preview is shorter so the query has room. The **Editor view** switch at the top changes between **Editor** and **JSON**. Data panels, text panels, dashboard lists and news panels can be edited. ### When Edit is missing **Edit** is missing from the menu, or the editor is read-only, when: - you do not have Edit on the dashboard's folder; - you are on a pinned older version, where the editor says "Open the latest version to edit this panel." with an **Open latest version** button; - the panel is a row or a placeholder, which says "This panel cannot be edited." ### Leave without losing a draft Pressing Escape, the browser's Back or Forward, or leaving the page, with unsaved changes asks "Discard your changes?" with **Keep editing** and **Discard**. **Keep editing** keeps the draft and its address. An editor opened from a bookmark or a pasted link adds the dashboard without the editor behind it in the browser history, so Back asks the same question instead of leaving the app. If your session ends while you have unsaved changes, for example because another tab signed you out, the editor keeps them in this tab's session storage. After you sign in and reopen the panel, "Your unsaved changes were kept." offers **Restore my changes**, which lays them over the panel as it is now, and **Discard them**. Nothing is kept when you close the editor in any other way, and nothing reaches the server. ## Add a panel 1. On a dashboard, open **More** and choose **Add panel**. The editor opens headed "Add a panel" with the line "A new panel. Nothing changes until you save." It holds a time series panel titled "New panel" below the last panel, using the datasource of the dashboard's first data panel, or the first configured datasource when it has none. 2. Pick the type, datasource and query as for any panel. 3. Save. The summary is `Add "<title>"` unless you add a note. **Add panel** needs Edit on the dashboard. It is missing when no datasource is configured, and disabled while you are on a pinned older version or have unsaved layout moves. ## Start from a blank dashboard On the Dashboards page, **Create dashboard** offers **Ask the agent** and **Blank dashboard**. **Ask the agent** opens the chat, and is marked "needs a model" when the server has no model provider. **Blank dashboard** asks for a title and a folder, starting in My Dashboards, and creates a dashboard holding one text panel that says how to add panels. Remove that note from its panel menu once you have added your own panels. ## Edit queries For a data panel, the **Preview** section sits at the top and the query rows below it. **Datasource** picks the default datasource of the panel. It lists your configured datasources and any datasource variable the dashboard defines. Each query row can use another datasource through its own menu. A row is "Query A", "Query B" and so on, up to 26. Type the query in the editor. **Legend** sets the name of each series, **Add query** adds a row, and **Remove query A** appears when the panel has more than one query. Rows carry a "New" or "Changed" marker against the saved version. A query is at most 20000 characters, and a legend at most 200. A Prometheus range query also has an **Exemplars** checkbox. When it is on, a time series or a heatmap marks the exemplars Prometheus stored for the query as diamonds on the chart. Hovering one lists its labels, a trace id first, in the tooltip. ### Read the lint The server lints the query, and each problem shows once, under the line that has it, with a marker in the gutter. A screen reader hears it as "Error: `<message>` (line 2, column 14)", or "Warning: ..." for a lesser one. A clean query shows "Syntax is valid." That check covers only how the query is written, and the preview is what runs it. "Lint is unavailable right now." means the check did not run, not that the query is wrong. ### Expressions and reused panels A query that is an expression shows as "Expression B", with its kind (math, reduce, resample or threshold), "hidden" when it is, and a one-line summary such as the math text. The editor does not change an expression. Edit it in the JSON view, or remove it with **Remove expression B**. See [Expressions](/docs/concepts/observespec/#expressions) for what an expression does. A panel that reuses the results of another panel shows "Reused panel A" with "Results of `<title>`", or "Results of `<title>`, after its transforms". That row is read-only, and **Add query** is disabled on such a panel. ### Find a metric or a label **Metrics and labels** opens a browser for the datasource of the active query. 1. Search a metric, or on ClickHouse a table. 2. Select it to see its labels, then a label to see its values. 3. Choose **Insert metric** or **Insert table** to put the name in the query, or choose a value to insert a matcher at the cursor. It lists the first 100 names, and "Showing the first 100. Type to narrow." tells you to search. If the names cannot be loaded, it says "Could not load names." with **Retry**. ### Live preview The preview runs the draft on the real datasource shortly after you stop typing. It uses the time range and variable selections the dashboard page has right now, and draws the panel in the type you chose. It reports its state: - "The draft is not valid yet." while a query has an error. - "Waiting for variables." until the variables the queries use have values. - "Running the draft." - "Draft ran `<time>`, 3 series" when it finished. - "The draft did not run." in place of the chart, with the reason under it, such as "The datasource is not answering." When the lint already shows a query's parse error under its line, the preview does not repeat it. When the draft's queries or datasource differ from the saved panel, a dotted line labelled "Saved in v3" shows the saved panel's data next to yours. A preview is limited like the agent's draft queries: 15 seconds, 200 series, 100,000 points and 1,000 rows, and it is never cached. It runs for a signed-in person who can comment on the dashboard, so a Commenter sees it too while suggesting an edit. It does not run for service-account keys. If the datasource is slow or busy, the preview says so and the draft stays as it is. It can say "The datasource is not answering.", "Too many requests right now. The preview runs again in a moment.", or "Query A failed: it took too long to run." When the draft itself is at fault, such as a query that does not parse, the footer reads "Fix the query to save." and the save button is disabled until the preview runs again. A slow or unreachable datasource does not disable it. ### Ask the agent for a query Below the preview, **Ask the agent** has a box "Ask the agent to change this query", for example "only 5xx, by route", and a **Suggest** button. The agent reads the panel and proposes a change, shown as "Proposed change" with a diff of the queries. - **Accept** applies it to the draft ("Applied the agent's change. Save to keep it."). - **Discard** drops it. - **Try again** asks for another. A suggestion never saves anything. The box is hidden when the server has no model, and unavailable on an older version or while a save is running. ## Change panel settings The settings column has: - **Panel type**. Switching type keeps the queries, redraws the preview and drops display options the new type does not have. [Panel types](#panel-types) lists them. - **Unit**, from the groups it lists, or custom text: a prefix, a suffix, a date format, an SI symbol, a count text or a currency symbol. - **Thresholds**, up to 10 rows, each with a colour and the value it starts from. The colour is OK, Info, Warning, Critical, Text for the theme's text colour, or a custom hex colour. The first row can leave the value empty ("Base"). - **Title**, up to 200 characters. - The display options that belong to the chosen type; see [Display options by panel type](#display-options-by-panel-type). - The field and panel options that the chosen type draws, in groups you can open and close; see [Field and panel options](#field-and-panel-options). Value mappings, links, actions, cell types, dash patterns, gap and null handling, overrides and transformations are edited in the JSON view. **Edit in JSON** under the groups opens it. ## Edit text and dashboard list panels A text panel has a **Content** box instead of queries. It takes Markdown up to 20000 characters, which may contain HTML. The box notes that HTML is cleaned: scripts, styles, forms and embeds are removed. A text panel scrolls inside its box, and a **More** button at its bottom edge shows while content is cut off. The panel's `mode` is set in the JSON view; see [Panels and layout](/docs/concepts/observespec/#panels-and-layout). `markdown` is the default, `html` reads the content as HTML only, and `code` shows it as code with a `code.language` and optional line numbers. Only people and Grafana imports can write HTML. The agent and MCP cannot, so an agent request can leave an HTML panel as it is but not change its text. The agent writes text panels in Markdown, bold, lists and tables included, and writes a requested HTML table as a Markdown table instead of refusing it. A dashboard list panel has the title, **Search**, **Tags** (up to 10), **Limit** (1 to 100), **Keep the time range** and **Include variable values**. A news panel has the title and **Feed URL**. Canvas elements, connections and background images are edited in the JSON view. ## Edit as JSON Choose **JSON** in **Editor view** to see "Panel JSON": the whole panel object, position included, exactly as it will be saved in the ObserveSpec. Edits there update the editor at once when they are valid, and the editor's changes show up in the JSON. An edit that is not valid never reaches the draft. The problems are listed with the line or the path they are about, and "and 2 more" when there are many. While any remain the summary reads "Fix the JSON to save." and the save button is disabled. Leaving the view with errors asks "Discard the JSON edits?" with **Keep editing** and **Discard JSON edits**. Some edits are refused whatever the JSON says: - The `id` must stay the same ("The panel id must stay "`<id>`""). - A panel cannot become a row or a placeholder, or move between data, text, dashboard list and news kinds. - An unknown type reports only that ("`"timeseriesx"` is not a panel type."), not the fields another kind of panel would need. Use the **Panel type** picker to change a data panel's type. ## Save as a new version The footer states what you changed: "No changes", "2 changes: query, title", "Fix the JSON to save." or "Fix the query to save." While you type a title, the editor heading and the panel on the dashboard show it. The dashboard goes back to the saved title when you close the editor without saving. **Add a note** opens "Note for the timeline", up to 500 characters, which becomes the version's summary. Without one the summary is `Changed <what> in "<title>"`, where `<title>` is the panel's saved title before your change. **Discard** drops the draft. The save button reads "Save as version 4" when you are on the latest version, 3. It saves the whole dashboard with your panel replaced, as the next version after the one you opened. The save runs only your panel's queries, as the agent's `update_panels` saves do, and a panel that fails is refused. On success the toast reads "Saved version 4" and you return to the timeline. ### A panel with no data A panel whose queries run but return no data for the dashboard's time range is refused too, with a notice that says so and **Save anyway**. **Save anyway** keeps the panel and marks it "Unverified" with the empty result as the reason. That suits a query that is empty while things are healthy. Only a signed-in person can do this. The agent, MCP clients, the CLI and service-account keys still get the refusal, and a request that sets `accept_empty` with a key answers 403 `user_session_required`. A panel that was already unverified and still fails is kept, marked "Unverified" with the reason it failed when it was saved. ### A refused save A refused save lists "This panel was rejected:" with each query and its problem, and "Other problems in this dashboard:" for panels you did not touch. Your draft stays in place after any refusal. When the check cannot finish, the editor says "The panel could not be checked right now." It names each query and datasource that did not answer, for example "Query B on tempo: query timed out after 15s", with **Try again**. That means the check itself failed, for instance because a datasource did not answer, rather than the panel being wrong. ### Someone saved while you edited If someone saves a version while you edit, the editor says who saved it ("Ada saved version 4 while you were editing.") and the button becomes "Save my changes as version 5". The header keeps the title the panel had when you started, so it agrees with your draft. When you and that version changed the same things, the notice lists them. For a title, datasource, panel type or unit it gives both values ("title: version 4 has "A", yours is "B""). Saving keeps your values for those and version 4's for everything else. When nothing overlaps, the notice says so. The button saves at once. It applies your change to that version's copy of the panel. If the panel no longer exists there it says "This panel no longer exists in the latest version.", and if your change does not fit it says "Your changes do not fit version 4." ### Saving on an older version A save made on an older version is merged by the server when the newer versions changed other panels, variables or settings than you did. The toast then reads "Saved version 5, merged with changes made since version 3". Moving one panel to a different place than a newer version moved it to counts as the same thing. A move of a different field of the panel, such as its width, merges. When the newer versions changed the same things, nothing is saved. The editor lists them under "Version 4 changed the same things", each as the panel title, "Variable `<name>`" or "Dashboard settings" with what clashed. **Reload version 4** replaces your draft with that version's panel. ### Someone deleted the dashboard If someone deletes the dashboard while you have unsaved changes, the editor stays open with your draft. It says "`<name>` deleted this dashboard. Your draft stays here until you close the editor, but it cannot be saved. Copy what you need from the JSON view." The save button is disabled and the footer says "This dashboard was deleted, so this draft cannot be saved." When you close the editor, or when you had no unsaved changes, the page reads "Dashboard deleted" instead of "Dashboard not found". The new version shows up in the timeline and in the version history, where you can compare it with the previous one or restore an earlier one; see [Comments, agent requests and versions](/docs/use/review/). ## Who can edit Editing a panel needs Edit on the dashboard's folder. By default that means Editors and Admins in an open folder. A Commenter or Viewer gets it only when a restricted folder's list gives them Edit. See [Roles](/docs/teams/roles/) and [Folders](/docs/teams/folders/). Without Edit you can still open the dashboard, and a Commenter can [comment on a panel](/docs/use/review/) for an Editor to act on. ### Suggest an edit as a Commenter A Commenter can open a panel's editor with **Suggest an edit** in the panel menu. The save button reads "Propose change" and the footer says "An editor merges your change". Saving creates a [proposal](/docs/concepts/proposals/) instead of a version. The toast reads "Proposed for an editor to merge" with **View proposal**, and saving again while it is open reads "Added to your open proposal (revision 2)". The dashboard's top row shows "1 proposal" while one is open, listing each with its author and "Behind" when the dashboard has moved on. ## Reference ### Panel types **Panel type** can be Time series, Stat, Gauge, Bar gauge, Table, Pie chart, Heatmap, Histogram, State timeline, Logs, Bar chart, Status history, Trend, XY chart, Candlestick, Node graph, Traces, Flame graph, Geomap, Canvas or Alert list. ### Display options by panel type #### Legend and tooltip of time series and trend panels For Time series and Trend panels the legend options are: - **Legend**: Bottom, Right or Hidden. - **Legend values**, up to 8 entries. - **Legend mode**: List or Table, "Table when values are shown" until you choose. - **Sort legend by**: Name or one of the legend values, "Series order" until you choose. - **Sort descending**. - **Legend width**, in pixels, 40 to 2000, for a legend on the right. - **Hide series that are all zero** and **Hide series with no values**. A series hidden from the legend is still drawn. Time series, Trend and Candlestick panels also have these tooltip and axis options: - **Tooltip**: Single series, All series or Hidden. - **Tooltip sort**: Series order, Ascending or Descending, which is the default. - **Hide zero values in the tooltip**. - **Show stacked totals in the tooltip**. - **Tooltip max width** and **Tooltip max height**, in pixels, 100 to 2000. - **X axis**: Shown or Hidden. The sort, zero and total options apply to a tooltip that lists all series. Every legend and tooltip option below uses the same names and values unless the section says otherwise. #### Reducers in stat, gauge, bar gauge and pie chart panels For Stat, Gauge, Bar gauge and Pie chart panels, **Calculation** picks how each field is reduced to one value. **Calculation** lists the common reducers, and a **More** search box below it finds any other reducer by name or id. **Legend values**, **Sort legend by** and a table's **Footer** list their own short set, with the same **More** search. The last value has two names, depending on the control: - In **Calculation**, "Last" is the last non-empty value and "Last, including empty" is the last value, empty or not. - In the short list of **Legend values** and **Footer**, the last non-empty value is "Last (not null)". Other options of these panels: - **Show every value** shows one value per row instead. - **Row limit** (1 to 5000) caps the rows shown per field. - **Fields** shows a field by name or by a pattern such as `/^cpu/` instead of every number field. #### Stat A Stat panel also has: - **Orientation**: Auto, Horizontal or Vertical. - **Color mode**: Value, Background or None. - **Show graph**, with **Graph style**: Area or Line. - **Text**: Auto, Value, Name, Value and name or None. - **Alignment**: Auto or Center. - **Title size** and **Value size**, in pixels from 1 to 200, empty for the default. - **Show percent change**, with **Percent change size** (pixels from 1 to 200) and **Percent change color** (Standard, Inverted or Same as value, applied to the arrow only). - **Wide layout**, which puts the name beside the value on wide tiles. Without a **Value size**, a long value such as a state name is drawn smaller, down to 12 pixels, to fit its tile. Tiles that would not fit the panel at full height are made shorter before the panel scrolls. #### Pie chart Pie chart panels add: - **Pie type**: Pie or Donut. - **Slice order**: Largest first, Smallest first or Data order. - **Slice labels**: Name, Value and Percent, written on the slices that are big enough. - **Label name size** and **Label value size**, in pixels, empty for 12. Their legend options are: - **Legend**: Bottom, Right or Hidden. - **Legend values**: Value and Percent, both until you choose. - **Legend mode**: List or Table. - **Sort legend by**: Name or Value, "Series order" until you choose. - **Sort descending** and **Legend width**. A pie chart's tooltip has **Tooltip** (Single series, All series or Hidden), **Tooltip sort**, **Hide zero values in the tooltip**, **Tooltip max width** and **Tooltip max height**. The sort and zero options apply to a tooltip that lists all series. Clicking an entry in a pie chart's legend hides its slice, and the rest share the circle. #### Bar chart Bar chart panels add: - **Orientation**: Auto, Horizontal or Vertical. - **X field**, a field name; empty is the first text or time field. - **Color by field**, which colors each category by that number field's thresholds. - **Show values**: Auto, Always or Never. - **Value text size**, 6 to 100 pixels, empty for 12. - **Bar width** and **Group width**, a share above 0 and at most 1. - **Bar radius**, 0 to 0.5 of the bar width. - **Highlight the whole category**. - **X label rotation**, -90 to 90 degrees. - **X label spacing**, the minimum pixels between labels, 0 to 500, 0 for automatic. - **X label max length**, 1 to 200 characters before an ellipsis. They sit next to the legend and tooltip options. #### Histogram Histogram panels add: - **Bucket size**, a number above 0, empty for automatic. - **Bucket count**, 1 to 1000, empty for automatic. - **Bucket offset**, which shifts the bucket edges. - **Stacking**: Stacked, Percent or Overlaid. - **Combine all series**. They sit next to the legend and tooltip options. A bar chart or histogram tooltip shows the hovered series or all series, in the order of **Tooltip sort**. **Hide zero values in the tooltip** is on by default for a histogram. Clicking an entry in a bar chart or histogram legend hides its series, and the rest are redrawn. #### XY chart XY chart panels add: - **X field**, a field name; empty is the first number field. - **Show**: Points, Lines or Points and lines. - **Point size**, 1 to 40. - **Smallest point size** and **Largest point size**, 1 to 100, which a series with a size field scales between. They have the same legend and tooltip options as a histogram. The series mapping, meaning the x, y, size and color fields and the name of each series, is edited in the JSON view. An XY chart draws a point in the color of its color field when the series has one. Clicking a legend entry hides the series, and the tooltip lists the size and color values of the hovered point. #### Gauge and bar gauge Gauge panels add: - **Show threshold markers** and **Show threshold labels**. - **Minimum gauge width** and **Minimum gauge height**, 1 to 2000 pixels. - **Title size** and **Value size**, 1 to 200 pixels. Bar gauge panels add: - **Orientation**: Auto, Horizontal or Vertical. - **Bar style**: Basic or LCD. - **Value**: With threshold state, Plain text or Hidden. - **Name placement**: Auto, Top, Left or Hidden. - **Show unfilled area**. - **Minimum bar width**, **Minimum bar height** and **Maximum bar height**, 1 to 2000 pixels. - **Title size** and **Value size**, 1 to 200 pixels. #### Traces Traces panels add: - **Search**, which matches a service, operation, id or attribute. - **Services**, comma-separated names, up to 50, with **Exclude these services**. - **Operations**, comma-separated names, up to 50, with **Exclude these operations**. - **Shortest span** and **Longest span**, in milliseconds, 0 to 86,400,000. - **Show matching spans only**. - **Show the critical path only**. Without the matching switch, the spans that do not match are dimmed. #### Logs Logs panels add: - **Wrap lines**. - **Show time**. - **Order**: Newest first or Oldest first. - **Show unique labels** and **Show common labels**. - **Show line attributes**, which hides the label chips on each line when it is off. - **Log details**, with **Details placement**: under the line or in a side panel. - **Prettify JSON messages**. - **Deduplication**: None, Exact, Ignore numbers or Ignore letters and numbers. - **Controls bar**. - **Font size**: Default or Small. - **Highlight key=value and levels**. - **Line fields**, up to 20 field names that build the line instead of the message. - **Time precision**: Milliseconds or Nanoseconds. #### Table Table panels have: - **Show header**. - **Row height**: Small, Medium, Large or Fit content. - **Maximum row height**, 20 to 1000 pixels, for rows that fit their content. - **Frame**, 0 to 99, to show only that frame when the data has several. - **Show column type icons**. - **Paginate rows**. - **Frozen columns**, 0 to 10. - **Sort by**, a column name, and **Sort descending**. - **Footer**, up to 5 calculations, with **Footer columns** (up to 50 names) and **Footer row count**. Column settings such as width and alignment are under **Table columns**. The cell type is edited in the JSON view. #### Heatmap Heatmap panels have these groups of options. Buckets: - **Calculate buckets**, which turns raw samples into cells. - **Time buckets** and **Value buckets**, each with a mode (Automatic, Size or Count) and a value. - **Time bucket scale** and **Value bucket scale**: Linear, Log or Symmetric log. The value scale can also follow the Y scale. - **Time bucket log base** and **Log base** for the value buckets: 2 or 10, 2 by default. - **Y scale**: Linear or Log. - **Pre-bucketed rows**: Upper bounds when labeled le, Upper bounds, Lower bounds or One row per series. - **Pre-bucketed value field**, for data that is already bucketed. Color: - **Color mode**: Opacity or Scheme. - **Color scheme**, one of 17 ramps such as Blues, Viridis or Magma. - **Opacity color**: Green, Blue, Yellow, Red or Text, and the series color by default. - **Opacity scale**: Linear or Exponential, with **Opacity exponent** from 0.1 to 2. - **Color steps**, 2 to 128, empty for a continuous ramp. - **Color range start** and **Color range end**. - **Reverse colors**. - **Color legend**: Shown or Hidden. Cells: - **Cell gap**, 0 to 25 pixels, and **Cell radius**, 0 to 10 pixels. - **Show values**: Auto, Always or Never. - **Cell value unit** and **Cell value decimals**, 0 to 10. - **Hide cells at or below** and **Hide cells at or above**. Axis and tooltip: - **Y axis**: Left, Right or Hidden, with **Y axis label**, **Y axis width** (0 to 400), **Y axis unit**, **Y axis decimals**, **Y axis minimum**, **Y axis maximum** and **Reverse Y axis**. - **Tooltip**: Hovered cell, Every row of the column or Hidden. It comes with **Tooltip histogram**, **Tooltip color scale** and the max width and height. - **Show exemplars**, with **Exemplar color**: Green, Blue, Yellow, Red or Text, and the foreground color by default. #### State timeline and status history State timeline panels have: - **Merge equal values**. - **Show values**: Auto, Always or Never. - **Row height**, a share of the row, 0.1 to 1. - **Rows per page**, 1 to 100, empty for every row. - **Align values**: Left, Center or Right. - **Legend**, **Legend mode** and **Legend width**. - **Tooltip**, **Tooltip sort**, **Hide zero values in the tooltip** and the tooltip max width and height. Status history panels have the same, with **Column width**, a share of the cell from 0.1 to 1, in place of **Merge equal values** and **Align values**. A legend of State timeline and Status history panels lists the first 12 states and says how many more there are. #### Trend A Trend panel has an **X field**, a field name that is empty for the first number field. It needs a numeric x field and at least one more numeric field. Without them it shows the table with a note that says so. Its legend, tooltip and **X axis** options are the ones listed for time series. #### Candlestick Candlestick panels have: - **Mode**: Candles and volume, Candles or Volume. - **Candle style**: Candles or OHLC bars. - **Color strategy**: Open to close or Close to close. - **Up color**, **Down color** and **Flat color**: OK, Info, Warning, Critical or Text. Flat color is the up color until you choose. - The **Open field**, **High field**, **Low field**, **Close field** and **Volume field** names. - **Draw other fields as lines**. - **X axis**. - The legend and tooltip options of a time series, except hiding all-zero and empty series. #### Node graph and flame graph Node graph panels have **Layout** (Layered, Force or Grid) and **Zoom with the scroll wheel**. Flame graph panels have no display options. #### Geomap Geomap panels have these options: - **View**: Fit to data, World, Coordinates or a region. The regions are North America, South America, Europe, Africa, West Asia, South Asia, South-East Asia, East Asia, Australia and Oceania. Coordinates adds **Latitude** (-85 to 85), **Longitude** (-180 to 180) and **Zoom** (1 to 18). - **Location**: Auto, Coordinates or Geohash, with the **Latitude field**, **Longitude field** and **Geohash field** names. - **Size field**, **Color field**, **Marker size** and **Largest marker size**, 1 to 100. - **Basemap**: Outline, CARTO, Esri, OpenStreetMap, Custom XYZ or None. It comes with the settings of the one you pick: - **CARTO theme** (Match the app, Light or Dark) and **Show CARTO labels**. - **Esri map** (World imagery, World physical, Topographic, USA topographic or Ocean). - **Custom XYZ URL**, an https URL with `{z}`, `{x}` and `{y}`. - **Basemap attribution**, **Basemap opacity** (0 to 1), **Lowest tile zoom** and **Highest tile zoom** (0 to 18). - **Draw the world once**. - **Lowest zoom** and **Highest zoom**, 0 to 18, and **Fit padding**, 0 to 50 percent of the smaller side. - The controls **Show zoom buttons**, **Zoom with the mouse wheel**, **Show attribution**, **Show scale bar**, **Show measure tool** and **Show zoom and center**. - **Tooltip**: Details or None. The editor has no layer settings; edit `layers` in the JSON view. #### Canvas Canvas panels have **Calculation**, **Background color**, **Border color**, **Border width** (0 to 20 pixels), **Border radius** (0 to 100 pixels), **Pan and zoom**, **Pan beyond the canvas** and **Tooltip** (Details or None). The colors are OK, Info, Warning, Critical or Text. A Canvas panel with no element, connection or background image says it has no elements. #### Alert list Alert list panels have **Limit** (1 to 100), **Sort** (A to Z, Z to A, Importance, Oldest first or Newest first) and **View** (List or Count). ### Field and panel options Below the display options the column lists the ObserveSpec field and panel options that the chosen panel type draws, grouped as the Spec groups them. Each group shows how many of its options are set, and only **Standard options** starts open. An empty field shows the Spec default, or "Auto" when there is none. A choice list starts on "Default", naming the default value when the Spec has one. Choosing the default value removes the option from the panel, so the saved JSON holds only what you changed. A number or text that the Spec would refuse is marked with what it accepts, such as "A whole number from 0 to 10.", and is not applied until it fits. #### Details of the groups - **Standard options.** **Decimals**, **Min**, **Max**, **Display name**, **No value text**, **Color mode**, **Color scheme**, **Color** and **Threshold mode**, for every type that draws field values. Heatmaps leave out the color options, which their own color settings replace, and flame graphs have only **Decimals**. - **Range.** **Range each field by its own values** for gauges and bar gauges, and **Neutral value** for gauges. - **Series.** Draw style, line width, interpolation and style, fill opacity, points and point size, stacking and its group, value labels, line, fill and point colors, bar alignment, width factor and max width, **Show thresholds**, **Transform**, **Fill below to**, **Treat nulls as zero** and the three hide options, for Time series, Trend and Candlestick panels. Time series also has **Color by value**. - **Axis.** Placement, label, soft min and max, scale, log base, linear threshold, centered zero, width, grid lines, border and color, for Time series, Trend, Candlestick, Bar chart, Histogram and XY chart panels. - **Bars.** For Bar chart panels: fill opacity, line width, stacking, **Show thresholds** and the three hide options. For Histogram panels: fill opacity, line width, stacking, its group and the hide options. - **Cells.** For State timeline and Status history panels: fill opacity, line width, **Hide in tooltip** and **Hide in chart**. - **Points and lines.** For XY chart panels: line width, line style, point shape, point stroke width, fill opacity and the three hide options. - **Series visibility.** The hide options for pie charts, and **Hide in chart** for heatmaps, geomaps and canvases. - **Table columns.** Column width and min width, cell alignment, column filter, cell inspect, hide and wrap header, field description and the cell tooltip field and placement. - **Panel.** For every data panel: **Description**, **Transparent background**, **Hide title**, **Relative time** (like `now-1h`), **Time shift** (like `1h`), **Hide time info**, **Min interval** and **Max data points**. Time series, State timeline and Status history panels add **Time zone**. - **Repeat.** **Repeat for variable**, **Repeat direction** and **Max per row**. ### Limits | What | Limit | | --- | --- | | Query rows on a panel | 26 | | Query text | 20000 characters | | Legend text | 200 characters | | Panel title | 200 characters | | Thresholds | 10 rows | | Note for the timeline | 500 characters | | Text panel content | 20000 characters | | Dashboard list tags | 10 | | Preview run | 15 seconds, 200 series, 100,000 points, 1,000 rows | # Import Grafana dashboards > Import a Grafana dashboard from the web page, the CLI or MCP, with datasource and folder matching, the import report, and what each Grafana option becomes. Source: https://slashobserve.com/docs/use/import-grafana/ · Markdown: https://slashobserve.com/docs/use/import-grafana/index.md Import a Grafana dashboard to get a SlashObserve dashboard with the same panels, variables and layout. Use it to move a dashboard over from Grafana, or to try SlashObserve on a dashboard you already know. Every panel is kept: what cannot render yet becomes a placeholder, and the import report lists what did not convert. You can import from the web page, from the CLI with `observe import`, over MCP with the `import_grafana_dashboard` tool, or over HTTP. The JSON can be the classic dashboard model, an export that shares a dashboard externally, or the response of Grafana's dashboard API. To bring over every dashboard of a running Grafana in one run, with its folders, see [Switch from Grafana](/docs/use/switch-from-grafana/). ## Import a dashboard in the web app Every person can create in their own My Dashboards, so an import always has a place to go. A service-account key needs a folder grant that lets it create. 1. On Home, open the **Import a dashboard** tab. Paste the dashboard JSON into **Grafana dashboard** and choose **Preview**, or choose or drop a file there. Home opens the **Import from Grafana** page at `/import` with your dashboard loaded; see [Home](/docs/use/home/). On that page you can also drop a file, or paste JSON anywhere outside a text field. 2. Under **Datasources**, match each Grafana datasource to one of yours. SlashObserve matches the ones it can; [Match datasources](#match-datasources) says how. A row that is not matched has a **Choose a datasource** menu, and the import stays off until you pick one. 3. Read the panel list. The filters **Needs a look**, **Partial**, **Placeholders** and **All panels** show which panels did not convert whole. Nothing runs against your datasources yet, so these counts cover only what the importer already knows. 4. Under **Folder**, check where the dashboard goes. The card starts on the folder you chose on Home, else the shared folder you imported into last, else **Automatic**. [Choose the folder](#choose-the-folder) says where each choice goes. 5. Choose **Import as new dashboard**. You see "Imported as `<title>`, version 1" and "In folder `<title>`", and **Open dashboard** takes you there. The server saves the dashboard as version 1 and runs every query once. A panel whose queries fail is kept and marked unverified instead of failing the import. The preview before the import runs no query, so more panels can need a look afterwards; see [Panels marked unverified](#panels-marked-unverified). ## Import from the CLI, MCP or HTTP With the CLI, preview first, then import: ```sh observe import checkout.json --preview observe import checkout.json --map prometheus=prom --folder Platform ``` `--preview` saves nothing. It prints the dashboard's title, format and sizes, and whether it is ready. It prints an `Already imported as` line when you imported the file before. Then it prints a datasource table (`GRAFANA`, `TYPE`, `PANELS`, `MATCH`, `BY`), the counts and the panels that need a look. The import prints the new dashboard's address on standard output. The counts line, the `Folder:` line, a folder note and the panels that need a look go to standard error: ```text https://observe.example.com/d/9f2c.../checkout Imported "Checkout": 12 panels, 10 imported, 1 partial, 1 placeholders, 0 unverified Folder: Platform ``` `-` reads standard input. A file can be up to 8 MiB, and the request the CLI builds from it, with the JSON written as an escaped string, must also fit in 8 MiB. A larger request answers `413 too_large`. If a datasource has no match, the command fails with `datasources_unresolved`, shows the table and tells you to pass `--map '<grafana>=<uid>'`, which you can repeat. `--update <dashboard id>` and `--as-new` are for a file you imported before; see [Update a dashboard you already imported](#update-a-dashboard-you-already-imported). [CLI](/docs/use/cli/) lists the other flags. Over HTTP, send the JSON as a string in `json`: ```sh curl -fsS -X POST "$OBSERVE_SERVER/api/v1/imports/preview" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d "$(jq -n --rawfile json checkout.json '{json: $json}')" ``` `POST /api/v1/imports/preview` saves nothing, and `POST /api/v1/imports` saves the dashboard. The web page and `observe import` call these two routes. Both take `json`, `mapping` (Grafana datasource key to your datasource uid), `folder`, `update_dashboard` and `refuse_existing`. A `mapping` with more than 50 entries, or a key or value that is not 1 to 200 bytes, answers `400 invalid_request`. Both answer `403 forbidden_role` when the caller cannot create dashboards in any folder. A caller can run 1 import and 2 previews at a time, and the instance 4 of each. The `import_grafana_dashboard` MCP tool runs the same import with `json`, `mapping`, `folder`, `update_dashboard` and `import_as_new`. `import_as_new` cannot be combined with `update_dashboard`. Inside the built-in agent's runs the JSON has to be in the run's prompt, `update_dashboard` is refused, and `refuse_existing` is not set. The tool, and the built-in agent that uses it, refuse JSON that converts to an HTML text panel, a placeholder panel or a panel action. They fail with `import_content_not_allowed`, because the agent and MCP clients never write those. The web page and `observe import` keep them. ## Match datasources Each datasource the dashboard uses is matched to one of yours, in this order: 1. the mapping you give; 2. a Grafana uid equal to one of your datasource uids; 3. `grafanaUids` in the [datasources file](/docs/reference/datasources-file/), shown as `alias` in the `BY` column; 4. being the only datasource of its type. An import cannot be saved while a datasource of a supported, configured type has no match. SlashObserve never guesses between two datasources of the same type. Give the match with the mapping that comes with the request, or add the Grafana uid to `grafanaUids`. SlashObserve imports Prometheus, ClickHouse, Loki, Tempo, Elasticsearch (the `elasticsearch` plugin) and OpenSearch (the `grafana-opensearch-datasource` plugin) datasources. A Grafana datasource whose type has no configured datasource here does not block the import. Its panels import as placeholders that say so, such as "No Loki datasource is configured.". A datasource of another type, such as InfluxDB, imports its panels as placeholders that say "Influxdb is not supported yet.". Over MCP, and in the built-in agent, such a dashboard is refused with `import_content_not_allowed`, because placeholders are import-only. ## Import from a Grafana link An Admin can paste a dashboard link instead of the JSON, such as `https://grafana.example.com/d/abc123/checkout?orgId=1`. The Grafana needs a [connection](/docs/use/switch-from-grafana/#connect) in Settings. 1. On Home, in the **Import a dashboard** tab, paste the link into the **Grafana dashboard** field. 2. Choose **Preview**. Home fetches the dashboard and opens the import page with it. The **Folder** field there chooses the folder the import page starts on. 3. Continue as in [Import a dashboard in the web app](#import-a-dashboard-in-the-web-app). Only Admins can do this, because the connection's token is an Admin's credential and could read every dashboard it is allowed to. Everyone else pastes the JSON. Over HTTP, `POST /api/v1/grafana/link` takes the link as `url`, fetches the dashboard with the connection's token and returns it as `json`. `POST /api/v1/imports/preview` and `POST /api/v1/imports` take that value as it is. The link must be a `/d/<uid>` or `/d-solo/<uid>` link under the connection's address, and the server fetches only from the hosts of stored connections. The fetch never adds the connection's domain to the [outbound allowlist](/docs/operate/outbound-access/). | Answer | Meaning | | --- | --- | | `403 outbound_domain_not_allowed` | The connection's domain is not on the outbound allowlist, because an Admin removed it or `SLASHOBSERVE_OUTBOUND_DOMAINS` does not name it. The link works again once it is allowed. | | `404 no_connection` | No stored connection matches the link. | | `404 dashboard_not_found` | Grafana has no such dashboard, or the token cannot read it. | | `409 secret_key_missing` | `SLASHOBSERVE_SECRET_KEY` is not set, so the stored token cannot be used. | | `409 token_unreadable` | The server cannot read the stored token. | | `422 not_a_dashboard_link` | The text is not a web address, or the link is on a connection's address but is not a `/d/<uid>` or `/d-solo/<uid>` dashboard link. | | `502 grafana_unavailable` | Grafana failed or refused the token. | ## Import a Spec you exported A dashboard exported with **Export spec JSON** is an ObserveSpec, not a Grafana dashboard. Drop or paste it on the import page. The page recognises it when the text starts with `{` and has a string `specVersion` and a `panels` array, skips the Grafana conversion and the datasource matching, and shows **Create dashboard** instead of **Import as new dashboard**. It creates the dashboard from the Spec as it is, in the folder you pick, as version 1. The server validates the Spec and runs every query as it does for [`observe dashboards apply`](/docs/use/cli/), and it reports a Spec it refuses with the first problem. No import report is made, because nothing was converted. ## Choose the folder The dashboard goes into a folder, chosen in this order: 1. The request's `folder` title: `--folder` for `observe import`, `folder` for the API and the MCP tool. The web page sends the folder you pick in its **Folder** card, and sends none when the choice is **Automatic**. 2. The `meta.folderTitle` of an export taken from Grafana's dashboard API, which names the folder the dashboard had in Grafana. 3. Your default folder: your My Dashboards, or General for a key. A title matches an existing folder without regard to case. A title of `General` or `My Dashboards` means your default folder, and so does an export title that is empty or not a valid folder title. An invalid `folder` in the request is refused with `400 invalid_request`. When no folder has the title, an Editor or Admin creates it, and a Viewer's dashboard goes to the default folder instead. When a folder has the title but you cannot create dashboards in it, the dashboard also goes to your default folder. Either way the response carries a `folder_note` saying so, and `observe import` prints it on standard error, even with `-q`. On the web page, the **Folder** card lists the folders where you may create dashboards, except General. General is left out because a title of `General` means your default folder, which **Automatic** already gives you. The page starts on the folder you chose on Home, else on the shared folder you last imported into in this browser, as long as you can still create in it. Creating a dashboard from a Spec also counts. General and My Dashboards are never remembered. Pick **Automatic** to use the export's folder or your My Dashboards instead. After an import the page shows the `folder_note` when the dashboard did not go where the request or the export asked. The server chooses the folder before it saves the dashboard, so an import that then fails can leave a new, empty folder behind. Delete it from its settings page. ## Update a dashboard you already imported Importing the same Grafana dashboard twice would make two copies, so the import checks first. The import record keeps the dashboard's Grafana uid in `grafana_uid`, and `GET /api/v1/grafana/resolve/{uid}` finds the dashboard from an old Grafana link. Only the first import of a uid holds it, and only a uid of 1 to 40 letters, digits, `-` or `_`. Importing the same uid again makes a separate dashboard whose record has an empty `grafana_uid`, until the dashboard holding it is deleted. When you can see the dashboard that holds the uid, the preview's `existing` field names it. The import page then says "Already imported as `<title>` (version `<n>`)". When you can edit it, the page also offers **Update `<title>`**. Updating saves the file as the dashboard's next version and refreshes its import record, so edits made since stay in the version history. **Import as new dashboard** still makes a second copy. On the CLI, `--update <dashboard id>` does the update, and `--as-new` makes another dashboard on purpose. Without either flag, `observe import` and the MCP tool set `refuse_existing`, so the call fails with `409 already_imported` and an `existing` object (`dashboard_id`, `title`, `version`, `can_update`). Over MCP, pass `update_dashboard` or `import_as_new`. Over HTTP, `update_dashboard` on `POST /api/v1/imports` takes the dashboard id and answers 200 instead of 201, and `refuse_existing` asks for the 409. An update only takes the file the dashboard was imported from. A file with another Grafana uid, or none, answers `409 grafana_uid_mismatch`, names the dashboard's uid and the file's, and changes nothing. Import it as a new dashboard instead. A dashboard imported from a file with no uid takes any file. An update keeps the dashboard in its folder and ignores `folder`. ## Panels marked unverified A first import is the one save that tolerates failing queries. It saves the dashboard as version 1, runs every query once, and records the panels and variables whose queries fail as unverified, in the import report instead of an error. For Editors and Admins, the **Imported, not verified** problem filter on the [dashboards list](/docs/use/dashboard-health/#in-the-dashboards-list) lists every dashboard that still has unverified panels or variables or placeholder panels. **Repair** sends them to the agent; see [Repair](/docs/use/switch-from-grafana/#repair). Later saves keep a failing panel or variable unverified for as long as these stay unchanged: - its queries and the variables they use; - its panel type; - its time override (`timeFrom` and `timeShift`), `maxDataPoints` and `interval`. A new or changed query must return data, and a panel whose queries pass again is no longer unverified. A save with the `update_dashboard` tool runs every query. A save with the `update_panels` tool runs only the queries it changed. It runs every query when it changes the dashboard's default `time`, or its title while a query or variable uses the `__dashboard` macro. Either way a panel the save did not change stays unverified while it still fails, and an unverified panel that now returns data leaves the list. A panel or row that repeats on a variable is checked as one copy, with the first value the variable offers or the first value selected. That is how the dashboard draws each copy, with a single value, so its query is not run with All and a healthy repeated panel is not marked unverified. ## Read the import report The report sits below the panel list. **Show every option, block by block** opens it, grouped by block: the dashboard settings, each variable, each row, and each panel with its queries, transformations, field config and overrides. Each block is collapsed until you open it. It lists every Grafana option the block carried as one of: - mapped, with the ObserveSpec fields it became; - excluded by decision, with the reason SlashObserve leaves it out; - not imported, with the reason. An option mapped without a field name is one no catalog describes yet, such as the options of legacy panels. Options that need no setting (Grafana defaults, options with no visible effect and editor bookkeeping) show as a count that you can open. A very large dashboard lists at most 200 options per block and 10,000 in all, keeping excluded, then not imported, then mapped options before those that need no setting. A value SlashObserve does not support, such as a delay in days or a time zone name the server does not know, is left out and listed. Query-based annotations are not imported, and the report says so under the dashboard's annotations. Add SlashObserve annotations with the CLI, the HTTP API or an MCP client; see [Annotations](/docs/use/annotations/). When any panel carried Grafana alert rules, one dashboard note named "alert rules" lists those panels. That covers an alert list of Grafana-managed alerts and a legacy graph alert. The note says that alert rules, contact points and silences are not imported, so alerting stays on Prometheus rules and Alertmanager. The server stores the original JSON with the import, so a newer importer can convert it again. The API never returns it, and the agent never sees it. ## Reference ### Limits and errors | Limit or error | Value | | --- | --- | | Request body | 8 MiB, the JSON as a string plus the mapping; larger answers `413 too_large` | | JSON that does not parse | `422 invalid_json` with the line and column, or a note that the file ends early and may be cut off | | JSON that is not a dashboard, a format it does not know, or too many panels | `422 not_a_dashboard`, `422 unsupported_format` or `422 too_many_panels` | | A mapping that names a datasource the dashboard does not use, one that is not supported, or one that is not a configured datasource of that type | `422 invalid_mapping` | | Too many imports or previews at once | `429 too_many_imports` | | An update target that is not an import | `404 not_imported` | | A datasource with no match | `422 datasources_unresolved`, listing each datasource with its candidates | | Already imported | `409 already_imported` with `existing` | | Update with another Grafana uid | `409 grafana_uid_mismatch` | | Invalid `folder`, a mapping with more than 50 entries, or a mapping key or value that is not 1 to 200 bytes | `400 invalid_request` | | HTML text, placeholder or panel action over MCP | `import_content_not_allowed` | | Options in the report | 200 per block, 10,000 in all | | Transformations | 20 per panel | | Queries on a panel | 26 | ### Dashboard settings A dashboard's time settings, links and editability import as follows. | Grafana setting | Imports as | Notes | | --- | --- | --- | | Time zone, week start and fiscal year start month | The [dashboard fields](/docs/concepts/observespec/#the-dashboard) `timezone`, `weekStart` and `fiscalYearStartMonth` | | | The time picker's now delay | The `nowDelay` dashboard field | | | Time range | The same range | It may use `now/fy` and `now/fQ`. A range written in epoch milliseconds becomes the same moment as an absolute time. | | The time picker's hidden flag, refresh intervals (in seconds, minutes, hours or days) and quick ranges, and the dashboard's live now switch | Carried over | A refresh interval of `500ms` is left out and reported. | | Links to other dashboards by tag | Links that list the matching dashboards | | | Links to an address | Links that keep their keep-time and include-variables options | | | A link's tooltip | Imported as written | It is cut to 200 characters and reported when cut. | | Dashboard, panel and row titles | Trimmed, with control characters turned into a space and invisible format characters removed | Dashboard, panel and row titles are also cut to 200 characters and reported when cut. | | Link icons other than Grafana's default, and placement in the controls menu | Reported | | | A dashboard that is not editable in Grafana (`editable: false`) | Reported; read-only dashboards are not part of SlashObserve | | Details of titles: line breaks and other control characters turn into a space, and an empty result becomes `Imported dashboard`, `Row` or no panel title. Format characters are removed (such as zero-width and bidirectional override characters), except U+200C, U+200D, U+200E, U+200F and U+061C, which are kept. A few filler characters are removed too: U+034F, U+115F, U+1160, U+2800, U+3164 and U+FFA0. The [text rules](/docs/reference/text-rules/) then accept the title. Details of the other settings: - A dashboard keeps at most 20 links and 20 tags. A link by tag with an invalid tag, or with more than 20 tags, is dropped whole. - Tags are lowercased, other characters become `-`, and a tag is cut to 40 characters. An empty or repeated tag, or one past the first 20, is dropped and reported. - A link of any type other than an address or a list of dashboards by tag is dropped and reported. So is an address that is empty, over 2000 characters, or does not start with `http`, `https` or `mailto`. - At most 20 refresh intervals import, in whole seconds, minutes, hours or days. - At most 30 quick ranges import, with the name cut to 100 characters. - The dashboard's refresh, description, tags and shared tooltip setting (`graphTooltip`, as `cursorSync`) import too. - A time range the Spec cannot hold falls back to the last 6 hours. ### Variables #### Custom, text box and interval variables A query's min step written as a variable (`$name`, `${name}` or `[[name]]`) imports as `${name}` when that variable imports as an `interval` variable, so the query uses the step selected in that variable. Otherwise the min step is not kept and the report says so. A `custom` variable becomes an `interval` variable, without a note, when all of these hold: - its options are all durations, and it has at most 50 of them; - it is single-select and has no All; - some query uses it as a min step. A `custom` variable's `text : value` pairs import as `{ text, value }` options, so the picker shows the text and the selection uses the value. A text box imports its saved value as its default, else its default text. #### Query variables - A `query` variable's sort imports as `alpha`, `num`, `alphaCaseInsensitive` or `natural`, each in its two directions. - `allowCustomValue` imports as written, with Grafana's own default of true when it is missing. - Static options import as `staticOptions`, with Grafana's placement as `staticOrder`. - A query variable that Grafana never refreshes imports as `refresh: "never"` with its saved options as the static options, so only those are offered. One that never refreshes and has no saved options keeps loading, and the report says so. - `regexApplyTo` imports without a note at its default `value`. At `text` the regular expression is not applied, because options here carry a value only, and the report says so when the variable has a regular expression. A `query` variable whose query uses a variable the dashboard does not declare is dropped and reported, and the panels that use it become placeholders. The exception is a `query` variable (tested with Prometheus) whose undeclared `$name`, `${name}` or `${name:format}` is the label that exactly one other `query` variable lists with `label_values(selector, name)`. VictoriaMetrics' per-tenant dashboard has this after its rename of `accountID` to `account`. The reference imports as that variable, the report says so on the variable, and the panels that use it import whole. A variable that lists the label without a selector, a variable that depends on the one being repaired, or two variables that list the label keep the drop. #### URL sync, hidden variables and datasource variables A variable's `skipUrlSync` imports as written, so it stays out of the URL and starts from its default on every load. A variable that Grafana hides in the controls menu (`hide` 3) imports shown and is reported, except a `constant` variable, which is not reported. So is a datasource variable's `multi`, `includeAll` or `allowCustomValue: false`, because a datasource variable selects one datasource from the ones it lists. #### Ad hoc variables - A saved ad hoc filter list imports as the variable's `default`, and its base filters as `baseFilters`. Each filter keeps its key label and first value label. A filter's `values` list is not stored. It is accepted without a note when it is the regular expression's alternatives joined with `|`, and reported otherwise. - On ClickHouse the operators `<` and `>` and the condition OR import too. On Prometheus those three are reported, because label matchers can only be ANDed and have no comparison. - A filter with another operator, an invalid key or regular expression, or another condition is reported, in the base filters as in the saved ones. - `defaultKeys` import as `keys` (up to 100), the keys the filter picker offers instead of asking the datasource. Grafana's key texts are shown as the keys themselves, and the report says so. - On Prometheus, `allowCustomValue: false` imports as `listedValuesOnly`, so a filter's key and value must be picked from the lists the picker shows. On another datasource the picker lists no values, so it is reported. - A ClickHouse ad hoc variable imports with `applyToAll`, so its filters apply to every query on its datasource; see [Ad hoc filters](/docs/concepts/datasources-and-variables/#ad-hoc-filters). For the Altinity plugin the report notes that Grafana filters only the outermost query. #### Group-by variables A Grafana group-by variable on Prometheus imports as a `groupby` variable. Its current labels (else its default value) become the `default`, up to 20 labels that are valid label names. Like Grafana, it adds the selected labels to the grouping of every aggregation in the queries on its datasource, so the queries need no change. Its saved label options import as `keys` (up to 100 valid label names), the labels the picker offers instead of asking the datasource. A group-by variable on any other datasource is dropped and reported. A Grafana 13.1 ad hoc variable with `enableGroupBy` on Prometheus imports as the ad hoc variable plus a `groupby` variable. The new variable uses the same datasource and visibility, has no saved labels and is named `<name>_groupby` (or the first free name that follows that pattern). It keeps the ad hoc variable's `skipUrlSync` and its `defaultKeys` as `keys`. On another datasource, or when the dashboard already holds 20 variables, `enableGroupBy` is reported. #### Loki and Tempo variables A Loki query variable imports as written, and one saved in the label values form becomes `label_values(<stream>, <label>)`. A Loki label names variable and any Tempo query variable keep their saved values as a fixed list. An ad hoc variable on Loki or Tempo is dropped and reported. While a Loki variable selects All, `${var}` in a stream selector becomes `.+`, because Loki refuses a selector whose matchers all match an empty value. In a label or line filter after the selector it stays `.*`. A custom All value that matches an empty value, such as `.*`, is kept as written and reported when a Loki query uses the variable, so change it to `.+`. ### Queries #### Prometheus - A min step of `$__interval` or `$__rate_interval` imports as no minimum, and a resolution factor from 2 to 10 is kept as `intervalFactor`. - A query that Grafana runs as both an instant and a range query (`instant` and `range` both on) imports as two queries. The range query keeps its ref. An `instant` copy without the min step or resolution factor takes the next free ref, which the report lists as `refId A (instant) -> B`. Both queries are hidden together, and a style override or a `filterByRefId` transformation that names the original ref covers the copy too. - A query with `instant` on and `range` unset or off stays one instant query. - When an instant copy would take the panel past 26 queries, only the range query is kept and the report lists the instant one. - A target's `exemplar` flag is kept on a time series and a heatmap. It is dropped without a note on an instant query and on every other panel type, which draw no exemplars. #### Loki A Loki query imports its LogQL as written, on the matched Loki datasource. A Loki metric query keeps its legend and keeps a resolution from 2 to 10 as `intervalFactor`. It runs as an instant query when its `queryType` is `instant` (or, with no `queryType`, when `instant` is on). A Loki `step` of `$__interval` or `$__auto` imports as no minimum. Another step becomes the smallest step and is reported, because Grafana uses that step as is. `$__auto` in a Loki query becomes `$__range` in an instant query and `$__interval` otherwise, and the report lists the rewrite. A Loki log query, one that starts with a stream selector, always reads the whole time range. Its legend, resolution and step have no effect, and an instant log query is reported. A Loki query whose `queryType` is `stream` imports as a range query and is reported. #### Tempo A Tempo query imports its TraceQL or trace id as written, on the matched Tempo datasource. A trace id held in a variable, such as `${trace_id}`, is looked up after the variable is expanded. The Tempo search form state saved beside a TraceQL query is editor state and imports without a note. That state is the filters, group-by, service names, durations and the metrics options. These Tempo queries are dropped, and a panel left with no query becomes a placeholder: - the search builder and the legacy search; - the service graph; - an uploaded trace file; - a TraceQL metrics pipeline such as `| rate()`. #### Elasticsearch and OpenSearch An Elasticsearch or OpenSearch query is compiled from its Lucene query, metrics and bucket aggregations on the matched datasource. Two kinds import as `lucene:<query>`: - a query whose only metric is a count over an automatic date histogram on the time field; - a logs, raw data or raw document query (by `queryType`, by its first metric, or by the OpenSearch `luceneQueryType`), which runs as an instant query that returns lines. A raw document query is reported, because it shows `_source` and SlashObserve shows lines. Every other query imports as a Query DSL body. It holds a `query_string` of the Lucene query, with the bucket aggregations nested in their order around the metrics, keyed by their Grafana ids. The bucket aggregations import as follows: - date histograms with `$__interval` or the fixed interval, and `$__from` and `$__to` as extended bounds; - terms with their size, order and missing value, where a size of 0 means 500; - filters, labelled as saved; - histograms. Metrics import as follows. | Metric | Imports as | | --- | --- | | `avg`, `sum`, `min`, `max`, `cardinality`, `percentiles`, `extended_stats` and `rate` | The same metric, with its fields and settings | | `moving_avg` | A `moving_fn` with an unweighted average over its window; the model is not kept and nothing is reported | | `moving_fn`, `derivative`, `cumulative_sum`, `serial_diff` and `bucket_script` | The same metric, with its window, bucket paths and scripts | | `count` | The implicit metric | | A hidden metric (`hide: true`) | Drawn anyway, and reported | | A metric of a type SlashObserve does not know | Reported and left out of the query; the query is dropped when no metric is left | | A bucket aggregation other than those listed above | The query is not imported and the report gives the reason | An empty Lucene query matches everything, as in Grafana. A query's `alias` imports as the legend, with `{{term <field>}}` rewritten to `{{<field>}}` and `{{field}}` written out as the metric's field name. A `timeField` on a query is editor state: Grafana copies the datasource's time field onto every query, and a date histogram without a field uses it. A query variable saved as `{"find": "terms", "field": <field>, "query": <lucene>}` becomes `label_values(lucene:<query>, <field>)`, or `label_values(<field>)` without a query, and its `size` is reported. A `{"find": "fields"}` variable is dropped and reported. A variable query in any other form keeps its saved values as a fixed list, and is dropped when it has none. An ad hoc variable on Elasticsearch or OpenSearch imports as on ClickHouse, with the operators `<` and `>`, the condition OR, and dotted field names as keys. It does not set `applyToAll`, because these datasources filter every query anyway. #### ClickHouse queries from the Altinity plugin A query that starts with a whole-query macro is written out as plain ClickHouse SQL that uses SlashObserve's time macros, so the saved query no longer needs the Altinity macros. The whole-query macros are `$rate`, `$perSecond`, `$delta` and `$increase` with their `Columns` and `ColumnsAggregated` forms, `$columns` and `$columnsMs`, and `$lttb` and `$lttbMs`. A whole-query macro that is not at the start of the query, or whose arguments cannot be read, means the query is not imported. The query is dropped and the report gives the reason. Inside a query, these macros import as follows. | Macro | Imports as | Notes | | --- | --- | --- | | `$naturalTimeSeries` | Buckets by year, month, week or day for long ranges | | | `$timeFilter64ByColumn` | The millisecond time filter | | | `$timeFilterByColumn(column)` | `$__timeFilter(column)` | Only for a plain `DATETIME` column without `round`. See the time column rules below. An unreadable call means the query is not imported. | | `$adhoc` | The dashboard's ad hoc variable, when exactly one ad hoc variable uses the query's datasource | See the details below. | | `$conditionalTest(condition, $variable)` and its three-argument form `$conditionalTest(condition, otherwise, $variable)` | `$__conditionalAll`, which writes the otherwise condition when the variable selects All, as the plugin does | See the keyword rule below. | Details of `$adhoc`: it becomes `1` without a note when the dashboard declares no ad hoc variable. It becomes `1` with the note "Ad hoc filters inside this query are not applied." when ad hoc variables exist but not exactly one uses the query's datasource. A condition that starts with `AND` or `OR` keeps that keyword outside the macro. For example `$conditionalTest(AND service IN ($service), $service)` becomes `AND $__conditionalAll(service IN ($service), $service)`, because the macro writes the condition inside parentheses. With an otherwise condition, both conditions must start with the same keyword. A call whose two conditions start with different keywords, or only one of them with a keyword, means the query is not imported, and the report gives the reason. #### Time columns and counter macros The query's time column type decides how the time macros read the column. `DATETIME64` keeps its sub-second precision. `TIMESTAMP` and `FLOAT` hold seconds since the epoch. `TIMESTAMP64_3`, `_6` and `_9` hold milliseconds, microseconds and nanoseconds since the epoch. These numeric types are compared as numbers and bucketed as times. A type that is not in this list is read as `DATETIME`, and the report says so. `$timeFilterByColumn(column)` becomes `$__timeFilter(column)` only for a plain `DATETIME` column without `round`. A `DATETIME64` column gives `$__timeFilter_ms(column)`, a numeric time type gives explicit comparisons, and a `round` gives `toDateTime(...)` bounds. The `round` option rounds the start of the range down and the end up in the time filter, `$from` and `$to`. The first bucket of a counter macro has no value when `extrapolate` is off, because by default it is compared with a virtual earlier bucket. The `Columns` forms return one row per time and key (time, key, value), which SlashObserve draws as one series per key, named by the key. Counter macros always use window functions (`lagInFrame`), whatever the plugin's `useWindowFuncForMacros` says, because `runningDifference` is deprecated in current ClickHouse versions. The first point of a counter series has nothing to subtract from: - a rate treats the previous point as one step earlier; - a delta or increase is 0; - a per-second value is empty. #### Options the plugin carries The plugin's `extrapolate` option is converted, and the report does not mention it. When it is off, the first bucket of a counter macro is nan. The `round` option is applied when it is `$step` or a whole number of seconds from `1s` up. `0s` or an empty value means no rounding. Any other value is reported and the range is not rounded. A ClickHouse query that keeps its generated SQL drops the query builder's settings without a note. #### Server-side expressions A server-side expression (math, reduce, resample or threshold) imports as an expression query that reads the queries it names; see [Expressions](/docs/concepts/observespec/#expressions). A threshold keeps its main condition without its recovery threshold, because Grafana applies the recovery threshold only when it evaluates alert rules. These are dropped, with the reason in the report: - a classic condition, because it belongs to alert rules, which SlashObserve does not import; - a SQL expression, because SlashObserve does not support it; - a math function SlashObserve does not support, and math that reads a dashboard variable or a `$__` global; - an expression whose input query did not import; - expressions that depend on each other in a circle. A panel keeps at least one data query or becomes a placeholder. ### Field options and overrides #### Units, names and descriptions A unit imports as itself. Unit text Grafana does not know imports as the suffix Grafana shows, up to 20 characters. A display name keeps `${__field.name}`, `${__field.displayName}`, `${__series.name}`, `${__data.refId}`, `${__field.labels.<label>}` and dashboard variables in all four syntaxes. Other `__` tokens, such as `${__data.fields[0]}`, are reported. A field description (`fieldConfig.defaults.description`, also as an override property) imports on tables, where it is the tooltip of the column header, cut to 2000 characters. On every other panel type it is reported, because they draw no field description. A field's `fieldMinMax` imports on gauges and bar gauges, where fields otherwise share one range. It is left out silently elsewhere, where every field already has its own range. #### Colors and value mappings A field's color mode imports as one of these: - the classic palette (the default); - a palette by series name; - a fixed color; - shades; - a named color scheme; - `thresholds`, where the panel type draws it. A series-colored mode imports on time series and trend panels. `thresholds` imports on time series and trend panels, and on the panel types that color by threshold anyway it imports without a note. A scheme also imports on stat, gauge, bar gauge, table (when its cells are colored), bar chart, XY chart, state timeline and status history. There, a state is colored by its place between the field's min and max, else the data's, and a value mapping color wins. A histogram colored by `thresholds` whose thresholds are only the base step imports as a fixed color, the base step's, because Grafana draws a histogram series in the color of the step its last value meets. With more steps it is reported. A color mode a panel type does not draw is reported as "The color mode X is not drawn on Y panels." A value mapping keyed by the empty string imports as the empty-value mapping. A value mapping's icon is reported, and its text and color are kept. #### Overrides An override imports its matcher and its properties like the panel's own. The matchers are: - by name, by a regular expression, by type, by a list of types, by a regular expression or names, and by a list of names; - numeric fields, time fields, first field, first time field and every field; - query ref, and value. A list of types becomes one override per type. A value matcher may reduce with `allIsNull` or `allIsZero`, which is how many dashboards hide series that are empty. On time series and trend panels, and on the extra series of a candlestick, the series properties import too: - negative-Y and constant transforms; - hiding from the legend or tooltip; - stack group and fill below to. A legacy graph's series overrides import the same way. In a series override's `custom.stacking.group`, a stack group written as `false`, `true` or a number becomes that text, so its series stack together and apart from the default group `A`. In a legacy graph override, `stack` is a boolean (stacking on or off) or a group name, and a number is reported. A group on a series whose stacking is `none` has no effect. #### Panel links and data links A data link's `oneClick` imports on stat, gauge, bar gauge and table panels. On every other type it is reported, and the link stays a panel link. A panel link to another dashboard, named by its title, imports as a link that opens that dashboard when it is clicked. Imported dashboards get new ids, so the title is looked up at click time. When several dashboards you can see share the title, or none does, the link opens the dashboards list filtered by the title instead. The link carries the time range when Grafana's keep-time option was on and the variable selections when include-variables was on. A panel link to an address keeps both options the same way, as the link tokens `${__url_time_range}` and `${__all_variables}`. A panel link is reported and not kept in these cases: - its type is neither an address nor a dashboard; - it has no address, or its address is over 2000 characters or does not start with `http`, `https` or `mailto`; - it is a dashboard link with no title, or with a title over 200 characters. #### Field actions Field actions are HTTP fetch actions in a field's defaults and overrides, with their inputs, button color, confirmation and one-click. They import on stat, gauge, bar gauge and table panels, the types that draw them, and are reported on other types. An action that is not an HTTP fetch is reported. A one-click action stays one-click only when it is the field's only data link or action. ### Panel types #### Titles, time overrides and time zones A panel with no title imports with an internal name (`Panel <id>`) that menus and screen readers use but that is not drawn, as in Grafana. A transparent panel is drawn without a border or background. A panel that hides its time override (`hideTimeOverride`) imports as `hideTimeOverride`, which leaves the override note out of the panel header while the override still applies to the queries. A time series, state timeline or status history panel's single time zone imports as the panel's `timezone`, so its times are drawn in that zone. The zone is `options.timezone`: `utc`, `browser` or an IANA zone. `default` and an empty entry mean the dashboard's. A list of several zones is reported, because Grafana draws one axis per zone and a panel draws in one. #### Layout and panels that reuse another panel Panels in a collapsed row keep their layout relative to the topmost one, whatever order they were saved in. An entry of a panel list that is not an object, and a row inside a collapsed row, are not kept, and the report lists each one by its path under "panels". Grafana's `-- Dashboard --` query, which shows another panel's results, imports as a query that reuses that panel; see [Reusing another panel's results](/docs/concepts/observespec/#reusing-another-panels-results). Panels that reuse another are converted after all the others. Its `withTransforms` setting is kept, and `adHocFiltersEnabled` imports as `adHocFilters`, which filters the reused rows by the dashboard's ad hoc filters. The query is dropped with "The panel this one reuses could not be imported." when the source panel: - is missing; - is not a data panel; - repeats; - itself reuses another panel. A panel left with no query becomes a placeholder. A reusing panel takes its time range and step from its source, so its own `interval`, `maxDataPoints`, `timeFrom` and `timeShift` are reported. A reusing query that sits beside other queries is dropped and reported. #### Time series, trend and candlestick A time series, trend, candlestick or legacy graph panel imports: - its legend: placement, list or table mode, values, sort, width and, on a legacy graph, hiding series that are all zero or empty; - its tooltip: sort, hide zeros, maximum width and height, and a legacy graph's cumulative values; - the axis options; - the line style: interpolation, width, dots, dashes with a custom dash and gap length from 1 to 100 pixels, square dots, and points; - the fixed line, fill and point colors, and the point symbol (circle or square); - value labels; - how gaps draw: spanning nulls, or inserted nulls given in milliseconds or at the query interval; - the bar alignment and width, the threshold style, and a candlestick's extra number fields. A named Grafana color becomes its hex color. Grafana's `text` color (the theme's text color) becomes the Spec color `text`. Any other CSS color name, such as `gray`, becomes its hex color. These are reported: - a point symbol other than a circle or square; - a dash pattern that is not one dash length and one gap length, each a whole number from 1 to 100 pixels; - an axis placement of top or bottom. A point size on a time series with automatic points sizes the isolated points that automatic points draw. Grafana's own size 5 is left out without a note, because it draws them at the usual size. This applies to automatic points only. A size of 4 is reported, because it cannot be told from no size. An axis color mode other than `series` is Grafana's default, `text`. A candlestick imports its up, down and flat candle colors. A flat candle, whose open equals its close, otherwise takes the up color. The annotation lane options of a time series panel (`options.annotations.multiLane` and `clustering`) import without a note. Grafana 12.3 does not define them, and SlashObserve draws annotations as markers, not lanes. #### State timeline and status history Both import: - the row height (and a status history's column width); - the legend and tooltip, including hiding a series from the tooltip; - line width, fill, null spanning and inserted nulls; - the rows per page (`perPage`, from 1 to 100), which pages the rows with previous and next buttons. A state timeline also imports its value alignment. These import without a note, because these panels have no value axis and their legend lists states: - a legend sort or calculation; - hiding a series from the legend; - the value axis options. A legacy discrete panel imports as a state timeline with its value, range and color maps and its unit. The keys that Grafana's own discrete panel migration does not read import without a note: row height, text sizes, colors, time axis, time precision and the legend value choices. #### Value options of stat, gauge, bar gauge and pie chart These panels import their value options: the first reducer, "Show" as every value (`allValues`, with `limit` when it is not 5000) and the `fields` name or pattern. Grafana uses only the first reducer of these panels, so extra reducers are dropped without a note. #### Stat A stat panel imports its text alignment (`justifyMode`), `wideLayout`, percent change (`showPercentChange` and `percentChangeColorMode`), and its title and value sizes. The sizes are `text.titleSize` and `text.valueSize`, from 1 to 200 pixels, and a size outside that range is reported. The percent size (`text.percentSize`) imports like the other text sizes. The line graph mode (`graphMode: line`) draws the sparkline as a line without the area under it. #### Gauge and bar gauge A gauge imports its threshold labels and its neutral value (`custom.neutral`, the value the bar grows from). A bar gauge imports its `lcd` display mode, value mode, name placement, unfilled area and orientation (horizontal, vertical or auto). Both import their text sizes (`text.titleSize` and `text.valueSize`, from 1 to 200 pixels). The `basic` and `gradient` bar gauge display modes import as the basic bar, because bar gauges are drawn flat. When the sizing is Manual, a gauge or bar gauge imports its minimum width and height, and a bar gauge its maximum height. It uses Grafana's own defaults when they are not set. With Auto sizing Grafana ignores these limits, so they are left out without a note. #### Pie chart A pie chart imports its slice labels (name, value and percent), their text sizes (`text.titleSize` and `text.valueSize`, from 1 to 200 pixels), its legend and its tooltip. The legend imports its placement, list or table mode, the values it shows (value and percent), the sort by name or value, the sort order and the width. The tooltip imports its mode, sort, "Hide zeros" and maximum width and height. A pie chart's slice order (`options.sort`) imports: largest first by default, smallest first, or the order of the data. A series hidden from the legend or the tooltip in the field options imports as it does on a time series, and stays drawn. A legend sorted by a calculation such as Mean, the pie chart's orientation and its legend calculations import without a note, because a pie has no orientation and its legend shows no calculations. #### Bar chart and histogram A bar chart imports: - its label rotation, spacing and maximum length (`xTickLabelRotation`, `xTickLabelSpacing` and `xTickLabelMaxLength`); - `barRadius` (up to 0.5), `fullHighlight` and `colorByField`; - the value text size (`text.valueSize`, 6 to 100 pixels); - its legend and tooltip like a time series does, including the table mode, legend calculations, sort, width and the tooltip sort, "Hide zeros" and maximum sizes; - the threshold style (lines, areas or both over the value axis). A histogram imports `bucketOffset`, `combine`, its stacking mode (normal, percent or none), the stack group of each series, and the same legend and tooltip options. Grafana's own `none` stacking and `single` tooltip are written explicitly, because a histogram without them stacks series and lists all of them. On both: - the axis options (label, soft limits, log and symlog scales, centered zero, width, grid, border and color mode) apply to the value axis; - `lineWidth` is the bar border and `fillOpacity` the bar fill; - a series hidden from the legend or the tooltip in the field options imports and stays drawn. A fully transparent fill is reported, because bars are drawn opaque at 0. A histogram's `thresholdsStyle` and the bottom or top axis placement are still reported. #### Heatmap A heatmap imports: - the color mode, scheme, steps, scale and exponent, fill, range (`color.min` and `color.max`) and reverse; - the cell gap and radius, the cell value unit and decimals, the legend toggle, `showValue`, and the low and high value filters (`filterValues.le` and `ge`); - the calculated buckets (`calculation.xBuckets` and `yBuckets`: mode, value and the y scale with its log base); - the y axis: placement left, right or hidden, unit, decimals, range, width, label and reverse; - the rows layout (`rowsFrame.layout`); - the tooltip: `single`, `multi` as all rows, `none` as hidden, the y histogram, the color scale and the size limits; - the exemplar color. It writes Grafana's own defaults when the panel does not set them: scheme mode with the Oranges scheme, 64 steps, a gap of 1 and values shown where they fit. Grafana ignores the scale, exponent and fill in scheme mode and the scheme in opacity mode, so they are left out without a note. A scheme with no color ramp (such as Cool) or a fill color with no matching theme color is reported, and the heatmap then uses the default scheme or the first series color. A time bucket size is read in seconds when it has no unit, and a lone bucket value without a mode is taken as a size. The selection modes `xy` and `y` are reported. Hiding a series from the heatmap legend or tooltip imports without a note, because a heatmap draws one field. A heatmap that Grafana still runs through its own Angular migration imports whole. That is a `dataFormat` with a schema version below 37, or with empty `options`. These import: pre-bucketed or calculated rows, bucket bound as the rows layout, bucket sizes and counts, the log base, y axis unit, decimals, range and visibility, color mode, scheme and scale, card padding and rounding, hidden zero buckets, reverse, tooltip decimals as the cell decimals, tooltip and legend. The highlight of the hovered card is not drawn, and a hidden time axis, `splitFactor` and a log base other than 2 and 10 are reported. A heatmap that already has `options` keeps the Angular keys it was saved with (`dataFormat`, `yAxis`, `color`, `cards`, `tooltip` and the rest) without a note, because Grafana never reads them again. Its `options.tooltip.show` decides the tooltip as Grafana's migration does. A `fieldConfig` color is not drawn, since a heatmap colors its cells from `options.color`. #### Table A table column imports how its cells are drawn (`custom.cellOptions`, or the older `custom.displayMode`) as the field option `cell`: - colored text; - a colored background, with `applyToRow` as `wholeRow`; - a bar gauge (basic or `lcd`, with its value display); - a sparkline, with its line style, fill, points, null spanning and soft axis limits as the column's field options; - JSON, an image (with its alt text and title), data links, pills, the `actions` cell type, and markdown (with `dynamicHeight`); - `wrapText` as `wrap`. Gradient backgrounds and gauges, and the sparkline gradient mode, are drawn flat. Map cells are reported by decision. Thresholds are kept for the columns whose cells they color. A table column also imports these options, and the older table panel's column alignment. | Grafana key | Imports as | | --- | --- | | `custom.width` and `custom.minWidth` | Width and minimum width | | `custom.align` | Alignment | | `custom.filterable` | Filter | | `custom.inspect` | Inspect | | `custom.hideHeader` | Hidden header | | `custom.wrapHeaderText` | Wrapped header | | `custom.tooltip` | The cell tooltip, with its field and placement | A table imports: - its row height (`sm`, `md`, `lg` and `auto`, which fits each row to its content) and the maximum row height (20 to 1000 pixels); - the frame it shows (`frameIndex`, 0 to 99); - type icons, pagination and frozen columns; - the first column of `sortBy` with its direction; - its footer: the reducers (a footer that is shown without a reducer sums), the columns it covers and the row count. A table panel's `options.showSearch` and `options.filterable` are not table options in Grafana (the column option is `custom.filterable`), and they import without a note. A second sort column, more than 10 frozen columns and the footer reducers of a single column's override are reported. The older table panel's saved sort is dropped silently when it is Grafana's own default (the first column, descending) and reported otherwise, because it names a column by position. A table with `styles` and no `fieldConfig` is read as Grafana reads it, as the older table panel. Its styles import as column units, decimals, names, alignment, thresholds and hidden columns. A style's `dateFormat` on a column that is not a date and its link options when `link` is off are Grafana's own no-ops and import without a note. A table that already has a `fieldConfig` keeps the Angular keys it was saved with without a note, because Grafana never reads them again. Those keys are `styles`, `transform`, `columns`, `sort`, `showHeader`, `fontSize`, `pageSize` and leftover graph options such as `yaxes`, `lines` and `legend`. On a table, `custom.hidden` (written `true` or `"true"`) and `custom.hideFrom.viz` hide the column, in the panel's defaults or in an override. #### Logs A logs panel imports: - its unique and common labels, log details and where they open (`detailsMode`); - prettified JSON, deduplication, controls bar, font size and syntax highlighting; - the displayed fields (at most 20, shown as the line instead of the message); - the log attributes switch (turning it off hides the per-line labels); - the nanosecond timestamp resolution. Infinite scrolling, the field selector and the context toggle are reported. #### Traces and flame graph A traces panel imports its span filters: - the search (`spanFilters.query`); - the service and span name lists, with their `!=` operators; - the minimum and maximum duration (`from` and `to`, written with a unit from `ns` to `h`, up to 24 hours); - `matchesOnly` and `criticalPathOnly`. A filter that is not valid, such as a duration without a unit or a list of more than 50 names, and the tag filters are reported. A flame graph has no options of its own to import. #### Text A text panel imports its HTML mode and its code mode with the language (JSON, YAML, XML, SQL, Go, TypeScript, Markdown or HTML) and the line numbers. Another language is shown as plain text and reported, and the code view has no minimap. Only people can write HTML text: an agent or the MCP server cannot, and the sanitizer still removes scripts and styles. #### Geomap A geomap imports its basemap, the basemap opacity, theme and labels, the view, the map controls and the tooltip. The basemap is the CARTO map Grafana draws by default, OpenStreetMap, an Esri server, or an `xyz` tile address that is an https address written out in full with `{z}`, `{x}` and `{y}`. It also imports the zoom levels an `xyz` tile server serves, and tiles are never requested outside them. The view covers every named region, the zoom limits, the fit padding, fitting to one layer or only the last points, the shared view, and whether the world is drawn only once. A tile address over http is changed to https and reported. An address with a variable in the host, a `maplibre` basemap and its access token are reported and never imported. The mouse wheel zoom is imported as on, because Grafana's default is on. The map draws tiles only when the server may fetch the basemap's host, so allow it under [Images and GeoJSON](/docs/operate/outbound-access/#images-and-geojson). Until then the map shows country outlines. A geomap imports its first 10 layers, each with its opacity, tooltip and the query that feeds it. Later layers are reported. | Layer | Imported options | | --- | --- | | Markers | Size, color, fill opacity, outline width, symbol or a symbol from a field with its alignment, text or a fixed label with its offsets and alignment, fixed and clamped rotation, and a WKT location column | | Heatmap | Radius, blur, and a fixed weight or the weight range of a weight field | | GeoJSON | The bundled country and state maps, an https address and its rules | | Day and night | The night color, the sun, and whether the night is drawn at the start or the end of the time range | | Photos | Border color and size, crop and shadow | | Route | Arrow, line width and line color | | Network | Node color, edge color, edge width and arrow | | Tile (CARTO, OpenStreetMap, Esri, `xyz`) | Theme, labels, Esri server, tile address and attribution | A markers layer without a fill opacity imports Grafana's own 0.4, so the markers are as light as they are in Grafana. A markers layer imports its legend, which Grafana shows unless it is turned off. The legend is a color swatch under the layer name for a fixed color, one entry per threshold step when the color field has thresholds, else the smallest and largest color values. The zoom levels of a tile layer are still reported. Locating points by name uses the bundled country and state gazetteers. These are reported: an airport lookup, other gazetteers, other GeoJSON files, dynamic GeoJSON, the last-point tracker, photo frames, MapLibre basemaps and the other layer types. #### Canvas A canvas imports: - text, metric value, rectangle, ellipse and icon elements (a bundled icon, an https image or an image taken from a field), buttons, and server, triangle, cloud, parallelogram, wind turbine and drone elements; - the constraint and pixel placement, rotation, vertical alignment, border width and radius, an icon's outline color and width, and template text; - background images, and the background, border, pan and zoom and tooltip of the canvas. Pixel placement inside a group is still converted to percent of the panel and reported. A template text shows the values of the element's data, and a reference to a field the data lacks shows as nothing. An outline width that is not a whole number from 0 to 20 is reported. Element links import with their open-in-new-tab setting, and an element's one-click link or action imports as its one-click behavior. A connection imports its path, line style, arrow, a width that follows a field with its range, and its bends (at most 20). Widths or directions that follow a rule are reported. A canvas keeps at most 50 elements and 100 connections, and an element keeps at most 10 links and 10 actions. The rest are reported. #### Canvas actions A canvas element action and a button's API call import when the address is an https address written out in full. The action needs Edit to run, nothing is sent without a confirmation, and only people can add or change actions (the agent and MCP cannot). A canvas action also imports its inputs (`variables`). Its button color (`style`) is reported because a canvas action draws none. An action with a credential in a header or query (such as `Authorization`, a token or an API key) is kept without that header, and the report says so. These are left out and reported: - an action whose address is not https, or has a variable in the host; - an action that refers to a variable the dashboard does not declare; - an action with a body over 10,000 characters; - an infinity action. #### XY chart An XY chart imports its series mapping. With `Manual` mapping each series keeps its x, y, size and color fields, its frame or query and its name. Fields are chosen by name, and y also by names or a regular expression. The older `seriesMapping` and `dims` options import the same way. Point size and color follow the size and color fields, and `custom.pointSize.min` and `custom.pointSize.max` set the size range. These import too: the point shape (circle or square), point stroke width, line width, fill opacity, axis options, legend and tooltip options. The square line style and custom dash patterns import as on a time series, and an ordinal scale is reported. #### Node graph A node graph imports its layout (`layered`, the default, `force` or `grid`) and the greedy zoom mode as mouse wheel zoom. Its stat units and arcs import as overrides on the main stat, secondary stat and arc fields. Node and edge units that differ are reported. #### Placeholders and special panel types These Grafana panel types import as follows. | Grafana panel | Imports as | Notes | | --- | --- | --- | | Annotation list, live panel and Alertmanager panel | A placeholder that gives the reason | Annotations, live streaming and alert rules are not part of SlashObserve. | | Library panel | A normal panel when the export carries its definition, else a placeholder that says library panels are not supported | A dashboard exported for sharing externally carries the definition. SlashObserve has no library panels, so an imported one is copied into the dashboard. | | `welcome` | A text panel with a one-line note | | | `gettingstarted` | A text checklist that links these docs | | | `datagrid` | A table that shows the frame its `selectedSeries` names | It shows the first frame when `selectedSeries` is empty. | | `debug` | A table over its own targets, or a text panel without targets | The debug modes are not part of SlashObserve. | | Alert list | One Prometheus `ALERTS` query | A Grafana-managed or legacy alert list, or one on a datasource that is not Prometheus, becomes a placeholder. | | Dashboard list | A static panel | It needs no datasource match. A starred list is reported and shows dashboards by last update. | | News | A news panel with the feed address, changed from http to https and reported | An empty address gets Grafana's blog feed. The feed's domain must be on the [outbound allowlist](/docs/operate/outbound-access/#news-feeds) before the panel shows items. | #### Legacy panel types Grafana's renamed and retired panel types import as their modern type, such as `graph`, `table-old` and `singlestat`. `grafana-worldmap-panel` imports as a geomap, with its circle sizes, thresholds and colors, view and wheel zoom. A world map whose `locationData` is `countries`, `countries_3letter` or `states` imports as a markers layer that looks places up by name in the countries or US states gazetteer. The `valueName` becomes a `reduce` transform of the queries, and `current` reduces to the last value that is not null. A table-format query makes the transform unnecessary, because its rows already hold one value each. On a world map with table data the `valueName` has no effect, as in Grafana. On any other location, a `valueName` other than `current` is reported. The keys Grafana's own world map migration does not read import without a note: `esMetric`, `hideEmpty`, `hideZero`, `stickyLabels`, the legend, the unit words and the label field. Graph options that Grafana's own time series migration drops import without a note, such as `paceLength`, `hiddenSeries`, `renderer`, `options.alertThreshold`, `yaxis.align`, `yaxis.alignLevel`, the tooltip's millisecond resolution, thresholds without a value, and `percentage` without stacking. A legacy graph alert is excluded with alert rules. A legacy graph's threshold fill and line choose the threshold style the way Grafana's migration does (lines, areas, or both), and `dashLength` and `spaceLength` set the pattern of a dashed line. A legacy singlestat imports without a note for the keys Grafana's own singlestat-to-stat migration drops, such as: - `minSpan`, the prefix and postfix colors, the font sizes, the sparkline fill and full width, and the mapping editor choices; - a prefix or postfix beside a unit (the unit is kept, as in Grafana); - a null mode, except that a connected null mode turns the first value into the first value that is not null. The sparkline line color imports without a note too, because the sparkline is drawn in the series color. ### Transformations Transformations import in order, up to 20 per panel, and a disabled one is skipped. These import: - `merge`, `seriesToRows`, `concatenate`, `transpose` and `heatmap`; - `organize` (and the older `rename`, `order` and `filterFields`), `filterFieldsByName` and `renameByRegex`; - `reduce`, `joinByField` (and `seriesToColumns`), `calculateField`, `sortBy` and `limit`; - `convertFieldType`, `formatString`, `formatTime`, `filterByValue`, `filterByRefId` and `extractFields`; - `labelsToFields`, `joinByLabels`, `partitionByValues`, `prepareTimeSeries`, `timeSeriesTable`, `rowsToFields` and `configFromData`; - `groupBy`, `groupToNestedTable`, `groupingToMatrix`, `histogram` and `regression`; - `spatial` and `fieldLookup`. See [Field options, overrides and transforms](/docs/concepts/observespec/#field-options-overrides-and-transforms) for what each does. Any other transformation, one past the 20th, and an option the Spec cannot hold are reported at their path. #### Grouping steps and calculateField The grouping steps keep only their `by` and `aggregate` fields, as Grafana's output does. They take every reducer, including the true or false and list reducers (`allIsNull`, `allIsZero`, `allValues` and `uniqueValues`). A reducer name Grafana does not have is reported. `calculateField` imports its binary, row reduce (including its list of fields), unary, index, cumulative and window modes. The unary `percent`, a row reduce `nullValueMode` and `timeSeries: false` are reported. A binary calculation over field names with spaces imports. A name that holds a spaced operator, or a matcher other than `byName`, is reported. A `convertFieldType` with no conversions imports as nothing, since Grafana changes no field either. #### Limiting a transformation to some queries A transformation that Grafana limits to some queries (a `filter` of `byRefId`) imports as `queries`, matched against the refs the panel imported. A match is one ref, refs joined with `|`, a list or a `/regex/` pattern. A frame filter (`byFrameRefID`) imports the same way. A ref that did not import, a pattern that matches none and any other filter are reported at `filter`, and the transformation then applies to every query. `filterByRefId` imports `include` and `exclude`. `filterByValue` imports every filter Grafana offers, including `between` and `substring`. `notSubstring` imports only as a transformation's only filter. `formatTime` imports the `utc` time zone, and any other time zone is reported. #### Heatmap, spatial and lookups The `heatmap` transformation imports its x and y buckets, the log, symlog or ordinal row scale, the log or symlog time scale and `keepOriginalData`. A heatmap panel draws its cells directly. An ordinal time scale, a log base other than 2 and 10, and `rowsFrame` are reported. `spatial` imports its action (prepare, calculate or modify), its source and target locations (automatic, coordinates, geohash or lookup) and the line builder. A lookup in `spatial` or `fieldLookup` uses the built-in countries or US states gazetteer. An airports gazetteer or one from a URL drops the transformation and is reported ("Airport lookup is not available." or "Only the built-in countries and US states gazetteers are supported."). ### Options that are not imported Some Grafana options are reported and not imported by decision, because SlashObserve does not have the feature. #### Grafana services and links - Grafana scopes on Prometheus queries, and images served by a Grafana server. - The Infinity datasource (canvas actions and field actions), Explore links, editing data from a panel, and CSS taken from a field. - Recently viewed dashboards and Grafana folder filters (`folderUID` and `folderId`) in dashboard lists. - Alert rules in alert lists: inactive alerts, instances, the normal state filter, alert grouping, dashboard alerts and the alert folder. - The modes and counters of the debug panel. #### Altinity queries and ClickHouse - Grafana Live streaming on Altinity queries, and the log context window of Altinity queries. - Hidden log labels in Altinity logs settings, and the Altinity ad hoc values query. - A group-by variable on ClickHouse. #### Logs panels - The log context toggle, infinite log scrolling and the log field selector. #### Axes and scales - Vertical value axes placed at the top or bottom, and ordinal value scales, on time series, trend, candlestick, histogram, bar chart and XY chart panels. - The time comparison and horizontal orientation of time series. #### Gauges, heatmaps and tables - Bar gauge legends (turning one off imports without a note). - The horizontal and vertical orientation of a gauge (a bar gauge imports its orientation). - The heatmap selection modes `xy` and `y`. - Map cells in tables. - The `anyMatch`, `allMatch` and `invertMatch` override matchers, and the `byType` matcher for other fields. #### Canvas - Server element animation (blink rate and bulb color). - Canvas connection widths that follow a rule and connection directions that follow a field, canvas zoom to content, the one-click canvas tooltip and the canvas background image mapping mode. #### Geomap - MapLibre basemaps, dynamic GeoJSON layers, the last-point tracker and photo frames. #### Loki - Grafana Live streaming, and the line limit of Loki queries (a logs panel shows up to the datasource's row limit). - Reading Loki lines oldest first. #### Tempo - The search builder, the service graph, uploaded trace files and TraceQL metrics queries. - The trace limit, span-set limit and span tables of Tempo queries (a search lists one row per trace). #### Elasticsearch and OpenSearch - PPL queries (rewrite them in KQL or Query DSL). - `geohash_grid` and `nested` bucket aggregations, and trimmed histogram edges. - The `top_metrics` metric, inline scripts on a metric, and hiding one metric of a query. - Field-name variables (`{"find": "fields"}`), which have no equivalent. #### Transformation options - The `convertFrameType` conversions to annotations, time regions and exemplars. - Transformations of annotations (`topic: annotations`). - The percent unary operator and the max window reducer. - Enum and time zone conversions of field types. - Ordering by label or in descending name order, and by mode `auto`. - The semicolon and pipe separators and names of partition by values. - The ignore and threshold modes of rows to fields with its name and value fields, and the inline statistic of time series table. The report marks these options as excluded by decision, apart from options that are not supported yet. A panel whose only report lines are such decisions counts as imported, and its report line still lists them. ### Imported without a note These imports carry no report line: - Options that Grafana itself does not draw or read where they are written, such as the legend options of a stat panel, a log base on a query, the unit scale of a field, and a Prometheus exemplar flag on an instant query or on a panel that draws no exemplars. - Editor state, such as a query's help toggle or a query's own `adhocFilters` list. - Inputs Grafana rejects. A query with no text is dropped without a note, because Grafana sends no request for it and the panel shows the same data without it. A panel left with no query becomes a placeholder. # CLI > Install the observe command line client, sign in with a service-account key, ask the agent for a dashboard, query logs, traces and metrics, and manage a workspace from a terminal or a script. Source: https://slashobserve.com/docs/use/cli/ · Markdown: https://slashobserve.com/docs/use/cli/index.md `observe` is the SlashObserve command line client. Use it to send a prompt to the agent and get back a dashboard address, to query your datasources from a terminal, and to script what you do in the web app. It calls the server's HTTP API with a service-account key, so it can do what that key's role allows. Most commands accept `--json`, which prints the API response unchanged, so a script or an agent can read it. This page starts with your first ten minutes: install, sign in and a first prompt. Later sections group the commands by what you do with them, and [Reference](#reference) lists every command and flag. ## Install 1. Install the latest `observe` on macOS or Linux (amd64 or arm64) with one line: ```sh curl -fsSL https://raw.githubusercontent.com/slashobserve/slashobserve/main/install.sh | sh ``` You see `Downloading observe v<version> for <os>/<arch>`, then `Installed <version> to <directory>/observe`. 2. Check that the command runs: ```sh observe version ``` The script needs `curl` or `wget`. It downloads the archive for your platform from the [releases page](https://github.com/slashobserve/slashobserve/releases), checks its SHA-256 against `checksums.txt`, and refuses to install on a mismatch. It installs into `/usr/local/bin` when you can write there and into `~/.local/bin` otherwise, and it never uses `sudo`. It warns on standard error when the directory is not on your `PATH`. Two environment variables change what it installs. `OBSERVE_INSTALL_DIR` chooses the directory, and the script creates it if it is missing. `OBSERVE_VERSION` installs one release, written `v0.1.0` or `0.1.0`: ```sh curl -fsSL https://raw.githubusercontent.com/slashobserve/slashobserve/main/install.sh | OBSERVE_VERSION=v0.1.0 OBSERVE_INSTALL_DIR="$HOME/bin" sh ``` `OBSERVE_RELEASES_URL` points the script at another release location, which the installer's own tests use. The script fails when `HOME` is unset, `OBSERVE_INSTALL_DIR` is not set and `/usr/local/bin` is not writable. ### Install by hand or build from source On Windows, or to install by hand, download the `observe` archive for your platform and `checksums.txt` from the releases page. The Windows archive is a `.zip` and the others are `.tar.gz`. Each archive also holds `LICENSE` and `NOTICE`. Check the archive against the checksums: ```sh sha256sum --check --ignore-missing checksums.txt ``` On macOS, use `shasum -a 256 --check --ignore-missing checksums.txt`. Unpack the archive and put `observe` on your `PATH`. To build it yourself, which needs only Go, run `make cli`; it writes `bin/observe`. This page writes `observe`; with a binary you built, run `bin/observe`. ## Sign in You sign in once with a service-account key. An Admin creates keys on the API keys page of the server; see [Service-account keys](/docs/operate/service-account-keys/). 1. Run `login` with your server's address: ```sh observe login --server https://observe.example.com ``` 2. Paste the key when it asks. The terminal does not echo it. You see `Signed in to https://observe.example.com as <key name>`. `login` checks the key with the server and then saves the server and key to `~/.config/slashobserve/cli.json`. The file is readable by you only. The location is under `$XDG_CONFIG_HOME` instead when that variable is an absolute path. To pass the key on standard input, for a script: ```sh printf '%s' "$OBSERVE_TOKEN" | observe login --server https://observe.example.com --with-token ``` `login` takes the server from `--server`, then `OBSERVE_SERVER`, then the server already saved in `cli.json`. With none of them it exits 1 and says `no server configured: pass --server, set OBSERVE_SERVER, or run observe login --server URL`. It does not take `--token`, so a key never lands in your shell history, and it exits 2 if you pass one. Without `--with-token`, standard input must be a terminal, or `login` exits 2. A key must be printable ASCII without spaces and at most 4096 bytes. A wrong key answers `the server did not accept that key`. The server must be an `https` address, or an `http` address on `localhost`, `127.0.0.1` or `::1`. Any other `http` address is refused with `refusing plain http to <host>: use https, or a loopback address for local stacks`. An address with credentials, a query or a fragment in it is refused too. The CLI drops the default ports `:443` and `:80` and a trailing `/`, and it keeps a path prefix. `observe logout` removes the saved key and keeps the saved server. The key stays valid on the server until someone revokes it. ## Send a prompt A prompt is a sentence that tells the agent what dashboard you want. The agent runs on the server's model, so each prompt costs model usage. 1. Send the prompt as one quoted argument: ```sh observe "checkout p99 latency, last 6h" ``` 2. Watch the build. The agent's latest step shows on one status line, and each panel it adds prints a line: ```text Panel 3 of 8: Checkout p99 (timeseries) ``` 3. Read the last line. On a terminal it is one line with `Saved version N` and the dashboard address: ```text Saved version 1 https://observe.example.com/d/<dashboard id>/<slug> ``` The number after `of` is how many panels the agent planned. It is left out when the agent gave no estimate or built more than it planned. A follow-up prints only the panels it adds, and their numbers continue after the panels the dashboard already has. The address is described in [Addresses in the web app](/docs/use/web/). Only the key that made the request can read its build. So `status --wait` on someone else's request shows the steps without panel lines. ### Output modes In a terminal, the progress goes to standard output. The latest step shows on one status line that rewrites in place, the panel lines stay, and the status line clears before the last line. When standard output is not a terminal, it holds only the address. That is the case in `url=$(observe "checkout p99 latency")` or a pipe. The steps, the panel lines and `Saved version N` go to standard error, one per line. These flags change what prints: - `-q` hides the steps, the panel lines and `Saved version N`, and prints only the address. - `--json` prints the finished request object of `GET /api/v1/observe/{id}`, and the steps and panel lines still go to standard error. - `--open` opens the dashboard address in the browser once it is saved. `--open` uses `open` on macOS, `xdg-open` on Linux and the URL handler on Windows. It opens only `http` and `https` addresses. When the opener is missing or fails, the CLI prints a warning and still exits 0. `status --wait`, `continue`, `retry`, `run` and `import` accept `--open` too. Colour shows only in a terminal, and setting `NO_COLOR` to any non-empty value turns it off. The CLI sends no time zone, so the agent writes the times in its answer in UTC, where the web app uses the zone of your browser. ### Ask a question in a prompt A prompt that only asks a question ends with an answer that stays in the chat. The CLI prints it the way `observe investigate` does, followed by the hint `observe save-answer <request-id>`. `observe save-answer <request-id>` files that answer as an [observation](/docs/use/observations/) and prints `Saved as an observation: <address>`. Only the person who asked can do this. Saving twice prints `Already an observation: <address>`. When the prompt asked to change one existing dashboard, the answer ends with that dashboard's title and the `observe --revise --dashboard <id> '<prompt>'` command that asks for the change there. ### Quote a prompt that looks like a command A prompt whose first word is a command name must be quoted as one argument. The command names are `access`, `activity`, `annotate`, `annotations`, `audit`, `cancel`, `chats`, `comments`, `completion`, `continue`, `dashboards`, `datasources`, `doctor`, `folders`, `grafana`, `health`, `help`, `import`, `investigate`, `login`, `logout`, `logs`, `metrics`, `o`, `observations`, `open`, `people`, `proposals`, `requests`, `retry`, `run`, `save-answer`, `saved-searches`, `search`, `share-answer`, `skill`, `status`, `teams`, `traces`, `version` and `webhooks`. The CLI also refuses a prompt that is probably a mistyped command, with exit code 2 and before anything is sent. A run costs money, and this is almost always a typo. The refusal applies in two cases: - A prompt of one bare word, such as `observe latency`. Add a second word to send it. - A prompt of several words whose first word is close to a command name, such as `observe dashbords list`. The first word needs at least 4 characters, and it is close when it differs from a command name by one letter, or by two when it is longer than 6 characters. Quote the words as one argument to send them anyway. A prompt sent with `--dashboard <dashboard-id>` is never refused, because a command name does not take that flag. So `observe --dashboard <id> faster` works. ## Check that your setup works `observe doctor` explains why a setup does not work, one check per row: ```sh observe doctor ``` ```text CHECK STATUS DETAIL server ok https://observe.example.com is ready key ok ci-deploy (service_account) role ok editor version ok CLI 0.2.0, server 0.2.0 datasource ok prom (prometheus) datasource fail logs (loki): The datasource is not answering (The server could not connect to the datasource's address) model ok anthropic claude-haiku-5-5, effort low ``` `doctor` exits 1 when any check fails and 0 otherwise, since a warning never fails it. It takes no flags. `--json` prints `{"ok": <bool>, "checks": [{"check", "status", "detail"}]}` instead of the table. Colour marks `ok`, `warn` and `fail` only in a terminal and when `NO_COLOR` is not set. Details of the checks: - `server` asks `/readyz` and names the readiness checks that fail. When this check is not `ok`, whether the server cannot be reached or answers not ready, every later check is `skip` with no detail. - `key` reads `/api/v1/me` with the saved or given key. With no key it fails with `no key; run observe login`, and with a refused key with `the server refused the key; run observe login`. After a failed `key` check, the later checks are `skip` too. - `role` warns for a Viewer or Commenter key, because those roles cannot create dashboards or annotations. - `version` warns when the CLI and the server are different releases. A local build such as `dev` never warns. - `datasource` is one row per datasource with its health, and a warning when there are none. - `model` fails when the server has no model configured, because prompts cannot run. ## Open an address `observe open` prints an address on the server and opens it in the browser: ```sh observe open observe open <dashboard-id> observe open checkout-overview ``` With no argument it opens the server itself. A dashboard id opens that dashboard, and so does the uid of a dashboard imported from Grafana, which the server resolves to the imported one. An `http` or `https` address opens only when its scheme and host are the server's, and another address exits 2 with `<address> is not on <server>`. More than one argument exits 2, and so does an argument that is not a dashboard id, a Grafana uid or an `http(s)` address. It needs only the server, not a key. `--json` prints `{"url": "<address>"}` instead of the address. Unlike `--open`, it exits 1 when the opener is missing or fails, after printing the address. ## Work with agent requests Every prompt becomes a request, and every request is a turn of a chat. This section covers follow-ups, waiting, stopping and finding your earlier requests. [Chat and follow-ups](/docs/use/chat/) describes the same work in the web app. ### Send a follow-up to a dashboard Use `--dashboard <dashboard-id>` to ask about a dashboard you already have: ```sh observe --dashboard <dashboard-id> "why is the p99 panel flat after 10:00?" observe --revise --dashboard <dashboard-id> "add a panel for errors by pod" ``` Without `--revise`, `--dashboard` asks about that dashboard privately, as `observe investigate --private` does. With `--revise`, the prompt is a follow-up that changes that dashboard, as [Chat and follow-ups](/docs/use/chat/) describes. `--revise` without `--dashboard` exits 2. Four more flags shape a follow-up: - `--apply <finding-id>`, with `--revise` and `--dashboard` and no prompt, revises the dashboard with the suggested change of that answer instead of a prompt you write. - `--chat <chat-id>` sends the prompt as the next turn of that chat of yours, from `observe chats list`. You may combine it with `--dashboard` when the chat is about that dashboard. - `--new-chat` starts a new chat even when `--revise` would join your latest chat on that dashboard. It exits 2 with `--chat`. - `--at '<anchor>'` points the prompt at one spot on the `--dashboard` dashboard. The server refuses `--at` without `--dashboard`. The anchor is a JSON object, for example `--at '{"kind":"position","pos":{"x":0.4,"y":0.3}}'`, or one of these short forms: | Short form | Points at | | --- | --- | | `row:service=payments,span=authorize_card` | A table row, named by its labels. | | `time:2026-11-20T23:56Z` | One moment. | | `range:23:50Z..23:58Z` | A time range. | | `series:service=checkout` | One series, named by its labels. | | `pos:0.4,0.3` | A position on the panel, as x and y. | Every `--at` of the CLI takes these forms, except `annotate --at`, which takes a time. A time of day such as `23:50Z` means its latest occurrence not after now, and it may carry seconds, as in `23:56:10Z`. A range given as times of day must end in the past, so `range:10:00Z..09:00Z` asked at noon is refused. A short form that names no position points at the middle of the panel. A label value in a short form cannot contain a comma, because the comma separates labels. The JSON form takes any value. ### Follow-ups and waiting A prompt waits for the build and prints the address. These flags change the waiting: - `--no-wait` prints the request id and returns at once. - `--timeout` stops the waiting after the time you give, 2 hours by default, so a large build can finish while you wait. It stops the waiting and not the request, which keeps running on the server. To see a request, or to wait for it again, use `status`: ```sh observe status <request-id> observe status <request-id> --wait ``` `status` without `--wait` exits 0 even when the request failed. With `--wait` it exits 1 when the request failed or the waiting stopped at `--timeout`. When polling fails 3 times in a row, the CLI exits 1 and says `the request may still be running: observe status <id>`. An Admin can show anyone's request with `observe status`, read only. While a request waits for a worker, `status` prints `Queued, position N`, its place among the queued requests. The order can shift, because a request is skipped while another revision of its dashboard is running. While a request runs, `status` prints a `Live text` section with what the agent is writing, the same text the Working row shows in the browser. The text is not kept and is gone once the run ends, and `--json` carries it as `live_text`. Details of what `observe status` prints. The fields are `ID`, `Status`, `State`, `Intent`, `Investigation`, `Trigger`, `Cost`, `Dashboard`, `Version`, `URL`, `Error`, `Title` and `Prompt`, then the steps, with these rules: - `Status` is `queued`, `running`, `succeeded` or `failed`. `State` is `queued`, `running`, `canceling`, `succeeded`, `failed` or `canceled`. - `Investigation` is `yes` for a run started as an investigation that writes into an observation and `no` for an ask. `--json` carries it as `investigation`, and it never changes once the run is queued. - `Trigger` says what started the request. It is `person` for a prompt, a follow-up or an investigation the requester asked for, and `mention` for a run that a comment asked for, as `--to agent` does. - `Title` and `Prompt` tell requests apart without opening the browser. For a request from someone else's private chat, both read `hidden, asked in a private chat`. - `Points at` shows the spot a request points at, and `On block` an observation block, which it prints alone for a question about a whole block. - `About observation <id>` shows for an ask about an observation, also after its answer is saved into another observation. - `Finding` and `Finding URL` show the finding of an investigation, and `Shared in thread` the thread an answer was shared in. - `Cost` shows once the request has finished. It is the server's estimate in US dollars, such as `about $0.12`, `under $0.01` or `$0.00`, and `-` when the model has no price or no usage was recorded. - A hint line follows the fields and says what to do next. A queued request prints `Queued, position N`, and a failed request that was continued prints `Continued by <request-id>`. A request that was retried prints `Retried by <request-id>`. A stopped request with a build prints `Save it in the browser, or continue it: observe continue <request-id>`. A failed or canceled request with no build to continue prints `Run it again: observe retry <request-id>`. ### Cancel, continue or retry a request Only the person who made a request can cancel or continue it. Anyone else gets `only the requester can cancel or continue <request-id> (forbidden)`. `observe cancel <request-id>` cancels a queued or running request and prints it. A queued request stops at once, and a running one within a few seconds, once the call it is in returns. A running request shows the state `canceling` until its worker stops, and one whose worker is gone ends at once. The request ends `failed` with the code `canceled`, and what it built so far is kept. Canceling a request that is already canceled or canceling succeeds and prints it, and canceling a finished request fails with a one-line message naming it. `observe continue <request-id>` starts a new request that takes over the kept build of a stopped one. It waits the way a prompt does and prints the dashboard address. It accepts `--no-wait`, `--timeout` and `--open` like a prompt, and `--note <text>` gives the continued run an instruction. The note follows the same rule as a prompt: 1 to 4000 characters and no control characters, see [Text rules](/docs/reference/text-rules/). The server's `400` message is printed as it is. Continuing a request that was saved, was already continued or has no build fails with a one-line message naming it. Continuing a revision fails when its dashboard has a newer version than the build started from. `observe retry <request-id>` starts a finished request again as a new request with the same prompt. It waits the way a prompt does and prints the result, and it accepts `--no-wait`, `--open` and `--timeout`. Anyone who can see the request and may start that kind of request can retry it, and the new request is theirs and counts against their limits. A request that has not finished or was already retried fails with `request <request-id> is <state> and cannot be retried`. A comment or suggestion request cannot be retried. Details of how retry counts: - A failed or canceled request can be retried once by the person or key that asked. - Anyone else's retry is a request of their own and leaves the original retryable. - A succeeded request queues a new request on every call. ### Your requests `observe requests list` prints your agent requests, newest first with pinned ones on top, as a table of id, state, intent, dashboard, the spot it points at and title. Archived requests are left out. A request that failed before it had a dashboard shows only here, and `observe status <request-id>` reads it. The state reads as in the web app: Running, Done or Stopped. `--json` keeps the server's `queued`, `running`, `canceling`, `succeeded`, `failed` and `canceled`, which is also what `--state` takes. These flags narrow the list: - `--state` repeats, or takes a comma-separated list. - `--q <word>` matches a word of the title or prompt. - `--pinned` or `--pinned=false` keeps pinned or unpinned requests. - `--dashboard <id>` keeps the requests asked about a dashboard. - `--observation <id>` keeps the requests asked about that observation and the ones that wrote into it. - `--anchored` keeps the requests you asked about a spot. The server refuses it with `--scope all`, even for an Admin. - `--scope all` lists every principal's requests and needs the Admin role. The `AT` column shows the spot in words, and a dash when the request points at nothing. `--json` carries it as `anchor` and `block_id`. Only the person who asked a request sees its spot, so anyone else reads `null`. The list pages like every list; see [Lists and paging](#lists-and-paging). Four commands change one of your own requests: ```sh observe requests pin <request-id> observe requests unpin <request-id> observe requests rename <request-id> "New title" observe requests archive <request-id> ``` `requests rename` takes a title of 1 to 120 characters on one line, and `--clear` takes the title back to the start of the prompt. `requests rename` and `o edit --title` also rename the chat or observation that shares the title, as [Chat](/docs/use/chat/#one-title-for-a-chat-and-its-observation) describes, and say so or say that the other title was left as it is. You can repeat each command without effect, so a retry after a dropped connection is safe. An archived request stays readable with `observe status`. `requests archive <id> --delete-observation --yes` first deletes the observation the request saved, as `observe o delete` does and with the same permission. That is Manage on its folder, or Edit when you started the observation. It archives the request only after that delete succeeds. The two differ: the request is only archived and still reads with `observe status`, while the observation is deleted for everyone, with its blocks, RCA revisions and discussion, and that cannot be undone. A request that saved no observation is refused and left as it was. ### Your chats Every prompt you send is a turn of a chat, which you and Admins can read and nobody else sees. `observe chats list` prints your chats, pinned ones first and then the one most recently asked in. The table shows the id, whether it is pinned, the state of the last turn, the number of turns, when it was last asked, its dashboard and its title. ```sh observe chats list --q checkout observe chats show <chat-id> observe chats pin <chat-id> observe chats archive <chat-id> --yes ``` `chats list` takes `--q` (a word of the title or any prompt), `--pinned` or `--pinned=false`, `--dashboard <id>` and `--observation <id>`. It pages with `--limit` (at most 50), `--cursor` and `--all`. `--scope all` lists every person's chats with an `OWNER` column and needs an Admin key. `chats show <chat-id>` prints the chat and its turns, oldest first. Each turn has its request id, state and the first line of its prompt. A `points at` line follows a turn that pointed at a spot, an `is about block` line follows one about a whole block, and `Request <id> is shared in thread <id>` names a shared answer. `observe status <request-id>` prints one turn in full. An Admin may show anyone's chat, read only. Every show is recorded in the audit trail as `chat.view` with the owner's id, and every list as `chat.list` with its scope, each once per reader in 10 minutes. `chats pin <chat-id>` and `chats unpin <chat-id>` pin a chat of yours to the top of the list and take it back, as Pin and Unpin do on the Chats page. Pinning a pinned chat changes nothing, and only the chat's owner can do it. The id must be a chat id from `chats list`. The id of a later turn or of any other request is refused with `is not one of your chats`. `chats archive <chat-id> --yes` archives the chat and every request in it, which stay readable with `observe status`. Dashboards and observations they made are kept. It needs `--yes` because nothing brings an archived chat back to the lists. Only the chat's owner can do it, and an Admin who can read the chat gets `chat_read_only`. ## Investigate a question `observe investigate <question...>` asks the agent a question about your data, as in [Investigate](/docs/use/investigate/), and needs an Editor key: ```sh observe investigate why did checkout errors rise after 10:00 observe investigate --dashboard <dashboard-id> --panel <panel-id> --from now-6h --to now what changed observe investigate --observation <observation-id> why did checkout errors rise ``` It shows the steps like a prompt, then prints the finding's title, its answer as plain text and its address. Without `--observation`, each investigation opens a new observation that shows its run and receives its conclusion. `--json` then prints the finished request, which carries the `observation_id` of that observation, or null when no folder allowed one; see [Observations](/docs/use/observations/#investigations-write-into-an-observation). With `--observation` the run and the conclusion go into that observation. It must be one you can see, or the server answers `not_found`, and one you may comment on, or it answers `forbidden_role`. When the answer has no saved address, the command prints `This answer is kept in the chat only. Save it as an observation: observe save-answer <id>`. When the answer suggests a change, it prints `Suggested change: ...` and an `observe --revise --dashboard <id> '<change>'` line. When that change belongs on another dashboard, it first prints `This change is made on the dashboard <title>. Ask there:`. `investigate` exits 1 when the investigation fails or ends without a finding. `observe status <request-id>` on an investigation shows the finding's title and address, and with `--wait` prints the finding. An instance runs at most 10 investigations at once, and one caller at most 3 queued or running. Beyond that the server answers 429 `agent_busy` or `too_many_requests`. Private asks do not count. ### Scope an investigation These flags narrow what the investigation looks at: - `--dashboard <id>` makes it about one dashboard, and `--panel <id>` about one of its panels. - `--from` and `--to` set the window, together, as relative times such as `now-6h` or epoch milliseconds. - `--observation <id>` names an existing observation to write into. - `--as-of <time>`, for an Admin key, runs the investigation as of a past time, an RFC 3339 time or epoch milliseconds. The server requires that time to be in the past, and `--to` to be no later than it. So `--from now-1h --to now` is the hour before it; see [Investigate a past incident](/docs/use/investigate/#investigate-a-past-incident). - `--at '<anchor>'` points the question at one spot of the dashboard or observation, in the JSON or short forms of [Send a follow-up to a dashboard](#send-a-follow-up-to-a-dashboard). The server refuses it without `--dashboard` or `--observation`. - `--block <block-id>` with `--observation` puts that spot in one of its blocks, or without `--at` points the question at that whole block. - `--open`, `--no-wait` and `--timeout` work as they do for a prompt. The command exits 2 for these mistakes: - `--panel` without `--dashboard`. - One of `--from` and `--to` alone. - An `--observation`, `--dashboard` or `--block` that is not an id. - `--block` without `--observation`. - An unparsable `--at`. - `--private` without exactly one of `--dashboard` and `--observation`. - An empty question, or a `--timeout` of 0 or less. ### Ask privately and share the answer `--private` asks privately about one of `--dashboard` or `--observation`. It needs only Comment on it, writes nothing into it and opens no observation. Only you read the answer, and Admins read it read only; see [Private asks](/docs/concepts/agent/#private-asks). `observe share-answer <request-id>` then shows that answer to everyone who can read what it was about. It opens a comment thread there with your question and the answer, and prints `Shared in thread <id>`. On an observation it also writes the answer onto the page. `--thread <thread-id>` adds both to that thread instead. - Only the person who asked can share, and a run is shared once. Sharing again prints `Already shared in thread <id>`. - `observe status <request-id>` and `observe chats show <chat-id>` then name the thread. - `observe comments withdraw <comment-id>` takes it back to only you while nobody else has written in that thread. - The server can refuse with `restricted_answer`, `no_answer` or `not_shareable`, or answer that the run `was not found, or it is not yours`. ## Run a saved prompt `observe run <name>` runs a saved prompt that someone shared with everyone on the server. It waits like a prompt does and prints the dashboard address, and it accepts `--no-wait`, `--timeout` and `--open`. The name ignores case and its words need no quotes. ```sh observe run observe run Checkout health ``` `observe run` alone prints a table of the shared prompts by name and who shared them, or `no shared prompts yet; share one from the chat home in the web app`. An unknown name fails with `no shared prompt named "<name>"; run observe run to list them`. A key never sees private prompts, so share a prompt from the chat home before you run it from the CLI. ## Work with dashboards `observe dashboards` reads, changes and files dashboards. The most common commands are these: ```sh observe dashboards list observe dashboards show <dashboard-id> observe dashboards versions <dashboard-id> observe dashboards diff <dashboard-id> --from 2 --to 3 observe dashboards restore <dashboard-id> --version 2 ``` The lists and the panel table print as columns aligned with spaces. `observe --help` shows the other commands, and `--json` prints the API response. ### Read a dashboard and its history `dashboards list` prints dashboards with the columns `ID`, `TITLE`, `VERSION`, `VIEWS`, `UPDATED`, `UPDATED BY` and `FOLDER`. It shows the newest update first, 50 at a time, and up to 200 with `--limit`. `--order views` puts the most viewed in the last 30 days first, and `--order name` sorts by title. When more exist, it prints the total and the `--cursor` value for the next page. That cursor works only with the same `--order`, and `--all` reads every page. `--exclude-audit` leaves out the dashboards in the Audit folder. `dashboards show <dashboard-id>` lists the panels of the latest version, or of the version you give with `--version N`. It also prints how many views the dashboard had in the last 30 days, and the folder is in the details. A version that does not exist answers `version_not_found` and says what the latest one is. `--json` adds `view_count` and `window_days`. Four more commands read around a dashboard: - `dashboards versions <dashboard-id>` lists its versions with `VERSION`, `PARENT`, `AUTHOR`, `CREATED` and `SUMMARY`. - `dashboards revisions <dashboard-id> [<revision-id>]` lists the agent requests that changed it, newest first, or shows one in full. The columns are `ID`, `STATE`, `INTENT`, `BASE`, `SAVED` and `PROMPT`. - `dashboards viewers <dashboard-id>` lists, by name, the other people who have had the dashboard open in the last 45 seconds. It needs View and prints nothing when nobody is looking. - `dashboards tags [--exclude-audit]` lists every tag with the number of dashboards that carry it. `--exclude-audit` counts only dashboards outside the Audit folder. `dashboards diff <dashboard-id>` lists the changes between two versions as `OP`, `PATH`, `FROM` and `TO` columns, with values clipped to 60 characters. `--to` is the latest version by default and `--from` the one before it. `--from 0` compares with an empty dashboard. A version that does not exist answers `version_not_found` with the latest version. ### Restore an earlier version `observe dashboards restore <dashboard-id> --version <n>` saves an earlier version as the newest version. It prints `Restored version <n> as version <m>`. `--summary <text>` sets the version's summary. `restore` reads the latest version for `--parent` when you leave it out, and `--parent <n>` names it yourself. It answers `version_conflict` when someone saved since, so read the dashboard again and rerun it. ### Change some panels `observe dashboards panels` saves a new version that adds, replaces, removes or moves only the panels you name. It runs only their queries and prints `Saved version <n> of <title>`. ```sh observe dashboards panels <dashboard-id> --summary "Add errors panel" --file patch.json observe dashboards panels <dashboard-id> --summary "Drop the old panel" --remove <panel-id> ``` `--summary` is required. `--file` names a JSON patch of up to 4 MiB with the fields `upsert`, `delete`, `layout`, `variables` and `dashboard`, the same fields as the `update_panels` MCP tool. The CLI rejects unknown fields, and `--remove <panel-id>` repeats. Like `restore`, it reads the latest version for `--parent` when you omit it, and a change that touches only other panels than a newer version merges onto it. To duplicate a panel, upsert a copy under a new id with a `gridPos` below the original. ### Move, copy or delete a dashboard - `observe dashboards move <dashboard-id> --folder <folder-id>` moves a dashboard to another folder without saving a version. It needs Edit on the dashboard and on the folder, and a personal folder takes no moves. - `observe dashboards duplicate <dashboard-id> --title <title> [--folder <folder-id>]` saves the latest version as version 1 of a new dashboard and prints `Duplicated as <id>`. The copy goes to `--folder`, by default the dashboard's own folder when you may create there, else your default folder. Its queries are not run. - `observe dashboards delete <dashboard-id> --yes` deletes a dashboard with every version, comment and agent request, for everyone. It needs Edit on the dashboard, cannot be undone, and exits 2 without `--yes`. While the agent request that is creating the dashboard is still queued or running, it fails with 409 `dashboard_being_created`. Dashboard pins (stars) belong to a signed-in person and a key cannot set them, so the CLI has no command for them. Pin dashboards in the web app or over MCP. `chats pin` and `requests pin` pin a chat or a request of yours, and `o pin` pins an observation to a dashboard as an annotation. ### Keep dashboards as files `dashboards export` and `dashboards apply` move dashboards to and from a directory; see [Dashboards as code](/docs/use/dashboards-as-code/). ```sh observe dashboards export Platform --dir ./dashboards observe dashboards apply --dir ./dashboards ``` `export <folder-id-or-title> --dir <dir>` writes the latest version of each dashboard in a folder to `<dir>/<folder>/<name>.json`. `--dir` defaults to the current directory. A folder title matches without regard to case, and an ambiguous title exits 2. The folder directory name escapes `%` as `%25` and `/` as `%2F`. `apply --dir <dir>` saves every `.json` file of a directory back as dashboards. It never deletes one, and it skips files and directories whose names start with a dot. A file in a subdirectory goes to the folder of that name, and a file directly in `--dir` goes to General. For each file, `apply` updates the dashboard it applied before, else adopts the dashboard with the same title in that folder, else makes a new one. It saves a version only when the file changed. It exits 1 when any file failed, and exits 2 when `--dir` is missing, is a file or cannot be read. When the directory holds no `.json` file it prints a warning and exits 0, but it still needs a signed-in client, so with no key it exits 1. Two commands need no server: - `observe dashboards schema` prints the JSON Schema every dashboard file must satisfy, the document the `get_spec_guide` MCP tool returns. - `observe dashboards sample` prints a complete example Spec with variables, several panel types and a layout. Save it as a `.json` file and edit it before `apply`. ### Import a Grafana dashboard `observe import dashboard.json` imports a Grafana dashboard of up to 8 MiB and prints its address. Use `-` instead of the file name to read standard input. `--preview` shows the report without saving; [Import Grafana dashboards](/docs/use/import-grafana/) describes the report. ```sh observe import dashboard.json --folder Platform observe import dashboard.json --map 'prometheus=prom' ``` - `--map '<grafana>=<uid>'` picks our datasource for a Grafana one, and repeats. A bad value or a repeated key exits 2. A datasource with no match answers 422 `datasources_unresolved`, with a table and a `--map` hint. - `--folder <title>` chooses the folder. - `--open` opens the result in the browser. - `-q` hides the report and the `Folder:` line, but the folder note always prints, because it says the folder you asked for was not used. The report, the `Folder:` line and the folder note go to standard error, so standard output stays the address. The command exits 1 for an empty file, a file over 8 MiB, or a failed read of standard input, and exits 2 for a file that cannot be read. A file whose Grafana uid an earlier import already holds, in a dashboard you can see, is not imported twice. The command exits 1, names that dashboard and its version, and says which flag to pass: - `--update <dashboard id>` saves the file as the next version of that dashboard. It needs Edit and keeps the folder. - `--as-new` makes another dashboard on purpose. `--update` with `--as-new` exits 2. `--preview` shows the same dashboard in an `Already imported as` line. To import a directory of exports into one folder: ```sh for f in dashboards/*.json; do observe import "$f" --folder Platform || echo "failed: $f" >&2; done ``` Running the loop again reports each file an earlier import already made as failed, instead of making a second copy. ## Query logs, traces and metrics These commands run the same queries as the Logs, Traces and Metrics pages. They are the way for a script or an agent with only a shell to read your data. Each takes `--datasource <uid>`, and `--json` prints the response body. [Discovering what a datasource holds](#discovering-what-a-datasource-holds) shows how to find the uid and what to query. ### Logs `observe logs [<query>] --datasource <uid>` runs a log query on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource. It prints the lines oldest first, in the language of the datasource: LogQL, SQL, or KQL with the `lucene:` prefix and Query DSL forms of [Logs and traces](/docs/use/logs-and-traces/#query-languages-on-elasticsearch-and-opensearch). ```sh observe logs '{app="shop"} |= "error"' --datasource loki --from now-15m observe logs '{app="shop"}' --datasource loki --tail ``` `--from` and `--to` default to `now-1h` and `now` and take the same times as a dashboard. `--limit` keeps the newest 1 to 1000 lines, 100 by default. A search that finds nothing prints `No log lines between <from> and <to>` on standard error. An invalid query exits 1 with the datasource's message. Each line shows its time in UTC, its level when the lines have one, the labels whose values differ between the lines, and the message. The level comes from `severitytext`, `severity`, `level`, `lvl` or `detected_level`, and is `-` when absent. The message is the first column found among `body`, `message`, `msg`, `line` and `log`, tried in that order and without regard to case. Without any of them it is the first text column, as in the web app's logs panel. Details by datasource: - On ClickHouse the query is SQL that reads the time range with `$__timeFilter(Timestamp)` and selects `Timestamp` and `Body`. The rows come back as they are, and a result with no `Timestamp` or message column prints as a table instead of log lines. - On Elasticsearch and OpenSearch the query is KQL, `lucene:` or a Query DSL body. The lines come from the same search the logs page runs, newest first from the server and printed oldest first here. `--limit` is at most 500 there, because a search page holds at most 500 lines, and a larger value exits 2. `--json` lists the rows oldest first too, the newest `--limit` of them. #### Follow new lines `--tail` keeps asking every 2 seconds and prints only the lines it has not printed, with every label, until Ctrl-C, which exits 0. Each poll asks from the newest line printed so far, so a line indexed late with an older time is not printed. The command exits after 3 failed polls in a row. With `--json`, `--tail` prints one JSON object per line with `time`, `level`, `labels` and `line`. #### Facets, patterns and context Three flags read the lines differently, as the logs page does, and print the response body with `--json`: ```sh observe logs '{app="shop"}' --datasource loki --facets observe logs '{app="shop"}' --datasource loki --patterns observe logs '{app="shop"}' --datasource loki --context 2026-11-01T10:00:00.123456789Z ``` `--facets` counts the top values of each label or field instead of printing lines. Each field prints a header `<name> (<kind>, exact|sampled)`, then one `<count> <value>` row per value. A Loki index label counts bytes, so its header adds `bytes`. A sampled field counts the newest lines only. `--field <name>` counts only the fields you name, and repeats. `--patterns` groups the lines into patterns and prints a `COUNT` and `PATTERN` table, with every variable part written `<*>`. `--limit` is the most patterns to print, up to 100. A notice on standard error, which `-q` hides, says how many lines matched. It adds the number sampled when the server read the lines itself, and `counted by <datasource type>` when the datasource's own pattern API counted them. `--context <time>` prints the lines around one line: the lines before it oldest first, a `-- <time> --` line, then the lines after it. Give the line's time as nanoseconds since the epoch, or as an RFC 3339 time with nanoseconds, so that two lines in the same millisecond stay apart. `--before` and `--after` set how many lines to read on each side, 0 to 500 and 50 by default. A note on standard error says when more exist. The server reads at most 1 hour on each side of the line. `--facets`, `--patterns`, `--context` and `--tail` cannot be combined. `--field` needs `--facets`, and `--before` and `--after` need `--context`. Each mistake exits 2. #### Ask for logs in plain language `--ask` takes a question instead of the query, and the server writes the query with [Ask](/docs/use/logs-and-traces/#ask-in-plain-language): ```sh observe logs --ask "checkout errors" --datasource loki --from now-6h observe logs --ask "checkout logs mentioning payment" --datasource clickhouse --dry-run ``` It prints `Query: <query>`, the explanation and one `Warning: <warning>` line per warning on standard error. Then it runs the query as if you had typed it, `--tail` included. `--dry-run` prints them and runs nothing, and needs `--ask`. A question the server cannot turn into a query exits 1 with the reason, and so does a server with no model. ### Traces `observe traces <trace id> --datasource <uid>` prints the spans of one trace from a Tempo, Jaeger or ClickHouse datasource as a tree: ```sh observe traces 4bf92f3577b34da6a3ce929d0e0e4736 --datasource tempo observe traces 4bf92f3577b34da6a3ce929d0e0e4736 --datasource clickhouse --from now-7d ``` The id is 16 or 32 hexadecimal characters. `--from` and `--to` bound the search and default to `now-24h` and `now`. On ClickHouse it reads the OpenTelemetry `otel_traces` table. It prints a header with the span count, the total duration and the root span. Then one row per span shows its service, its name indented under its parent, its start after the trace start, its duration and `ok`, `error` or `-`. When a span has a status message, it follows `error:`, such as `error: card declined`. A trace with no spans in the range exits 1. #### Search traces in plain language `--ask` takes a question instead of the trace id and prints 100 matching traces, the newest unless `--sort` says otherwise: ```sh observe traces --ask "checkout requests slower than 2s with errors" --datasource tempo observe traces --ask "slow checkout requests" --datasource clickhouse --dry-run observe traces --ask "checkout requests with errors" --datasource clickhouse --sort -duration ``` It prints the answer on standard error, as `Filters: service=checkout min=2s errors` or `Query: <TraceQL>`, with the explanation and any warnings. Then it runs the same search as the Traces page. That is TraceQL on Tempo and `key=value` pairs on Jaeger. On ClickHouse it is a query over `otel_traces` grouped by trace, so each row is the whole trace with its root, its span count and its full length. Each row shows the trace's start, service, span, duration, span count and error count, and a column the datasource does not return stays blank. `--dry-run` prints the answer and searches nothing, and `--json` prints the search's response body. When the list is incomplete, a `Note:` line on standard error says why and how to get more. It may say the page is full and tell you to narrow `--from` and `--to` or the question, or that Tempo stopped before it searched everything. The same sentence is `meta.note` in the response body and `note` in the MCP query tools' result. `--sort start|service|span|duration|spans|errors` orders the traces, with a minus in front for descending, such as `-duration`. ClickHouse sorts everything that matches before it takes the 100, and Tempo and Jaeger sort only the 100 they return. #### Search traces with your own query `--query` takes a search instead of the trace id, in the language of the datasource, and needs no model: ```sh observe traces --query 'service=checkout error=true' --datasource jaeger --sort -duration observe traces --query '{ resource.service.name = "checkout" && status = error }' --datasource tempo observe traces --query 'SELECT TraceId, ServiceName, Duration FROM otel_traces WHERE $__timeFilter(Timestamp) ORDER BY Duration DESC' --datasource clickhouse ``` On Jaeger it takes the `key=value` pairs of the Traces page: `service`, `operation`, `minDuration`, `maxDuration`, `error` and tags. On Tempo it takes TraceQL. Both run as the search of `--ask` does and print the same table of 100 traces. `--sort` applies to the 100 traces returned. A `Note:` line on standard error says when the list is incomplete. On ClickHouse it takes SQL over `otel_traces` and runs it as the SQL view of the Traces page does. It goes through the same checks as that view and the SQL of `observe logs`. That means one read-only `SELECT`, the range of `--from` and `--to` read through a macro such as `$__timeFilter(Timestamp)`, and the 15 second limit. A query that breaks one exits 1 with the server's sentence. - It prints the first 100 rows as a table with a column per selected column and times in RFC 3339 with nanoseconds. - A numeric column named `Duration`, in any case, prints as a duration such as `1.20s`, `350.0ms` or `120µs`, not as raw nanoseconds. - When more rows match, it says so on standard error, and an empty result prints `No rows between <from> and <to>`. - The rows come back as the SQL wrote them, with its own `ORDER BY`, `LIMIT` and columns even when it selects `Timestamp`. A `LIMIT` above 100 is cut to the first 100 rows. - Single quotes keep the shell from expanding `$__timeFilter`. `--query` takes no trace id and cannot be combined with `--ask`, `--dry-run` or `--compare`. `--sort` does not apply to SQL, which has its own `ORDER BY`. Each mistake exits 2. #### Compare traces `--compare` explains what sets some traces apart from others, as the compare view of the Traces page does: ```sh observe traces --compare 4bf92f3577b34da6a3ce929d0e0e4736,5c1d7a2e9f8b4a3d --baseline 6d2e8b3fa09c4b4e9f7a1c2d3e4f5061 --datasource tempo ``` `--compare` takes the trace ids to explain, up to 50, and `--baseline` the trace ids to compare them with, up to 150. Each is comma separated or repeated, and a trace id can be in only one of them. It works on Tempo and ClickHouse datasources only, and a Jaeger datasource answers 400. It prints `ATTRIBUTE`, `VALUE`, `SELECTED` and `BASELINE` columns. They show the attribute values whose share of the selected traces and share of the baseline traces differ by at least 10 percentage points, the largest gap first. `--limit` is the most differences to print, 1 to 100 and 20 by default. `--from` and `--to` bound where the traces are read. A note on standard error says when some traces were not found in the range or more differences exist than `--limit` allows. `--compare` takes no trace id argument and cannot be combined with `--ask`, `--dry-run` or `--query`. `--baseline` and `--limit` need `--compare`. Each mistake exits 2. A trace id in both sets is a server 400 and exits 1. Two more rules apply to every trace form. `--sort` needs `--ask` or `--query`, a trace id cannot go with `--ask`, and more than one id exits 2. The datasource must be Tempo, Jaeger or ClickHouse, or the command exits 2. ### Metrics `observe metrics query <promql> --datasource <uid>` runs a PromQL query on a Prometheus datasource and prints one line per series: ```sh observe metrics query 'sum by (service) (rate(http_requests_total[5m]))' --datasource prom --from now-6h observe metrics query 'up == 0' --datasource prom --instant observe metrics query --ask "requests per second by service" --datasource prom --dry-run ``` `--from` and `--to` default to `now-1h` and `now` and take the same times as a dashboard. The output is a table with the columns `SERIES`, `POINTS`, `LAST`, `MIN`, `MAX` and `MEAN`, one row per series. `--instant` evaluates the query once at the end of the range and prints `SERIES` and `VALUE`. A query with no series prints `No series between <from> and <to>` on standard error. `--ask` takes a question instead of the query. The server writes the PromQL with [Ask](/docs/use/metrics/#ask-in-plain-language) and prints it to standard error with its explanation and warnings before it runs. `--dry-run` prints them and runs nothing, and needs `--ask`. Giving a query and `--ask` together exits 2. An invalid query exits 1 with the datasource's message. So does a query that hits a server limit on time, series or points, and the message names the limit. `observe metrics` alone prints help. The [Metrics](/docs/use/metrics/) page runs the same queries in the web app. ### Discovering what a datasource holds A script or an agent with only a shell finds what to query with `observe datasources`. `list` prints each datasource's uid, and the uid is what `--datasource` takes: ```sh observe datasources list observe datasources metrics prom --search http observe datasources labels prom observe datasources label-values prom service ``` The commands answer what the agent's own tools answer, such as `get_schema` and `sample_rows`. Every command takes `--json`, which prints the server's answer unchanged. #### List names, labels and values - `metrics <uid>` lists metric names with `NAME`, `TYPE`, `UNIT`, `TABLE` and `HELP` columns, for a Prometheus datasource or, as OpenTelemetry metric names with their table, a ClickHouse one. - `labels <uid>` lists label names, and `label-values <uid> <label>` lists one label's values. All three take `--search` to filter by substring and `--limit` to cap the list at 1 to 500, 100 by default. When more exist, the command says so and names the two ways to see them. `labels` and `label-values` also take `--metric` and `--table`, and `--from` with `--to` narrows the window that Loki, Tempo, Elasticsearch and OpenSearch look in. On ClickHouse, `labels` and `label-values` need `--table` or `--metric`. `--from` or `--to` alone exits 2. #### See which services a datasource has `services [uid]` lists the services a Loki, Tempo, Jaeger, ClickHouse, Elasticsearch or OpenSearch datasource has seen in the last hour. For each it shows the label, column or attribute that holds them. - `--window` takes a duration such as 15m, from 1 minute up to 6h, and the default is 1h. - `--signal` picks `logs` or `traces`. - `--service checkout` keeps only the sources that hold a service whose name contains the text, without regard to case. That answers which source holds a service. Without a uid it asks every such datasource and prints one row per source and signal. A source that cannot answer in time says so while the others still answer. `--json` then prints `{"sources": [...]}`. The server caches an answer for about a minute and lists at most 200 services per source. #### Look at the schema and a few rows `schema <uid>` lists the tables of a ClickHouse, Elasticsearch or OpenSearch datasource, and `--table` lists one table's columns with their types. A cut list names the `--offset` that reads the next page. A Tempo or Jaeger datasource has no tables, so `schema` lists its services and span names, and on Tempo its attribute names. `sample <uid>` prints recent rows or log lines, cut to 300 bytes a cell, so the real values show before a query is written. `--limit` takes 1 to 20 and the default is 5. ClickHouse needs `--table`. On Loki, `--table` is a stream selector, and leaving it out reads every stream. #### Check a query and count what it matches - `lint <uid> <query>` checks a query without running it and prints each diagnostic with the byte range it covers. It exits 1 only when a diagnostic is an error. - `log-volume <uid> <query>` counts every line a logs query matches per bucket, by level. When the datasource ran out of time, it says from when it counted. - `trace-stats <uid> [<filter>]` counts spans, errors and the p50, p95 and p99 durations per bucket. - `trace-logs <uid> <trace-id>` prints the log lines of a Loki, ClickHouse, Elasticsearch or OpenSearch datasource that carry a trace id, or one span with `--span`. `--service` narrows the Loki streams, or the Elasticsearch and OpenSearch documents, it reads. `--limit` takes 1 to 1000 lines, 100 by default. `log-volume`, `trace-stats` and `trace-logs` take `--from` and `--to`, `now-1h` and `now` by default. The two counting commands take `--buckets`, 1 to 200 and 60 by default. ## Find and save searches ### Search the workspace `observe search` finds dashboards, annotations, observations, comments and saved searches by words, ranked by relevance, as the [search](/docs/use/search/) of the web app does: ```sh observe search checkout latency observe search "connection reset" --kind comment --kind observation -- -staging ``` ```text dashboard Checkout latency General https://observe.example.com/d/0b6c... Slow checkout requests by pod ``` Every word must match. [Search](/docs/use/search/) explains the rest of the syntax: quoted phrases, `or`, `-word` and a prefix on the last word. Write words that start with `-` after `--`, so the command does not read them as flags. You find only what the key can read. A line holds the kind, the title, the folder and the address of the page that opens the result, with `no folder` or `no page` when it has none. The snippet is indented on the line below, and a comment shows the title of what it is on. No match prints `No results.` - `--kind` takes `dashboard`, `annotation`, `observation`, `comment` or `saved_search`, and repeats. - `--limit` prints 1 to 50 results, 20 by default. - `--cursor` continues from the cursor a full page prints, and `--all` reads every page and prints one list. `--all` with `--cursor` exits 2. - `--json` prints the response of `GET /api/v1/search` unchanged. ### Save a search `observe saved-searches` works with the logs, trace and metrics searches you save from the Logs, Traces and Metrics pages. ```sh observe saved-searches list --kind logs observe saved-searches save --kind logs --title "Shop errors" --datasource loki --query '{app="shop"} |= "error"' ``` `list` prints the searches you can view, most recently changed first, with their id, kind, title, folder, datasource and last change. `--kind logs|traces|metrics` keeps one kind, `--folder <id>` one folder, and `--limit`, `--cursor` and `--all` page through the result. `save --kind logs|traces|metrics --title <title> --datasource <uid>` files a search in your My Dashboards, or in `--folder <id>`. The title is 1 to 120 characters. It prints the address that reopens the search, even with `-q`. The search's id is printed on standard error as `Saved search <id>`, which `-q` hides, and `--json` prints it too. `--from` and `--to` default to `now-1h` and `now` and are kept as written. A service-account key has no My Dashboards, so a search saved with a key lands in the folder General, which everyone who can see General can read. Pass `--folder` to file it elsewhere. For a service-account key, the server also lints the query. A query with a lint error is refused with `query_invalid` and nothing is saved. It also finds a search you already saved with the same title, datasource, query, filters, range and folder. Then it prints `Search <id> was already saved` and its address instead of a second copy, and `--json` shows `replayed: true`. What a search needs depends on its kind: - A logs search needs `--query`, runs on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource, and may set `--columns a,b`. - A trace search may set `--service`, `--span`, `--min`, `--max` and `--errors`. It may also set `--query` on a Tempo datasource (TraceQL) or a ClickHouse datasource (SQL, which reopens the search in the SQL view). The help text of the command names Tempo and ClickHouse for traces, and the code also accepts a Jaeger datasource with `key=value` pairs such as `service=checkout minDuration=1s`. - A metrics search needs `--query` on a Prometheus datasource and may set `--mode graph|table`. `--min` and `--max` are span durations: a trace matches when one span that also fits the service and span name is that long. A flag of another kind is refused with exit code 2 before any request is sent. ### Change a saved search ```sh observe saved-searches update <id> --query '{app="shop"} |= "timeout"' observe saved-searches rename <id> New title observe saved-searches move <id> --folder <folder-id> observe saved-searches delete <id> ``` `update <id>` changes what a saved search runs and keeps its kind, datasource, title and folder. `--query`, `--from` and `--to` replace one value each. Any filter flag (`--columns`, `--service`, `--span`, `--min`, `--max`, `--errors`, `--mode`) replaces all the filters, so repeat the ones to keep. `--clear-filters` removes them all, and `--query ""` removes the query of a trace search. Only the flags you give change, and a call with none exits 2. The result must pass the checks a save does, so a trace filter on a logs search is refused with the server's message and exit 1. `rename <id> <title...>` takes everything after the id as the new title, so flags such as `--json` or `-q` must come before the id. `move <id> --folder <folder-id>` files the search in another folder and shares it with that folder's readers. My Dashboards takes no moves, so save the search there instead. `delete <id>` removes it. Update, rename, move and delete need Edit on the saved search, and a move also needs Edit on the folder. The text output names what was done, such as `Updated saved search <id>`, and `-q` hides it. `--json` prints the response of the matching `/api/v1/saved-searches` route unchanged, and nothing for `delete`. The kind and datasource of a saved search never change, so save a new one instead. ## Write up and discuss what you find ### Observations `observe o` works with observations, the pages of Markdown, panel and snapshot blocks that people and agents build about one question. The group is named `o`, with `observations` as an alias, so a prompt that starts with the single word `o` or `observations` must be quoted. Every subcommand takes `--json`, which prints the response of its API call unchanged, so `o discard --json` prints an empty line. The commands need the folder access the web app needs for the same work, and a refusal prints the server's message and exits 1. ```sh observe o new "Slow checkout" --text "Started after the 10:00 deploy." observe o list --state open observe o show <observation-id> observe o add <observation-id> --text "p99 doubled on checkout-1." observe o resolve <observation-id> --summary "Rolled back the deploy." ``` #### Start and read an observation `observe o new <title...>` starts an observation and prints `Created <title> <address>`, even with `-q`. It files the observation in `--folder <id>`, by default your My Dashboards. `--from` and `--to` are RFC 3339 times that go together, and they set the range its panels show. `--text <markdown>` or `--text-file <path>`, never both, also adds a first text block. `o list` prints the observations you can see, most recently changed first, with their id, title, state and last change. `--folder <id>`, `--state open|resolved` and `--title <text>` narrow it, and `--title` matches a title that contains the text, without regard to case. `--limit` takes 1 to 100 and the default is 50, and `--cursor` and `--all` page through the result. `o show <observation-id>` prints the title, state, summary and address. Then it prints one line for each block with its position, id, kind, state, version, width, height (`auto` or pixels), range and, for a text block, its first line, or for a panel block its title. The range of a panel block is its own window as `from..to` (RFC 3339, to the minute), or `page` when it follows the observation's range, and the other blocks show `-`. A block that someone who can only comment added shows the state `requested`. #### Add and change blocks `o add <observation-id>` adds one block and prints `Added <kind> block <id> (live)`, or `(requested)` when you can only comment. Give exactly one of these: - `--text <markdown>` or `--text-file <path>` adds a text block. - `--panel-file <path>` adds a panel block from a JSON file with one panel whose query must return data. - `--snapshot-of <block-id>` freezes the data of a panel block. These flags shape the block: - `--from` and `--to` give a panel its own range. - `--width third|half|two_thirds|full`, or `--half`, sets the width. - `--height <pixels>` from 120 to 960 sets the height of a panel or snapshot block. - `--position <n>` places it instead of appending it. - `--var name=value` sets a variable the panel's queries use, repeated for more values of the same name. Without one the block is refused with `variable_missing` and the name of the variable. The server runs the check the MCP `add_block` tool runs. A panel whose query is invalid, or returns nothing in its range, is refused with the failing paths below the error, exits 1 and adds no block. `o edit-block --panel-file` is checked the same way. `o edit-block <block-id> --version <n>` changes a live block and prints `Changed <kind> block <id>`. It needs the block's current version from `o show`, and a block that changed since answers `version_conflict`, so read it again and retry. It takes these flags, and it needs at least one: - `--text` or `--text-file` for a text block. - `--panel-file` for a panel block, with `--from` and `--to` for its own range. `--text` and `--panel-file` cannot be combined, and `--from` and `--to` need `--panel-file`. - `--width third|half|two_thirds|full`, `--half` or `--full` for the width, and only one of them. - `--height <pixels>` for a panel or snapshot block only, 120 to 960, or 0 for the automatic height. - `--position <n>`, which moves the blocks in between and exits 2 below 0. - `--follow-page`, which drops a panel block's own range so it shows the observation's range again. It cannot go with `--text`, `--text-file` or `--panel-file`. A snapshot block's body cannot change. A requested block is kept or discarded instead. `o arrange <observation-id> <block-id>[:<width>[:<height>]]...` sets the order of the blocks you name and prints `Arranged <n> block(s)`. After each id you may add a width and, for a panel or snapshot block, a height in pixels or `auto`. An empty width keeps the width, as in `id::auto`. A block you leave out keeps its place after the block it followed. An id that is not a block of the observation is refused by name, and a bad height or more than three `:` parts exits 2. It takes no `--version`, because a layout change never conflicts with a content edit. `o remove-block <block-id> --version <n>` deletes a live block and prints `Removed block <id>`. The blocks after it close the gap. It needs the block's current version from `o show`, like `edit-block`. `o keep <block-id> --version <n>` makes a requested block live, and it needs the block's version from `o show`. `o discard <block-id>` deletes a requested block. Keeping needs Edit on the observation's folder, and discarding is open to an editor and to whoever asked for the block. #### Resolve, reopen and change an observation - `o resolve <observation-id> --summary <line>` closes an observation and prints `Resolved <title>`. - `o reopen <observation-id>` reopens a resolved observation and prints `Reopened <title>`. - `o edit <observation-id>` changes the title with `--title <title>`, and the range its panels show with `--from <time> --to <time>`, RFC 3339 times that go together. `--clear-range` removes the range. It prints `Updated <title>`, and the chat the observation came from may be named after it. The message says either that it renamed that chat or that the chat keeps its title because only the person who started it may rename it. Giving nothing, one of `--from` and `--to` alone, or a range with `--clear-range` exits 2. - `o move <observation-id> --folder <folder-id>` files the observation in another folder and prints `Moved <title> to folder <id>`. It needs Edit on the observation and on the folder, and My Dashboards takes no moves. #### Pin, publish and turn an observation into a dashboard `o pin <observation-id>` pins an observation to a dashboard as an annotation and prints `Pinned to dashboard <id> as annotation <id>`. It pins to `--dashboard <id>`, or by default the dashboard its run was about. Pinning it again to the same dashboard prints the same annotation. An observation with no dashboard to pin to exits 1 with `observation_has_no_dashboard`. `o dashboard <observation-id>` makes a dashboard in My Dashboards from its live panel blocks, or from one block with `--block <block-id>`. It prints `Dashboard <id>: <title>`. It re-runs every query first, and an observation with no live panel block answers `observation_has_no_panels`. Running it again prints the dashboard you made first, and `--new` makes another. `o publish <observation-id>` publishes the observation as the next RCA revision and prints `Published revision <n> of <title>`, as in [Observations](/docs/use/observations/#publish-as-rca). It needs Edit on the observation's folder. An observation in My Dashboards is private and cannot be published until you move it to a shared folder, and publishing never creates a public link. `o rcas <observation-id>` lists the published revisions, newest first, as `REVISION`, `TITLE`, `STATE`, `PUBLISHED BY` and `PUBLISHED` columns. `o rcas <observation-id> <revision>` prints one revision: its title, its summary, each text block's Markdown and a line `snapshot <id>` for each snapshot block. #### Delete an observation or a revision Two commands delete for good. No MCP tool deletes anything, so an agent cannot do either. - `o delete <observation-id> --yes` deletes the observation for everyone, with its blocks, snapshots, RCA revisions, the public links of those revisions and its discussion. It prints `Deleted observation <id>`. It needs Manage on the observation's folder, or Edit on it when you started the observation. It cannot be undone, so without `--yes` it exits 2. While an investigation on the observation is queued or running, it answers 409 `run_in_progress`. - `o withdraw <observation-id> <revision> --yes` deletes one published revision and prints `Withdrew revision <n> of <observation-id>`, as in [Observations](/docs/use/observations/#withdraw-a-revision). It needs Edit on the observation's folder, answers `rca_shared` while the revision has a live public link, and cannot be undone. Without `--yes` it exits 2. ### Comments You can work the comments on a dashboard, an annotation or a proposal from the terminal, and so the discussion of an observation. A target is written `<kind>:<id>`, with kind `dashboard`, `annotation`, `observation` or `proposal`. An example is `dashboard:0a1b2c3d-0000-4000-8000-000000000001`. ```sh observe comments list <dashboard-id> observe comments add --on dashboard:<dashboard-id> --panel <panel-id> "The p99 line jumps at 10:00" observe comments reply <comment-id> "Rolled back at 10:20" observe comments resolve <comment-id> ``` Add `--json` to any of these to print the API response unchanged. Add `-q` to hide the confirmation of `edit`, `delete`, `withdraw`, `resolve` and `reopen`. `add` and `reply` print their result even with `-q`. #### List comments `comments list` lists the comments of open threads, replies included, oldest first. `comments list <dashboard-id>` and `comments list --on <kind>:<id>` list the same way, and a dashboard id gives what `--on dashboard:<id>` gives. Exactly one of the dashboard id and `--on` is required, and a single argument that contains a colon counts as `--on`. - `--status resolved` shows resolved threads instead, and `--status all` shows both. The default is `open`. - `--panel <panel-id>` narrows the list to one panel. - `--limit` takes up to 500 and the default is 50, and `--cursor` and `--all` page through the result. The table has the columns `ID`, `THREAD`, `PANEL`, `STATUS`, `AUTHOR`, `CREATED` and `COMMENT`. `THREAD` shows `-` for a thread's first comment, and `PANEL` shows the target kind, or `<panel> (removed)`. `AUTHOR` shows the actor label, such as `Observe Agent for Ada` or `Ada (via Claude Code)`. `COMMENT` is cut at the first line and 80 characters, and for a run's reply it shows the answer's title after `Answered.` `--json` prints the server's page of `threads` and `messages`, with `next_cursor` and `can_comment`. A script reads the messages with `jq '.messages[]'`, which replaces `.comments[]`: - A thread carries its `anchor`, the spot it points at in the shape `--at` takes as JSON, and its `status`, `panel_id`, `panel_present` and `resolved_by_version`, which moved there from the comment. - A message's `thread_id` names its thread in `threads` and replaces `parent_id`. A reply is a message whose `thread_id` is not its own `id`. - A message's `actor.label` replaces `author.name` and is the text the AUTHOR column shows. - A run's reply carries its `answer` when you can read it. #### Start a thread `comments add --on <kind>:<id> <text...>` starts a thread and prints `Started thread <id> on <kind>:<id>`, even with `-q`. Everything after the flags is the comment text. So `--on`, `--panel`, `--block`, `--at`, `--version`, `--to`, `--json` and `-q` must come before it. - On a dashboard, `--panel <panel-id>` anchors the thread to a panel, and `--version N` to a version, the latest by default. The server refuses both on an observation, an annotation or a proposal. - On an observation, `--block <block-id>` anchors the comment to one of its blocks. Without it the comment is about the whole observation. The server refuses `--block` on any other target. - `--at '<anchor>'` points the thread at one spot, in the JSON or short forms of [Send a follow-up to a dashboard](#send-a-follow-up-to-a-dashboard). An example is `--at time:2026-11-20T23:56Z`. On an observation it points at a spot in the `--block` block. - `--to agent` or `--to everyone` sets who the comment is for. The default is `everyone`, and anything else exits 2. See [Ask an agent from a comment](#ask-an-agent-from-a-comment). A comment is for everyone and asks no agent unless you add `--to agent`. #### Reply, edit and delete - `comments reply <comment-id> <text...>` adds a reply to a thread, and the id can be any comment of the thread. It prints `Replied to thread <id> as <id>`, even with `-q`. - `comments reply <dashboard-id> <comment-id> <text...>` does the same on a dashboard through the dashboard comment endpoint. When the first two arguments are both ids, the first is the dashboard id. - Everything after the ids is the reply text, so flags such as `--json`, `-q`, `--block`, `--reply-to` or `--to` must come before the ids. - `--block <block-id>` anchors the reply to one block of an observation, and `--reply-to <comment-id>` names the comment of the same thread that the reply answers, which the web app shows quoted. - `--to`, `--block` and `--reply-to` work only with the comment id alone, because the dashboard comment endpoint takes none of them. - `comments edit <comment-id> <text...>` replaces the text of your own comment, while you can still comment on its target. Everyone else gets 403 `not_author`. It prints `Edited comment <id>`, and the flags go before the id, as for `add`. - `comments delete <comment-id>` deletes one comment and prints `Deleted comment <id>`. - Its author may delete it while they can still comment, unless an agent run wrote it. - Anyone who manages the target's folder may delete any comment, including an agent's reply. - Deleting the first comment of a thread deletes the whole thread. Its author may do that only while nobody else has written in it, and everyone else gets 403 `not_author`. #### Resolve and reopen threads `comments resolve <comment-id>` resolves a thread, and `comments resolve <dashboard-id> <comment-id>` does the same through the dashboard endpoint. It prints `Resolved thread <id>`, or `Resolved thread <id> by version N` with `--version N`, which records the version that fixed a dashboard thread. A Commenter gets `not_starter` on a thread someone else started, and an Editor resolves any. When the thread was already resolved, `--version` is not applied and the command exits 1. `comments reopen <comment-id>` reopens a resolved thread and prints `Reopened thread <id>`. #### Mention people and agents Mention a person in the text as `@[Name](user:<id>)`, and the built-in agent as `@observe`. Mention one of your own connected agents as `@[Name](grant:<id>)`, and a service account that takes runs as `@[Name](service_account:<id>)`. A comment may hold at most 20 mentions. A mention shows in the [activity log](/docs/use/activity/) and asks no agent unless you add `--to agent`. `comments people --on <kind>:<id>` lists up to 20 people, other than you, who can see the target, with the mention to paste into a comment. You need Comment on the target, or the server answers 403. `--search <text>` keeps those whose name or email contains the text, and `--limit` takes up to 20. A notice says when more people match. A person who cannot see the target is not listed, and mentioning one is refused with `invalid_mention`. #### Take back an answer you shared `comments withdraw <comment-id>` takes an answer you shared with `share-answer` back to only you, and prints `Withdrew the answer shared in thread <id>`. It takes the id of the thread or of any of its comments. It deletes the thread when the share opened it, and otherwise only the shared question and its answer. - It works only for the person who asked, while every comment in the thread is theirs or their run's reply. When someone else wrote in it, the server answers 409 `others_wrote`. When nothing of yours is shared, it answers 404. - On an observation, the answer's text that was written onto the page stays there. The run and its answer leave the observation's lists, and you can share the answer again later. #### Apply an answer's suggested change `comments apply <comment-id> <finding-id>` makes the change that an answer in a dashboard thread suggests. The finding id is the answer's, from `observe status <request-id> --json`, and the answer must have been given in that thread. Another kind of thread answers 400 `invalid_thread`, and a finding that is not in that thread answers `not_found`. It posts `Revise the dashboard: <suggested change>` in the thread as you, and prints `Asked to revise the dashboard in thread <id>`. Then it starts a run, yours and taken by the agent that answered. The run saves a new version when you can edit the dashboard, and opens a proposal when you can only comment. Applying the same answer again while that run is queued or running, or after it succeeded, starts nothing and prints `Already applied by run <id>`. An answer without a suggested change is refused with `no_suggested_change`. ### Ask an agent from a comment `--to agent` on `comments add` or `comments reply` asks an agent in the same transaction as the comment. It picks the one agent the text mentions, else the thread's agent, else `@observe`, and that agent becomes the thread's agent. Without `--to agent`, the comment is for everyone, asks no agent and turns the thread's agent off. Then the web app's plain replies stop asking it until someone mentions an agent again. The agent's token is removed from the text to make the run's prompt. The earlier messages of the thread, the last 20 and at most 8000 characters, go with it as context. What the run may do depends on the thread: - A dashboard thread starts a read-only ask, which a Commenter may start and which answers in the thread without changing the dashboard. - An observation thread starts a read-only ask, which needs Comment on the observation and answers in the thread without writing on the page. - An annotation or a proposal thread starts none. Mentioning more than one agent is refused with `too_many_agents` and nothing is written. You can mention only people who can see the target, your own connected agents and service accounts that take runs. Anything else is refused with `invalid_mention`, and a service-account key can never mention a connected agent. An observation has one discussion. So `comments add` on an observation that has one adds the comment to that discussion, unless `--at` points it at a spot of its own. When the comment is stored but the run cannot start, the command succeeds and prints `No run started (<code>): <message>` on standard error, which `-q` does not hide. The code is one of these: - `mention_target_unsupported`. - `agent_unavailable`, for `@observe` on a server with no model provider, or a thread agent that was disconnected. - `agent_not_yours`, when the thread's agent is someone else's connected agent. - `forbidden_role`. - `too_many_runs`. When the run starts, the command prints `Started run <id>, taken by <builtin|grant|service_account>`. #### What the reply says When the run ends, it posts one reply in the same thread. It never resolves the thread or reopens a resolved one. The reply reads `Observe Agent for <your name>` when the built-in agent took the run, `<your name> (via <client>)` when one of your connected agents did, and the service account's own name when a service account did. The reply is a status line the server writes, not the model's text. It is one of these: - `Saved version N of this dashboard.` - `Opened a proposal: <title>.`, or `Opened a proposal.` when it has no title. - `Answered.` when the run saved an answer. The thread carries the answer with the reply, so everyone who can read the thread reads it, and `comments list` prints the answer's title after the line. - `The run finished.` when it succeeded with no version, proposal or answer. - `No agent picked this up within 10 minutes.` - `The run failed: <reason>.` - `The run was stopped before it finished.` - A line that says the answer read data only Admins can query, such as the audit trail, so it is not shown in the thread. Only whoever asked and Admins read it, in the run. The run's own page has the detail. A retry or a continuation of the run answers in the same thread and goes to the same agent. It fails with `assignee_unavailable` and starts nothing when that connected agent was revoked, has expired or is not yours, or when the service account no longer takes runs. Someone who cannot comment on the observation of an observation thread, and retries an answer from it that was saved as an observation, gets a private ask of their own about the saved observation. Nothing is posted in the thread. ### Proposals A proposal is a change that someone who cannot edit a dashboard, or whose connection is in propose mode, saved for a person who can edit to merge; see [Proposals](/docs/concepts/proposals/). ```sh observe proposals list <dashboard-id> observe proposals show <proposal-id> observe proposals merge <proposal-id> --revision 2 observe proposals discard <proposal-id> --reason "Superseded" ``` `proposals list <dashboard-id>` prints the open proposals of a dashboard, newest first. The columns are `ID`, `STATE`, `REVISION`, `BEHIND` and `TITLE`, and `BEHIND` reads `behind main` when the dashboard has a newer version than the one the proposal builds on. `--state merged`, `--state discarded` or `--state all` shows the closed ones, and `--limit`, `--cursor` and `--all` page through the result. The default is 50 and the most is 100. `proposals show <proposal-id>` prints the proposal's details, then `Changes`, one line for each panel, variable or setting it adds, changes, removes or moves, such as `added panel p4`. It then prints `Conflicts` with the units a merge onto the latest version would hit, and the actions you may take now. `proposals merge <proposal-id> --revision <n>` merges the proposal as the next version of its dashboard and prints `Merged as version <n>`. It prints `Already in the dashboard` when the dashboard already held its change. `--revision` is required and is the revision `show` printed, and a proposal that gained a newer one is refused with `proposal_changed`. Merging needs Edit on the dashboard and a connection that is not in propose mode, which otherwise gets 403 `propose_mode`. It runs the queries of the panels it changes like any save. For each conflict, `--take <kind>:<id>=ours|theirs` names the side that wins, and it repeats: ```sh observe proposals merge <proposal-id> --revision 2 --take panel:p1=theirs --take setting:title=ours ``` `ours` keeps the dashboard's unit and `theirs` takes the proposal's. The kind is `panel`, `variable` or `setting`, and anything else exits 2. When a `--take` keeps the dashboard's side, the command also prints which units the proposal's change was dropped for. If nothing was saved, `Merged without a new version` replaces `Already in the dashboard`. `proposals discard <proposal-id> [--reason <text>]` closes the proposal without saving it and prints `Discarded`. `--reason` takes up to 500 characters, and it is shown on the proposal and printed by `proposals show`. Its author may discard it, and so may anyone who may merge it. `-q` hides the confirmation of `merge` and `discard`, and `--json` prints the API response unchanged. ### Annotations `observe annotate <text...>` adds an [annotation](/docs/use/annotations/), such as a deploy marker, at the server's current time on every dashboard: ```sh observe annotate "Deploy checkout v1.4.2" --tags deploy,checkout observe annotate "Database failover" --dashboard <dashboard-id> --at now-15m ``` It prints `Added annotation <id> at <time> on every dashboard`, which `-q` hides. A global annotation needs a key with the Editor role. - `--tags` takes comma-separated tags. - `--dashboard` puts the annotation on one dashboard instead of every dashboard. It prints `Added annotation <id> at <time> on dashboard <id>` and needs Edit on that dashboard. - `--at` places it in the past, as `now`, as `now-<N>` with `s`, `m`, `h` or `d` and one to six digits, or as an RFC 3339 time such as `2026-11-01T10:00:00Z`. It takes no short form like `time:`. An `--at` more than a day in the future still saves the annotation and prints a warning on standard error, because a wrong year is the usual cause. `observe annotations list` prints annotations newest first as `ID`, `TIME`, `DASHBOARD`, `TAGS` and `TEXT` columns, with the text cut at 60 characters: ```sh observe annotations list --dashboard <dashboard-id> --from 2026-11-01T00:00:00Z --tag deploy observe annotations update <annotation-id> --text "Deploy checkout v1.4.3" --tags deploy observe annotations delete <annotation-id> ``` Without `--dashboard` it lists only the global annotations, and with it that dashboard's annotations and the global ones. `--from` and `--to` are RFC 3339 times, and `--tag` repeats to match any of several tags. `--limit` takes up to 500 and the default is 50, and `--cursor` and `--all` page through the result. `annotations update <annotation-id>` changes the text with `--text`, the tags with `--tags`, or both, and prints `Updated annotation <id>`. `--tags` is a comma-separated list that replaces the old tags, and `--tags ""` removes them. Giving neither flag exits 2. The annotation keeps its time, dashboard and author. `annotations delete <annotation-id>` prints `Deleted annotation <id>`. Only an annotation's creator or an Admin may update or delete it. ## Watch what changes and what is wrong ### Activity `observe activity` prints the newest events of the [activity log](/docs/use/activity/), oldest first, one line each with the time, who did it and what happened. Comment threads are included: ```sh observe activity observe activity --dashboard <dashboard-id> --since 24h observe activity --follow --type run.failed --type run.canceled observe activity --actor <person-id> --since 168h ``` ```text 2026-11-01T10:00:00Z Observe Agent for Sam run failed (no_progress) 2026-11-01T10:05:09Z Sam saved version 12 of "Checkout" ``` Observation events read as sentences too, such as `started the observation "Slow checkout"` and `requested a panel block on the observation "Slow checkout"`. You see only the events of the folders the key can see, and an empty log prints `No activity yet`. - `--dashboard`, `--folder`, `--observation` and `--actor` take ids. - `--type` takes an event type and repeats. - `--since` and `--until` take a Go duration such as `24h`, or an RFC 3339 time. A duration counts hours at most, so a week is `168h`, and `7d` exits 2. - `--limit` prints up to 100 events, 20 by default, and `--cursor` and `--all` page through the result. When a full page prints, standard error says `Showing N, and more exist. More: --cursor <cursor>, or --all for every page.` - `--json` prints the response of `GET /api/v1/activity` unchanged, except with `--all`, which merges the pages. An Admin key also gets the [admin changes](/docs/use/activity/#admin-changes): who changed a role, a key, a webhook, a connected agent, an outbound domain or a Grafana connection. The code also names people invites and deactivations, service accounts and their keys, webhook secret rotations, datasources, and access requests. `observe audit search` reads the [audit trail](/docs/reference/audit-queries/). #### Follow events as they happen `--follow` prints that page and then keeps printing new events until you press Ctrl-C, which exits 0. It reads `GET /api/v1/activity/stream` from the newest event it printed, so no event is skipped or repeated. With `--json` it prints one event object per line, the first page included. `--follow` cannot be combined with `--all` or `--cursor`, and either exits 2. When the connection drops, or nothing arrives for 45 seconds, not even the server's 15 second pings, it reconnects. It waits the server's retry delay and resumes from the last event it printed. It exits 1 after 3 failed attempts in a row. If the server no longer knows that event, it prints `Some activity may have been missed.` and continues from the newest event. Run `observe activity` again to read what happened in between. ### Dashboard health `observe health` lists the dashboards with [health problems](/docs/use/dashboard-health/) in the folders the key can see, one row per problem: ```sh observe health observe health --kind no_data --folder <folder-id> observe health repair <dashboard-id> <dashboard-id> observe health run ``` ```text ID DASHBOARD FOLDER STATE KIND PANEL OR VARIABLE CHECKED REPAIR 0a1b2c3d-0000-4000-8000-000000000001 Checkout Shop failing no_data Requests (p_rps) 2026-11-06T03:00Z - 0a1b2c3d-0000-4000-8000-000000000001 Checkout Shop failing variable_failed $pod 2026-11-06T03:00Z - Last check finished 2026-11-06T03:04Z: succeeded. ``` - `--kind` takes `no_data`, `query_failed`, `variable_failed`, `duplicate_title` or `unopened`. - `--folder` takes a folder id. - `--limit` lists up to 100 dashboards, 50 by default, and `--cursor` and `--all` read the rest. `STATE` is the dashboard's health state and `REPAIR` the outcome of its latest repair, both described in [Dashboard health](/docs/use/dashboard-health/#from-the-cli). A variable shows as `$<name>`, and the last line says how the last daily check went. A dashboard listed with no problem shows one row with `-` as its kind and target. When a listed dashboard is `outdated`, a line after the table says its problems belong to an earlier version and a recheck is pending. When no dashboard has a problem, it prints `No dashboard has a health problem.`, then the line about the last check. That line can also read `A health check is running now.`, `Last check started <time> and did not finish.` or `No health check has run yet.` Listing exits 0 whatever it finds, and `--json` prints the response of `GET /api/v1/health`. #### Repair dashboards and run a check `health repair <dashboard-id>...` asks the agent to repair 1 to 50 dashboards. It prints one row per dashboard with `queued` and the request id, or the reason it was skipped. The reasons are `active`, `nothing_to_repair`, `not_found`, `forbidden_role`, `provisioned` (a starter dashboard, which only a release changes) and `queue_full`. It needs an Editor key and a model on the server, and exits 1 when it queued no repair. `health run` starts a check of every dashboard now and needs an Admin key. Results appear as each dashboard is checked. ### Audit trail `observe audit` reads the [audit trail](/docs/reference/audit-queries/) with an Admin key. Every other key gets 403 `forbidden_role`. ```sh observe audit search --query 'outcome:denied and origin:mcp' --from now-7d observe audit search --follow --query 'outcome:denied' observe audit show <event-id> observe audit facets actor_name --query 'action:dashboard.*' observe audit histogram --query outcome:failed --buckets 48 observe audit aggregate --query '{"aggs":{"by":{"terms":{"field":"origin"}}}}' observe audit fields observe audit export --from now-30d --format csv --file audit.csv ``` The subcommands that read a window of events share three flags: - `--query` takes KQL, `lucene:` and a Query DSL body, and matches everything by default. - `--from` and `--to` take an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`. The window is the last 24 hours by default and at most 366 days. `--json` prints the API response unchanged. The subcommands are these: - `search` prints a table of events, newest first, with `WHEN`, `WHO`, `VIA`, `ACTION`, `OUTCOME`, `TARGET` and `ID`. `WHO` reads `<agent> for <name>` for an agent, `VIA` is the origin and tool, and `OUTCOME` includes the reason. It prints 50 a page by default and at most 1,000, and pages with `--cursor` or `--all`. With no match it prints `No audit events match in the window.` on standard error. - `show <event-id>` prints one event and the other events of its request and its agent run. - `facets <field>` prints the most frequent values of a field, and `--limit` takes 1 to 100, 10 by default. - `histogram` prints the counts over time, and `--buckets` takes 1 to 200, 60 by default. It adds `N events, one bucket per <step>.` on standard error. - `aggregate` prints the rows of a Query DSL `aggs` body. `--query` must start with `{`, or the command exits 2. It allows up to 3 levels and the metrics `cardinality`, `value_count`, `min`, `max`, `avg`, `sum` and `percentiles`. - `fields` prints what a query can name. - `export` streams NDJSON, the default, or CSV with `--format csv`. #### Export the trail `export` writes to standard output, or to `--file`. It warns on standard error when it stopped at the server's limit of 1,000,000 rows and more events matched. With `--file` it writes to `<file>.partial` and renames it to the name you gave once the export is complete. It then prints `Wrote N events to <file>.`, which `-q` hides. If the server or the connection ends the export early, it exits 1, says how many events arrived and leaves them in `<file>.partial`. #### Follow the trail `search --follow` reads `GET /api/v1/audit/stream` and prints each matching event recorded from then on, in the order it committed, until Ctrl-C. With `--json` it prints one event object per line. It cannot be combined with `--all`, `--cursor`, `--limit`, `--from` or `--to`. It exits 1 when the key is no longer an Admin, or when the server ends the stream because the query is too expensive to follow. When the connection drops, it reconnects after the server's retry delay and from the last event it printed. It prints every matching event committed since, down to 10 minutes before that event's time. When that event is more than 24 hours old, it exits 1 and asks you to read the gap with `search --from`. It exits 1 after 3 failed attempts in a row, and a nothing-received gap of 45 seconds counts as a drop. ## Manage your workspace Most commands here need an Editor or Admin key. Each says which. ### Folders `observe folders` manages the [folders](/docs/teams/folders/) that hold dashboards, observations and saved searches: ```sh observe folders list observe folders create Team Payments observe folders rename <folder-id> Team Billing observe folders delete <folder-id> observe folders permissions show <folder-id> observe folders permissions grant <folder-id> --email ada@example.com --level edit observe folders permissions revoke <folder-id> --group payments observe folders permissions open <folder-id> --yes observe folders permissions admins-only <folder-id> --yes ``` `list` prints `ID`, `TITLE`, `DASHBOARDS` and `LEVEL` columns for the folders the key can see. It marks the General folder `(General)`, your My Dashboards `(yours)`, an Admins-only folder `(Only Admins)` and the [Audit folder](/docs/use/activity/#audit-folder) `(Audit folder)`. `create` joins its words into the title, needs the Editor role and prints `Created folder <title> (<id>)`. A title that another folder uses answers `folder_exists`. `rename` joins the words after the id into the new title and prints `Renamed folder to <title>`. The General folder answers `general_folder`. `delete` prints `Deleted folder <id>`. It works only on an empty folder, asks for no `--yes`, and answers `folder_not_empty` when anything is still filed in it. The General folder cannot be deleted either. #### Set who can open a folder `permissions show` lists who the folder is restricted to, users first and then groups, or says the folder is open to everyone by role. The other subcommands change the list: - `permissions grant` adds a person, with `--user <id>` or `--email <address>`, or a group with `--group <name>`, at a `--level` of `view`, `comment`, `edit` or `admin`. It changes the level of the entry that names the same person or group, and keeps every other entry. The first grant restricts the folder. It prints `Granted <level> on folder <id> to <who>`. - `permissions revoke` removes one entry and keeps the others, and prints `Removed <who> from folder <id>`. It answers that the name is not on the list when it is not. It needs `--yes` when it removes the last entry, because the folder is then open to everyone by role again. - `permissions open --yes` clears the whole list in one step and prints `Folder <id> is open to everyone by role`. - `permissions admins-only --yes` clears the list and lets only Admins read the folder, its creator included. It prints `Only Admins can read folder <id>`, and `permissions show` then says so. It needs an Admin key and never applies to a personal folder. Changing the list needs Manage on the folder. An Admin key has Manage on every folder except another person's personal one, and the General folder cannot be restricted. Each command is one read followed by one replace of the whole list, so two people changing the same folder at once can overwrite each other. The server can also refuse with `restricted_content` or `restricted_answer` when items or answers would become unreadable. It answers `admins_only_folder` when closing a folder that holds an unexpired public link, and `general_folder` for the General folder. ### Ask for comment access `observe access` asks for [comment access](/docs/teams/folders/#ask-for-comment-access) to a dashboard or observation you can view, and lists the requests that wait for you: ```sh observe access request dashboard:<dashboard-id> --note "I am on call for checkout this week" observe access request observation:<observation-id> observe access requests ``` `request` takes the object as `<kind>:<id>`, with `dashboard` or `observation` as the kind. The optional `--note` is one line of at most 200 characters, and a bad note answers `invalid_note`. It prints `Asked for comment access to <kind> <title>; the people who manage its folder will see it in their inbox` and changes no access. `-q` does not hide that line. Three answers are possible when the request cannot open: - A request that is still open answers `request_open` with the time it was made. - An object you can already comment on answers `already_can_comment`. - One you cannot see answers `not_found`. A request closes when Comment is granted, when a recipient marks it done, or after 30 days. A service-account key may ask too, and its request is granted by raising the service account's role. `requests` prints `ASKED`, `WHO`, `WHO ID`, `OBJECT`, `TITLE`, `FOLDER` and `NOTE` columns for the open requests on the folders you manage. It lists the newest first and at most 100, or prints `No open access requests on folders you manage.` Grant one with `observe folders permissions grant <folder-id> --user <id> --level comment`, or by raising the role. General takes no folder entry. For a request whose `FOLDER` is General, the command adds a note on standard error that says to raise the person's role on the People page, or to move the object to a folder first. `-q` hides that note. ### Datasources `observe datasources list` prints each datasource with its uid, type, name and health. It also prints its source (`file` or `app`), the dashboards that use it, and when it was last checked. An `AUDIENCE` column shows who can query it, `everyone` or `admins`, and only an Admin key sees it. An unhealthy datasource shows the failure and, when the server knows it, the cause. With none, it prints `No datasources yet` on standard error. `observe datasources recheck <uid>` skips the server's 10 second health cache and prints the new status. It exits 1 while the datasource is unhealthy. Any role can list and recheck, and neither takes flags. `--json` prints the API response. For finding what a datasource holds, see [Discovering what a datasource holds](#discovering-what-a-datasource-holds). #### Add and change datasources An Admin can manage the datasources added in the app, with these commands: ```sh observe datasources get prom observe datasources add prom --type prometheus --address https://prometheus.example.com observe datasources edit prom --name "Production Prometheus" observe datasources test prom --saved observe datasources remove prom ``` A datasource from the datasources file cannot be changed here. See [Add datasources in the app](/docs/connect/datasources-in-the-app/). - `get <uid>` prints the address, login and which credentials are set, never their values. - `add <uid> --type <type> --address <address>` creates one. `--type` is `prometheus`, `loki`, `tempo`, `jaeger`, `clickhouse`, `elasticsearch` or `opensearch`. `--address` is an `http` or `https` URL that passes the [outbound allowlist](/docs/operate/outbound-access/), or `host:port` for ClickHouse. - `edit <uid>` changes the settings you pass, and needs at least one. - `test <uid>` runs the health check on the definition you give and saves nothing. It takes `--saved` and every flag of `add`, and `--type` is optional. With `--saved` it starts from the saved datasource, so its stored credentials are used. It prints `The datasource answered the health check` or `The check failed: <reason>`, and exits 1 while the datasource is unhealthy. - `remove <uid>` prints `Removed datasource <uid>`. It is refused with the list of dashboards and saved searches that still use the datasource. The list says `and N more in folders you cannot see` when it is longer. `add` and `edit` print `Added datasource <uid>` or `Changed datasource <uid>`, then `Check it now: observe datasources recheck <uid>`. An edit applies at once on the server you reached and within 15 seconds on the others. Details of the `add` and `edit` flags: - `--name` defaults to the uid. - `--audience` is `everyone`, the default, or `admins`, who alone can then query the datasource. - `--username` and `--timeout` set the login and the request timeout. - `--max-series`, `--max-points`, `--max-rows` and `--max-concurrent-queries` set the limits. - `--grafana-uid` is repeatable, or comma-separated, and names the Grafana datasource uids this one stands for on import. - `--scrape-interval` is for Prometheus, `--tenant-id` for Loki, and `--database` and `--tls` for ClickHouse. - `--index`, `--time-field`, `--query-language` (`kql` or `lucene`), `--field-level`, `--field-message`, `--field-service`, `--field-span-id` and `--field-trace-id` are for Elasticsearch and OpenSearch. - `--password-file`, `--bearer-token-file`, `--api-key-file` and `--header NAME=FILE` read a credential from a file, where `-` reads standard input once. A credential must not be empty and may be at most 4096 bytes. A credential you do not pass keeps its stored value. - `edit --clear` removes a stored credential: `password`, `bearer_token`, `api_key` or `header:<name>`. ### Grafana connections `observe grafana` connects to a Grafana and imports its dashboards for [Switch from Grafana](/docs/use/switch-from-grafana/). Both commands need an Admin key. #### Connect to a Grafana `observe grafana connect <url> --token-stdin` stores a Grafana connection and tests it. The token comes only from standard input, so it never lands in shell history, and `--token-stdin` is required. `--name` defaults to the URL's host and is cut to 100 characters. ```sh printf '%s' "$GRAFANA_TOKEN" | observe grafana connect https://grafana.example.com --token-stdin --name "Ops Grafana" ``` It prints `Connected <name>: <id>` and the test message, and `--json` prints the tested connection. The URL must be `http` or `https`, and the token must not be empty, or the command exits 2. A failed test exits 1 with `the connection test failed: <message>` and a line that says the connection `<id>` is stored. The connection stays stored, and you fix or remove it on the Grafana settings page. The line `Connected <name>: <id>` still prints first. #### Import from a Grafana `observe grafana import <connection id>` imports dashboards from that Grafana, with `--folders` for some folders or `--all` for every one: ```sh observe grafana import <connection id> observe grafana import <connection id> --folders general,platform observe grafana import <connection id> --all ``` `--folders` takes comma-separated Grafana folder uids, each with its subfolders, and `general` stands for the dashboards outside any folder. `--folders` with `--all` exits 2. Without either flag it prints the folders as a table of uid, title and dashboard count and exits 2. It then waits for the import and shows `Imported <done> of <total>` on a terminal. At the end it prints how many dashboards were done, skipped and failed, a table of the failed ones with their error, and a notice for dashboards with panels that did not verify. It exits 1 when any dashboard failed or the import failed or was canceled, and `--json` prints the final import. An interrupt stops the waiting while the import continues on the server. The server keeps a connection's last 20 imports. ### Webhooks `observe webhooks` manages the [webhooks](/docs/use/webhooks/) that send workspace activity to an outside address as signed requests. Every verb needs an Admin key. ```sh observe webhooks add --name "Failed runs" --url https://hooks.example.com/slashobserve --event run.failed observe webhooks list observe webhooks test <webhook id> ``` A server holds at most 20 webhooks, and a 21st answers 422 `too_many_webhooks`. A server with no `SLASHOBSERVE_SECRET_KEY` answers 409 `secret_key_missing`, because it cannot store a signing secret. A webhook whose secret the current key cannot read answers 409 `secret_unreadable`, and `rotate-secret` makes a new one. `--json` prints the response body of each request unchanged. - `list` prints each webhook's id, name, address, number of event types and status. The status is `sending`, `retrying` or `disabled (<reason>)`. A retrying webhook also shows how many events wait behind the failing one and when the next attempt is due, such as `retrying (3 waiting, next 2026-11-11T09:15Z)`. `100+` means more than 100. - `add --name <name> --url <https address> --event <type>` creates a webhook, and `--event` repeats for several types. All three flags are required, or it exits 2. The name is 1 to 100 characters, and the address is `https` on port 443, at most 2048 characters, with no credentials or fragment in it. An address whose domain is not on the [outbound allowlist](/docs/operate/outbound-access/) fails with `outbound_domain_not_allowed`. `--format slack` or `--format teams` sends one line of text for a Slack or Teams address instead of the signed JSON envelope, `generic`, the default. It prints the webhook and its signing secret once, and a notice on standard error says the secret is not shown again, so copy it then. `-q` hides the notice but not the secret. - `update <id>` changes the `--name`, `--url`, `--format` or `--event` list you pass and leaves the rest. `--event` replaces the whole list, and with none of the flags it exits 2. - `enable <id>` and `disable <id>` turn a webhook on, clearing its failures, or off. - `test <id>` sends a `webhook.test` event now and prints its outcome, the receiver's status, the duration and the error code. It exits 1 when the event was not delivered. - `skip <id>` passes a retrying webhook over the oldest event it is stuck on, so the events behind it go out. The skipped event is never sent to that receiver and shows in `deliveries` as `skipped`. It exits 1 with `nothing_to_skip` when the webhook is not retrying, and with `webhook_busy` while a server is delivering for it. - `rotate-secret <id>` makes a new signing secret and prints it once. The old one stops working at once. - `delete <id>` deletes the webhook and its recorded attempts. - `deliveries <id>` prints the newest attempts first as a table of time, event, outcome, status, duration and error code. `--limit` takes 1 to 100, 20 by default, and `--cursor` and `--all` page through the result. The server keeps attempts for 7 days. `update`, `enable`, `disable` and `rotate-secret` keep the webhook's owner. `update --take-ownership` makes the caller the owner. `enable` does the same for a webhook disabled with the reason `owner`, as the [HTTP API](/docs/use/webhooks/#manage-webhooks-over-http) does. ### People `observe people` lists everyone who has signed in and invites people by email with the role they get at their first sign-in, as described in [People](/docs/teams/people/#invite-people). Every verb needs an Admin key. ```sh observe people list observe people invite new@example.com --role viewer observe people invites observe people uninvite <invite id> ``` No email is sent, so send the printed sign-in link yourself. The role applies only at the person's first sign-in through your identity provider with a verified email. An invite never admits anyone the sign-in rules refuse. - `list` prints everyone who has signed in, newest first, as a table of id, name, email, role, status (`active` or `deactivated`) and when they were last active. - `invite <email> --role <role>` records a pending invite and prints `Invited <email> as <role>`, its id and its sign-in link. `--role` is `admin`, `editor`, `commenter` or `viewer`, and a missing or invalid role exits 2. Inviting an email that already has a pending invite changes its role. An email that has already signed in fails with `already_member`, and one outside `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` with `email_domain_not_allowed`. - `invites` prints the pending invites, newest first, as a table of id, email, role, who invited and when. - `uninvite <invite id>` withdraws a pending invite and prints `Withdrew invite <id>`. `list` and `invites` take `--limit` of 1 to 500, 50 by default, with `--cursor` for the next page and `--all` for every page. An Admin deactivates and reactivates people in the web app, because a key never ends another person's sessions. ### Teams `observe teams` manages the [teams](/docs/teams/people/#teams) whose names share folders with their members. Every verb needs an Admin key. The verbs take no flags other than `--json` and `-q`. ```sh observe teams create sre observe teams add <team id> <person id> observe teams list ``` - `list` prints each team's id, name, number of members and their names. - `create <name>` creates a team with no members. A name another team has, in any case, fails with `team_exists`, and a server holds at most 200 teams, so a 201st answers 422 `too_many_teams`. - `add <team id> <person id>` and `remove <team id> <person id>` change the members and print the team. `observe people list` prints the person ids. - `delete <team id>` deletes the team. ## Use the CLI from an agent ### Agent skill `observe skill install` writes the `/observe` skill, the guide that outside agents follow, to `~/.agents/skills/observe/SKILL.md` and `~/.claude/skills/observe/SKILL.md`. Claude Code and other agents that read Agent Skills then offer it as `/observe`. The guide covers how to build and change dashboards, investigate a question, search logs and traces, answer comments, keep observations, review proposals, take assigned runs and read the audit trail. The command replaces an earlier copy and prints one `Installed <path>` line per file. It needs no server, sign-in or network. `--dir <path>` writes only `<path>/observe/SKILL.md`. `observe skill` alone prints help. The skill is part of the CLI program and is never fetched from a server, so the text always comes from the release you installed. Run `observe skill install` again after you upgrade the CLI. The same guide reaches MCP clients as the [`observe` prompt](/docs/use/mcp/#the-observe-prompt). ### Shell completion `observe completion bash`, `zsh` or `fish` prints a completion script for commands and flags. Load it for the current shell, or save it where your shell reads completions: ```sh source <(observe completion bash) observe completion zsh > "${fpath[1]}/_observe" observe completion fish > ~/.config/fish/completions/observe.fish ``` Other shells are not supported, and `observe completion` alone prints help. ## Reference ### Settings and saved keys The CLI reads its settings in this order: flags, the environment, then the saved file. | Setting | Flag | Environment variable | | --- | --- | --- | | Server | `--server` | `OBSERVE_SERVER` | | Key | `--token` | `OBSERVE_TOKEN` | Prefer `OBSERVE_TOKEN` to `--token`, since flags end up in shell history and the process list. A saved key is sent only to the server it was saved for. To use another server, pass `--token` or set `OBSERVE_TOKEN`. Otherwise the command fails with `the saved key belongs to <server>; pass --token or run observe login --server <current>`. Details of the saved file: - The file is `$XDG_CONFIG_HOME/slashobserve/cli.json` when that variable is an absolute path, else `~/.config/slashobserve/cli.json`. - The file has mode 0600 and its directory 0700. - Two server addresses match when their scheme, host and path match, with the default ports dropped. `observe version`, or `--version`, prints the CLI's version, which is `dev` for a binary built without a version. `--json` has no effect on local commands: `skill install`, `completion` and `version`. ### Global and prompt flags These flags work on every command. | Flag | Meaning | | --- | --- | | `--server` | The server address. | | `--token` | The service-account key. | | `--json` | Print the API response body instead of text. | | `-q`, `--quiet` | Hide progress and confirmations. Results and errors still print. | | `--help` | Print help for a command. | The prompt command `observe [flags] <prompt words...>` takes these flags. | Flag | Default | Meaning | | --- | --- | --- | | `--dashboard` | none | Ask about, or with `--revise` change, a dashboard. | | `--revise` | false | Change `--dashboard` instead of only answering. | | `--apply` | none | Apply an answer's suggested change, by finding id. | | `--chat` | none | Send the next turn of one of your chats. | | `--new-chat` | false | Start a new chat instead of joining the latest. | | `--at` | none | The spot on `--dashboard`, as JSON or a short form. | | `--no-wait` | false | Print the request id and return. | | `--timeout` | 2h | Stop waiting. The request keeps running. | | `--open` | false | Open the saved dashboard in the browser. | The command exits 2 before it sends anything in these cases: - `--revise` without `--dashboard`. - `--new-chat` with `--chat`. - `--apply` with prompt words, or without `--revise`. - A `--timeout` of 0 or less. - No prompt words, which prints `a prompt is required` and the usage. ### Exit codes The CLI exits with these codes. | Code | When | | --- | --- | | `0` | The command succeeded. | | `1` | The server refused or failed the request, or a check the command makes failed. | | `2` | The command line is wrong. | Details of code 0: - It includes a prompt where `--open` could not open the browser, and `observe logs --tail` ending with Ctrl-C. - `observe status <id>` without `--wait` and `observe cancel` exit 0 even when the request failed. Only commands that wait exit 1 for a failed request. Details of code 1: - The server refused or failed the request, the agent request failed, or the waiting stopped at `--timeout` or an interrupt. - `observe open` could not open the browser. - An `observe doctor` check failed. - An `observe datasources lint` diagnostic is an error, or `datasources recheck` or `datasources test` finds the datasource unhealthy. - An `observe grafana import` had a dashboard fail, or the import failed or was canceled. - An `observe import` refused an already imported file, or read an empty or oversized file or standard input. - An `observe dashboards apply` had a file fail. - An `observe health repair` queued no repair. - A `--follow` command used up 3 failed reconnects. Details of code 2: - An unknown command or flag, a missing argument or an invalid id. - A file or directory named on the command line that cannot be read. - A flag combination the command refuses before it sends anything, such as `--all` with `--cursor` or a `--limit` outside its range. ### Error output An error is one line on standard error. It holds the server's message with its code in parentheses, when the server sent both. Without a message the line reads `the server answered HTTP <status>`. A message without a code has no parentheses. Below the line, the failing paths of an invalid Spec or panel print, at most 10, then `and N more`. A hint line follows some errors: `forbidden_role`, `outbound_domain_not_allowed`, `observation_thread_exists`, `restricted_content`, and a 400 that mentions a cursor. With `--json`, the error is one JSON object on standard error, so a script can branch on the code: ```json {"error": "<message>", "code": "<code>"} ``` The object can also carry `start` and `end`, integers, when the server sends a byte range. Details of the codes: - The code is the server's own, such as `not_found`, `forbidden_role` or `version_conflict`. - `usage` is a wrong command line. - `unauthenticated` is a missing or refused key. - `unreachable` means the server cannot be reached. - `interrupted` is an interrupt. - `http_<status>` is a status where the server sent no code. - `failed` is anything else. An address that answers with a web page instead of JSON is reported as probably not a SlashObserve server. A version that does not exist is reported with the latest version of the dashboard. ### Lists and paging The commands that list rows in pages take `--limit`, `--cursor` and `--all`. | Command | Default limit | Largest limit | | --- | --- | --- | | `dashboards list`, `dashboards versions`, `dashboards revisions` | 50 | 200 | | `comments list`, `annotations list` | 50 | 500 | | `people list`, `people invites` | 50 | 500 | | `o list`, `saved-searches list`, `proposals list` | 50 | 100 | | `requests list`, `health` | 50 | 100 | | `chats list` | 50 | 50 | | `audit search` | 50 | 1000 | | `search` | 20 | 50 | | `activity`, `webhooks deliveries` | 20 | 100 | `--limit` outside its range exits 2 before anything is sent. `observe <command> --help` shows the range of one command. When more rows exist, the table is followed on standard error by `Showing 5 of 23. More: --cursor <cursor>, or --all for every page.` The total is printed where the server counts it, as `dashboards list` does, and otherwise the line says that more exist. `--cursor` continues from the `next_cursor` a page ended with, which `--json` shows too. A cursor the server does not recognise is refused with `invalid_request` and a hint to pass it exactly as printed. `--all` follows the cursor to the last page and prints one list. With `--json` it is one object whose list holds every row, with `next_cursor` null and any `total_count` kept. After 1000 pages, or a repeated cursor, it fails with `the server kept answering with more pages; use --cursor to read them one at a time`, exits 1 and prints no partial list. `--all` cannot be combined with `--cursor`, and `activity --follow` cannot be combined with either. The MCP list tools take their own, smaller page sizes and the same `next_cursor`. ### Permission errors A refusal with the code `forbidden_role` and the message "your role does not allow this" gets a hint that an Admin can change the key's role on the API keys page. A second hint covers 403 `forbidden_role` with "you do not have access to this dashboard". A dashboard the key cannot see answers `not_found`, like a dashboard that does not exist. Activity, search and observations answer 403 for something the key cannot see. A key matches no access list entry, because entries name people and groups. So a key sees a restricted folder only as an Admin service account or as the service account that created the folder, as [Folders](/docs/teams/folders/) describes. ### Roles the commands need Most reads need the Viewer role. These commands need more. | Role | Commands | | --- | --- | | Editor | `investigate`, `folders create`, `health repair`, `annotate` without `--dashboard` | | Admin | `audit`, `webhooks`, `people`, `teams`, `grafana`, `health run` | | Admin | `datasources get`, `add`, `edit`, `test` and `remove` | | Admin | `requests list --scope all`, `chats list --scope all`, `folders permissions admins-only` | | Admin | `investigate --as-of` | | Comment on the target | `comments add`, `comments people` | | Edit on the target | `dashboards move`, `dashboards delete`, `annotate --dashboard` | ### Commands and flags Each table lists the flags a command registers. A flag with a default shows it in parentheses. The sections above describe what each flag does. Every command also takes the global flags. #### Agent requests | Command | Flags | | --- | --- | | `observe <prompt...>` | The prompt flags above. | | `status <request-id>` | `--wait`, `--timeout` (2h), `--open` | | `cancel <request-id>` | None. | | `continue <request-id>` | `--note`, `--no-wait`, `--timeout` (2h), `--open` | | `retry <request-id>` | `--no-wait`, `--timeout` (2h), `--open` | | `save-answer <request-id>` | None. | | `share-answer <request-id>` | `--thread` | | `investigate <question...>` | `--dashboard`, `--panel`, `--from`, `--to`, `--observation`, `--block`, `--at`, `--as-of`, `--private`, `--open`, `--no-wait`, `--timeout` (2h) | | `run [<name>]` | `--no-wait`, `--timeout` (2h), `--open` | | `requests list` | `--scope` (mine), `--state`, `--q`, `--pinned`, `--dashboard`, `--observation`, `--anchored`, `--limit` (50), `--cursor`, `--all` | | `requests pin <id>`, `requests unpin <id>` | None. | | `requests rename <id> <title...>` | `--clear` | | `requests archive <id>` | `--delete-observation`, `--yes` | | `chats list` | `--scope` (mine), `--q`, `--pinned`, `--dashboard`, `--observation`, `--limit` (50), `--cursor`, `--all` | | `chats show <chat-id>`, `chats pin <chat-id>`, `chats unpin <chat-id>` | None. | | `chats archive <chat-id>` | `--yes` | #### Setup and sessions | Command | Flags | | --- | --- | | `login` | `--with-token` | | `logout` | None. | | `version` | None. | | `open [<id or address>]` | None. | | `doctor` | None. | | `skill install` | `--dir` | | `completion bash`, `zsh`, `fish` | None. | #### Dashboards | Command | Flags | | --- | --- | | `dashboards list` | `--order` (updated), `--exclude-audit`, `--limit` (50), `--cursor`, `--all` | | `dashboards show <id>` | `--version` | | `dashboards versions <id>` | `--limit` (50), `--cursor`, `--all` | | `dashboards revisions <id> [<revision-id>]` | `--limit` (50), `--cursor`, `--all` | | `dashboards tags` | `--exclude-audit` | | `dashboards viewers <id>` | None. | | `dashboards move <id>` | `--folder` (required) | | `dashboards duplicate <id>` | `--title` (required), `--folder` | | `dashboards restore <id>` | `--version` (required), `--parent`, `--summary` | | `dashboards panels <id>` | `--summary` (required), `--file`, `--remove`, `--parent` | | `dashboards diff <id>` | `--from`, `--to` | | `dashboards export <folder>` | `--dir` (current directory) | | `dashboards apply` | `--dir` (required) | | `dashboards schema`, `dashboards sample` | None. | | `dashboards delete <id>` | `--yes` | | `import <file or ->` | `--map`, `--preview`, `--folder`, `--update`, `--as-new`, `--open` | #### Logs, traces, metrics and datasources | Command | Flags | | --- | --- | | `logs [<query>]` | `--datasource`, `--from` (now-1h), `--to` (now), `--limit` (100), `--tail`, `--ask`, `--dry-run`, `--facets`, `--field`, `--patterns`, `--context`, `--before` (50), `--after` (50) | | `traces [<trace id>]` | `--datasource`, `--from` (now-24h), `--to` (now), `--ask`, `--query`, `--dry-run`, `--sort`, `--compare`, `--baseline`, `--limit` (20 with `--compare`) | | `metrics query [<promql>]` | `--datasource`, `--from` (now-1h), `--to` (now), `--instant`, `--ask`, `--dry-run` | | `datasources list`, `datasources recheck <uid>` | None. | | `datasources metrics <uid>` | `--search`, `--limit` (100) | | `datasources labels <uid>` | `--search`, `--limit` (100), `--metric`, `--table`, `--from`, `--to` | | `datasources label-values <uid> <label>` | `--search`, `--limit` (100), `--metric`, `--table`, `--from`, `--to` | | `datasources services [<uid>]` | `--signal`, `--window` (1h), `--service` | | `datasources schema <uid>` | `--table`, `--offset` (0) | | `datasources sample <uid>` | `--table`, `--limit` (5) | | `datasources lint <uid> <query>` | None. | | `datasources log-volume <uid> <query>` | `--from` (now-1h), `--to` (now), `--buckets` (60) | | `datasources trace-stats <uid> [<filter>]` | `--from` (now-1h), `--to` (now), `--buckets` (60) | | `datasources trace-logs <uid> <trace-id>` | `--from` (now-1h), `--to` (now), `--span`, `--service`, `--limit` (100) | | `datasources get <uid>` | None. | | `datasources add <uid>`, `edit <uid>`, `test <uid>` | `--type`, `--address`, `--name`, `--audience`, `--username`, `--timeout`, the limit, type and credential flags in [Add and change datasources](#add-and-change-datasources); `test` adds `--saved`, and `edit` adds `--clear` | | `datasources remove <uid>` | None. | | `search <words...>` | `--kind`, `--limit` (20), `--cursor`, `--all` | | `saved-searches list` | `--kind`, `--folder`, `--limit` (50), `--cursor`, `--all` | | `saved-searches save` | `--kind`, `--title`, `--datasource`, `--folder`, `--query`, `--from` (now-1h), `--to` (now), `--columns`, `--service`, `--span`, `--min`, `--max`, `--errors`, `--mode` | | `saved-searches update <id>` | `--query`, `--from`, `--to`, the filter flags, `--clear-filters` | | `saved-searches rename <id> <title...>` | None. | | `saved-searches move <id>` | `--folder` | | `saved-searches delete <id>` | None. | #### Observations, comments and proposals | Command | Flags | | --- | --- | | `o new <title...>` | `--folder`, `--from`, `--to`, `--text`, `--text-file` | | `o list` | `--folder`, `--state`, `--title`, `--limit` (50), `--cursor`, `--all` | | `o show <id>` | None. | | `o add <id>` | `--text`, `--text-file`, `--panel-file`, `--snapshot-of`, `--from`, `--to`, `--var`, `--half`, `--width`, `--height`, `--position` | | `o edit <id>` | `--title`, `--from`, `--to`, `--clear-range` | | `o edit-block <block-id>` | `--version`, `--text`, `--text-file`, `--panel-file`, `--from`, `--to`, `--half`, `--full`, `--width`, `--height`, `--position`, `--follow-page` | | `o arrange <id> <block-id>...` | None. | | `o remove-block <block-id>` | `--version` | | `o keep <block-id>` | `--version` | | `o discard <block-id>` | None. | | `o move <id>` | `--folder` | | `o resolve <id>` | `--summary` | | `o reopen <id>` | None. | | `o pin <id>` | `--dashboard` | | `o dashboard <id>` | `--block`, `--new` | | `o publish <id>` | None. | | `o rcas <id> [<revision>]` | None. | | `o delete <id>` | `--yes` | | `o withdraw <id> <revision>` | `--yes` | | `comments list [<dashboard-id>]` | `--on`, `--status` (open), `--panel`, `--limit` (50), `--cursor`, `--all` | | `comments add <text...>` | `--on` (required), `--panel`, `--version`, `--block`, `--at`, `--to` (everyone) | | `comments reply <comment-id> <text...>` | `--block`, `--reply-to`, `--to` | | `comments edit <comment-id> <text...>` | None. | | `comments delete <comment-id>` | None. | | `comments withdraw <comment-id>` | None. | | `comments apply <comment-id> <finding-id>` | None. | | `comments people` | `--on` (required), `--search`, `--limit` (20) | | `comments resolve <comment-id>` | `--version` | | `comments reopen <comment-id>` | None. | | `proposals list <dashboard-id>` | `--state` (open), `--limit` (50), `--cursor`, `--all` | | `proposals show <proposal-id>` | None. | | `proposals merge <proposal-id>` | `--revision` (required), `--take` | | `proposals discard <proposal-id>` | `--reason` | | `annotate <text...>` | `--tags`, `--dashboard`, `--at` | | `annotations list` | `--dashboard`, `--from`, `--to`, `--tag`, `--limit` (50), `--cursor`, `--all` | | `annotations update <id>` | `--text`, `--tags` | | `annotations delete <id>` | None. | #### Activity, health and audit | Command | Flags | | --- | --- | | `activity` | `--dashboard`, `--folder`, `--observation`, `--actor`, `--type`, `--since`, `--until`, `--limit` (20), `--cursor`, `--all`, `--follow` | | `health` | `--kind`, `--folder`, `--limit` (50), `--cursor`, `--all` | | `health repair <dashboard-id>...` | None. | | `health run` | None. | | `audit search` | `--query`, `--from`, `--to`, `--limit` (50), `--cursor`, `--all`, `--follow` | | `audit show <event-id>`, `audit fields` | None. | | `audit facets <field>` | `--query`, `--from`, `--to`, `--limit` (10) | | `audit histogram` | `--query`, `--from`, `--to`, `--buckets` (60) | | `audit aggregate` | `--query`, `--from`, `--to` | | `audit export` | `--query`, `--from`, `--to`, `--format` (ndjson), `--file` | #### Workspace administration | Command | Flags | | --- | --- | | `folders list`, `folders delete <id>` | None. | | `folders create <title...>`, `folders rename <id> <title...>` | None. | | `folders permissions show <id>` | None. | | `folders permissions grant <id>` | `--user`, `--email`, `--group`, `--level` | | `folders permissions revoke <id>` | `--user`, `--email`, `--group`, `--yes` | | `folders permissions open <id>`, `admins-only <id>` | `--yes` | | `access request <kind>:<id>` | `--note` | | `access requests` | None. | | `grafana connect <url>` | `--token-stdin` (required), `--name` | | `grafana import <connection id>` | `--folders`, `--all` | | `webhooks add` | `--name`, `--url`, `--event`, `--format` (generic) | | `webhooks update <id>` | `--name`, `--url`, `--event`, `--format`, `--take-ownership` | | `webhooks list`, `enable <id>`, `disable <id>`, `test <id>`, `skip <id>`, `rotate-secret <id>`, `delete <id>` | None. | | `webhooks deliveries <id>` | `--limit` (20), `--cursor`, `--all` | | `people list`, `people invites` | `--limit` (50), `--cursor`, `--all` | | `people invite <email>` | `--role` | | `people uninvite <invite id>` | None. | | `teams list`, `create <name>`, `delete <id>`, `add <team> <person>`, `remove <team> <person>` | None. | # MCP > Connect Claude Code, Claude Desktop, Cursor, OpenCode and other MCP clients to the server, make a first tool call, work with dashboards, comments and observations, and look up every tool, argument and error. Source: https://slashobserve.com/docs/use/mcp/ · Markdown: https://slashobserve.com/docs/use/mcp/index.md SlashObserve speaks the Model Context Protocol (MCP), so an agent such as Claude Code or Claude Desktop can build dashboards, read and answer comments, investigate a question and keep what it finds, using its own model. The agent acts as the person who connected it, with that person's role and folder access. The server exposes its tools over Streamable HTTP at `<public url>/mcp`. `GET /api/v1/instance` returns the exact address as `mcp_url` next to `public_url`; it needs a signed-in session or a key. Every request carries `Authorization: Bearer <token>`. The token is either a person's OAuth access token, which [Connect your own agent](#connect-your-own-agent) sets up, or a [service-account key](/docs/operate/service-account-keys/) for a headless bot, which [Connect a bot with a service-account key](#connect-a-bot-with-a-service-account-key) sets up. ## Connect your own agent Add `<public url>/mcp` to an MCP client, approve it once in your browser, and the client acts as you. The steps below use Claude Code and a server at `https://observe.example.com`. For the demo stack, use `http://localhost:58080/mcp`. The **Connect an agent** button on the [Agents page](/docs/use/agents/) shows the Claude Code command with your address filled in. 1. Add the server to Claude Code: ```sh claude mcp add --transport http slashobserve https://observe.example.com/mcp ``` 2. Inside Claude Code, run `/mcp` and choose **Authenticate** for `slashobserve`, or run `claude mcp login slashobserve` in your shell. Claude Code opens your browser. 3. Sign in through your identity provider, as for the web app. The consent page names the client, shows your name, email and role, shows the host the browser returns to, and asks you to approve or deny. When the client runs on your own computer, the page warns that any program on this computer can ask under any name, so approve only a connection you just started. 4. Choose **Approve**. Claude Code now lists the server's tools. ### Connect VS Code Add this to `.vscode/mcp.json`, choose Start on the server, and allow the sign-in: ```json { "servers": { "slashobserve": { "type": "http", "url": "https://observe.example.com/mcp" } } } ``` ### Connect Cursor Add a `url`-only entry to `.cursor/mcp.json` and sign in when Cursor asks: ```json { "mcpServers": { "slashobserve": { "url": "https://observe.example.com/mcp" } } } ``` ### Connect Claude Desktop or claude.ai Add the server from the connector settings, entering `<public url>/mcp` as the remote MCP server URL. These clients reach the server from Anthropic's servers, so `SLASHOBSERVE_PUBLIC_URL` must be an `https` address that is reachable from the internet. A server on `localhost` cannot be added. ### What an approved connection can do After you approve, the client acts with your role and your folder access, re-read on every call, so a role change takes effect at once. Everything it writes shows as `<your name> (via <client>)`. The client chooses its own name and SlashObserve cannot verify it. The name is a label and never changes what the client may do. The connection has these limits: - An access token lasts 1 hour. - A refresh token lasts 30 days from when it was issued and is replaced each time it is used, so a client that stays in use keeps working. - A connection lasts at most 90 days, after which you approve it again. - You can have at most 20 connected agents, and approving a client you already connected replaces that connection. - An approval the client has not yet finished lasts 60 seconds and counts toward the 20. ### Disconnect an agent In the web app, open Settings, Connected agents. An Admin sees and disconnects everyone's connections in Settings, Agent access. The [Agents page](/docs/use/agents/) lists the same connections with their mode and presence. Disconnecting a client also ends a run it already claimed: the run's token stops working at once, and the run ends when its lease lapses. In Claude Code, `claude mcp logout slashobserve` clears only the credentials Claude Code stored, so disconnect in Settings too. Over the HTTP API, any signed-in person lists and disconnects their own agents with `GET /api/v1/me/grants` and `DELETE /api/v1/me/grants/{id}`. An Admin lists and disconnects everyone's with `GET /api/v1/grants` and `DELETE /api/v1/grants/{id}`. Each connected agent in the list has a `state`, always `active` there because the list leaves out revoked and expired connections; see [States](/docs/reference/states/). Service-account keys cannot call any of these routes. ## Make your first tool call Once connected, ask the client in plain words, for example "Which datasources does SlashObserve have?". The client picks the tool and sends a `tools/call` request with the tool name and its arguments: ```json { "name": "list_datasources", "arguments": {} } ``` The result has one entry for each datasource, with its `uid`, `type`, `name` and `healthy` flag. On the demo stack the list starts like this: ```json { "datasources": [ { "uid": "prom", "type": "prometheus", "name": "Prometheus", "healthy": true }, { "uid": "loki", "type": "loki", "name": "Loki", "healthy": true } ] } ``` Use a `uid` from this list as the `datasource` argument of the other tools. From here, try `list_dashboards` to see what exists, or ask the client to build a dashboard; [Build and change a dashboard](#build-and-change-a-dashboard) shows the order it follows. Two things help when a call fails. Every refused call returns a `code` you can branch on and a `message` that says what to change; [Errors](#errors) lists them. A call with a field the tool does not take is refused with `invalid_request` and the list of fields it takes, so a wrong guess costs one call. ## Connect a bot with a service-account key A service-account key suits a headless bot that has no person to approve it. Its writes show as the service account, and its role decides what it may do. Create the key as [Service-account keys](/docs/operate/service-account-keys/) describes. Export the key in the shell that starts your client, so the key never lands in a config file: ```sh export OBSERVE_TOKEN=<your service-account key> ``` ### Claude Code with a key Add this to `.mcp.json` in your project, with your server's address: ```json { "mcpServers": { "slashobserve": { "type": "http", "url": "https://observe.example.com/mcp", "headers": { "Authorization": "Bearer ${OBSERVE_TOKEN}" } } } } ``` Claude Code expands `${OBSERVE_TOKEN}` from its environment when it starts. `.mcp.json` is the documented place for that expansion. `claude mcp add` can create the same entry. Use single quotes so your shell does not expand the variable and write the key into the config: ```sh claude mcp add --transport http --scope project slashobserve https://observe.example.com/mcp --header 'Authorization: Bearer ${OBSERVE_TOKEN}' ``` Prefer `.mcp.json`. The **API keys** page's Claude Code snippet also appends one line to your project's `CLAUDE.md`, only if the file does not already contain `For SlashObserve dashboards`. The line tells Claude Code to read open comments with `list_comments`, fix them with `update_dashboard`, reply to each with `reply_to_comment` and resolve it with `resolve_comment`, passing the version that fixed it. ### OpenCode with a key Add this to `opencode.json`: ```json { "$schema": "https://opencode.ai/config.json", "mcp": { "slashobserve": { "type": "remote", "url": "https://observe.example.com/mcp", "enabled": true, "oauth": false, "headers": { "Authorization": "Bearer {env:OBSERVE_TOKEN}" } } } } ``` `"oauth": false` stops OpenCode from trying an OAuth flow; SlashObserve takes only the bearer key on this route. ### Cursor with a key Cursor reads remote MCP servers from `.cursor/mcp.json` (per project) or `~/.cursor/mcp.json`. This is a generic example that the project has not tested with Cursor. The `url` and `headers` fields apply to any client that supports remote MCP servers with custom headers. Cursor defines how it expands environment variables inside `headers`, so check its current MCP documentation before relying on the `${env:OBSERVE_TOKEN}` form below: ```json { "mcpServers": { "slashobserve": { "url": "https://observe.example.com/mcp", "headers": { "Authorization": "Bearer ${env:OBSERVE_TOKEN}" } } } } ``` If your Cursor version cannot expand variables there, put the key in the file only for a user-level `~/.cursor/mcp.json` that is never committed. ## The /observe prompt The server offers one MCP prompt, `observe`, with two optional arguments, `ask` and `kind`. - Without `kind`, it returns the guide that outside agents follow to build and change dashboards, investigate a question, search logs and traces, answer comments, keep observations, review proposals and take assigned runs. It appends the `ask`, what you want, as the last section. - With `kind` set to `build` or `investigate`, it returns the system text SlashObserve's own agent works from for that kind of run. An agent that claims runs reads it before it starts one. The `ask` is not used. - Any other `kind` is refused. Any key or OAuth connection that can call `/mcp` can list and get the prompt, and the text holds nothing secret. How a client shows a prompt is up to the client; in Claude Code it appears as an `mcp__` command under the server's name. To get the same guide as `/observe` in Claude Code and other agents that read Agent Skills, run `observe skill install`; see [CLI](/docs/use/cli/#agent-skill). ## Build and change a dashboard On `initialize`, the server sends instructions with the order of work, and a client follows it: 1. Call `get_spec_guide` once before the first save. It returns the authoring guide, the JSON Schema and an example. 2. Take a datasource `uid` from `list_datasources`, then find real names with `list_metrics`, `list_labels`, `list_label_values`, `get_schema` and `sample_rows`. 3. Check each query with `lint_query`, then run it with `query_range`, or with `query_instant` for an instant query or a table. 4. Save a new dashboard with `create_dashboard`. `list_folders` gives a `folder_id` to put it in. To change a dashboard, read it with `get_dashboard`, or only the panels you need with `get_panels`. Then send just the change with `update_panels`, passing the `parent_version` you read. This call changes only the default time range: ```json { "dashboard_id": "<dashboard id>", "parent_version": 3, "dashboard": { "time": { "from": "now-6h", "to": "now" } }, "summary": "Default to the last 6 hours" } ``` `update_dashboard` rewrites the whole document instead, so use it only when most of the dashboard changes. Every save runs the panel queries first and rejects a panel whose query fails or returns no data, as [What a save checks](/docs/concepts/agent/#what-a-save-checks) describes. A save on an older version merges when it changed other panels, and answers `version_conflict` when it changed the same ones; read the latest version and apply your change again. When the caller can comment but not edit, the save becomes a [proposal](/docs/concepts/proposals/) and the answer has the code `proposed`. No tool deletes a dashboard. People do that in the web app, through the HTTP API or with `observe dashboards delete`. Related tasks: - To read history, use `list_dashboard_versions`, `diff_dashboard_versions` and `restore_dashboard_version`. - To move or copy a dashboard, use `move_dashboard` and `duplicate_dashboard`. - To bring in a Grafana dashboard, use `import_grafana_dashboard`; see [Import Grafana dashboards](/docs/use/import-grafana/). - To repair an imported dashboard, read it with `get_dashboard`, fix the panels and variables in its `unverified` list with `update_panels`, and leave placeholder panels to people. The web repair queue does the same through `POST /api/v1/repairs`. - To see who else has a dashboard open, use `list_dashboard_viewers`. - To find broken dashboards, use `list_dashboard_health`, read the panel with `get_panels` and save the fix with `update_panels`. ## Find the right names and check a query Discovery tools read what a datasource holds, so a query uses real names. Each datasource type answers a different set; [Discovery by datasource type](#discovery-by-datasource-type) lists them. 1. `list_datasources` shows the datasources and whether each is healthy. `recheck_datasource` runs a fresh health check on one. 2. `list_metrics`, `list_labels`, `list_label_values`, `get_schema` and `sample_rows` list names, labels, tables and sample rows. 3. `list_services` finds which log or trace datasources hold a service. 4. `lint_query` checks a query without running it. 5. `query_range` runs a query over a time range, and `query_instant` runs one at a point in time or returns a table. 6. `draft_query` turns a question into a checked query, using the server's own model. After a scoped `list_metrics`, saves tell you which metric families no panel uses yet, as [Save results report what is left uncovered](#save-results-report-what-is-left-uncovered) explains. ## Review a change with proposals and comments When an agent or person who can only comment changes a dashboard, the change waits as a [proposal](/docs/concepts/proposals/). An Editor reviews it: 1. `list_proposals` shows the open proposals of a dashboard. 2. `get_proposal` returns the proposal with its changes, the conflicts a merge would hit and the field-by-field diff. 3. `merge_proposal` saves it as a new version, or `discard_proposal` closes it. Comments work the same way over MCP as in the web app. Open comments on a dashboard can be read with `list_comments`, answered with `reply_to_comment` and resolved with `resolve_comment`, passing the version that fixed the comment. A dashboard that Claude Code built can then be reviewed by the team without a model on the server. `create_comment` opens a thread, and a comment can ask an agent to answer with `to: agent`; [Comments](#comment-tools) has the rules. ## Investigate and keep what you learn An observation is a page of blocks about one question: Markdown text, panels that run live, and snapshots that freeze a panel's data. No tool queues an investigation on the server. An MCP client investigates with its own model, using the discovery and query tools, and saves the answer into an observation: 1. `create_observation` makes the page, with up to 10 blocks. 2. `add_block` adds text, a live panel or a snapshot, and `update_block` changes one. 3. `resolve_observation` closes it with a one-line summary. 4. `publish_rca` publishes it as the next immutable RCA revision; see [Observations](/docs/use/observations/#publish-as-rca). `pin_observation` pins an observation to a dashboard as an annotation, and `make_dashboard` turns its live panels into a dashboard. ## Search logs and traces Over MCP, `log_context`, `log_patterns`, `log_facets` and `logs_for_trace` read logs, and `get_trace`, `trace_stats` and `compare_traces` read traces. `query_instant` runs your own query, including SQL over `otel_traces` on ClickHouse. `save_search` saves a search so people can open it from the logs, traces or metrics page. [Logs and traces](/docs/use/logs-and-traces/) describes the same features in the web app. ## Organize and find your work - Folders: `list_folders`, `create_folder` and `rename_folder`. - Pins: `pin_dashboard`, `unpin_dashboard` and `list_pinned_dashboards` manage the dashboards in a person's sidebar. - Home dashboard: `get_home_dashboard`, `set_home_dashboard` and `clear_home_dashboard`. - Search: `search_workspace` runs the workspace [search](/docs/use/search/). - Saved searches: `save_search`, `list_saved_searches` and `update_saved_search`. - Annotations: `list_annotations`, `create_annotation` and `update_annotation`; see [annotations](/docs/use/annotations/). - Activity: `list_activity` reads the [activity](/docs/use/activity/) log. - Inbox: `list_inbox` and `set_inbox_item_done` read and clear a person's [inbox](/docs/use/inbox/). - Access: `request_comment_access` asks for comment access and `list_access_requests` lists open requests. - Audit trail: six Admin-only tools read the [audit trail](/docs/reference/audit-queries/). ## Ask SlashObserve's own agent An MCP client can hand a question to the built-in agent, as the person who connected it. `start_run` queues a run and answers at once, and `get_run` follows it. `cancel_run` and `retry_run` control it, `list_runs` and `list_chats` find earlier work, and `save_run_answer` and `share_answer` keep or share an answer. The built-in agent needs a model provider on the server; without one, `start_run` answers `agent_unavailable`. ## Take runs as an agent An outside agent can do the runs that people hand to it, with its own model and under the guards of SlashObserve's own agent. A run reaches it when a comment mentions it and starts a run: `@[Name](grant:<id>)` for a connected agent and `@[Name](service_account:<id>)` for a service account (see [Give an agent a run](/docs/use/agents/#give-an-agent-a-run)). The run waits in the queue, assigned to that one agent, and only that agent can claim it. Only a mention assigns a run to an outside agent, and the built-in agent never takes one. Two kinds of credential can claim: - A connected agent, signed in over OAuth, claims the runs assigned to its own connection. It works only for the person who connected it, and the run's writes carry that connection's `direct` or `propose` mode. - A service account claims the runs assigned to it with its key. An Admin first turns on **Takes agent runs** for it in the Create key panel, sets `takes_runs` through the API, or sets `takesRuns: true` in the [service-accounts file](/docs/operate/service-account-keys/). Its runs always use the direct mode. With **Takes agent runs** off, or `takes_runs` false, `claim_run` answers `not_a_worker`. The claim tools are `claim_run`, `report_run`, `finish_run` and `get_run_brief`; MCP lists them like any other tool. Connect as in [Connect your own agent](#connect-your-own-agent) or [Connect a bot with a service-account key](#connect-a-bot-with-a-service-account-key), and poll with `claim_run` while the agent is idle. An agent that polls shows as `listening` on the [Agents page](/docs/use/agents/), and as `working` while it holds a run. The loop of an agent that takes runs: 1. Call `claim_run`, which waits up to `wait_seconds` (0 to 30, 30 by default) and answers `run: null` when nothing is waiting. Call it again. An agent may keep 2 waiting `claim_run` calls at a time. Past that, and when `wait_seconds` is 0, the answer is `run: null` with `retry_after_seconds` of 5, so wait that long before the next call. 2. Read the claim answer. Next to `run` it has these top-level fields: - `lease_seconds` (60). - `session`, with a `url`, a `token` (starting `sot_`) and `expires_at`. - `system_prompt`, the prompt to read with the run's `kind`: its `name` (`observe`) and `arguments`. The `run` holds these fields: - `id`, `attempt`, `kind` (`build` or `investigate`), `intent` (`ask`, `apply` or `suggest`) and `prompt`. - Its target: `dashboard_id`, `base_version`, `panel_id`, `from` and `to`, each null when the run has none. - `continue_note`, and `requested_by`, the person it acts for, with their `kind`, `id` and `name`. - `thread_context`, the earlier messages of the thread oldest first, when a message in a comment thread started the run; read it before you answer. It is `null` for any other run. - `anchor` and `block_id`, when the question points at a spot on a panel or an observation block. `anchor` is shaped as `start_run` takes it. `block_id` is the observation block the anchor sits on, or alone the whole block the question is about. Both are `null` for a run that points at nothing. `get_run_brief` names the same spot in one sentence. The server answers in the thread when the run ends, so do not reply there yourself. 3. Read the `observe` prompt with that `kind`; it is the system text SlashObserve's own agent works from for that kind of run. `get_run_brief` returns the same text with the first message SlashObserve's own agent starts each model session with, and is optional. 4. Open a second MCP connection to the session `url` with the token as the Bearer, and work with the tools it lists. 5. Call `report_run` at least every 30 seconds with the `run_id` and `attempt`. The lease ends 60 seconds after the last call, and `stop: true` in the answer means the run was canceled or has ended. `note`, one line of at most 500 characters, shows in the run's steps. When the server has no run time limit, the session's `expires_at` is a minute out and every `report_run` moves it a minute on, so a run lasts as long as it keeps reporting. 6. Call `finish_run` with `outcome` `succeeded` or `failed`. A claim tool called with a run that is not yours at that attempt answers `not_your_run`. The session lists the tools SlashObserve's own agent has for that kind of run, with the same text, and none of the claim tools. It acts for the person who asked and records every call in the run's steps. Its prompt list is empty, because the `observe` prompt is read on the first connection. The token stops working when the attempt changes, when the run is canceled or ends, when the lease lapses, or when the run passes its time limit. A report that arrives after the time limit ends the run as failed. A run that saved a dashboard version, a [proposal](/docs/concepts/proposals/) or a finding ends as succeeded whatever `finish_run` says, and one that saved nothing ends as failed. A run that no outside agent took within 10 minutes fails as `agent_unavailable`. ### The run session enforces the guards The server enforces the guards of [SlashObserve's own agent](/docs/concepts/agent/#guards) on every run session, whatever agent works in it: - The save-now window: after 6 turns without a save, 12 in a suggest run and `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` (12 by default) in an investigate run, only a save runs and a read in a turn without a save is refused; the call before the limit gets a note. - Identical reads: a third identical read is refused, and an errored read or a query result runs again. - One save per turn: a second save in one turn is refused. - Repeated saves: a save identical to an earlier one is refused. - Rejected saves in a row: the third ends the run as `validation_exhausted`. - Stalled turns: two turns in a row in which every call was refused end the run as `no_progress`. - Churn: a save that changes no panel, or changes a panel for the fifth time, gets a note, and the fourth such save in a row ends the run as `no_progress`. - The cost limit: when `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` is set and `report_run` or `finish_run` reports `usage` whose cost reaches it, the answer has `stop: true` and the run ends as `budget_exhausted`. Without `usage` the server cannot know the cost and never stops a run for it. - Conflicts: a save that finds a newer version first rebases the build onto it when the panels do not overlap, and otherwise the run restarts once from the latest version; a second conflict ends the run as `conflict`. Every call may carry `_meta["slashobserve.com/turn"]` with `{"id", "calls", "saves"}`: the id of one model turn, how many calls the turn made and how many of them save. The server treats the calls with one id as one turn. Without the key, each call is its own turn, so the stalled-turn and one-save-per-turn guards judge one call at a time. A key the server cannot trust (an empty or over-long id, more than 64 calls, or more saves than calls) is ignored. The key may also carry `usage`, the same cumulative object as `report_run`, counting the model call that made the turn, so a run the server ends on the result of that turn stores the usage including it. The cost limit is checked only on `report_run` and `finish_run`. Every result of a run session carries `_meta["slashobserve.com/run"]` with `{"settled", "build"}`. `settled` is `saved`, `proposed`, `finding`, `suggested`, `restarted`, `ended` or `null`: - `saved`, `proposed`, `finding` or `suggested` once the run has its result. `proposed` means the save became a proposal, which ends the run as succeeded with the result kind `proposal`. - `restarted` when a conflict restarted the run from the latest version. - `ended` once the run has ended. - `null` otherwise. `build` is the saved panel progress, `{"saves", "panels", "planned_panels"}`, or `null` when the run has no build. Some results also carry a note after the content, which an agent reads like any other tool text. ### Briefs, usage and live text `get_run_brief` takes `run_id`, `attempt` and an optional `reason` (`restart`, `output_limit`, `pending`, `conflict`, `continue`, `renewed`, `call_timeout`, `no_finding` or `no_answer`) and answers `system`, `message`, `reason` and `build`. `message` is the first message of a model session. Calling it starts a session: it resets the read guard and pins the parent version the run's saves are checked against. The server may replace `reason`, with `conflict` after a rebase and with the resume reason when the run has a build. An agent that never calls it works from the claim answer and the `observe` prompt. It answers `run_ended` for a run that has ended. A request on the run's token after the run ended is answered with HTTP 409 and `run_ended`, not a server error. `report_run` also takes, all optional: - `text`, at most 4,000 characters: the end of what the model is writing, shown on the run as live text while the run is running and never stored. - `usage`: the agent's model use so far, cumulative, with `provider`, `model`, `input_tokens`, `output_tokens`, `cache_read_tokens`, `cache_write_tokens`, `cost_usd`, `model_calls`, `failed_calls`, `retries`, `compactions`, `renewals`, `model_ms` and `max_save_output_tokens`. Its answer has, next to `state`, `stop` and `lease_until`, the run's `build` progress. `finish_run` also takes `failure_code`, one of `call_timeout`, `rate_limited`, `provider_error`, `output_limit`, `no_tool_call`, `no_finding`, `refused`, `no_fixture` and `internal`, with `outcome` `failed`. The server stores its own text for the code, so no `message` is needed. `commit: true`, with `outcome` `succeeded`, saves the finished build as a version first. `usage` takes the fields above, and the run shows it as the agent reports it. The answer has `restarted`, true when the commit found a newer version and the run restarted from it: the run stays claimed, so call `get_run_brief` and go on. `finish_run` on a run that was canceled settles it as canceled at once. A `failure_code` with another outcome, a code outside the list, or `commit` with `outcome` `failed` answers `invalid_request`. ### Presence and modes A connected agent or service account shows its presence, with `last_seen_at`; see [Agent presence](/docs/reference/states/#agent-presence). The presence is one of these: - `working` while it holds a run. - `listening` when it asked for work in the last 40 seconds. - `offline` otherwise. A connection's `mode` is `direct` by default. Its person can switch it to `propose` with `PATCH /api/v1/me/grants/{id}` and the body `{"mode": "propose"}`, and back with `direct`, or with the **Mode** menu on the [Agents page](/docs/use/agents/#direct-and-propose-mode). The change applies from the agent's next request, and no key or agent can change it. In propose mode: - `update_dashboard` and `update_panels` save a proposal and answer `proposed` even when the person is an Editor. - `merge_proposal` answers `propose_mode`, and `discard_proposal` works only on a proposal the agent itself opened. - A save that removes panels or variables answers `proposal_required` and names them, so the agent asks its person to remove them. The same holds when a run ends with `finish` on a build that removed any, and when `finish_run` with `commit` saves such a build, which stays so the agent can put the panels back and finish again. - `create_dashboard` is not changed by the mode. ## Reference This section has every rule that applies to all tools, then one entry for each tool. ### Endpoint behavior and limits - Browser sessions are not accepted on `/mcp`, and an OAuth access token is accepted nowhere else. - A request without a token, or with one the server refuses, gets `401` with `WWW-Authenticate: Bearer realm="slashobserve", resource_metadata="<public url>/.well-known/oauth-protected-resource/mcp"`. That header is how an MCP client finds the sign-in. A refused token adds `error="invalid_token"`. - The endpoint is stateless. - It refuses an `Origin` header that is not `SLASHOBSERVE_PUBLIC_URL` with `403` and the code `forbidden_origin`. A request with no `Origin` header is accepted. - It answers `413` above 8 MiB, `429` above 8 concurrent requests per key or person, and `503` above 32 across all callers. A `claim_run` call does not count toward the 32. - Those three, and a refused JSON-RPC batch (send one request per POST), come back as JSON-RPC error bodies with the short code in `error.data.code`. The `429` and `503` answers carry `Retry-After`, so a client SDK backs off instead of reporting a broken transport. - `tools/list` has no pages: a `cursor` is ignored. - For a key, `initialize` returns an `Mcp-Session-Id` that only carries the client's self-reported name and holds no state. For an OAuth client, the name it registered under is used and `clientInfo` is ignored. - Each version, agent request, finding and annotation records its origin (`web`, `cli`, `mcp` or `api`) and, for `mcp`, that client name. The web app, the CLI and the API show the author as `<name> (via <client>)`. ### Roles by tool Each tool has a lowest role, which the server checks when a client calls it. The server uses the role of the key's service account, or of the person for an OAuth client. | Tool | Lowest role | | ---- | ----------- | | `add_block` | Viewer | | `aggregate_audit_events` | Admin | | `apply_suggested_change` | Viewer | | `archive_run` | Viewer | | `arrange_blocks` | Viewer | | `cancel_run` | Viewer | | `claim_run` | Viewer | | `clear_home_dashboard` | Viewer | | `compare_traces` | Viewer | | `create_annotation` | Viewer | | `create_comment` | Viewer | | `create_dashboard` | Viewer | | `create_folder` | Viewer | | `create_observation` | Viewer | | `diff_dashboard_versions` | Viewer | | `discard_block` | Viewer | | `discard_proposal` | Viewer | | `draft_query` | Viewer | | `duplicate_dashboard` | Viewer | | `edit_comment` | Viewer | | `finish_run` | Viewer | | `get_audit_event` | Admin | | `get_audit_histogram` | Admin | | `get_chat` | Viewer | | `get_dashboard` | Viewer | | `get_home_dashboard` | Viewer | | `get_observation` | Viewer | | `get_panels` | Viewer | | `get_proposal` | Viewer | | `get_rca` | Viewer | | `get_run` | Viewer | | `get_run_brief` | Viewer | | `get_run_build` | Viewer | | `get_schema` | Viewer | | `get_spec_guide` | Viewer | | `get_trace` | Viewer | | `import_grafana_dashboard` | Viewer | | `keep_block` | Viewer | | `lint_query` | Viewer | | `list_access_requests` | Viewer | | `list_activity` | Viewer | | `list_annotations` | Viewer | | `list_audit_facets` | Admin | | `list_audit_fields` | Admin | | `list_chats` | Viewer | | `list_comments` | Viewer | | `list_dashboard_health` | Viewer | | `list_dashboard_versions` | Viewer | | `list_dashboard_viewers` | Viewer | | `list_dashboards` | Viewer | | `list_datasources` | Viewer | | `list_folders` | Viewer | | `list_inbox` | Viewer | | `list_label_values` | Viewer | | `list_labels` | Viewer | | `list_mentionable_people` | Viewer | | `list_metrics` | Viewer | | `list_observations` | Viewer | | `list_pinned_dashboards` | Viewer | | `list_proposals` | Viewer | | `list_rcas` | Viewer | | `list_runs` | Viewer | | `list_saved_searches` | Viewer | | `list_services` | Viewer | | `log_context` | Viewer | | `log_facets` | Viewer | | `log_patterns` | Viewer | | `logs_for_trace` | Viewer | | `make_dashboard` | Viewer | | `merge_proposal` | Viewer | | `move_dashboard` | Viewer | | `move_observation` | Viewer | | `pin_dashboard` | Viewer | | `pin_observation` | Viewer | | `pin_run` | Viewer | | `publish_rca` | Viewer | | `query_instant` | Viewer | | `query_range` | Viewer | | `recheck_datasource` | Viewer | | `rename_folder` | Viewer | | `rename_run` | Viewer | | `reopen_comment` | Viewer | | `reopen_observation` | Viewer | | `reply_to_comment` | Viewer | | `report_run` | Viewer | | `request_comment_access` | Viewer | | `resolve_comment` | Viewer | | `resolve_observation` | Viewer | | `restore_dashboard_version` | Viewer | | `retry_run` | Viewer | | `run_dashboard_health` | Admin | | `sample_rows` | Viewer | | `save_run_answer` | Viewer | | `save_search` | Viewer | | `search_audit_events` | Admin | | `search_workspace` | Viewer | | `set_home_dashboard` | Viewer | | `set_inbox_item_done` | Viewer | | `share_answer` | Viewer | | `start_run` | Viewer | | `trace_stats` | Viewer | | `unpin_dashboard` | Viewer | | `unpin_run` | Viewer | | `update_annotation` | Viewer | | `update_block` | Viewer | | `update_dashboard` | Viewer | | `update_observation` | Viewer | | `update_panels` | Viewer | | `update_saved_search` | Viewer | The lowest role is the one the web app needs for the same work, and folder access decides the rest, as in the web app. A person's client can create and change dashboards in their own My Dashboards, comment where they may comment, and query every datasource, whatever their role. A key has no My Dashboards and is never on a folder's list, so below Editor it can read and query but not save directly. A save from a Commenter becomes a [proposal](/docs/concepts/proposals/). ### Errors Every refused tool call returns one shape: `code`, a stable word to branch on, and `message`, what to change. It adds fields specific to the refusal, such as `issues`, `latest_version`, `allowed_actions` or `needed_role`. These codes apply to many tools: - `forbidden_role`: the call is below the tool's role, or the folder does not allow the change. - `not_found`: a dashboard, folder or other object the caller cannot see. - `version_not_found`: a dashboard the caller can see has no such version. It carries a `message` and `latest_version`, so `not_found` always means the dashboard, never the version. - `invalid_request`: a field the tool does not take, a field of the wrong JSON type, or two names for one field with different values. The answer lists the fields the tool takes, or the type it needs. - `user_session_required`: a service-account key called a tool that works only for a person. - `too_large`: a result over its size limit; the entry for the tool says what to ask for instead. Other codes belong to one tool and are listed in its entry. ### Tool annotations and output schemas Each tool carries MCP annotations that say what it does. `readOnlyHint` is true for a tool that only reads. `destructiveHint` is true for a tool that can overwrite or delete what someone saved. Those tools are `update_dashboard`, `update_panels`, `restore_dashboard_version`, `update_block`, `arrange_blocks`, `update_observation`, `update_annotation`, `update_saved_search`, `edit_comment`, `rename_folder`, `rename_run`, `discard_block`, `discard_proposal`, `merge_proposal`, `set_home_dashboard`, `clear_home_dashboard`, `set_inbox_item_done` and `cancel_run`. A client that approves only non-destructive tools on its own therefore asks before any of them runs. `list_datasources`, `list_dashboards`, `get_dashboard`, `query_range` and `query_instant` also publish an `outputSchema`, so a client knows the fields of a result before it calls. The schema accepts the `{code, message}` body a failed call answers with, because a client that validates results checks a failed one too. Every other tool publishes none. ### Tools only a person can use `pin_dashboard`, `unpin_dashboard`, `list_pinned_dashboards`, `list_inbox` and `set_inbox_item_done` work only over a person's OAuth connection. A service-account key does not see them in `tools/list`, and answers `user_session_required` if it calls one. `get_home_dashboard`, `set_home_dashboard` and `clear_home_dashboard` also answer `user_session_required` to a key. ### Argument names and aliases A thing's id is named `<thing>_id` and a datasource is named `datasource`. Every tool that takes one also accepts its common alias, so a guess costs no call: - `datasource_uid` is accepted wherever `datasource` is. - `id` is accepted for `dashboard_id` on a tool named for a dashboard, for `observation_id` on one named for an observation and for `run_id` on one named for a run. - `run_id` is accepted for the `id` of every tool named for a run, such as `get_run`, `get_run_build`, `cancel_run` and `retry_run`. - `diff_dashboard_versions` also accepts `from_version` and `to_version` for `from` and `to`. - `get_panels` accepts `panel_ids` for `ids`. A call that sends both names with the same value works, and one that sends them with different values is refused with `invalid_request`. The names in `tools/list` are the documented ones; a run of the built-in agent takes only those. ### Tool text and instructions On `initialize` the server sends instructions with the order of work: read `get_spec_guide` once before the first save, find real names with the discovery tools, check each query with `lint_query` and `query_range` or `query_instant`, then save, sending changes with `update_panels`. Each tool's description and input schema are the text the built-in agent reads. MCP clients differ in three places: the full guide from `get_spec_guide`, `folder_id` on `create_dashboard`, and `dashboard_id` and `parent_version` on `update_dashboard` and `update_panels`. `get_spec_guide` returns the core of the authoring guide plus one section per datasource type the server has configured, the text the built-in agent reads. An Admin also gets the section on the built-in audit datasource. ### Discovery by datasource type Each datasource type answers these discovery tools: - Prometheus: `list_metrics`, `list_labels` and `list_label_values`. - ClickHouse: the same on the OpenTelemetry tables, plus `get_schema` and `sample_rows`. - Loki: - `list_labels` and `list_label_values` for stream labels, narrowed by a stream selector in `metric`. - `sample_rows` for up to 20 lines of the last 15 minutes, from every stream or from a stream selector in `table`. - `list_metrics` with a stream selector as `scope`. - Tempo: `list_labels` and `list_label_values` for TraceQL attributes, and `get_schema` for every service with its span names as `columns` and `rows`, plus `attributes`. - Jaeger: `list_label_values` for the services, or for the operations of one service with `service=checkout` as `metric`, and `get_schema` for every service with its span names as `columns` and `rows`. Tags are free-form and are not listed. - Elasticsearch and OpenSearch: - `list_labels` for the fields you can group or filter by, and `list_label_values` for a field's top values over the range. - `get_schema` for the concrete indices of the index pattern, or with `table` set to an index name every mapped field with its kind. - `sample_rows` for up to 20 of the newest documents of the index pattern with no `table`. - `list_metrics` with a `scope` answers an empty inventory there. `list_metrics` without a `scope` on Loki, Tempo, Jaeger, Elasticsearch or OpenSearch, and `get_schema` on Prometheus or Loki, answer `invalid_request` and name the datasource types they read, instead of an empty list or the datasource's own wording. On Loki each family of a scoped `list_metrics` is a stream label key, and its `series` counts the streams that carry it. That inventory, and the empty one of Elasticsearch and OpenSearch, never replaces the one `uncovered` reads. ### Save results report what is left uncovered The server keeps the last scoped inventory of each service account. After one, the results of `create_dashboard`, `update_dashboard` and `update_panels` carry two fields: - `uncovered`, up to 50 families of that inventory that no panel query names. It is `[]` once every family is covered. - `uncovered_total`, how many there are in all. Runtime families left out of the inventory are never in `uncovered`. A histogram, summary or counter counts as covered when a query names any of its series, such as `<name>_bucket` or `<name>_total`. Save results also carry `notes`, up to 20 hints that never reject a save: - A time series or bar chart query with no `legend`. - A stat, gauge, bar gauge or time series with no `unit`. - A stat with no `description`. ### Comment rules These rules apply to every comment tool. Comments can sit on a dashboard, an annotation, an observation or a proposal. A `target` is written `kind:uuid`, for example `observation:7f0c1d2e-5a4b-4c3d-8e9f-0a1b2c3d4e5f`. A `proposal:<uuid>` target is read with View and written with Comment on the proposal's dashboard, and a comment on it has no `panel_id` or `version`. A key needs the Comment ability on the target to write. A target the key cannot see answers `not_found`, and only the author can edit a message (`not_author`). Each comment the tools return has these fields: - `version`, which is null off a dashboard, `edited_at` and its `mentions`. - `actor`, the same object the HTTP API returns (`kind`, `id`, `name`, `origin`, `client`, `run_id` and `label`). Its `run_id` is the run that wrote an agent reply and null for a person. - `author`, the plain name. - A top-level `run_id`, only on an agent reply. - `target`, when the result was listed by `target`. - `block_id`, null for the whole observation and on every other target. - `reply_to`, null when it quotes nothing, else the quoted message's `id`, its `author` as the web app labels it, and an `excerpt` of its first 200 characters. - `anchor` and `at`, on the first comment of a thread that points at a spot. `anchor` is the spot as `create_comment` takes it, and `at` is the spot in words. Replies carry neither, so read the spot from the comment their `parent_id` names. [Anchors over MCP and the CLI](/docs/use/ask-and-comment/#anchors-over-mcp-and-the-cli) lists the kinds of `anchor` and what each needs. A single comment too large for a page first drops `at`, then its mentions lose their names but keep their `kind` and `id`, and then its `body` is cut, with `body_truncated`. Its `anchor` is always kept whole. A comment id is the id of any message of the thread, and the first message's id is the thread's. Mentions: - Write `@[Name](user:<id>)` for a person. `list_mentionable_people` gives the `id`. - Write `@observe` to address the built-in agent, `@[Name](grant:<id>)` for one of your own connected agents and `@[Name](service_account:<id>)` for a service account that takes runs. - A mention is recorded and appears in the activity log as `thread.mentioned`. - Mentioning a person who does not exist or cannot see the target answers `invalid_request` with the reason in its message. The HTTP API and the CLI say `invalid_mention`. A mentioned person gets it in their Inbox. Asking an agent: - A comment is for everyone and asks no agent unless the call sets `to` to `agent`. - With `to: agent` the comment asks the one agent it mentions, else the thread's agent, else `@observe`, in the same transaction as the comment. That agent becomes the thread's agent. A comment for everyone turns the thread's agent off. - The result carries `to`, and `run` (`id`, `status`, `assigned_kind`) or `run_refusal` (`code`, `message`) when the comment was stored without a run. - A dashboard or an observation thread starts a read-only ask, which needs Comment on the dashboard or observation and answers in the thread without changing it. An annotation or a proposal thread starts none. A run started this way is checked like one the same person starts in the web app. - Two agents in one comment write nothing and answer `invalid_request`, as do a grant that is not yours, revoked or expired, a service account that takes no runs, and a grant mention from a key. The HTTP API and the CLI name these `too_many_agents` and `invalid_mention`. - The refusal codes are `mention_target_unsupported`, `agent_unavailable`, `agent_not_yours`, `forbidden_role` and `too_many_runs`. `agent_unavailable` also applies when the thread's agent was disconnected, which clears it. `agent_not_yours` means the thread's agent is someone else's connected agent. When a run a comment started ends, whatever the outcome, the server posts one reply in the thread. The reply is written by the actor the run's agent writes as: - "Observe Agent for <person>" for the built-in agent. - "<person> (via <client>)" for a connected agent. - The service account's own name for a service account. The reply is a status line the server writes, and it does not resolve the thread. `list_comments` shows it like any other message, with `run_id` set to the run that wrote it when the built-in agent did. When the run saved an answer you can read, the reply also carries `answer`: `run_id`, `finding_id`, `title`, the start of `markdown` (400 bytes, with `markdown_truncated` when cut), `evidence_panels`, `suggested_change` and `observation_id`. `get_run` reads the rest. A reply that could not be posted when the run ended is tried again every minute for up to a day, and a reply a person deleted is never posted again. Every opened, replied, edited, resolved and reopened thread appends to the activity log, which `list_activity` reads. ### Tool reference The entries are grouped by task. Each entry names the arguments the tool takes and what it returns. ### Dashboard tools #### `get_spec_guide` Returns the authoring guide, the JSON Schema and an example for ObserveSpec, the dashboard format. Call it once before the first save. It takes no arguments. Its content is described under [Tool text and instructions](#tool-text-and-instructions). #### `list_dashboards` Lists the dashboards the key can see, with `id`, `title`, `tags`, `folder`, `latest_version`, `updated_at`, `view_count` and `url`. - `limit` is 1 to 50, 20 by default, and `cursor` takes the `next_cursor` of the previous page. - `order` is `updated` (the default), `views` for the most viewed first, or `name` for A to Z by title. Pass a `next_cursor` back with the order that produced it. - `exclude_audit: true` leaves out the dashboards in the [Audit folder](/docs/use/activity/#audit-folder). - `view_count` is the number of people-days on which the dashboard was opened in the last 30 days. #### `get_dashboard` Reads a dashboard's Spec at the latest version, or at `version`. - The result has `saved_by`, `origin`, `saved_at` and `summary` of that version, its `url`, its `folder` and its `unverified` panels and variables. - It also has `view_count`, with `window_days`. - A Spec over 128 KiB returns `too_large`; read its panels with `get_panels` instead. #### `get_panels` Reads the full JSON of up to 20 panels by `ids`, at the latest version or at `version`, together with the dashboard's variables. - Ids it did not return are in `missing`. - `truncated` is true when the result was cut to fit. - It returns at least one panel, and a panel too large to return is listed in `too_large`. #### `create_dashboard` Saves a new dashboard from a complete Spec document and returns its `dashboard_id`, `version` and `url`. - It takes `spec`, a `summary` and an optional `folder_id` from `list_folders`. Without a `folder_id`, a person's dashboard goes to their My Dashboards and a key's to General. - It runs every panel query before it saves, and rejects a panel whose query fails or returns no data, as [What a save checks](/docs/concepts/agent/#what-a-save-checks) describes. - A retry is safe. When the same caller already saved a dashboard with that title and an identical spec in that folder, it returns that dashboard with `replayed` true instead of making a second one. - A `folder_id` the key cannot create in returns `forbidden_role`, and an unknown one `not_found`. - Propose mode does not change it: a connection in propose mode still creates dashboards. #### `update_dashboard` Saves a new version of a dashboard from the complete document, which replaces it whole. Use it only to rewrite most of a dashboard; for anything smaller, use `update_panels`. - It needs `dashboard_id` and the `parent_version` you read, and sends the complete document in `spec`. - It runs every panel query before it saves, as `create_dashboard` does. - If a newer version has been saved since and your save changed none of the panels, variables and settings that version changed, the server merges the two. The result then carries `merged_from`, with the `base_version` you read and the `onto_version` it merged onto. - If both changed the same panel, variable or setting, it returns the tool error `version_conflict` with `latest_version` and `conflicts`. Each conflict has a `kind`, an `id`, a `reason` and a `message`. The client reads the latest version and applies its change again. - It saves a [proposal](/docs/concepts/proposals/) instead when the caller can comment but not edit, or when its connection is in propose mode. The answer is a success, not a tool error. Its code is `proposed`, and it carries `proposal_id`, `revision`, `opened` (false when the save added a revision to the caller's open proposal) and the dashboard's `url`. A Viewer still gets `forbidden_role`. #### `update_panels` Changes an existing dashboard by sending only what changed, so a one-panel fix costs one panel and not the whole document. It takes `dashboard_id`, `parent_version` and a `summary`, and a patch with any of these: - `upsert`: up to 50 complete panels, each replacing the panel with its id or, with a new id, added. A panel that leaves out `gridPos` keeps its position, and a row keeps its children, which are upserted by their own ids. - `delete`: up to 50 panel ids; a row only together with all of its children. - `layout`: up to 200 moves of existing panels to a `gridPos` or into a row, with `row` set to `""` for the top level. - `variables`: the complete variable list, which replaces the existing one. - `dashboard`: the default `time`, the `title`, the `tags` and the `links`. Behavior: - A key present in `dashboard` replaces that value whole, so `tags` and `links` are not merged item by item and `[]` clears them. A key left out keeps the current value. - The server merges the patch into the version named by `parent_version` and validates the whole result, so a bad tag or time is rejected with its path in the document. - It runs only the queries it changed, and every query when `time` changes to a different range, as [What a save checks](/docs/concepts/agent/#what-a-save-checks) describes. - A rejection lists `failing_panels`, so the client resends only those panels. - An overlap is reported at the panel the patch upserted or moved, with both panels' positions in the message. - Merging, `version_conflict`, `proposed` and `proposal_required` work as for `update_dashboard`. #### `list_dashboard_versions` Lists a dashboard's history, 20 versions per page by default and at most 100. It takes `dashboard_id`, `limit` and `cursor`. #### `diff_dashboard_versions` Compares two versions of a dashboard. It takes `dashboard_id`, `from` (0 compares against an empty dashboard; by default the version before `to`) and `to` (by default the latest). #### `restore_dashboard_version` Saves an earlier version as a new one. It takes `dashboard_id`, `version`, the `parent_version` you read as the latest, and an optional `summary` of at most 200 characters. It applies the same `parent_version` check as a save. A connection in propose mode cannot restore a dashboard directly and gets `proposal_required`. It can save the change with `update_dashboard`, which becomes a proposal. #### `move_dashboard` Moves a dashboard to another folder. It takes `dashboard_id` and `folder_id`. A connection in propose mode gets `proposal_required`. #### `duplicate_dashboard` Copies a dashboard. It takes `dashboard_id`, a `title` and an optional `folder_id`. The copy goes to `folder_id`, by default the dashboard's own folder when you may create there, else your My Dashboards or General, as the web dialog does. #### `import_grafana_dashboard` Hands the server a Grafana dashboard. See [Import Grafana dashboards](/docs/use/import-grafana/). - It takes `json`, the dashboard JSON text. It also takes an optional `folder` title and a `mapping` from Grafana datasource keys to your datasource uids, for datasources the result says could not be matched. - Panels whose queries fail are saved as unverified and listed in the result, so the client can fix them with `update_dashboard`. - The tool refuses JSON that converts to an HTML text panel, a placeholder panel or a panel action with `import_content_not_allowed`. This is the same content `update_dashboard` and `create_dashboard` refuse. The message names the panels and asks the agent to remove them or to have a person import the JSON in the web app, where a person can also use `observe import`. - The result names the folder the dashboard went to in `folder`, and `folder_note` says why when it is not the one requested. - A file whose Grafana uid an earlier import already holds, in a dashboard you can see, is not imported twice. The call fails with `already_imported`, and `existing` names that dashboard with its `dashboard_id`, `title`, `version`, `url` and `can_update`. - Pass its `dashboard_id` as the tool's `update_dashboard` argument, which is not the `update_dashboard` tool, to save the JSON as its next version. That needs Edit, keeps the folder, and answers `updated: true`. - Or set `import_as_new` to make another dashboard on purpose. - An update with a file that has another Grafana uid than the dashboard was imported from fails with `grafana_uid_mismatch` and changes nothing. - A retried call of the same agent request still answers with the dashboard it made. - The built-in agent in a run that creates a dashboard imports as before and is not refused, because the person asked it to import that JSON. It may not use `update_dashboard` on this tool, because that run may not save a version of an existing dashboard. #### `list_dashboard_viewers` Lists, by name, the other people who have the dashboard open in the web app now, so a client can see who is looking before it changes the dashboard. It needs View, and the list is empty when nobody is looking. It is over MCP only. #### `list_dashboard_health` Lists the dashboards with [health problems](/docs/use/dashboard-health/) in the folders the key can see. It is over MCP only. - The order is the one in [Dashboard health](/docs/use/dashboard-health/): failing first, then no data, then duplicate title, then unopened, and within each the most recently opened first. - A page has 20 dashboards by default and at most 50. `folder_id` and `kind` narrow the list, and `next_cursor` pages on. - Each dashboard has its `problems`: `kind`, and `panel_id`, `panel_title`, `variable`, `code` and `message` where they apply. It also has `checked_at` and `checked_version`. - The `job` field shows the state of the daily check. #### `run_dashboard_health` Starts the health run, as `POST /api/v1/health/run` does, and needs an Admin. It answers at once and starts nothing more while a run is going. The `job` field of `list_dashboard_health` shows how it went. #### `pin_dashboard`, `unpin_dashboard` and `list_pinned_dashboards` Manage the person's pins, the dashboards in their sidebar. The HTTP API calls them stars (`/dashboards/{id}/star`, `/stars`). They work only over a person's OAuth connection. #### `get_home_dashboard`, `set_home_dashboard` and `clear_home_dashboard` Manage the dashboard that opens for the person after sign-in in place of Home. The HTTP API calls it `/me/home-dashboard`. - `get_home_dashboard` returns `status`, one of `none`, `ok`, `gone` or `unreadable`, and, when it is `ok`, the dashboard. - `set_home_dashboard` needs a dashboard the person can view and answers `not_found` otherwise. Setting the same dashboard again changes nothing. - They work only over a person's OAuth connection. ### Datasource and query tools #### `list_datasources` Lists the configured datasources with their `uid`, `type`, `name` and `healthy` flag. An unhealthy one carries `message` and `detail`. An Admin's call also shows `audience`, `everyone` or `admins`. Every other tool names a datasource by this `uid`. #### `recheck_datasource` Runs a fresh health check on one datasource instead of reading the cached one, and answers its status. Calls within 2 seconds of the last check return that check. The built-in agent does not have it. #### `list_metrics` Lists the metric names of a Prometheus datasource, or the OpenTelemetry metric names of a ClickHouse datasource. It takes `datasource`, `search`, `limit` (1 to 500, 100 by default), `offset` and `scope`. - `scope` is a series selector such as `{job="checkout"}` on Prometheus, or a table name on ClickHouse. With it, the tool answers every metric family in that scope in one result. Each family has its name, type, unit, label keys and series count. The result also has `families_total` and `grouped`, the families that share a name prefix such as `http_server`. - Label keys that every family has are listed once in `common_labels`. - A scope too large for one result pages with `next_offset` like the other lists. - Runtime families, `up` and the names that start with `go_`, `process_`, `promhttp_` or `scrape_`, are left out of the list and counted in `runtime_families`. They stay in when the scope names `__name__`, as `{__name__=~"go_.+"}` or `go_goroutines{job="checkout"}` do. - `search` and `limit` are refused together with `scope`. - The inventory of a scoped call feeds `uncovered` in save results; see [Save results report what is left uncovered](#save-results-report-what-is-left-uncovered). #### `list_labels` and `list_label_values` List label names, and the values of one label, for a datasource; [Discovery by datasource type](#discovery-by-datasource-type) says what each type answers. `list_label_values` takes the `label`. - Both take `datasource`, `metric`, `table`, `search`, `limit` and `offset`. - Both also take `from` and `to`, both or neither, so Loki and Tempo answer only the names seen in that window instead of their own default one. #### `get_schema` Lists the tables of a ClickHouse datasource, or the columns and types of one table with `table`. On Tempo, Jaeger, Elasticsearch and OpenSearch it answers as [Discovery by datasource type](#discovery-by-datasource-type) says. It takes `offset` to page. #### Paging of discovery tools `list_metrics`, `list_labels`, `list_label_values` and `get_schema` take an `offset`. They answer `truncated`, `truncated_by` (`limit` or `bytes`) and `next_offset`, so a client pages through a long list by passing `next_offset` back as `offset`. #### `sample_rows` Reads recent rows to show real values. It takes `datasource`, `table` and `limit`, 1 to 20 and 5 by default. `table` is required on ClickHouse. #### `list_services` Lists the services a log or trace datasource has seen over a recent window, and finds which datasources hold a service. - With `datasource` it reads that one source. Without it, it asks every Loki, Tempo, Jaeger, ClickHouse, Elasticsearch and OpenSearch source, and ClickHouse answers once for its logs table and once for its traces table. - `signal` (`logs` or `traces`) picks one signal. - `window` (such as `15m`, default `1h`, at most `6h`) sets how far back the window ends now. Jaeger ignores it and lists every service it retains. - `service` keeps only the sources that hold a service whose name contains it, case-insensitive. - Each source answers its `field`, the label, column or attribute that holds the service, so a query can filter on it. - A source that does not answer in time says why under `unavailable` while the others still answer. - Answers are cached for about a minute. A source lists at most 200 services, with `truncated` set when there were more. #### `lint_query` Checks a PromQL, LogQL, TraceQL, ClickHouse SQL, KQL, Lucene or Query DSL query for syntax and policy problems without running it. It takes `datasource` and `query`. `ok` is false when any diagnostic is an error. It cannot tell whether the query returns data. An error such as `datasource_unavailable` means the check could not run, not that the query is wrong. #### `query_range` Runs a query over a time range and returns a compact summary: up to 20 series with points, min, max and last, or the first rows of a table. - It takes `datasource`, `query`, `from` and `to` (default `now-1h` and `now`, at most 31 days apart), `max_data_points` (10 to 1000, default 200) and `format` (`timeseries`, `table`, `heatmap` or `logs`; default `timeseries`). - It takes `variables`, an object of variable name to a list of values for each `$variable` the query uses, and `dashboard_title` for `$__dashboard`. - It returns `executed`, the text each query ran as after variables and macros were expanded, when it was sent to the datasource. That shows what a `$job` or a `$__rate_interval` became. - On any ClickHouse table, `query_range` refuses a query that does not read the time range through a macro such as `$__timeFilter(Timestamp)`. A macro inside a comment does not count. #### `query_instant` Runs a query as an instant query, PromQL evaluated once at `to`, and returns the summary of the rows or series. Use it for a table panel's query, or a query with `instant: true`. - It takes the arguments of `query_range` except `format` and `max_data_points`, plus `page_size`, `page`, `cursor`, `sort` and `as_written`. - It returns `executed`, as `query_range` does. - On a ClickHouse trace datasource it also runs your own SQL over `otel_traces`, the query the SQL view of the trace search runs, with the same read-only, time range and row checks. `page_size` (50 to 500), `page` and `sort` page it. - A paged query that selects `Timestamp` comes back as log lines, newest first, with a `TimeNs` column. - Pass `as_written` with `page_size` to get the rows as the SQL wrote them instead, with its own `ORDER BY`, `LIMIT` and columns. - On any ClickHouse table, `query_instant` without `page_size` refuses a query that does not read the time range through a macro such as `$__timeFilter(Timestamp)`, even one that selects `Timestamp`. Only a paged query is cut to the range by the server. #### `draft_query` Turns a question into a checked LogQL, ClickHouse SQL, KQL, PromQL or TraceQL query, or trace search filters, as [Ask](/docs/use/logs-and-traces/#ask-in-plain-language) does. It works for one Loki, ClickHouse, Elasticsearch, OpenSearch, Prometheus, Tempo or Jaeger datasource. It is over MCP only. - `signal` is `logs`, `traces` or `metrics`. It defaults to the one the datasource holds, and a ClickHouse datasource needs it. - A Prometheus datasource answers with `language` `promql`, evaluated at the end of the range. - It spends at most two of this server's model calls per question, checks the query with the lint and a short sample, and never runs the full query. Run the answer with `query_instant`. - A question it cannot turn into a query returns the tool error `cannot_translate` with the reason. A server with no model returns `agent_unavailable`. ### Log and trace tools #### `log_context` Reads the log lines just before and just after one line on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource, as [Show context](/docs/use/logs-and-traces/#context-around-a-line) does. The built-in agent has the same tool. - Pass `datasource`, the `query` and the line's `time_ns` from a `query_instant` result as `anchor`. - `before` and `after` default to 20 lines each and take at most 100. - The answer holds each side's lines with `time`, `time_ns`, `body` and `labels`. The before side is newest first and the after side is oldest first. It says when more lines exist within an hour on either side. - On an Elasticsearch or OpenSearch time field of type `date`, context is exact to the millisecond. #### `log_patterns` Groups the lines a logs query matches into patterns with counts on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource, as [Patterns](/docs/use/logs-and-traces/#pattern-templates) does. The built-in agent has the same tool. - It reads from Loki's pattern index or Elasticsearch's `categorize_text` when it has one, otherwise from the newest 2,000 lines. OpenSearch has no such aggregation, so the server clusters the newest 2,000 lines there and says `source: server`. - Pass `datasource`, `query` and optionally `from`, `to` and `limit`, 10 patterns by default and at most 30. - The answer says `source` (`loki`, `elasticsearch` or `server`), `lines_sampled` and `lines_matched`. - Each pattern has `count`, `sample` cut to 200 bytes, `first`, `last`, `level` and `trend`. `trend` holds the counts of 30 equal buckets over the range, whose width in milliseconds is `trend_step_ms`. #### `log_facets` Counts the top values of each label, field or column that a logs query matches on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource. Counts are exact where the datasource can give them, and come from the newest sampled lines where it cannot. The built-in agent has the same tool. #### `logs_for_trace` Reads the log lines that carry a trace id, or one span id, from a Loki, ClickHouse, Elasticsearch or OpenSearch datasource over a window. These are the same lines the trace view opens from a span. It answers the table summary of `query_instant`. - It takes `datasource`, `trace_id` (16 or 32 hex characters), `span_id` (16 hex characters), `service`, `from`, `to` and `limit` (1 to 200, default 50). - `service` narrows the Loki stream selector or the Elasticsearch and OpenSearch service field; ClickHouse ignores it. #### `get_trace` Reads one trace by id from a Tempo, Jaeger or ClickHouse datasource: its services, root span, error spans with the message each set, and slowest spans. A trace over 20,000 spans is cut to its earliest spans and says so. The built-in agent has the same tool. #### `trace_stats` Counts spans and errors per time bucket (at most 60, set with `buckets`). It gives p50, p95 and p99 durations and a duration histogram over a filter. The `query` is a TraceQL filter on Tempo or a SQL condition over `otel_traces` on ClickHouse. The built-in agent has the same tool. #### `compare_traces` Explains why some traces are slow or failing. It takes up to 50 `selected` trace ids and up to 150 `baseline` ids from a Tempo or ClickHouse datasource. It returns the attribute values whose share of traces differs most between the two sets, at most `limit` of them (default 20, at most 100). The built-in agent has the same tool. #### `save_search` Saves a logs, trace or metrics search with a title, outside an agent run, so people can open it from the logs, traces or metrics page. - It takes `kind` (`logs`, `traces` or `metrics`), `title` and `datasource`, and optionally `query`, `filters`, `from`, `to` and `folder_id`. It returns the saved search with its `url`. - A logs search needs a `query` and a Loki, ClickHouse, Elasticsearch or OpenSearch datasource. Its `filters` takes only `columns`. - A traces search needs a Tempo, Jaeger or ClickHouse datasource. The `query` is optional: TraceQL on Tempo, `key=value` pairs on Jaeger and SQL on ClickHouse, which reopens the search in the SQL view. Its `filters` takes `service`, `span`, `min`, `max` and `errors`. - A metrics search needs a PromQL `query` and a Prometheus datasource. Its `filters` takes only `mode`, `graph` (the default) or `table`. - `from` and `to` default to `now-1h` and `now`, and are saved as written. - A search is filed in `folder_id`, by default the key's My Dashboards when it has one, else General, and the folder's readers can open it. A `folder_id` the key cannot save in returns `forbidden_role`, and an unknown one `not_found`. A datasource that does not exist or does not fit the kind returns `invalid_request`. - The query is linted as `lint_query` does it. One with a lint error is refused with `invalid_request` and the lint message, so a saved search never opens on a query that cannot run. When the lint check itself cannot run, for example because the datasource is unreachable, the search is saved anyway. Saving runs no query, so check the query with `lint_query` or `draft_query` first. - A repeat of a search you already saved, with the same kind, title, datasource, query, filters, range and folder, returns that search with `replayed: true` and saves no second copy. - `POST /api/v1/saved-searches` and `observe saved-searches save` apply the same two checks to a service-account key. They refuse a lint error with 422 `query_invalid` and answer a repeat with 200 and `replayed` true. A person's browser session saves as before. - No MCP tool renames or deletes a saved search, so people do that in the web app or with the CLI. #### `list_saved_searches` Lists the saved searches in the folders the key can see, most recently changed first. It takes an optional `kind` or `folder_id`. Each search has its datasource, query, filters, range, folder and `url`. #### `update_saved_search` Changes what a saved search runs, outside an agent run. Pass its `id` from `list_saved_searches` and any of `query`, `filters`, `from` and `to`. - Each one replaces the saved value. `filters` replaces all the filters, so send every filter to keep, and `null` removes them all. - An empty `query` removes the query of a trace search and is refused for a logs search. - The result is checked as a save is, so a rule it breaks returns `invalid_request`. - The kind, datasource, title and folder stay, and the tool returns the search with its `url`. - It needs Edit on the search's folder, which a Viewer key lacks (`forbidden_role`). A search the key cannot see returns `not_found`. - No tool renames, moves or deletes a saved search: people do that on the web or with `observe saved-searches`. ### Proposal tools #### `list_proposals` Lists proposals. It takes a `dashboard_id`, a `state` (`open` by default, or `merged`, `discarded` or `all`) and a `cursor`, and pages with `next_cursor`. #### `get_proposal` Returns a proposal with these fields: - Its `spec` and its `changes`. - The `conflicts` a merge would hit while it is open and behind the dashboard. - The `allowed_actions` of the caller. - The field-by-field `diff`. The diff is left out, with the step saying so, when it would take the result over 128 KiB. A result over 128 KiB without it answers `too_large`. #### `merge_proposal` Saves a proposal as a new version. - It takes the `proposal_id`, the `revision` read with `get_proposal` and, for each conflict, a choice such as `{ "kind": "panel", "id": "p1", "take": "theirs" }`. `ours` keeps the dashboard's unit and `theirs` takes the proposal's. - It needs Edit on the dashboard, and runs the queries of the panels it changes like any save. - It answers `proposal_changed` with the newest `revision` when the author added one. It answers `version_conflict` with `conflicts` when a conflict has no choice. It answers `invalid_transition` with the `state` and `allowed_actions` when the proposal is already closed. - In propose mode it answers `propose_mode`. #### `discard_proposal` Closes a proposal. It takes the `proposal_id` and an optional `reason` of up to 500 characters that the proposal shows. Its author or someone who may merge it can discard it. A caller without the access gets `forbidden_role`, and an unknown proposal or one on a dashboard the caller cannot see gets `not_found`. In propose mode it works only on a proposal the agent itself opened. ### Comment tools The [comment rules](#comment-rules) above apply to all of these tools. #### `list_comments` Lists the comments on a dashboard, observation, annotation or proposal, oldest first. Open threads are listed by default. - It takes exactly one of `target` and `dashboard_id`. `dashboard_id` means the same as `dashboard:<id>`. - Optional arguments are `status` (`open`, the default, `resolved` or `all`), `panel_id`, `limit` (1 to 100, 50 by default) and `cursor` from `next_cursor`. - Comments carry the fields in [Comment rules](#comment-rules). #### `create_comment` Opens a thread on a `target`. - It takes `target` and `body`, and optionally `to`, `client_id`, `anchor`, `block_id`, and on a dashboard `panel_id` and `version`. It takes `target` and not `dashboard_id`, so a comment on a dashboard is written with `target` `dashboard:<id>`, and a `dashboard_id` is refused. - On a dashboard it defaults to the whole dashboard on the latest version. - On an observation, it takes `block_id`, the block the message is about from `get_observation`, and omits it for the whole observation. A block of another observation, or a `block_id` on any other target, answers `invalid_request`. - An observation has one discussion, so `create_comment` on an observation that has one adds the comment to it. With `anchor` it opens a thread of its own on that spot instead. - `anchor` is the spot a dashboard or observation thread points at. With `block_id` on an observation, it is a spot in that block. - `client_id` is a UUID you make for the message. Sending the same call again returns the message already posted with `replayed` true, and starts nothing. #### `reply_to_comment` Replies to a thread. It works on any thread. - It takes `comment_id`, `body`, and optionally `to`, `client_id`, `block_id` and `reply_to_id`. - `reply_to_id` is a message of the same thread that the reply answers, which the web app shows quoted. - On an observation it takes `block_id` as `create_comment` does. - `client_id` works as in `create_comment`. #### `resolve_comment` Resolves a thread. It works on any thread, and takes `version` only on a dashboard, the version that fixed the comment. A caller with only Comment resolves only a thread they started and gets `not_starter` on any other. A caller who can edit resolves any. #### `reopen_comment` Reopens a resolved thread. #### `edit_comment` Changes the text of a comment the same key wrote. Only the author can edit a message (`not_author`). #### `list_mentionable_people` Lists the people who can see a `target`, so they can be mentioned. It takes a `target` and an optional `query`. - Each person has an `id` to put in `@[Name](user:<id>)`. - It returns at most 20 people, and `more` is true when others match, so narrow with `query`. - It also takes a `limit`, at most 20. - It takes `target` and not `dashboard_id`. #### `apply_suggested_change` Applies the change that an answer on a dashboard suggests. An answer may carry `suggested_change`, one sentence on a change that would help. - It takes `comment_id` and the answer's `finding_id` from `get_run`. - It posts "Revise the dashboard: <suggested change>" in that thread as you, and starts a run that makes the change. The run saves a version when you can edit the dashboard and opens a proposal when you can only comment. - The run is yours and goes to the agent that answered. - A repeat call while it is queued or running, or after it succeeded, posts nothing and returns that run with `replayed` true. - An id that is not an answer given in this thread answers `not_found`, and an answer without a suggested change `invalid_request`. - The run's own refusals are `too_many_revisions`, `agent_unavailable`, `assignee_unavailable` and `provisioned` on a starter dashboard. #### `request_comment_access` Asks for [comment access](/docs/teams/folders/#ask-for-comment-access) to a dashboard or observation the caller can view but not comment on. It takes `object_kind` (`dashboard` or `observation`), `object_id` and an optional one-line `note` of at most 200 characters. - It changes no access, and its answer never names who received the request. - It answers what `POST /api/v1/access-requests` answers, including `already_can_comment` and `not_found`. It also answers `request_open` with `requested_at`, also named in its message, while a request is open. - It is over MCP only, and a service-account key may call it. #### `list_access_requests` Lists the open requests on the folders the caller manages, as `GET /api/v1/access-requests` does, with each request's `folder`. When `folder.general` is true, the object is in General, which takes no folder entry. Only a role change or moving the object to another folder first grants it. It is over MCP only, and a service-account key may call it. ### Observation tools An observation is a page of blocks about one question. [Observations](/docs/use/observations/) describes them in the web app. #### `create_observation` Creates an observation and its blocks together. - It takes a `title`, and optionally a `folder_id` (by default the key's My Dashboards when it has one, else General), a range with `from` and `to`, and up to 10 `blocks`. - When a block is refused nothing is created, and the call answers `block_refused` with the `block_index` and the reason. #### `get_observation` Returns the observation with `allowed_actions` and its blocks in order. - Each block has its `kind`, `state`, `position`, `width`, `height`, `version` and a short view. - The short view is Markdown clipped to 2,000 characters (`markdown_truncated`), a panel block's `title`, `type`, datasources, `variables` (the values it runs with) and its full `panel`, in the shape `update_block` takes, or a snapshot's `snapshot_id`. - `blocks_truncated` says the rest did not fit. - A block's `allowed_actions` never lists `remove`, because no MCP tool removes a block. - The built-in agent also has this tool, and only reads with it. #### `list_observations` Lists the observations in the folders the key can see, most recently changed first. It takes an optional `folder_id`, `state` (`open` or `resolved`), a `title` that contains the given text, a `limit` (20 by default, at most 50) and a `cursor`, and pages with `next_cursor`. The built-in agent also has this tool, and only reads with it. #### `add_block` Adds a block. It takes `observation_id` and a `kind`: - `text` takes `markdown` of at most 4,000 characters. - `panel` takes `panel`, optionally `variables` and its own `from` and `to`. `variables` is an object of variable name to a list of values, for each variable the panel's queries use. Without `from` and `to`, the panel uses the range of the observation, else the last hour. - `snapshot` takes `from_block_id`, the panel block to freeze. `width` (`third`, `half`, `two_thirds` or `full`, by default `full`), `height` (120 to 960 pixels, by default the block's own) and `position` apply to every kind. A field of another kind is refused with `invalid_request`. A panel that uses a variable with no value in `variables` is refused with `variable_missing`, and the message names the variable. #### `update_block` Changes a block. - It takes `block_id`, the `version` you read and the new `markdown`, or the new `panel` with its range. It optionally takes `width`, `height` (a number, or `null` for the automatic height) or `position`. - A `height` applies to panel and snapshot blocks only, and a number for a text block is refused with `invalid_block`. - `follow_page: true` drops a panel block's own `from` and `to`, so it shows the observation's range again. It goes without `panel`, `markdown`, `from` or `to`. #### `arrange_blocks` Sets the order and size of the page's blocks in one call. - It takes `observation_id` and `blocks`, a list of `block_id` in the order the page should show them, each with an optional `width` and `height` (panel and snapshot blocks only). - A block left out keeps its place after the block it followed. An id that is not a block of the observation refuses the call and names the id. - It needs no `version`, and a layout change never makes a text or panel edit stale, because a block's `version` counts content only. - The last arrangement wins, and it answers with the blocks in their new order. #### `keep_block` and `discard_block` Decide a block that someone who can only comment added. Such a block arrives as `requested` and says so in `note`. A person who can edit keeps it with `keep_block` or discards it with `discard_block`, and the one who asked for it may discard it too. #### Block versions and states A block's `version` is checked by `update_block` and `keep_block`. A stale one answers `version_conflict`, so read the block with `get_observation` and apply the change to the version it names. A transition the state does not allow, such as keeping a block that is already live, answers `invalid_transition` with the actions allowed now. Like every agent write, a text block with HTML is refused with `html_not_allowed`. A panel is checked like the evidence of an investigation's answer: a panel whose query fails or returns no data in its range is refused with its issues. No tool removes a block: people do that in the web app or through the HTTP API. Every write answers with the ids, the `state` of what it changed, the block `version` and the `url`. #### `resolve_observation` Closes an observation with a one-line `summary`. #### `update_observation` Changes the title or range of an observation. A new title also renames the chat the observation shares its title with when you started that chat. `chat_rename` in its result is `renamed`, or `kept` when the chat's title was left as it is. `rename_run` on that chat's first run renames the observation and answers `observation_rename` the same way; see [Chat](/docs/use/chat/#one-title-for-a-chat-and-its-observation). #### `move_observation` Moves an observation to another folder. #### `reopen_observation` Reopens a resolved observation. #### `pin_observation` Pins an observation to a dashboard as an annotation. - It pins to `dashboard_id`, or by default to the dashboard its run was about, and needs edit access to that dashboard. - Pinning again answers with the same annotation and `created: false`. - An observation with no dashboard to pin to answers `observation_has_no_dashboard`. #### `make_dashboard` Makes a dashboard in My Dashboards from an observation's live panel blocks, or from one block with `block_id`, with the variables each block carries. - Making it again returns the dashboard you made first (`replayed: true`) unless `new` is true. - When the observation came from your own chat and that chat is about nothing else, the chat becomes about the new dashboard. - An observation with no live panel block answers `observation_has_no_panels`. #### `publish_rca` Publishes an observation as the next immutable RCA revision; see [Observations](/docs/use/observations/#publish-as-rca). - It takes `observation_id` and answers with the `revision`, the number of `blocks` and `snapshots` it holds and the `observation_url`. - A failing panel answers `panel_failed` with the block it names. - The other refusals are `rca_limit`, `rca_unchanged`, `observation_changed`, `snapshot_too_large` and `personal_folder`. - It never creates a public link: a person does that, and no tool lists or revokes one either. #### `list_rcas` and `get_rca` List an observation's published revisions and read one, as `GET /api/v1/observations/{id}/rcas` does. No tool withdraws a revision: people do that in the web app, through the HTTP API or with `observe o withdraw`. ### Built-in agent run tools These tools hand work to SlashObserve's own agent and read its runs. They are over MCP only, and act as the person who connected the client, with their role and folder access. #### `start_run` Queues a run of the built-in agent and answers with it at once. Follow it with `get_run`. - It takes a `prompt` (1 to 4000 characters) and optionally these arguments: - `kind`: `ask` (the default) or `revise`. - `dashboard_id`, with `base_version` for a revise. - `observation_id`. - `chat_id`, one of your chats from `list_chats` whose next turn the run is. - `anchor`, the spot on the dashboard or observation the prompt is about, shaped as `list_comments` shows it. - `block_id`, a block of `observation_id`: the one the anchor sits on, or without an anchor the whole block the prompt is about. - `client_id`, `new_chat`, `applies_finding_id` and `as_of`. - Without a `dashboard_id`, an `ask` builds a new dashboard or answers in the chat. `kind: revise` with a `dashboard_id` changes that dashboard and saves a version. - An `ask` with one of `dashboard_id` or `observation_id` is a [private ask](/docs/concepts/agent/#private-asks): it only answers, changes nothing, and is read only by you and Admins. - `kind: investigate` is refused, because an investigation is a person's decision. - An Admin may pass `as_of`, an RFC 3339 time or epoch milliseconds in the past, to run as of that time. It works for an `ask` about a dashboard or an observation and not for `revise`. Every relative time in the run, such as `now-1h`, resolves to it, and `get_run` and the finding give it back as `as_of`. See [Investigate a past incident](/docs/use/investigate/#investigate-a-past-incident). - With `kind: revise`, `applies_finding_id` in place of `prompt` makes the change an answer about that dashboard suggests. The answer's `suggested_change` from `get_run` is the prompt. While a run applying it is queued or running, or after it succeeded, the call returns your run with `replayed: true`, or answers `already_applied` for someone else's. - Every run is a turn of a chat. Without `chat_id` a new chat starts, and a revise joins your latest chat on that dashboard unless `new_chat` is true. `new_chat` always starts a new chat and is refused with `chat_id`. - Send a new `client_id` (a UUID) with each question. A resend with the same one answers with the run it started and `replayed: true`, and one with another prompt answers `client_id_reused`. Without `client_id` every call queues another run, so read `get_run` or `list_activity` before asking again. - The limits answer `too_many_requests` (3 new-dashboard runs per caller), `too_many_revisions` (5 revisions per dashboard) and `agent_busy` (an instance-wide cap). `agent_unavailable` means the server has no model. #### `get_run` Reads one run of the built-in agent by the id of a `run.*` event from `list_activity`. - The answer is the object `GET /api/v1/observe/{id}` returns: its `state`, `result_kind`, `allowed_actions`, `attempt`, the last 20 steps and its usage. - While the run is running it also has `live_text`, the text the agent is writing now, which is never stored and is `null` once the run ends. - A run is visible to the same people as through the API. An Admin can read any run; the answer then has `read_only: true` and no allowed actions. - A question someone asked in their own chat answers `not_found` to anyone but them and Admins, unless it is an investigation or its answer was shared into a thread you can read. - A revision from someone else's chat, other than an investigation or an answer shared into a thread you can read, has `redacted: true`, `read_only: true` and no allowed actions. Its `title`, `prompt`, step messages, `live_text`, `continue_note` and `error` are empty, while `failure_code` stays. - `subject_observation_id` names the observation an ask is about, such as one asked from an observation's chat. It stays set after the answer is saved into another observation. It is null when the run is `redacted` or when you cannot open that observation. - The run's `investigation` field says whether it is an investigation. - `anchor` and `block_id` are the spot a run points at, shaped as `start_run` takes it. They are filled only for the person who asked the run, and are `null` for anyone else and for a run that points at nothing. The turns of `get_chat` carry the same two fields under the same rule. When the run ended with an answer to a question, the object carries it as `finding`. The `finding` has an `observation_id` and `url`, which are null until the answer is saved as an observation. Only the person who asked and an Admin can read such an answer. When a request made on Home asked to change one existing dashboard, the `finding` carries `ask_on`, the `dashboard_id` and `title` of that dashboard. No `ask_on` means the finding names none or several. To make that change, use `update_panels` on that dashboard yourself, or ask the built-in agent with one of these: - `start_run` with `kind` `revise`, the finding's `ask_on.dashboard_id` as `dashboard_id` and the run's prompt. - `observe --revise --dashboard <id>`. - `POST /api/v1/observe` with `kind` `revise` and `dashboard_id`. #### `get_run_build` Reads the dashboard a run has saved so far, the object `GET /api/v1/observe/{id}/build` returns. Only the person who started the run and an Admin can read it. #### `cancel_run` Stops a run the caller started. It is safe to repeat: a run that is already canceled, succeeded or failed answers with its current state. #### `retry_run` Starts a succeeded, failed or canceled run again with the same prompt as a new run. - A queued or running run, a failed or canceled run that was already retried, and a run you read `redacted` answer `invalid_transition` with `allowed_actions`. - Investigations are a person's decision, so `retry_run` answers `investigation_person_only` for one. - A private ask about a dashboard or an observation is not an investigation, also once its answer is saved as an observation. `retry_run` starts it again as a private ask about the same dashboard or observation, in the same chat. #### `list_chats` Lists your chats, pinned ones first and then the one most recently asked in. - It takes `scope`, `dashboard_id`, `observation_id`, `pinned` and `q` as `GET /api/v1/chats` takes them, and a `limit` and `cursor`. A page has 20 chats by default and at most 50, and it pages with `next_cursor`. - `scope: all` lists every person's chats by their last turn only, and needs an Admin. - Each chat carries `dashboard_title`, null when you cannot see its dashboard. Its `observation_id` and its last turn's `subject_observation_id` are null when you cannot open that observation. #### `get_chat` Reads one chat with its turns oldest first, each the run as `get_run` returns it without steps. When the turns do not all fit it answers `truncated: true` and a `next_offset` to pass as `offset`. - A chat's owner and Admins read it and nobody else sees it. - An Admin reads another person's chat read only, with `owner` and `read_only` saying so. - An Admin who passes another person's `chat_id` to `start_run` gets `chat_read_only`, not `not_found`. - Archiving a chat is left to people, with `observe chats archive` or `DELETE /api/v1/chats/{id}`. #### `list_runs` Lists the caller's runs, newest first with pinned ones on top. These are the runs the web app lists as chats, with the same rules as `GET /api/v1/observe`, `PATCH /api/v1/observe/{id}`, `DELETE /api/v1/observe/{id}` and `observe requests`. - A page has 20 runs by default and at most 50, and pages with `next_cursor`. The first page also carries `summary.total`, the number of runs that match, which counts a chat once per message. - Each run has its `id`, `title`, `state`, `kind` (`build` or `investigate`), `intent` (`ask`, `apply` or `suggest`) and `investigation`. `investigation` is true for an investigation that writes into an observation, false for an ask. - Each run also has `result_kind`, dashboard, observation, `anchor` and `block_id` (the spot your own question points at), `pinned_at`, `created_at` and `allowed_actions`. It does not carry the prompt, which `get_run` returns. - Filters: - `state` (a list), `dashboard_id`, `pinned` and `q`, a word of the title, the prompt or an answer the caller may read. - `scope`: `all` lists everyone's runs and needs the Admin role. - `observation_id` keeps the runs asked about that observation and the runs that wrote into it. - `anchored: true` keeps the runs that point at a spot. It works only with the default `scope` of `mine`: with `scope: all` it answers `invalid_request`, even for an Admin. - `anchor` and `block_id` are filled only for the person who asked the run. They are `null` for anyone else, such as a reader of a shared answer or an Admin reading a private chat. #### `rename_run`, `pin_run`, `unpin_run` and `archive_run` Work the runs the web app lists as chats. - `rename_run` takes a `title` of 1 to 120 characters on one line, or `null` to take it back to the start of the prompt. - `pin_run` and `unpin_run` move a run to the top of the list and back. - `archive_run` removes the run from the list while `get_run` still reads it and everything it saved stays. An observation the run saved stays too, because no MCP tool deletes anything. A person deletes it with the chat in the web app, or with `observe requests archive <id> --delete-observation --yes`. - Only the person or key that started a run can rename, pin, unpin or archive it. Anyone else gets `forbidden` on a run they can see on a dashboard and `not_found` on any other, so a chat that only its requester can read never shows it exists. - Each is safe to repeat. #### `save_run_answer` Files the answer of a run as an observation. - It takes `run_id`. The observation goes in the folder of the dashboard the chat was about, else in the requester's default folder (a person's My Dashboards, a key's General). - It answers `observation_id`, `url` and `replayed`, true when the answer was already saved. - Until then a run's `result_kind` is `answer` and its `observation_id` is null. It reads `observation` afterwards, in `get_run`, `list_runs`, `observe requests list --json` and `GET /api/v1/observe`. - Only the one who asked can save it. An Admin gets `forbidden_role`, and anyone else and a run without an answer get `no_answer`. #### `share_answer` Shows the answer of a private question (`start_run` with `kind` `ask`) to the people who can read the dashboard or observation it was about. - It takes `run_id`. It opens a comment thread there, at the same panel or block, with the question as your message and the agent's answer as its reply. On an observation it also writes the answer onto the page. - With `thread_id` it adds both to that thread instead, which must be on the same dashboard or observation. - It answers `thread_id`, `message_id` and `replayed`, true when the run was already shared. A run is shared once. - Only the one who asked can share it, and only when you can comment there. Anyone else gets `not_found`, a run that is not a private question gets `not_shareable` and one without an answer gets `no_answer`. - An answer whose evidence reads a datasource only Admins can query is refused with `restricted_answer`, unless the dashboard or observation is in a folder only Admins can read. - The run and the rest of the chat stay readable only by you and Admins. - Withdrawing a shared answer deletes the shared question and its answer, or the thread the share opened, so no MCP tool does it. The person who asked uses `observe comments withdraw` or `DELETE /threads/{id}/share`. ### Workspace tools #### `list_folders` Lists the folders the key can see, with `can_create` for each, and sets `truncated` when there are more than fit in the result. The built-in agent also has it, so a request that names a folder can place the dashboard there. - For an Admin key each folder also carries `admins_only`, true for a folder only Admins can read. A save that reads an Admins-only datasource, and is refused with `restricted_content`, goes in one of those. A key below Admin never sees the field. - Each folder carries `audit`, true when it is the [Audit folder](/docs/use/activity/#audit-folder) and false otherwise. - No tool changes a folder's access: an Admin sets it with `observe folders permissions admins-only`. #### `create_folder` Creates a folder. It takes a `title` (1 to 100 characters, unique without regard to case). A Viewer is refused by the folder rules, an Editor or Admin may create, and the caller manages the folder they create. It answers `folder_exists` for a taken title. #### `rename_folder` Renames a folder. It takes a `folder_id` and a `title`, and needs the Manage permission on the folder. It answers `folder_exists` for a taken title and `general_folder` for the General folder. No tool deletes a folder or changes who may see one, because people do that in the web app or with `observe folders`. #### `search_workspace` Runs the [search](/docs/use/search/) of the workspace. - Pass `q`, and optionally `kinds` (`dashboard`, `annotation`, `observation`, `comment`, `saved_search`), `limit` (20 by default, at most 50) and `cursor`. - Each result has its `kind`, `id`, `title`, a plain-text `snippet`, the `url`, the `folder` and `updated_at`. For a comment it also has the `target` it is on and its `thread_id`. - It finds only what the key may read, and it is over MCP only. #### `list_annotations` Lists [annotations](/docs/use/annotations/), such as deploy markers, newest first. - It returns the global ones, plus one dashboard's own with `dashboard_id`. It is narrowed by `from` and `to` (RFC 3339) and `tags`. - A page has 50 by default and at most 100. - It is the one annotation tool the built-in agent also has, in every run and as the person who asked, so it can see a deploy beside a spike. #### `create_annotation` Adds an annotation. It has the fields of `POST /api/v1/annotations`: `text`, `tags`, `time_from` and `time_to`, and `dashboard_id` and `panel_id` to place it on one dashboard or panel. Without `dashboard_id` the annotation shows on every dashboard. It needs Edit on the dashboard's folder, and an annotation with no `dashboard_id` needs the Editor role. It is over MCP only. #### `update_annotation` Changes the `text`, the `tags` or both of an annotation by `id`. Only the caller who added it, or an Admin, may. Its time and dashboard never change. No tool deletes an annotation: people do that in the web app or through the HTTP API. #### `list_activity` Lists the [activity](/docs/use/activity/) of the workspace, newest first. It covers dashboard saves, restores, moves and deletes, annotations, findings and agent runs, each with its `actor` and the actor's `label`. - Narrow it with `dashboard_id`, `folder_id`, `observation_id`, `actor_id`, `types`, `since` and `until` (RFC 3339). - A page has 50 by default and at most 100, and pages with `next_cursor`. - It lists only the events of folders the key may see, plus the [admin changes](/docs/use/activity/#admin-changes) when the key is an Admin's. - It is over MCP only, so the built-in agent does not have it. #### `list_inbox` Lists the [inbox](/docs/use/inbox/) of the person who signed in to the connected agent: what asks something of them. Each item has the `reason` and whether it is `unread`, and the result has `unread_count`. - Pass `view` (`for_you`, `proposals`, `mentions` or `everything`, `for_you` by default), `filter`, `limit` and `cursor` from `next_cursor`. `filter` is `open` by default, `unread` for the open items that are unread, or `done` for the items marked done. `limit` is 50 by default and at most 100. - It answers what `GET /api/v1/inbox` answers, and it does not mark anything read. - A service-account key gets `user_session_required`. It is over MCP only, so the built-in agent does not have it. #### `set_inbox_item_done` Marks one inbox item done by its `seq` from `list_inbox`, or brings it back with `done: false`. A done item leaves the default list, counts as read and stays done when the inbox is read, as the done button in the web app does. It answers like `PUT /api/v1/inbox/items/{seq}`. A service-account key gets `user_session_required`. ### Audit tools Six tools read the [audit trail](/docs/reference/audit-queries/), and all need an Admin. They are `search_audit_events`, `get_audit_event`, `list_audit_facets`, `get_audit_histogram`, `aggregate_audit_events` and `list_audit_fields`. - `search_audit_events` returns 20 events a call by default and at most 100, paged with `next_cursor`. - `get_audit_event` returns one event with the events of its request and agent run. - The tools take `query` in KQL, `lucene:` or a Query DSL body, and `since` and `until`, the last 24 hours by default and at most 366 days. - An answer is at most 16 KiB, so a page can hold fewer events than `limit`. It then says `truncated: true` with a note, and `next_cursor` continues it. An agent that counts events must follow the cursor until it is null. - A call to any of them except `list_audit_fields` is recorded in the trail as `audit.search` with the query and its view. It is recorded once per key, view and query text in 10 minutes; see [Audit queries](/docs/reference/audit-queries/). `list_audit_fields` records nothing, and none of them changes or deletes an event. - The export is in the CLI and the API only, because a tool answer holds at most 16 KiB. ### Run claim tools `claim_run`, `report_run`, `finish_run` and `get_run_brief` are the tools of an outside agent that takes runs. [Take runs as an agent](#take-runs-as-an-agent) describes the loop and every field. | Tool | What it does | | ---- | ------------ | | `claim_run` | Takes the next run assigned to you, waiting up to `wait_seconds` (0 to 30). | | `report_run` | Keeps the lease, with an optional `note`, `text` and `usage`. | | `finish_run` | Ends the run with `outcome` `succeeded` or `failed`. | | `get_run_brief` | Returns the system text and first message of a model session. | # Activity > Read and follow what changed in your workspace, from dashboard saves to agent runs, through the web app, the CLI, MCP and the HTTP API, with each person seeing only the folders they can view. Source: https://slashobserve.com/docs/use/activity/ · Markdown: https://slashobserve.com/docs/use/activity/index.md The activity log lists everything that changed in your workspace, in the order it happened: dashboard saves, comments, agent runs and, for Admins, changes to people and access. Use it to see who changed what and when, to watch an agent run fail, or to send those events to another system. A change and its event are written in the same transaction, so the log never shows something that did not happen and never misses something that did. You see only the events of folders you can view; [Who sees an event](#who-sees-an-event) has the rules. ## See what changed In the web app, choose **Activity** at the top right of a dashboard to see its comments, agent requests and saved versions. [The activity timeline](/docs/use/review/#the-activity-timeline) describes that tab. An Admin reads the audit trail under **Audit**; see [Audit log](#audit-log). To read the log itself, use the CLI, MCP or the HTTP API. They need the Viewer role or higher. The HTTP API accepts a session or a service-account key, and the CLI and MCP accept a key. 1. Sign in once with a service-account key, as [CLI](/docs/use/cli/#sign-in) shows. 2. List the newest events: ```sh observe activity --since 24h ``` You see one line per event, oldest first, with the time, who did it and what happened: ```text 2026-11-01T10:00:00Z Observe Agent for Sam run failed (no_progress) 2026-11-01T10:05:09Z Sam saved version 12 of "Checkout" ``` 3. Narrow the list with a flag, for example `--dashboard <dashboard-id>`, `--type run.failed` or `--actor <person-id>`. 4. For the raw JSON, call the HTTP API: ```sh curl -fsS -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/activity?limit=20&type=dashboard.version_created&since=2026-11-01T00:00:00Z" ``` The answer is `{"activity": [...], "next_cursor": ...}`, newest event first. `observe activity --json` prints the same response unchanged. An empty log prints `No activity yet`. ## Read the next page The HTTP list is newest first, 50 events per page by default and at most 100. `next_cursor` is `null` on the last page. Pass a `next_cursor` back as `cursor` to read the next page. In the CLI, `--limit` takes 1 to 100 (20 by default), `--cursor` continues from a `next_cursor`, and `--all` reads every page as one list. ## Narrow the list The list takes these query parameters, and a value that does not parse answers 400: | Parameter | Matches | | --- | --- | | `dashboard_id` | Events of one dashboard. | | `folder_id` | Events in one folder. | | `observation_id` | Events of one observation. | | `actor_id` | A person or a service account. | | `type` | One event type, repeated for several. | | `since` | An RFC 3339 time. | | `until` | An RFC 3339 time. | `observation_id` returns the events recorded on that observation: its changes, its blocks, its RCA publications and the messages of its discussion. It narrows what you may see and never widens it, so an observation in a folder you cannot view returns nothing. In the CLI, `--dashboard`, `--folder`, `--observation` and `--actor` take ids, and `--type` repeats. `--since` and `--until` take a duration such as `24h` or an RFC 3339 time. ## Follow events as they happen `GET /api/v1/activity/stream` sends new events as Server-Sent Events, oldest first. It takes the same filters as the list. 1. Open the stream: ```sh curl -N -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/activity/stream?type=run.failed" ``` 2. Wait for `retry: 3000` and `event: ready`. Each new event then arrives as one frame: ```text id: 412 event: activity data: {"seq":412,"type":"dashboard.version_created", ...} ``` 3. Handle each frame, and keep its `id`. 4. When the connection drops, reconnect with that `id` as the `Last-Event-ID` header. The stream continues with the next event. From the CLI, `observe activity --follow --type run.failed` does the same. It prints the newest events first, then each new one until you press Ctrl-C. [CLI](/docs/use/cli/#activity) describes its reconnect behavior. ### What the stream sends A `: ping` comment arrives every 15 seconds. Without `Last-Event-ID` the stream sends only events appended after it opened, and `Last-Event-ID: 0` starts at the beginning of the log. `observe activity --follow` sends `0` until it has printed an event, so an event appended between its list and its stream is not missed. An event can arrive up to about a second after its change. If the server does not know the `Last-Event-ID`, for example because it was pruned, the stream sends `event: reset` after `ready`. It then continues from the newest event. A reset means some events may have been missed, so read the list again. A value that is not a non-negative integer answers 400. ### When the stream ends At every ping the server checks your credentials, role and folder access again. It ends the stream when the credential is gone. It also ends the stream after 30 minutes, so a client reconnects with `Last-Event-ID`. A person or key may hold 5 streams, and the server 500. Beyond that the answer is 429 or 503 `too_many_streams`. ## Read the log over MCP The `list_activity` tool of the [MCP server](/docs/use/mcp/) reads the same list, newest first. It takes `dashboard_id`, `folder_id`, `observation_id`, `actor_id`, `types`, `since`, `until`, `limit` (1 to 100, 50 by default) and `cursor`. It needs a Viewer key, lists only what the key may see, and pages with `next_cursor`. An Admin key also gets the [admin changes](#admin-changes). The tool has no stream. An agent calls it again with `since` to see what changed. ## Send events to another system An Admin can have the server post events to an address of their choice as signed requests. See [Webhooks](/docs/use/webhooks/). ## Audit log The audit log is a separate trail from the activity log, and only an Admin reads it. In the web app, choose **Audit** in the sidebar's Workspace group. An Editor, Commenter or Viewer who opens one of its pages sees a note that only Admins can open the page. **Audit** has three pages. - **Log**, at `/audit`, searches the trail. - **Dashboards**, at `/audit/dashboards`, lists what [the Audit folder](#audit-folder) holds, including its saved searches, and keeps the folder's settings button. - **Observations**, at `/audit/observations`, lists the observations in that folder. **Log** shows the trail that [Audit queries](/docs/reference/audit-queries/) describes, not this activity log. It holds every sign-in, read, change, agent tool call and refusal, admin changes among them. ### Search the trail 1. Choose **Audit**, then **Log**. 2. Type a query in the query box, or leave it empty. The box takes the same text as `GET /api/v1/audit/events`: KQL by default, Lucene after `lucene:`, and a Query DSL body that starts with `{`. It names the form it reads and completes field names. 3. Pick a time range. It is the last 24 hours unless you pick another, and it spans at most 366 days. 4. Choose **Search**, or press Ctrl+Enter (Cmd+Enter on a Mac). A query the server cannot read is shown with the part it stopped at marked and the parser's message under it. 5. Open a row to see every field of the event, the other events of the same request and everything the same agent run did. A chart counts the matching events over the range. The chips under it count the top actors, actions, outcomes, origins and initiators. Clicking a chip adds its value to a KQL query, or removes it when it is there, and the minus beside it leaves the value out. A Lucene or Query DSL query is edited only as text. The table lists the matching events newest first, 100 at a time, with **Load older events** for more. The query, the time range and the open event are in the page's address, so a link opens the same view. `observe audit search` and the `search_audit_events` tool read the same trail; see [Audit queries](/docs/reference/audit-queries/#api-mcp-and-the-cli). ### Watch the trail live Turn on **Live**, while the range ends now, to add new matching events at the top as they are recorded. After a dropped connection it reconnects and continues from the last event it showed. When the server refuses that resume because the event is more than 24 hours old, Live starts over, reloads the list and says so. After 500 new events the page reloads the list up to now, so the newest of them are in the list and the older ones a click on Load older events away. Live turns itself off with a message when you are no longer an Admin, when you already hold 5 audit streams, or when the query is too slow to follow. ### Open the same events in Logs **Open in Logs** opens the same events in the log explorer, the [Logs page](/docs/use/logs-and-traces/) on the audit datasource. It carries the page's current query and time range, so you can read the events there like any OpenSearch logs. A query longer than the Logs page accepts is left out, and Logs opens with the time range alone. That page is not part of **Audit**: its breadcrumb reads Audit, Log, Explorer, and while it is open **Log** is the highlighted page. ### Export the trail **Export** downloads the matching events as NDJSON or CSV through `GET /api/v1/audit/export`. The download records an `audit.export` event with the query, the window, the format and the row count. The browser shows the download's progress and can cancel it, so the page never holds the file in memory. An export stops at 1,000,000 events. When more match, the page says how many before the download starts, and a shorter range exports the rest. The app's other downloads, such as a dashboard's Spec JSON, a trace's JSON or a panel's CSV, are assembled in the browser from reads that are each recorded. They have no separate export event. The log used to live in Settings, under **Audit log**. `/settings#audit-log` now redirects to `/audit` and keeps its query, time range and open event. ## Audit folder The server creates a folder named Audit at its first start. Only Admins can read it. It holds four starter dashboards on the [audit datasource](/docs/reference/audit-queries/#the-audit-datasource): Audit overview, Sign-ins and access, Agent and MCP activity, and Data access. To open the folder, choose **Audit**, then **Folder**. It opens as `/f/<id>` does, with its dashboards, then its observations and saved searches. ### Change a starter dashboard The starters are provisioned, so they are read-only in the app, the API, MCP and the CLI. Those refuse a change with 409 `provisioned`. 1. Open the starter. The web app says why it is read-only. 2. Choose **Duplicate** in the dashboard menu. 3. Edit the copy. It is an ordinary dashboard in the Audit folder. Comments, pins, annotations, views, Ask and deleting a starter work as on any dashboard. The agent's changes to a starter are refused before anything is queued, a comment that requests a revision included. ### How starters stay current At every start the server compares each starter with the content its release ships. A starter that differs gets one new version with the summary `Updated to this release`. An unchanged starter gets nothing, and its threads, pins and view counts stay. - A starter that someone changed before it became read-only is kept as a separate dashboard named `<title> (your copy)`, and the starter takes the shipped content. - A starter that was moved out of the Audit folder returns to it. Its copy stays in the folder it had been moved to, or goes to the Audit folder when that folder may not hold its content. - A dashboard of your own that happens to carry a starter's title is never taken over, and the starter is added beside it. - A starter an Admin deletes comes back at the next start. ### Rules for the folder The page finds the folder by the server's record of it, not by its title, so it keeps working after an Admin renames the folder. `GET /api/v1/folders` marks that folder with `audit: true`. When a folder named Audit already exists, the server fills it only if it is Admins only, and otherwise logs a warning and leaves it alone. After an Admin deletes the Audit folder, the server does not create it again. A dashboard, observation or saved search that reads the audit datasource can live only in a folder that only Admins can read. ## Reference ### Event fields Every event has these fields. | Field | Holds | | --- | --- | | `seq` | The event's id. | | `type` | The event type. | | `target` | The `kind` and `id` of what changed. | | `dashboard_id` | The dashboard it belongs to, or null. | | `folder_id` | The folder it belongs to, or null. | | `actor` | Who made the change. | | `data` | Details of the change. | | `created_at` | When it was recorded. | The `actor` is the same object the rest of the API uses. Its `label` is the one text to show for who made the change. An event made through a key says which key, and an event made over MCP says which client. ### What is recorded | Target | Event types | Written when | | --- | --- | --- | | Dashboard | `dashboard.created`, `dashboard.version_created`, `dashboard.restored` | A version is saved, or an older one is restored. | | Dashboard | `dashboard.moved`, `dashboard.deleted` | A dashboard moves folder or is deleted. | | Annotation | `annotation.created`, `annotation.updated`, `annotation.deleted` | An [annotation](/docs/use/annotations/) is added, edited or removed. | | Public link | `public_link.created`, `public_link.revoked` | A [public link](/docs/use/public-links/) is created or revoked. | | Access request | `access_request.opened`, `access_request.granted` | A Viewer asks to comment, or a change lets them. | | Finding | `finding.created`, `finding.pinned` | A finding is saved, or pinned to its dashboard. | | Finding | `finding.moved` | Only old events; the API that moved findings is removed. | | Saved search | `saved_search.created`, `saved_search.updated`, `saved_search.moved`, `saved_search.deleted` | A [saved search](/docs/use/logs-and-traces/) is saved, changed, moved or deleted. | | Observation | `observation.created`, `observation.updated` | An observation starts, or its title or time range changes. | | Observation | `observation.moved` | An observation moves to another folder. | | Observation | `observation.resolved`, `observation.reopened` | An observation is resolved with a summary, or opened again. | | Observation | `observation.deleted` | An observation is deleted. | | Observation | `observation.published`, `observation.rca_withdrawn` | An RCA revision is published or withdrawn. | | Observation | `observation.block_added`, `observation.block_updated` | A block is added, or one changes or moves. | | Observation | `observation.block_kept`, `observation.block_discarded` | A requested block is kept or discarded. | | Observation | `observation.block_removed` | A block is taken off the page. | | Proposal | `proposal.opened`, `proposal.updated` | A [change is proposed](/docs/concepts/proposals/), or its author saves again. | | Proposal | `proposal.merged`, `proposal.discarded` | A proposal is merged or discarded. | | Run | `run.queued`, `run.started`, `run.released` | An [agent request](/docs/use/chat/) is queued, started or handed back. | | Run | `run.canceling` | The requester canceled a run a worker holds. | | Run | `run.succeeded`, `run.failed`, `run.canceled` | A run settles. | | Run | `run.kept` | The requester kept the build of a stopped run. | | Thread | `thread.opened`, `thread.replied`, `thread.edited`, `thread.deleted` | A comment thread is opened, answered, edited or deleted. | | Thread | `thread.resolved`, `thread.reopened` | A thread is resolved or opened again. | | Thread | `thread.mentioned` | A message mentions a person or `@observe`. | #### Details of some events - **Annotation.** An annotation event holds only a `title`, the first 80 characters of the annotation's text on one line. A delete repeats the annotation's `panel_id`, `tags` and times, so a row still says which annotation went. - **Public link.** The event belongs to the dashboard or observation, and it is written when someone who manages it creates or revokes a link. - **Access request.** The event belongs to the dashboard or observation. `access_request.opened` is written when a Viewer [asks for comment access](/docs/teams/folders/#ask-for-comment-access). `access_request.granted` is written when someone changes a folder's access or a role so that the requester can comment. - **Finding.** The answer's observation records its own `observation.created` and block events. A finding whose run is `restricted`, or whose answer is [kept for what it is about](/docs/use/chat/#answers-that-read-admin-only-data), records `finding.created` on its observation instead of its dashboard. Only that observation's readers then see its title. - **Moved finding.** `finding.moved` was written when a finding without a dashboard moved to another folder through the finding API. That API is removed, and only earlier events carry the type. - **Saved search.** `saved_search.updated` covers a rename or a change to the query, filters or range. - **Observation.** `observation.moved` shares the observation with the new folder's readers. `observation.deleted` removes the observation with its blocks, RCA revisions and discussion, and the event stays in the log with the title the observation had. An editor keeps or discards a block someone requested, and the block's author may discard it too. - **Proposal.** Someone who can edit the dashboard merges a proposal. - **Run.** `run.released` is written when a stopping server hands a run back to the queue. `run.canceling` is written while a worker still holds the run. `run.kept` is written when the requester keeps the build of a stopped run as a version. - **Thread.** A person or an agent run that finished the change the thread asked for can resolve it. `thread.mentioned` is one event for each mention. ### Admin changes These events record what an Admin changes about people, keys, integrations and access. Only an Admin can read them, in the list, in the stream, in a [webhook](/docs/use/webhooks/) and in [the Audit log](#audit-log) in the web app. Each has an `actor`, the Admin, with the same `label` and origin as any other event. | Target | Event types | Written when | | --- | --- | --- | | Person | `user.role_changed` | A person's role changes. | | Person | `user.signed_out_everywhere` | An Admin signs a person out everywhere. | | Person | `user.invited`, `user.invite_updated`, `user.invite_withdrawn` | An Admin [invites](/docs/teams/people/) an email, changes the invite or withdraws it. | | Person | `user.deactivated`, `user.reactivated`, `user.removed` | An Admin deactivates, reactivates or removes a person. | | Service account | `service_account.created`, `service_account.updated`, `service_account.deleted` | An Admin creates, changes or deletes a service account. | | Service account | `service_account.key_created`, `service_account.key_revoked` | An Admin creates or revokes a key. | | Webhook | `webhook.created`, `webhook.updated`, `webhook.secret_rotated`, `webhook.deleted` | An Admin creates, changes, rotates or deletes a webhook. | | Outbound domain | `outbound_domain.added`, `outbound_domain.removed` | An Admin allows or removes an outbound domain. | | Connected agent | `mcp_client.connected`, `mcp_client.disconnected` | A person connects an agent over MCP, or the connection ends. | | Grafana connection | `grafana_connection.created`, `grafana_connection.updated`, `grafana_connection.deleted` | An Admin connects, changes or removes a connection. | | Datasource | `datasource.created`, `datasource.updated`, `datasource.audience_changed`, `datasource.deleted` | An Admin adds, changes or deletes a datasource, or changes who can query it. | `data` never holds a secret. A key, a webhook secret or a Grafana token appears only as the fact that it was created, rotated or replaced. #### Details of admin events - **Role changed by an Admin.** An Admin sets or clears a person's role override, and the person's role changes as a result. `data` has the person's `name`, `from_role`, `to_role` and `manual`, which is false when the override was cleared. Pinning the role a person already has records nothing. - **Role changed by the sign-in policy.** The policy changes a role at a person's login or when the server starts, because they joined or left an admin group, or the admin emails or group roles changed. The person is the actor and `manual` is false. `data` has `source`, one of `admin_emails`, `first_user`, `group` or `default`. A person's first login is not a change. - **Signed out everywhere.** `data` has `name`, `sessions` and `grants`, how many sessions and connected agents ended. - **Invites.** `data` has the `email`, the invite has the `role`, and an update has `role` as `{from, to}`. The target id is the invite. Inviting an email again with the role it already has records nothing, and a first sign-in that uses the invite is not a change. - **Deactivated, reactivated, removed.** `data` has the person's `name`, and a deactivation also has `sessions` and `grants`. Deactivating someone already deactivated, or reactivating someone active, records nothing. - **Service accounts.** A create has `name`, `role` and `takes_runs`. An update has `name` and lists each changed field, `role` or `takes_runs`, as `{from, to}`. A delete has `name` and removes the account's keys. - **Service account keys.** `data` has the key's `key_id` and `key_name`, and a create adds `expires_at`. It never has the key. - **Webhooks.** `data` has `name` and `host`, and a create adds `event_types`. An update has `changes` with `{from, to}` for each of `name`, `host`, `enabled` and `event_types` that changed, plus `url_changed` when the address changed. The address path and the secret are never recorded. - **Outbound domains.** `data` has the `domain`, and the target id is a UUID derived from it. Connecting Grafana adds its host as an allowed domain, and that is recorded too. - **Connected agents.** `data` has the `client`, the person's `person_id` and `person_name`, and the grant's `mode`. A disconnect adds the `reason`: `person`, `admin`, `client` (the agent revoked its own token), `code_reuse` or `refresh_reuse` (the server revoked it after a token was replayed). The actor is the person, or the Admin who disconnected it. It never holds a token. - **Grafana connections.** `data` has `name` and `host`. An update has `changes` with `{from, to}` for each of `name` and `host` that changed, and `token_changed` when the token was replaced. The token is never recorded. - **Datasources.** `data` has `uid`, `type`, `name` and `host`, the address's host and port without its path. An update has `changes` with `{from, to}` for each of `name` and `host` that changed. It adds `address_changed`, `settings_changed` and `credentials_changed` when they did. An audience change has `from` and `to`, each `everyone` or `admins`, and a change of the audience and of anything else records both events. A credential is never recorded, and datasources defined in the datasources file are not recorded. ### What data holds `data` holds ids, numbers, enums, titles and the version summary. A saved version reads `{"version": 12, "parent_version": 11, "title": "Checkout", "summary": "Add a latency panel"}`. It never holds a prompt, a comment, a finding's text, a query or Spec JSON. To see more of the change, read the object through its own endpoint, which checks your access again. - **Dashboard versions.** `dashboard.created`, `dashboard.version_created` and `dashboard.restored` have `version`, `title` and `summary`. They also have `parent_version`, except on a create, and `restored_from` on a restore. - **Dashboard moves and deletes.** `dashboard.moved` has `title`, `from_folder_id` and `to_folder_id`, and `dashboard.deleted` has `title`. - **Annotations.** `annotation.created` and `annotation.deleted` have the 80-character `title`, `tags`, `time_from`, and `panel_id` and `time_to` when set. The `title` is empty when the text has no characters to show. `annotation.updated` has `tags`. - **Public links.** They have the `object` (`kind` and `id`), its `title`, the link's `prefix` and `expires_at`, never the token. - **Access requests.** They have the `object` (`kind` and `id`) and its `title`, and the note is never recorded. A grant adds `requested_by` (`kind`, `id` and `name`). - **Findings.** `finding.created` has `title`, and `agent_request_id` when the agent saved it. `finding.pinned` has `annotation_id`. `finding.moved` has `title`, `from_folder_id`, which is null when the finding was in no folder, and `to_folder_id`. - **Saved searches.** They have `title` and `kind`, which is `logs`, `traces` or `metrics`. `saved_search.updated` adds `changed`, the parts that changed out of `title`, `query`, `filters` and `range`. `saved_search.moved` adds `from_folder_id` and `to_folder_id`. - **Observations.** Every observation event has its `title`, and `observation.updated` adds `from_title` when the title changed. `observation.moved` adds `from_folder_id` and `to_folder_id`. `observation.published` and `observation.rca_withdrawn` add `revision`. - **Blocks.** A block event has `block_id` and `block_kind`, and `observation.block_added` adds the block's `state`, `live` or `requested`. Block text, summaries and snapshot data are never in an event. - **Proposals.** `proposal.opened` and `proposal.updated` have `title`, `revision` and `base_version`. `proposal.merged` has `title`, `revision` and `version`, which is null when the change was already in the dashboard. `proposal.discarded` has `title` and `revision`. - **Threads.** A thread event's `target` is the thread. Its `data` has `object`, the dashboard, annotation, observation or proposal the thread is on, as `{"kind": "dashboard", "id": "..."}`. `thread.opened` adds the `title` of the dashboard or observation, copied when the thread opens so the row still names it after the object is deleted. It adds `version` and `panel_id` when a dashboard thread opens. A reply, an edit, a delete and a mention add `message_id`, and `thread.deleted` names the thread's first message when the whole thread was deleted. `thread.resolved` adds `resolved_by_version` when a resolve names the version that settled it. A mention adds `mentioned` (`kind`, `id`, `name`). - **Runs.** Every run event has the run's `intent`: `ask`, `apply` or `suggest`. `run.queued` adds `continues_id` when the run continues another, and `run.started` and `run.released` add `attempt`. `run.failed` adds `failure_code`, and `run.succeeded` and `run.kept` add `result_version` when a version was saved. `run.succeeded`, `run.failed` and `run.canceled` add `cost_usd` when the cost is known. - **Health repairs.** The `run.succeeded` of a [health repair](/docs/use/dashboard-health/) that saved a version also has `dashboard_title` and `panels_repaired`. `panels_repaired` counts the panels the repair named that the saved version changed and no longer lists as unverified. Panels that were deleted, left unchanged or still fail are not counted. ### Who sees an event You see an event when any of these holds: - It belongs to a folder you can view, as [Folders](/docs/teams/folders/) decides. - It belongs to no folder and you made the change. - It belongs to no folder and you are an Admin. An [admin change](#admin-changes) is the exception to the second rule. Only an Admin sees it, even the one who made it once they are no longer an Admin. An event takes the folder of its dashboard. A global annotation takes General, which everyone with a role can view, so everyone who can read global annotations sees its events. An observation, a finding without a dashboard and a saved search belong to their folder. The discussion of a finding belongs to its observation. A run belongs to no folder when its dashboard does not exist yet, or when it answers a chat question that is not filed in an observation. An unfiled finding no longer exists: the upgrade filed each existing one in the folder of the observation it became. When a dashboard moves, its earlier events move with it, so only the viewers of the new folder see them. When a dashboard is deleted, its events stay in the folder it was in. Access is checked at every read, so a change to your role or to a folder's permissions applies to the next page or the next ping of a stream. ### Order and resuming Events are ordered by their position in the log, which is not always the order of their `seq`. An event appears once its own transaction and every older one have committed. A reader therefore never gets a later event before an earlier one that is still being written, and a slow transaction can hold back newer events for a moment. ### Retention The server keeps events for 180 days. The hourly `activity_prune` job deletes older events in batches of 10,000. Set `SLASHOBSERVE_ACTIVITY_RETENTION` to a Go duration from `24h` to `87600h` to change the period; see [Configuration](/docs/reference/configuration/#activity). A stream that resumes with the `Last-Event-ID` of a deleted event gets `reset`. ### Errors | Status | Code | When | | --- | --- | --- | | 400 | `invalid_request` | A filter, `limit`, `cursor` or `Last-Event-ID` is not valid. | | 403 | `forbidden_role` | Your role does not allow reading the log. | | 429 | `too_many_streams` | You hold 5 streams already. | | 503 | `too_many_streams` | The server holds 500 streams already. | | 503 | `shutting_down` | The server is stopping. | ### Not recorded Suggestions and the progress of an agent's build are not events. The dashboard stream behind the web app is a separate stream. It still carries comment and revision updates for the dashboard you have open. # Addresses and viewing tools in the web app > The short addresses of Home, the inbox, dashboards, folders, chats, builds, observations, proposals, agents, logs and traces, their title slugs and old forms, selecting a panel to act on it and arranging panels, the tools for viewing a dashboard at full size, in Inspect and on a phone, with the dashboards list and a dashboard's More menu, a pointer to TV mode, the sidebar, and the light and dark theme. Source: https://slashobserve.com/docs/use/web/ · Markdown: https://slashobserve.com/docs/use/web/index.md This page covers how to find your way around the web app and how to view a dashboard. Every page that belongs to one dashboard, folder or agent request has a short address you can paste into an incident, a runbook or a chat. The sections below follow what you want to do, and the Reference at the end lists every address and key. ## Share the address of a page 1. Open the page and copy the address from the browser. 2. Paste it where your team will read it. Anyone who can see the dashboard, folder or request opens the same page. A dashboard is `/d/<dashboard id>/<slug>`, a folder is `/f/<folder id>`, an observation is `/o/<observation id>` and an agent request is `/c/<request id>`. [Addresses](#addresses) lists them all. [Logs and traces](/docs/use/logs-and-traces/) describes the logs page, the trace search and the trace view, and [Metrics](/docs/use/metrics/) describes the metrics page. The lists keep their names: `/dashboards` lists dashboards, `/` opens Home, and `/` with a query string other than `tab` opens the chat at `/ask` with its query string kept. An address that nothing answers opens **Page not found** inside the app, with the sidebar and the top bar, the address it could not find and links to Home and the dashboards. A signed-out visitor signs in first and then sees it. A folder's page names the folder in the breadcrumb and in the tab title, such as "Dashboards / Checkout" and "Checkout - SlashObserve". `/logs`, `/traces` and `/explore/metrics` list their sources and saved searches. An address there that carries a search opens the source you used last on this browser, even though the source lists keep the order they had when the app loaded. An address with `?ds=<datasource uid>` redirects to the source's own page with the rest of its query string. ### Slugs The slug is the dashboard title in lowercase, with every run of other characters turned into one dash, trimmed, and cut to 60 characters. Only the letters `a` to `z` and the digits `0` to `9` are kept, so `Checkout health (prod)` becomes `checkout-health-prod` and a title with no such characters has no slug. The slug is only for people: `/d/<dashboard id>` opens the same dashboard, and so does any address with an old slug. When a dashboard opens, the address bar switches to the slug of its current title without adding a history entry, so a copied address always carries the title. A title whose slug would be `versions` gets no slug, because `/d/<dashboard id>/versions` is the history page. The server writes the same form wherever it returns an address: the `url` fields of the API, the MCP tool results and the `observe` CLI. The address of a request read with `GET /api/v1/observe/{id}` has no slug, and the page adds it when it opens. ### Old addresses The old forms keep working and redirect with `301 Moved Permanently`, keeping the query string, so bookmarks, curl and links in old runbooks reach the new address. [Old address forms](#old-address-forms) lists them. The server redirects only when the id is a UUID, and the web app does the same for links it follows itself. `/dashboards/by-title?title=<title>` is not an id address and keeps working as described in [ObserveSpec](/docs/concepts/observespec/). A Grafana dashboard's own address, `/d/<grafana uid>` or `/d/<grafana uid>/<slug>`, redirects with `302 Found` to `/d/<id>` of the dashboard imported from that uid, keeping the slug and the query string. It resolves only for a signed-in caller who can see the dashboard. A signed-out visitor signs in first and comes back to it. A uid nobody imported, or whose dashboard is in a folder you cannot see, opens the app's not-found page. ### When your session ends When an Admin uses Sign out everywhere, or the server drops your session, the next page or save sends you to the sign-in page, which says "Your session was ended, so you were signed out." After you sign in you return to the page you were on. Signing out yourself shows no such note. ### Public links A dashboard's Share pane can create a public link, whose `/p/<token>` address opens the dashboard read-only for anyone who has it, without signing in. The page reads only the time range, the refresh interval and, on a free link, the variables the viewer may choose from its address. [Public links](/docs/use/public-links/) describes who can create one, what the view shows, and how to revoke one. ## Find, organise and pin dashboards ### The dashboards list `/dashboards` lists the dashboards you can see, folder by folder. - **Create dashboard** is a menu with **Ask the agent**, which opens the chat at `/ask` where you describe the dashboard you want, and **Blank dashboard**; see [Start from a blank dashboard](/docs/use/edit-panel/#start-from-a-blank-dashboard). - **New folder**, offered to an Editor or an Admin, asks for a name and creates a folder you own. It appears in the list as soon as it is created. - The box above the list filters by title, and the folder and tag menus narrow it further. - Each row has a **More** menu, offered where you may edit the dashboard or duplicate it. [Details of a row's More menu](#details-of-a-rows-more-menu) lists its items. ### Move several dashboards at once Where you may edit dashboards and there is a shared folder you can move into, every row you may move has a checkbox, and the checkbox in the header selects all of them on the page. 1. Tick the rows, or tick the header checkbox. A bar above the list shows how many are selected, a **Move to folder** menu of the shared folders you can edit, **Move** and **Clear selection**. 2. Pick a folder in **Move to folder**. 3. Choose **Move**. **Move** moves each selected dashboard with one request, as a row's **Move to folder** does, and skips the ones already in that folder. It says how many moved and which failed and why, and the ones that failed stay selected. The selection is kept for the page and filters you are on and cleared when you change either. An agent does the same with one `move_dashboard` call for each dashboard. ### Sort the list The **Sort** menu on the list switches between **By folder**, **Last updated**, **Name** and **Most viewed**. Every order except by folder drops the folder headers and shows the folder as a column, because the order crosses folders. The choice is kept in the address as `sort=updated`, `sort=name` or `sort=views`, and the list asks the server for the same `order`. ### How often a dashboard is opened The dashboards list has a **Views** column and the dashboard's header says how many views it had, such as **12 views in 30 days**. A view is one person opening the dashboard on one UTC day, so three people who each open it twice today make three views. The count covers the last 30 UTC days including today, and the daily records are kept for 90 days. Opening a dashboard writes once for the page, never for each panel, and a service-account key records nothing. `GET /api/v1/dashboards/<id>/views` returns the count as `view_count` with `window_days`, and each item of `GET /api/v1/dashboards` carries the same `view_count`. `order=views` on the list sorts by it, most viewed first and then most recently updated, and it pages with `cursor` and `offset` like the other orders. A cursor only works with the order it came from. `order=name` sorts every visible dashboard by lower-case title and then by id, across folders, and pages the same way. `list_dashboards` takes `order` (`updated`, `views` or `name`) and returns `view_count`, and `get_dashboard` returns `view_count` and `window_days`. `observe dashboards list --order views` sorts the list and `observe dashboards show` prints the views. ### Find a dashboard from the Ask page The chat page at `/ask` lists your dashboards below the chat composer and its example prompts, or above the model note when no model is connected. It shows Recently viewed: the last five dashboards you opened in this browser. When you have none, it lists the first eight dashboards you can see, folder by folder, so a fresh demo shows its provisioned dashboard. The search box below them finds dashboards by title or description, and `tag:` words narrow it to tags: `tag:prod latency` finds dashboards tagged `prod` that mention `latency`. Arrow keys move through the results and Enter opens one. Recently viewed dashboards stay in this browser's local storage, at most 20, and never reach the server. ### Pin a dashboard to the sidebar 1. Open the dashboard and choose the pin button in its header, labelled **Pin to sidebar**. 2. The dashboard appears in the sidebar under **Dashboards**, indented, newest pin first. 3. To unpin it, press the button again, which now reads **Unpin from sidebar**. The pinned dashboard you have open is highlighted, while **Dashboards** itself turns semibold instead of highlighted. The sidebar lists ten pins and then **Show all pins**, which lists every pin in place until you choose **Show fewer pins**. The phone menu lists them too. On the icon rail, **Dashboards** opens a menu with a **Dashboards** link and your pins. Pins belong to you and are stored on the server, so they follow you to every browser. `GET /api/v1/stars` lists them, because the API keeps its original `stars` name. Only people pin: a service-account key gets `403 user_session_required`. A pinned dashboard in a folder you can no longer see leaves the sidebar, and deleting a dashboard removes its pins. ### Home dashboard Choose **Open on sign-in** in a dashboard's **More** menu and that dashboard opens in place of Home when you sign in or open SlashObserve in a new tab. - Home opens as usual for a link that names a page, such as a shared dashboard link or `/?tab=observe`, and when you click **Home** in the sidebar. - Choosing another dashboard replaces the first. - The same menu item, now **Stop opening on sign-in**, clears the choice. So does **Clear** under **Settings**, **Home dashboard**. - If the dashboard was deleted or you can no longer view it, Home opens and says so with a **Clear it** button. The choice comes back to work if you can view the dashboard again. The choice belongs to you and follows you to every browser. `GET`, `PUT` and `DELETE /api/v1/me/home-dashboard` read, set and clear it. `status` is `none`, `ok`, `gone` or `unreadable`, and setting a dashboard you cannot view answers `404 not_found`. Over MCP, `get_home_dashboard`, `set_home_dashboard` and `clear_home_dashboard` do the same. Only people have one, so a service-account key gets `403 user_session_required`, and the CLI has no command. ## Use a dashboard's More menu The **More** button at the right of a dashboard's header opens the actions below. [Details of the More menu](#details-of-the-more-menu) lists each item. While you have unsaved layout moves, the items that would change the dashboard say "finish the layout first". ### Print a dashboard or download it as an image **Print or save as PDF** in a dashboard's **More** menu lays the dashboard out for paper and opens the browser's print dialog, where **Save as PDF** is a destination. The page shows only the dashboard: no sidebar, toolbar or side panes. It has a header with the title, folder, version, time range, variables and the time of printing, and then the panels in one column in reading order. - Every panel loads before the dialog opens, including the ones far down the page. - A panel is moved whole to the next page instead of being cut when it does not fit. - Rows you collapsed are expanded on the sheet so that no panel is left out. - The variables and time range you chose are the ones printed. - The sheet prints in the light theme whatever theme you use, so a dark theme does not print as a page of dark boxes. The image keeps your current theme. **Back to dashboard** at the top of the page, or closing the print dialog, returns to the dashboard. **Download as image** in the same menu opens the same sheet, draws it as one PNG named after the dashboard and its version, such as `checkout-service-health-v7.png`, and returns to the dashboard. The image is drawn in your browser from the rendered panels, with no server involved. It is drawn at twice the size unless the dashboard is so tall that the browser's canvas limit needs a smaller scale. If the browser cannot draw it, a message says so and suggests **Print or save as PDF**. Both items are off while you are rearranging the layout, and a single panel is still saved from its own menu. Neither needs a server feature, so there is no API operation, CLI command or MCP tool for them. An agent that needs the data reads the dashboard and its panel queries instead. ### Show a dashboard on a wall screen TV mode shows a dashboard on a wall screen with nothing but its panels, and can cycle through its rows or its folder's dashboards. [Show it on a wall](/docs/use/public-links/#show-it-on-a-wall) describes how to start it, the address keys that open a TV straight into it, and how it fits with public links. ### Choose how hovering shows on other charts **Chart hover** in the **More** menu, also Cmd/Ctrl+O, chooses how hovering one time chart shows on the others: **This chart only**, **Shared crosshair** or **Shared tooltip**. A choice that differs from the dashboard's saved `cursorSync` goes into the address as `cursor` and is not saved to the dashboard. ## Act on a panel ### Select a panel A dashboard is a canvas: select a panel, then act on it. 1. Click the panel's title bar, or Tab to its title and press Enter. The panel gets a ring and a small toolbar above its top right corner. 2. Choose a button on the toolbar. 3. Press `Esc` to clear the selection. With the title focused, `↑`, `↓`, `Home` and `End` move the selection through the panels in reading order. The toolbar shows only what you may do: - **Comment**, when you can comment, opens the composer on the whole panel, as `c`, the panel menu's **Comment** and the **Comment** button in the panel's header do. In the full-size view and TV mode it starts the comment in the activity pane instead. - **Ask @observe**, when you can comment on the dashboard and a model is connected, opens the [ask box](/docs/use/ask-and-comment/#ask-mode) on the whole panel, on a data panel, as `a`, the panel menu's **Ask** and the **Ask** button in the panel's header do. In the full-size view and TV mode it opens the dashboard's Chat tab instead, with the cursor in its box and a chip naming the panel, so the question is about that panel until you remove the chip. - **Edit query** opens the panel editor on its query when you can edit the dashboard, and reads **Suggest an edit** when you can only comment. - **Add to observation** is described in [Add to an observation](#add-to-an-observation). - **More actions** opens the panel's menu, which every panel also has in its own title bar without selecting it. The toolbar moves below the panel's title bar when the panel is less than 48 pixels from the top of the dashboard area. The arrow keys move between the toolbar's buttons, and `Home` and `End` go to the first and last. While you have unsaved layout changes, Comment, Ask, Edit query and Add to observation are greyed. At the bottom of the screen a tool bar offers **Select**, **Comment** and **Ask**. It is hidden on a phone, in TV mode and when you cannot comment, as a Viewer cannot. **Comment** and **Ask** turn on the pointing modes, where a click or a drag names a spot on a panel and opens a box there to leave a comment or to ask the agent. [Ask and comment on a dashboard](/docs/use/ask-and-comment/) describes the modes, what a click can name, the pins and private asks. ### Arrange panels There is no edit mode. You can move a panel when you can edit the dashboard, are on its latest version and the dashboard area is at least 768 pixels wide. 1. Press a panel's title bar and drag. The pointer turns into a hand over every title bar, and a faint grip with the tip "Drag to move" appears at its left end. The panel is selected and moves in one go. 2. To resize it, drag a handle that shows on its right edge, bottom edge or bottom right corner while the pointer is over the selected panel's grip. An edge changes the width or the height, and the corner changes both. 3. Let go. A dashed outline shows where the panel will land, the other panels slide out of its way, and it settles into place. 4. When the bar at the bottom of the screen says "Your layout changes are not saved", choose **Save version N** and give a summary. It saves the layout as the next version. **Discard** asks "Discard unsaved layout changes?" and then drops the moves. With the grip focused, the arrow keys move the panel and `Shift` with an arrow resizes it. The panel's buttons, such as its menu and the information icon, never start a move. In Comment mode the hint, the grip and the handles are hidden and a click on a panel comments on that spot instead. While a panel is selected for arranging, the grid shows the saved layout, so a repeated panel shows once and a row cannot be collapsed until you clear the selection. When someone else saves a version, your moves stay on top of it, and a panel you did not touch takes the other version's size and place. Leaving the dashboard, or opening an older version, with unsaved moves asks first. While you have unsaved moves, the actions that would change the dashboard in another way, such as Edit details, Duplicate, Delete, Inspect and View, say "finish the layout first". When the Activity or chat pane is open beside the grid, selecting a panel to arrange closes it first, so the saved layout gets the full width. The press that selects still drags the panel. The pane comes back as you left it once no panel is selected and no moves are unsaved, for example after you press `Esc` or click an empty part of the grid. **Activity** in the controls brings it back sooner, and it then stays open while you select other panels. A Viewer who cannot edit, or a press in Comment or Ask mode, leaves the pane open. While you have unsaved moves the pane stays closed. ### Look at one panel at full size **View** in a panel's menu, or `v` over a panel, shows that panel alone in the whole dashboard area. The address carries `viewPanel=<panel id>`, so the view can be shared. **Back to dashboard**, `Esc` or `v` again returns to the grid. **View as table** in the menu of a chart panel replaces the chart with a table of its data in that panel until you choose **View as chart**. Nothing is saved. ### Inspect a panel **Inspect** in a panel's menu, or `i` over a panel, opens a pane in the place of the activity card. The address carries `inspect=<panel id>` and, for the second and third tab, `inspectTab=query` or `inspectTab=stats`. `Esc` or the close button closes it. `viewPanel` and `inspect` are dropped while you have unsaved layout changes or the panel editor is open. The pane has three tabs: - **Data** shows the panel's results after its transforms as a table of up to 500 rows, with **Download CSV** and **Save as PNG**. - **Query** shows the time range and step the server ran, and for each query its datasource, step, saved text, the text as run and the variables it uses with their selected values. The text as run is the query after variables and macros are expanded. It shows when it differs from the saved text and never on a public link. - **Stats** shows how long the request took, whether the server answered from its cache, when it ran, and the number of frames, series, points and rows with the first and last time. **Run again** runs the panel's queries again. **Download CSV** and **Save as PNG** are always in each panel's menu and are greyed until its data has loaded. The CSV has every row, quoted as RFC 4180 describes, with times in RFC 3339 UTC. When every series of the panel has its own time column with no repeated times, the CSV joins them into one row per time, with one column per series. Otherwise each row starts with a `series` column naming the series it came from. The PNG is the panel's body at twice the screen's pixel density, on the page's background colour, named after the panel title. ### See which series a panel left out A time series or trend panel draws at most 50 series per query. The server keeps the 50 whose highest value is largest, in their original order, and the panel header says "Top 50 of 412 series" with the full sentence on hover. Narrow the query or add a filter to see the series that were left out. In the data response `meta.series_shown` and `meta.series_total` carry the two numbers, `meta.partial` is true and `meta.note` says which series were kept. They are absent when nothing was dropped. ### Open a panel in Logs or Traces **Open in Logs** in a logs panel's menu, and **Open in Traces** in a traces panel's menu, open the explorer with the panel's query, its datasource and the dashboard's time range. The item is greyed, with the reason after it, when the panel has several queries, has no datasource, uses variables in its query, or is a ClickHouse SQL trace search. ### Duplicate or remove a panel An Editor's panel menu has **Duplicate** and **Remove** on the latest version, while no layout change is unsaved. - **Duplicate** saves a new version with a copy titled "<title> copy" right under the panel, moving the panels below it down, and runs only the copy's queries. A copy of a panel whose query returns no data, such as one you saved with **Save anyway**, is kept as it is and marked "Unverified" like the original. - **Remove** asks to confirm with the panel's title, then saves a new version without the panel and runs no query. Restoring the version before it from History brings a removed panel back. Agents and scripts make the same changes with the `update_panels` MCP tool or `observe dashboards panels`, both on `POST /api/v1/dashboards/{id}/panels`. ### Add to an observation **Add to observation** in a data panel's menu copies the panel into an [observation](/docs/use/observations/), the open one you choose or a new one. A panel that uses dashboard variables is copied with them and the values you have selected, see [Add to an observation](/docs/use/observations/#add-to-an-observation-from-a-panel-or-from-logs). The item is greyed in the toolbar and missing from the menu while you have unsaved layout changes. [Observations](/docs/use/observations/#add-to-an-observation-from-a-panel-or-from-logs) describes the side panel and the range the block takes. ## Check a dashboard's health ### Health on a dashboard When the last health check found a problem in the dashboard, its header has a button that counts the problems, such as **2 problems**. A dashboard that was checked and has no problem shows a quiet **Queries OK** button instead, whose popover says "No problems found" and when and on which version it was checked. The button reports whether the queries ran, not whether the numbers look right, so read a panel's threshold state for that. 1. Choose the problem button. A popover lists every problem, when and on which version the dashboard was checked, and **Repair**. 2. Read the problems. The popover says "before the latest version" when the dashboard has been saved since the check. 3. As an Editor, choose **Repair**. A panel that failed the check, or returned no data, shows a badge in its title bar with the kind of the problem. Choose the badge to read the message of every problem in the panel. The badges show only while you look at the version that was checked. Another version, such as an older one or the latest one after a save, shows the header button but no badges. A panel that is also **Unverified** shows only its Unverified badge. **Not opened in 90 days** is never listed here, because you just opened the dashboard. ### Repair failing panels An Editor sees **Repair** in the popover of the header button and in the popover of a badge. It asks the agent to fix every failing panel and variable on the dashboard in one revision, not only the panel you chose. The header says **Repair all** when more than one problem can be repaired. Both places show the same states: **Repair queued**, **Repairing**, **Repaired** with **See changes**, and **Repair failed** with the reason and **Repair** again. While you have unsaved layout changes, **Repair** is greyed and says "finish the layout first". Without a configured agent it is greyed too. The problems come from the last health check; see [Dashboard health](/docs/use/dashboard-health/). ## Search and move around ### Search Press `⌘K` or `Ctrl+K`, or choose **Search or jump to** in the sidebar (in the top bar on a phone), and type at least two characters. The command palette lists the pages, your dashboards and the log and trace sources that match. After a short pause it adds what the server finds in the workspace: dashboards, observations, comments, annotations and saved searches you can read, under their own headings with the matched words marked. - Typing a source's name or type, such as Loki, lists the source under Sources and jumps to its page. - Press Enter, or click, to open a result here, and hold `⌘` or `Ctrl` to open it in a new tab. - **Keyboard shortcuts** in the palette opens the list of keys on any page. - A comment opens the page of what it is on, and an annotation that is on no dashboard is left out of the palette, because it has no page. - Snippets show plain text, with Markdown links and emphasis flattened. - With nothing typed, the palette lists the observations you opened last under **Recent observations**. **See all results** at the end of a search, or the address `/search?q=checkout`, opens the Search page. It shows every match in pages of 20 with **Show more**, one button per kind to narrow them, and global annotations as rows with no link. Search matches whole words, their English stems and the start of the last word, so a misspelling finds nothing, and the empty result says so. **Help and docs** in the palette, and in the account menu, opens these docs in a new tab. The empty Dashboards list and the Search page link to their docs page the same way. [Search](/docs/use/search/) describes what each kind matches and how to write a query. ### Use the sidebar The sidebar starts with **Home**, then Inbox, Observations, Dashboards, Logs, Traces, Metrics and Agents. A Workspace group follows with Datasources, API keys, People and Audit for Admins and Settings for everyone. The Workspace group stays at the bottom of the sidebar, above your account, while the items above it scroll, so Datasources, People and Settings never sit below the fold. Open observations are listed indented under **Observations** the same way. **Audit** lists its three pages indented under it, **Log**, **Dashboards** and **Observations**. On the audit datasource's page under Logs, which **Open in Logs** on the Audit log reaches, **Audit** is the parent that turns semibold and **Log** the highlighted page, not **Logs**. On the page of a listed observation, pinned dashboard, or log, trace or metrics source only that row is highlighted, and its parent item is not highlighted but shown in semibold. On any other page of the section, such as the list itself, the parent is highlighted as usual. To fold the sidebar to a rail of icons, choose **Collapse sidebar**, beside your account at the bottom. **Expand sidebar**, above your avatar, opens it again, and this browser remembers the choice. Under 1200 pixels wide, and on dashboard pages, the sidebar is always a rail, and **Expand sidebar** opens the full sidebar over the page. `⌘\` or `Ctrl+\` does the same as these buttons on every page that shows the sidebar, including while you type in a field, and does nothing on a phone. Hovering or focusing an icon on the rail shows its name. On the rail, Inbox shows its unread count and Observations shows a teal dot while one of your open observations has something unread. Dashboards and Audit open a menu that Escape or a click outside closes. With two or more sources, Logs, Traces and Metrics open a menu with a link to their list and the sources. A pinned dashboard, in the sidebar and in the Dashboards menu, shows its problem count from the last health check, such as "1 problem", and nothing while it has none. ### Use the keyboard Dashboards answer `v`, `e`, `i`, `a`, `c`, `Esc`, `t z`, `t ←`, `t →`, `d r`, `d k`, `f` and `?`. [Keyboard shortcuts](/docs/use/keyboard-shortcuts/) lists them all. ## Use the app on a phone or a narrow screen Under 900 pixels wide, every page has a bar at the top with **Menu**, which opens the sidebar, the page's name, or the wordmark on Home, **Search or jump to** and **Inbox** with its unread count. On a dashboard, a build and a dashboard's version history the bar shows the dashboard's name. On a dashboard the dashboard's name, its version button and **Controls** sit under it, without the folder crumbs, which the sidebar and **Dashboards** page keep. A page's own actions, such as **Share** on an observation or **History** on a chat, sit in a row under the bar. Below 768 pixels wide a dashboard shows its panels in one column. Each panel type keeps a minimum height there, so a chart or a table stays readable even when the dashboard made it short. Up to 760 pixels wide, the time range, refresh, annotation filter and the dashboard's actions move behind one **Controls** button, which opens them in a sheet at the bottom of the screen. Choosing **Activity**, **Share**, **Add panel** or **Edit Spec JSON** in the sheet closes the sheet first, and closing the pane puts focus back on **Controls**. The activity pane starts closed at 900 pixels wide and below, whatever this browser saved on a wider screen, and **Activity** in the controls opens it. The activity card and the Inspect pane show below the panels, and opening Inspect scrolls to it. The panel editor opens as a sheet at the bottom of the screen, and the panel menu does not show keyboard shortcut letters. ### Wide and narrow windows On the Dashboards page, the Datasources and Open comments columns fold away when the list is under 1000 pixels wide, between the phone layout and a full-width window, so the title, health and actions keep their room. The Dashboards list fills the page: the title takes the spare width, keeps at least 240 pixels, and a narrower page scrolls the table sideways. Home and the Ask page stop growing at 720 pixels, and at 960 pixels on a window 1800 pixels wide or more. On a dashboard, the title and the controls share one row while they fit, and the controls drop to a second row under the title when they do not, for example with the Activity pane open on a 1440 pixel screen. Browser zoom scales the whole app if the text is small on a large display. ## Manage the agents you connected Settings groups its sections under You, Workspace and Integrations, and Admins also see Agent access and the Integrations group. A section's address is `/settings#<section>`, such as `/settings#grafana`; `#grafana-connection` opens the same section. An address whose section does not exist, or one that only Admins can open, shows Server with a note that says so. The audit log is not a Settings section any more: `/settings#audit-log` redirects to the Audit page at `/audit`. On a phone the section list is a **Settings section** menu at the top of the page. 1. Open Settings and choose **Connected agents** in its section list. **Your connected agents** lists the MCP clients you approved, each with the name it registered under, the host your browser returned to when you approved it, when it connected and when it last made a request. 2. To end a connection, choose **Disconnect** and confirm. The connection ends at once, and the client has to be connected again from the agent to work. 3. To add another, use the **Connect another** card, which shows the command that adds this server to Claude Code. It reads **Connect an agent** until you have connected one. A note under the list explains the two modes: Direct saves change dashboards, and Propose saves become proposals an editor merges. The API behind it also returns each connection's presence (working, listening or offline) and when it last asked for work; this section does not show them yet. The **Agents** page in the sidebar lists the same connections next to the Observe Agent and the service accounts, and each can switch between direct and propose mode there. An Admin finds **Everyone's connected agents** under **Agent access**, with the person each belongs to, and can disconnect any of them there. **Agent access** also links to API keys. [Connect your own agent](/docs/use/mcp/#connect-your-own-agent) describes how a client is approved. ## Change the theme The app follows your system's light or dark setting until you choose one. 1. Open Settings and choose **Appearance** in its section list. 2. Pick **Light**, **Dark** or **Match the system** under **Theme**. The choice applies at once. The account menu offers the same three choices under **Theme**, and the toolbar's **Switch theme** button and the command palette's **Switch theme** command flip between light and dark. The choice stays in this browser's local storage and never reaches the server, so it does not follow you to another browser. ## Change the time zone **Appearance** in Settings also has **Time zone**. It is the zone a dashboard draws its times in when the dashboard does not set one. It is the choice the time zone box next to the time range picker starts on and returns to. The zone a dashboard sets itself, and a zone you pick in that box (which goes into the address as `tz`), win over it. It is also the zone the **From** and **To** boxes of every time range picker read and show a typed time such as `2026-10-17 09:00` in. On a dashboard they follow the dashboard's own zone and use this one only when it sets none. It changes only how times are drawn and typed: a relative range such as `now/d` still resolves on the server in the dashboard's own zone, and the Logs and Traces pages keep showing times in your browser's zone. The choice stays in this browser's local storage and never reaches the server, like the theme, so it does not follow you to another browser. ## Pick a time range The time range button opens the quick ranges and the **From** and **To** boxes. 1. Choose **Pick dates** to show a calendar. 2. Click a day for that whole day, then click a second day for the days between them. The calendar fills **From** with the start of the first day and **To** with the end of the last, in the zone the boxes read. 3. Choose **Apply**. A time or range the picker refuses is explained under the box it comes from, for example when the range is longer than 400 days. On a dashboard, someone who may edit it also sees **Save as default**, which applies the range and saves it as the dashboard's default range in a new version. The button is missing on an older version and while a layout or panel is being edited, and it is disabled for a range that already is the default. ## Reference ### Addresses | Address | Opens | | --- | --- | | `/` | [Home](/docs/use/home/): ask Observe Agent, start an observation or import a dashboard. | | `/inbox` | Your inbox: what happened on your observations, dashboards and requests. | | `/ask` | The chat: ask the Observe Agent for a dashboard. | | `/chats` | Your chats with the Observe Agent. | | `/observations` | The list of [observations](/docs/use/observations/). | | `/o/<observation id>` | One observation, its blocks and its discussion. | | `/o/<observation id>/rca/<revision>` | A stored RCA revision inside the app. | | `/proposals/<proposal id>` | One [proposal](/docs/concepts/proposals/) with its changes, Merge and Discard. | | `/agents` | The Observe Agent, your connected agents and the service accounts that take runs. | | `/agents/<ref>` | One of them. | | `/dashboards` | The dashboards list. | | `/d/<dashboard id>/<slug>` | A dashboard. | | `/d/<dashboard id>/versions` | Its version history, headed "Versions of <title>". | | `/f/<folder id>` | A folder. | | `/c/<request id>` | The conversation of an agent request. | | `/b/<request id>` | The live view of an agent request's build. | | `/logs` | The list of log sources and saved logs searches. | | `/logs/<datasource uid>` | The logs page for one source. | | `/traces` | The list of trace sources and saved trace searches. | | `/traces/<datasource uid>` | The trace search on one source. | | `/explore/metrics/<datasource uid>` | The metrics page on one Prometheus source. | | `/t/<trace id>?ds=<datasource uid>` | One trace in a Tempo, Jaeger or ClickHouse datasource. | | `/search?q=<words>` | The Search page. | | `/settings` | Settings; `#<section>` opens a section. | | `/audit` | The Audit pages, for Admins. | | `/datasources`, `/keys`, `/people` | Datasources, API keys and People, for Admins. | | `/p/<token>` | A dashboard opened through a public link, with no sign-in. | | `/rca/<token>` | A published RCA revision opened through its public link, with no sign-in; see [Share a revision](/docs/use/observations/#share-a-revision). | | `/connect/<request id>` | Approve or deny an MCP client that asked to act as you. | #### Details of query strings - `/`: `tab=observe` or `tab=import` opens that tab. - `/inbox`: `view` and `item` reopen a view and an open item. - `/o/<observation id>`: `rca=1` opens the Publish as RCA panel. - `/d/<dashboard id>/<slug>`: `thread=<thread id>` opens the activity pane on that comment thread. - `/f/<folder id>`: the folder's page shows its dashboards with the same search and filters as the Dashboards list, its observations and its saved searches, and **Folder settings** for its name, access and deletion where you can manage it. - `/chats`: `q` and `state` reopen a search, and `scope=all` opens an Admin's Everyone view. - `/logs/<datasource uid>`: `q`, `ask`, `from` and `to` reopen a search or a question. - `/traces/<datasource uid>`: `service`, `span`, `min`, `max`, `errors`, `q`, `ask`, `from` and `to` reopen a search or a question. - `/explore/metrics/<datasource uid>`: `q`, `from`, `to`, `mode` and `ask` reopen a query, and `saved` and `observation` name the saved search or observation it belongs to. ### Old address forms | Old address | Redirects to | | --- | --- | | `/dashboards/<id>` and `/dashboards/<id>/versions` | `/d/<id>` and `/d/<id>/versions` | | `/folders/<id>` | `/f/<id>` | | `/observe/<id>` | `/c/<id>` | | `/builds/<id>` | `/b/<id>` | The server answers these with `301 Moved Permanently`. The web app also sends `/health` to `/dashboards?kind=any` and `/import/repair` to `/dashboards?kind=imported`, keeping `kind` and `folder`; these are not server redirects. ### Details of a row's More menu On the dashboards list, a row's **More** menu has: - **Duplicate...** asks for a title and a folder, from a list of the folders you may move it to with the current one marked, and **New folder** for an Editor or an Admin. - **Delete dashboard...** asks for confirmation and needs Edit on the folder. ### Details of the More menu The **More** menu of a dashboard has: - **Edit details**, when you can edit the dashboard, changes the title, description and tags and saves them as a new version. It has a **Folder** menu of the shared folders you can edit. Choosing another one moves the dashboard, after the new version when you changed both, and a move alone saves no version. - **Add panel**, when a datasource is configured, adds a panel; see [Edit a panel](/docs/use/edit-panel/). - **Edit Spec JSON** edits the whole Spec and saves it as a version; see [Versions](/docs/concepts/versions/). - **Open on sign-in** makes the dashboard open in place of Home; see [Home dashboard](#home-dashboard). It reads **Stop opening on sign-in** when it already does. - **Export spec JSON** downloads the dashboard's Spec as `<title>-v<version>.json`. - **Dashboards as code** opens [Dashboards as code](/docs/use/dashboards-as-code/) in a new tab. - **Print or save as PDF** and **Download as image** lay the dashboard out for paper or draw it as one PNG; see [Print a dashboard or download it as an image](#print-a-dashboard-or-download-it-as-an-image). - **Duplicate...** copies the dashboard under a title and into a folder you choose. The folder starts as the dashboard's own folder when you may create there, else your My Dashboards folder, else General. - **TV mode**, also `d` then `k`, starts [TV mode](/docs/use/public-links/#show-it-on-a-wall). **TV mode for this folder** cycles through the folder's dashboards and is left out in a personal folder. - **Chart hover**, also Cmd/Ctrl+O, chooses how hovering one time chart shows on the others. - **Delete dashboard...**, when you can edit the dashboard, asks for confirmation. # Agents > See and direct everyone who can do work for you, the Observe Agent, your connected agents and the service accounts that take runs, choose whether a connected agent saves directly or proposes, and hand it a run by mentioning it. Source: https://slashobserve.com/docs/use/agents/ · Markdown: https://slashobserve.com/docs/use/agents/index.md Three kinds of agent can do work in a workspace. - The Observe Agent is the built-in one and needs a model on the server. - A connected agent is an MCP client that you approved to act as you, such as Claude Code. - A service account that takes runs is a bot with its own key. The **Agents** page puts the three in one place. Use it to see who is working, what it cost and what failed, to connect a new agent, and to choose how a connected agent saves. ## See your agents 1. Choose **Agents** in the sidebar, which opens `/agents`. 2. Read the three parts of the page. **Observe Agent** shows whether it is On or Off, and the provider and model it uses or "No model configured". It also shows four counts for the last seven days: Runs, Failed, Cost and Median wait. Under them, "Last 7 days, everyone" shows for an Admin and "Last 7 days, yours" for anyone else. **Connected agents** lists your own live connections. Each row has the agent name, its **Mode**, its status and its writes in the last 7 days. The status is "Working", "Listening", "Offline, last seen" with a time, or "Never seen". With no connection, the page says "No connected agents yet." **Manage in Settings** opens the Connected agents section, where you disconnect one. **Service accounts that take runs** lists each account with its status. An Admin also sees its runs and failures for the last 7 days, and an **API keys** link that opens the page that creates keys (`/keys`). The page and `GET /api/v1/agents` need the Viewer role or higher and a signed-in person. A service-account key gets 403 `user_session_required`. ## Connect an agent 1. On the **Agents** page, choose **Connect an agent**. A side panel opens with this command and the text "Waiting for Claude Code to connect": ```sh claude mcp add --transport http slashobserve <mcp url> ``` 2. Run the command in Claude Code. 3. Approve the connection in the browser window that opens. 4. The panel says "Connected:" with the client's name. Choose **Done**. To connect another client, see [Connect your own agent](/docs/use/mcp/#connect-your-own-agent). ## Open one agent's page Choose an agent's name to open `/agents/<ref>`, which shows the same counts for that one agent. The `ref` is `observe` for the Observe Agent, `grant-<id>` for a connected agent and `sa-<id>` for a service account. The page ends with a **Recent work** list of the runs behind its seven-day counts, newest first. Each row shows: - the run's title; - its state: Queued, Running, Stopping, Done, Failed or Canceled; - when it was asked, and what it cost when a cost was recorded; - the dashboard or observation it touched. **Load more** shows the next page, and an agent with no runs says "No runs yet." [Who sees which runs](#who-sees-which-runs) has the rules. ## Direct and propose mode A connected agent has a mode. Use the **Mode** menu on its row or on its page to change it. - **Direct**, the default, lets the agent's saves change dashboards as the person who connected it may. - **Propose** makes every dashboard save of the agent a [proposal](/docs/concepts/proposals/) that someone who can edit merges, even when the person is an Editor. The mode applies from the agent's next request. A run assigned to a connected agent keeps that connection's mode, so its saves become a proposal while the mode is propose. A service account has no mode. Only a signed-in person can change the mode, and no agent or key can change its own. Over HTTP, send `PATCH /api/v1/me/grants/{id}` with `{"mode": "propose"}` or `{"mode": "direct"}`. ## Give an agent a run A comment that mentions an agent hands it work. 1. Open a comment composer in the web app and type `@`. The picker lists the Observe Agent first, then your connected agents and the service accounts that take runs, then people. 2. Keep typing to filter the list. The list closes at the first space or when nobody matches, so `@observe add a stat panel` typed straight through is a comment that asks the Observe Agent. 3. Send the comment from a composer that asks the agent. [Ask the agent from a comment](/docs/use/review/#ask-the-agent-from-a-comment) describes the composer. A message that mentions exactly one agent starts a run for it. That agent becomes the thread's agent, which later plain replies in the web app ask too. The run answers in the same thread when it ends. Over the API, MCP or the CLI, send the message with `to: agent`. The mentions in the comment text are: | Agent | Mention | | --- | --- | | The Observe Agent | `@observe` | | A connected agent | `@[Name](grant:<grant_id>)` | | A service account | `@[Name](service_account:<id>)` | You can hand a run only to your own connected agents and to service accounts that take runs. A service-account key can never mention a connected agent. A connected agent works only for the person who connected it. An agent claims its runs with `claim_run`; see [Take runs as an agent](/docs/use/mcp/#take-runs-as-an-agent) for the whole loop. ### When no agent takes the run A run that no outside agent took within 10 minutes fails with the code `agent_unavailable`. Its reply in the thread reads "No agent picked this up within 10 minutes." Retrying or continuing such a run goes to the same agent. It answers `assignee_unavailable` when that agent was disconnected or no longer takes runs. ## Who sees which runs - An Admin sees every run of the Observe Agent or of a service account, and the rows then say who asked. - Anyone else sees only the runs they asked for. - A connected agent's runs are listed only to the person who connected it, even after the connection was revoked or expired. Anyone else, an Admin included, gets 404 `not_found` for its id. - A dashboard or observation in a folder you cannot see is left out of its row. - A run opens only for the person who asked for it, so other people's runs show as plain text. - Suggestion runs are not listed because they have no page to open, although the seven-day counts still include them. - Archived runs are listed, because archiving only hides a run from its requester's own list. ## Reference ### What the agents list holds `GET /api/v1/agents` has three parts. | Part | Shows | | --- | --- | | `observe_agent` | Whether the built-in agent is on, the provider and model names, its `runtime`, and its runs of the last seven days. | | `connected` | Your own live connections, newest first. | | `service_accounts` | Every service account that [takes runs](/docs/operate/service-account-keys/). | Details of `observe_agent`: - The provider and model are names only, never an address or a key. - `runtime` is always `sidecar`. - `scope` is `workspace` for an Admin, whose seven days cover every run in the workspace, and `you` for anyone else, whose seven days cover only their own runs. Details of `connected`: - Each entry has the client, its `mode` (`direct` or `propose`), whether it is `present`, its `presence`, when you connected it and what it did in the last seven days. - `writes_7d` counts the changes you made through MCP under its client name in the last seven days. Two connections of one client name share that count. Details of `service_accounts`: - Each entry has the name, whether it is `present` and its `presence`. - Its seven days are shown to an Admin and are null for anyone else, who still gets its name to mention it. An agent is `present` while it holds a run or asked for work in the last 40 seconds. `presence` says which: `working`, `listening` or `offline`; [States](/docs/reference/states/) describes the three presences. ### Seven days of work Each `last_7_days` counts the runs created in the last seven days that were assigned to that agent. | Field | Meaning | | --- | --- | | `runs` | The runs created in the last seven days. | | `failed` | The failed runs; canceled runs are left out. | | `cost_usd` | The recorded cost of the runs; null when a finished run has none, because an unknown price is never counted as zero, and the page then shows "Not priced". | | `median_queue_wait_seconds` | The middle wait between a request and its start over the runs that started; null when none did. | ### Recent work over HTTP `GET /api/v1/agents/runs?kind=<builtin|grant|service_account>&id=<id>` returns the same list as **Recent work**. - It returns 20 runs a page by default and at most 50 with `limit`. - The `next_cursor` of one page is the `cursor` of the next. - The `id` is the grant id or the service account id, and it is refused for `builtin`. - Like the page, it needs a signed-in person, and a service-account key gets 403 `user_session_required`. ### Working now over HTTP `GET /api/v1/agents/working` lists the runs that are queued, running or canceling and that you started. It also lists the runs any agent is doing on dashboards and observations you created, newest first. - It returns 20 runs by default and at most 50 with `limit`, and has no cursor. - It leaves out suggestion runs and archived runs, and says `truncated: true` when more active runs exist. - A run someone else started names the agent and the dashboard or observation, never the request: its `title` is null and `mine` is false. - A dashboard or observation in a folder you cannot see does not bring someone else's run into your list, and it comes back as null on a run you started. - Unless you are an Admin, someone else's run is left out when it is `restricted` or its answer is kept with Admins for what it is about; see [Chat](/docs/use/chat/). - An Admin gets no wider list here, because the Agents page already shows the whole workspace. - It needs a signed-in person, and a service-account key gets 403 `user_session_required`. # Annotations > Mark deploys, incidents and maintenance on a moment or a range of time, see them as markers on charts, and add, edit and delete them from the dashboard, the CLI, MCP or the API. Source: https://slashobserve.com/docs/use/annotations/ · Markdown: https://slashobserve.com/docs/use/annotations/index.md An annotation is a note pinned to a moment or a range of time, such as a deploy, an incident or a maintenance window. Charts draw it as a marker, so you can see a deploy beside the spike it caused. Annotations are stored on the server beside your dashboards and never inside a dashboard's [ObserveSpec](/docs/concepts/observespec/). Adding one saves no version. You add, edit and delete them from the dashboard, the CLI and the HTTP API, and an MCP client can add, list and edit them. ## Add an annotation on a dashboard You need Edit on the dashboard's folder; see [Folders](/docs/teams/folders/). 1. Open the dashboard and choose **Add annotation** in the top row. A form opens with the fields **What happened**, **From**, **To (optional)** and **Tags**. 2. Type what happened. 3. Set **From**, as `2026-11-18 14:22` in the dashboard's time zone, or as `now-15m`. Leave **To (optional)** empty to mark one moment, or fill it in to mark a range. 4. Optionally add tags, separated by commas or spaces, such as `incident, db`. 5. Optionally choose **Shown on** to pick the scope: **This dashboard**, or **Every dashboard** for a global annotation. Only an Editor or an Admin sees **Every dashboard**. 6. Choose **Add**. A toast says "Annotation added", and the marker appears on the charts. A time before 1970 or after 2099 is refused. The web form lowercases the tags you type. ### Add one from a chart On a time series panel, hold Cmd (Ctrl on Windows and Linux) and click to add an annotation at that moment, or drag to cover a range. The form opens with the time filled in and the panel as the scope, so the marker appears on that panel only. Choose **This dashboard** under **Shown on** to show it on every panel. A state timeline has no chart gesture, so use the button there. Kiosk mode and a viewer without Edit hide **Add annotation** and the Cmd-click gesture. ## See the markers Time series and state timeline panels draw every annotation in their time range. A moment is a vertical line in the info colour, and a range is a light band between two lines. A small flag at the bottom of each line opens a card when you hover, focus or tap it. 1. Hover or tap a flag. The card shows the time, who added it, the text and the tags. 2. For a global annotation, the card also says `Every dashboard`. 3. Move the pointer away, scroll or resize the window to close it. A key at the top right of the chart names the flag, as Annotation or Annotations, while the chart shows any. Markers closer than 8 pixels share one flag, and its card lists all of them newest first and scrolls when they do not fit. The card opens above the flag and is never cut off by the panel's edge. Times carry the zone they are shown in, such as `2026-11-18 14:22:00 UTC`. A link in the text becomes a link in the card: an `http` or `https` address, or a path on this server such as `/d/<id>`. Other text, `javascript:` and `mailto:` addresses included, stays plain text. An annotation with a `panel_id` appears only on that panel. One without a panel appears on every panel of its dashboard, and a global one appears on every dashboard. ## Edit or delete an annotation The card of an annotation you added has **Edit** and **Delete**. An Admin sees them on every card. - **Edit** changes the text and the tags. The time, dashboard and author stay. - **Delete** asks first and cannot be undone. ## Show only some markers When the markers in the time range you are looking at have tags, the top row shows an **Annotations** menu. A dashboard that does not exist or cannot be read shows none. 1. Open the **Annotations** menu. It reads `Annotations: All` until you pick a tag. 2. Pick one or more tags to keep only the markers that have any of them. 3. Pick **All annotations** to show every marker again. The menu lists the tags of the ranges you have opened in this session. A tag whose markers all lie outside those ranges appears once you widen the range to include one of them. The choice is kept in the address as `ann=deploy,incident`, so a shared link shows the same markers. ## Add an annotation from the CLI `observe annotate` adds an annotation from a shell or a CI job. It needs a [service-account key](/docs/operate/service-account-keys/) in `OBSERVE_TOKEN`: ```sh observe annotate "Deploy checkout v1.4.2" --tags deploy,checkout observe annotate "Database failover" --dashboard <dashboard id> --at now-15m ``` You see `Added annotation <id> at <time> on every dashboard`, or `on dashboard <id>` when you pass `--dashboard`. - Without `--dashboard` the annotation is global, which needs the Editor role. `--dashboard` puts it on one dashboard instead, and needs Edit on that dashboard. - `--at` places it in the past, as `now`, `now-15m` or an RFC 3339 time. Without it the annotation is placed at the server's current time. - `--tags` takes comma-separated lowercase tags. See [CLI](/docs/use/cli/#annotations) for the output and the exit codes. ## Add a deploy marker from your pipeline Without the CLI, create a [service-account key](/docs/operate/service-account-keys/) with the Editor role for your CI system. Then add a global annotation from the deploy job: ```sh curl -fsS -X POST "$OBSERVE_SERVER/api/v1/annotations" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text": "Deploy checkout v1.4.2", "tags": ["deploy", "checkout"]}' ``` The answer is `201 Created` with the annotation and a `Location` header. Without `time_from`, the annotation is placed at the server's current time. Send `time_from` and `time_to` as RFC 3339 times, such as `2026-11-01T10:00:00Z`, to mark a range instead of a moment. Add `dashboard_id`, and optionally `panel_id`, to pin the note to one dashboard or panel. In GitHub Actions, store the key as a repository secret named `OBSERVE_TOKEN` and add a step after the deploy: ```yaml - name: Post a deploy marker env: OBSERVE_SERVER: https://observe.example.com OBSERVE_TOKEN: ${{ secrets.OBSERVE_TOKEN }} run: | curl -fsS -X POST "$OBSERVE_SERVER/api/v1/annotations" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d "{\"text\": \"Deploy ${GITHUB_REPOSITORY} ${GITHUB_SHA::7}\", \"tags\": [\"deploy\"]}" ``` A pipeline that needs a key before anyone signs in can get one from the [service-accounts file](/docs/operate/service-account-keys/#declare-service-accounts-in-a-file). ## List annotations `GET /api/v1/annotations` lists annotations newest first: ```sh curl -fsS -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/annotations?dashboard_id=<dashboard id>&from=2026-11-01T00:00:00Z&to=2026-11-02T00:00:00Z&tags=deploy,incident" ``` The answer is `{"annotations": [...], "next_cursor": ...}`. Pass the `next_cursor` of a page as `cursor` to read the next one, until `next_cursor` is null. From the CLI, `observe annotations list` prints the same list as the columns `ID`, `TIME`, `DASHBOARD`, `TAGS` and `TEXT`, with the text cut at 60 characters: ```sh observe annotations list --dashboard <dashboard id> --from 2026-11-01T00:00:00Z --tag deploy ``` [Parameters of the list](#parameters-of-the-list) has every filter, and [CLI](/docs/use/cli/#annotations) has the flags. ## Fix the text or tags of an annotation Change the text or the tags without deleting the annotation, so its author and time stay: ```sh curl -fsS -X PATCH "$OBSERVE_SERVER/api/v1/annotations/<annotation id>" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"text": "Deploy checkout v1.4.3", "tags": ["deploy"]}' ``` Send `text`, `tags` or both. A field you leave out stays as it was, and `tags` replaces the old tags. An empty `tags` list removes them all. Sending neither answers 422 `invalid_request`. Only the person or key that added the annotation, or an Admin, may edit it. Its time, dashboard and panel never change. The change is recorded as `annotation.updated` in the [activity](/docs/use/activity/) log, without the text. A change that leaves the text and tags as they were records nothing. `observe annotations update <id> --text <text> --tags <tags>` does the same from the CLI. `--tags ""` removes every tag. ## Delete an annotation ```sh curl -fsS -X DELETE -H "Authorization: Bearer $OBSERVE_TOKEN" "$OBSERVE_SERVER/api/v1/annotations/<annotation id>" ``` The answer is `204 No Content`. Only the person or key that added the annotation, or an Admin, may delete it, and it cannot be undone. `observe annotations delete <id>` does the same from the CLI; see [CLI](/docs/use/cli/#annotations). ## Use annotations from an MCP client An MCP client such as Claude Code lists annotations with `list_annotations`, adds one with `create_annotation` and changes the text or tags of one it added with `update_annotation`. The agent that just deployed can then post and correct the marker itself. No tool deletes an annotation. See [MCP](/docs/use/mcp/). - `create_annotation` takes the fields of `POST /api/v1/annotations`. It needs Edit on the dashboard, or the Editor role for an annotation on every dashboard. - `update_annotation` takes an `id` and `text`, `tags` or both, like `PATCH /api/v1/annotations/{id}`. - `list_annotations` takes `dashboard_id`, `from`, `to`, `tags`, `limit` and `cursor`, and returns `next_cursor`. `limit` is 1 to 100 and defaults to 50, which is smaller than the HTTP list's 500. Each annotation carries `created_by_label`, the label the web app shows. The built-in agent reads annotations with `list_annotations` in every run, as the person who asked and only on dashboards they can open. It can see a deploy beside a spike or say when the last deploy was, and it never adds one. ## Reference ### Global and dashboard annotations A global annotation has no dashboard and belongs on every dashboard. Deploy markers are usually global, because a deploy can move any chart. A dashboard annotation belongs to one dashboard, and optionally to one panel of it through `panel_id`. Deleting the dashboard deletes its annotations. ### Who may do what | Action | What it needs | | --- | --- | | Add a dashboard annotation | Edit on the dashboard's folder. | | Add a global annotation | The Editor role or higher. | | Read a dashboard's annotations | That you can see the dashboard. | | Edit or delete | Being the person or key that added it, or an Admin. | A dashboard you cannot see answers 404, as if it did not exist. That includes reading, editing and deleting the annotations of a dashboard you cannot see. ### Tags Tags group annotations so a dashboard can show only the kinds it cares about. An annotation has at most 10 tags, each 1 to 40 lowercase letters, digits, `_`, `.` or `-`, starting with a letter or digit. The web form lowercases what you type, while the API, the CLI and MCP refuse an uppercase tag with 422 `invalid_tags`. ### Fields of an annotation | Field | Holds | | --- | --- | | `id` | The annotation's id. | | `dashboard_id` | The dashboard, or null for a global annotation. | | `panel_id` | The panel, or null. | | `time_from` | When it happened or started. | | `time_to` | When a range ended, or null for a moment. | | `text` | What happened, 1 to 2000 characters. | | `tags` | Up to 10 tags. | | `created_by` | The id of the person or key that added it. | | `created_by_name` | Their name, or their email or the service account's name, or null once they are deleted. | | `actor` | Who added it, with the `label` the web app shows, such as `deploy-bot (via Claude Code)`, or null once they are deleted. | | `created_at` | When it was added. | ### Parameters of the list | Parameter | Matches | | --- | --- | | `dashboard_id` | That dashboard's annotations together with the global ones. Without it, only the global ones. | | `from` | Annotations that end at or after this RFC 3339 time. | | `to` | Annotations that start at or before this RFC 3339 time. | | `tags` | Comma-separated tags, keeping annotations with any of them. | | `limit` | 1 to 500, 100 by default. | | `cursor` | The `next_cursor` of the previous page. | A range that starts before `from` and ends inside the window is listed, because `from` and `to` keep the annotations that overlap it. A moment counts as a range of one instant. `to` before `from` answers 400. ### Limits and errors | Limit | Value | | --- | --- | | Text | 1 to 2000 characters. | | Tags | At most 10. | | Times | From 1970-01-01 to 2099-12-31. | | Request body | 16 KiB. | | Status and code | When | | --- | --- | | 400 `invalid_request` | `dashboard_id` is not a UUID, a `from`, `to` or `cursor` does not parse, or the list's `tags` are invalid. | | 403 | You lack Edit on the dashboard's folder, or the Editor role for a global annotation. | | 403 `not_creator` | You are neither the person or key that added it nor an Admin. | | 404 `not_found` | The dashboard or annotation does not exist, or you cannot see it. | | 422 `invalid_time` | A time is not RFC 3339, lies outside 1970 to 2099, or `time_to` is before `time_from`. It is never replaced by the current time. | | 422 `invalid_text` | The text is empty or breaks the [text rules](/docs/reference/text-rules/). | | 422 `invalid_tags` | More than 10 tags, or a tag outside the pattern. | | 422 `invalid_panel_id` | `panel_id` is not 1 to 64 characters without NUL, or has no `dashboard_id`. | | 422 `unknown_panel` | `panel_id` is not a panel of the dashboard's latest version. | | 422 `invalid_request` | An update gives neither `text` nor `tags`. | # Dashboard health > Find the dashboards that broke after a move from Grafana or rotted since, from panels with no data to dashboards nobody opens, and ask the agent to repair them. Source: https://slashobserve.com/docs/use/dashboard-health/ · Markdown: https://slashobserve.com/docs/use/dashboard-health/index.md Every dashboard is checked about once a day for panels that stopped working, and the health list shows each dashboard with a problem. Work through that list after [switching from Grafana](/docs/use/switch-from-grafana/), and come back to it as datasources and metrics change. ## Find dashboards with problems 1. Open **Dashboards** in the sidebar, or go to `<public url>/health`. That address opens the dashboards list filtered to dashboards with any problem, and keeps `kind` and `folder`. 2. Read the **Health** column. Each dashboard with a problem shows its first problem, "+N more problems" for the others, and the state of its repair. 3. Choose the problem to open a popover with every problem, when and on which version the dashboard was last checked, and **Repair** (**Repair all** when several panels or variables fail). 4. Narrow the list with the **Problem** menu, which holds one kind of problem or any problem. Its items are "Query fails" (`query_failed`), "Variable resolves to nothing" (`variable_failed`), "No data" (`no_data`), "Duplicate title" (`duplicate_title`) and "Not opened in 90 days" (`unopened`). Health shows in two places: the [dashboards list](#in-the-dashboards-list) and [a dashboard](/docs/use/web/#health-on-a-dashboard). ### In the dashboards list A dashboard that was checked and has no problem shows a **Queries OK** badge. Its popover says "No problems found" and when and on which version it was checked. The badge says only that the panel and variable queries ran. It does not read the numbers, so a stat past its threshold can sit beside it. The address keeps the **Problem** choice, as `?kind=<kind or any>&folder=<folder id>`. The Health column still shows every problem of a dashboard under a filter, because the filter chooses dashboards and not problems. For Editors, the **Problem** menu also has **Imported, not verified**, at `?kind=imported`, which holds the repair queue of imported dashboards; see [Repair](/docs/use/switch-from-grafana/#repair). A summary line above the list counts the dashboards that are failing, have no data, have not been opened in 90 days or have a duplicate title, such as **2 dashboards failing**. It says when the last check finished or that one is going now. It shows to everyone when there is something to report, and an Admin always sees it. ## Repair a dashboard An Editor can ask the agent to repair a dashboard whose last check found a `no_data`, `query_failed` or `variable_failed` problem. 1. Open the problem popover in the dashboards list, or open the dashboard. 2. Choose **Repair** (**Repair all** when several panels or variables fail). 3. Watch the repair state in the Health column. It shows Repair queued, Repairing, Repaired or Repair failed. When a repaired version still fails, **Repair** is offered again. The repair is an ordinary revision with a prompt that names each failing panel and variable. It shows in the dashboard's history and can be reviewed and reverted like any other. It needs a configured LLM provider and edit access to the dashboard. A dashboard saved since its last check has nothing to repair until the next check, because the problems on record belong to an older version. The repair then answers `nothing_to_repair`. A dashboard with a revision already queued or running is skipped. Each person can have 20 health repairs queued or running at once. ## Run a check now An Admin can start a run at once with **Run now** above the dashboards list, for example right after a large import. It checks the dashboards that are due, as the hourly run does. The button is turned off while a run is going, and when a run is already going nothing more starts. ## From the CLI `observe health` lists the same problems in a terminal, in the same ranked order. `observe health repair <dashboard-id>...` queues repairs, and `observe health run` starts a check. See [CLI](/docs/use/cli/). Its `STATE` column shows each dashboard's state. Its `REPAIR` column shows the outcome of the latest health repair: - `repair queued` - `repair running` - `repaired in version N` - `repair saved version N, still failing` - `repair failed: <error>` - `repair failed`, when the failure has no sentence - `-`, when the dashboard never had a repair A listed dashboard with no problem, such as an `outdated` one kept in the list for its repair, shows one row with `-` as its kind and target. A line after the table says that outdated dashboards wait for a recheck and that their problems belong to an earlier version. ## From MCP clients MCP clients call `list_dashboard_health` with a Viewer key or higher. It answers the same dashboards and problems in the same ranked order, with the state of the job. - It takes `folder_id`, `kind`, `limit` (up to 50) and `cursor`. - It takes `dashboard_id` for one dashboard, answered even when it has no problem, with empty `problems`. - Each dashboard carries `can_edit`, which is false on a starter, and its `state`. - An outdated dashboard carries a `note` saying that its problems belong to `checked_version` and a recheck is pending. - The first page also carries the same `summary` counts. - A dashboard with a health repair carries the repair's `state` and `outcome`, with `version` when it succeeded and `error` when it failed. An Admin's client can start a run with `run_dashboard_health`, which does what **Run now** does. A client fixes a failing panel with its own model, reading the panel with `get_panels` and saving the fix with `update_panels`, so the repair needs no LLM provider on the server. See [MCP](/docs/use/mcp/). ## Reference ### What counts as a problem | Kind | Meaning | | --- | --- | | `no_data` | A panel query runs but returns nothing over the last 7 days. | | `query_failed` | A panel query fails. | | `variable_failed` | A variable resolves to no value, so the panels that use it cannot run. | | `duplicate_title` | Another dashboard in the same folder has the same title, compared without case. | | `unopened` | Nobody opened the dashboard in the last 90 days. | Details of the kinds: - `no_data` leaves out alert list panels and panels over the built-in audit datasource, because a quiet audit trail is not a fault. - `query_failed` covers a syntax error, an unknown metric or a datasource that does not answer. - `unopened` counts from when the dashboard was created if nobody ever opened it. - The first three come from the health check. `duplicate_title` and `unopened` are worked out every time the list is read, so they change as soon as a dashboard is renamed, moved or opened. An open is one person loading the dashboard page, and the server keeps each person's latest open. Opens through an API key, the CLI or MCP do not count. ### The health check A server job named `dashboard_health` runs every hour. | Rule | Value | | --- | --- | | Time a run may spend | 8 minutes | | Dashboards checked at once | 2 | | A healthy dashboard is checked | About once a day; a run skips one checked in the last 23 hours | | Range of each query | The last 7 days | Details of what a run checks: - It takes the dashboards never checked first, then the oldest checks. - No run checks a dashboard more than once. - A dashboard whose last check found a `query_failed` or `variable_failed` problem is checked again on the next hourly run. A brief outage of a datasource stops showing within an hour of the datasource coming back. - A dashboard saved since its last check is also checked on the next hourly run, so a repair shows its result within an hour. A check runs every panel and variable query of the dashboard's latest version the way a save does. It uses the last 7 days instead of the dashboard's own time range, so a dashboard that only shows the last 15 minutes is not reported because the last 15 minutes were quiet. A check runs with no viewer. A dashboard whose queries read `${__user.login}`, `${__user.email}` or `${__user.name}` is not checked and is marked `depends_on_viewer`. A check that cannot run at all is recorded as a `query_failed` problem with the code `check_failed`, and the server log has the cause. ### API `GET /api/v1/health` lists the dashboards with a problem in folders the caller can see. It answers the state of the job beside the list. | Parameter | Meaning | | --- | --- | | `folder_id` | Narrow to one folder. | | `dashboard_id` | Repeats up to 50 times; lists only those dashboards. | | `kind` | One of the kinds above. | | `limit` | Up to 100. | | `cursor` | The `next_cursor` of the previous page. | Details of `dashboard_id`: - It lists only the dashboards the caller can see, whether or not they have a problem. - A checked dashboard with no problem comes back with empty `problems`. - One that was never checked has `state` `unchecked` with null `checked_at` and `checked_version`. - With `kind` as well, the list keeps only the dashboards with a problem of that kind. - `summary` is null on every page when `dashboard_id` is given. - The web reads a dashboard's Queries OK badge this way. `GET /api/v1/dashboards?problem=<kind or any>` narrows the dashboards list to the dashboards with that problem by the same rules, keeping its order, paging and `total_count`. #### Order of the list The list is ranked, so the dashboards most worth fixing come first. | Rank | Dashboards | | --- | --- | | 0 | a `query_failed` or `variable_failed` problem | | 1 | a `no_data` problem | | 2 | a `duplicate_title` problem | | 3 | only `unopened` | - Inside a rank, the most recently opened dashboard comes first, never-opened dashboards come last, and ties go by title. - A `kind` filter keeps each dashboard's rank, so the same order holds inside one kind. - `next_cursor` pages through that order. - A cursor from an older server, which ordered by last update, answers 400 `invalid_request`, and the client starts again from the first page. #### Summary counts The first page, sent without `cursor`, carries `summary`, and later pages have `summary` set to null. Each count is of dashboards, not problems, over every dashboard in the folders the caller can see. `folder_id` narrows it, and `kind` and the page never do. | Count | Dashboards | | --- | --- | | `dashboards` | with any problem, or waiting for a recheck of one | | `failing` | with a `query_failed` or `variable_failed` problem | | `query_failed`, `variable_failed`, `no_data` | with that problem | | `duplicate_titles` | with a `duplicate_title` problem | | `unopened` | with an `unopened` problem | #### State of a dashboard Each dashboard carries a `state`: `unchecked`, `outdated`, `skipped`, `failing` or `healthy`, computed on the server from its last check. `no_data`, `duplicate_title` and `unopened` stay problems in the list but do not make a dashboard `failing`; see [States](/docs/reference/states/). An `outdated` dashboard still lists the problems of the older check, but they belong to `checked_version`. - The counts above (except `dashboards`) and the `kind` filter leave out its `query_failed`, `variable_failed` and `no_data` problems until the next check. - The web shows it as **Recheck pending** instead of listing them. - Without a `kind`, such a dashboard, and one with a health repair on record, stays in the list after the dashboards with current problems. A repaired dashboard does not vanish before its next check. - Its `duplicate_title` and `unopened` problems are current and stay. #### Repair of a dashboard Each dashboard carries `repair`, its latest health repair whatever its age. It is null when the dashboard never had one, and always null for a starter dashboard, which no repair can change. | Field | Holds | | --- | --- | | `state` | The status of the repair's run: `queued`, `running`, `succeeded` or `failed`. | | `outcome` | What the repair came to: `queued`, `running`, `repaired`, `still_failing` or `failed`. | | `version` | The version a succeeded repair saved; null otherwise. | | `error` | The sentence a failed repair ended with; null otherwise. | | `updated_at` | When the repair finished, else when it started, else when it was queued. | | `request_id` | The revision request, which `GET /api/v1/dashboards/{id}/revisions/{revision_id}` reads. | `still_failing` means the repaired version was checked and still fails. #### Example answer ```json { "dashboards": [ { "id": "0a1b2c3d-0000-4000-8000-000000000001", "title": "Checkout", "url": "https://observe.example.com/d/0a1b2c3d-0000-4000-8000-000000000001/checkout", "folder": { "id": "0a1b2c3d-0000-4000-8000-0000000000f1", "title": "Shop", "general": false, "personal": false }, "can_edit": true, "state": "healthy", "checked_version": 4, "checked_at": "2026-11-06T03:00:12Z", "last_viewed_at": "2026-11-05T17:41:00Z", "skipped": null, "problems": [ { "kind": "no_data", "panel_id": "p_rps", "panel_title": "Requests per second", "variable": null, "code": "query_empty", "message": "query returned no data for the dashboard's default time range and variable values" } ], "repair": { "state": "succeeded", "outcome": "repaired", "request_id": "0a1b2c3d-0000-4000-8000-0000000000a1", "version": 5, "error": null, "updated_at": "2026-11-06T03:12:40Z" } } ], "next_cursor": null, "summary": { "dashboards": 1, "failing": 0, "query_failed": 0, "variable_failed": 0, "no_data": 1, "duplicate_titles": 0, "unopened": 0 }, "job": { "last_started_at": "2026-11-06T03:00:00Z", "last_finished_at": "2026-11-06T03:04:31Z", "last_outcome": "succeeded", "running": false } } ``` #### Repairs and runs `POST /api/v1/health/repairs` takes `{"dashboard_ids": [...]}` with up to 50 dashboards and needs the Editor role. It answers 202 with the repairs it queued and the dashboards it skipped. - The skip reasons are `active`, `nothing_to_repair`, `not_found`, `forbidden_role`, `provisioned` and `queue_full`. - A starter dashboard is skipped as `provisioned`, because the server keeps it current with each release. Duplicate it to repair a copy. - It answers 503 `agent_unavailable` when no LLM provider is configured. `POST /api/v1/health/run` needs the Admin role and answers 202 while the run starts in the background. # Dashboards as code > Export a folder's dashboards to ObserveSpec files, keep them in Git, and apply them back from your machine or a CI job. Source: https://slashobserve.com/docs/use/dashboards-as-code/ · Markdown: https://slashobserve.com/docs/use/dashboards-as-code/index.md A dashboard is an [ObserveSpec](/docs/concepts/observespec/) JSON document, so a folder of dashboards fits in a Git repository as a folder of files. `observe dashboards export` writes a folder's dashboards to files, and `observe dashboards apply` saves the files back as dashboards. Both run with the [CLI](/docs/use/cli/) and act with the folder access of the person or key running them. ## Export a folder to files 1. Sign in to the CLI, as [CLI](/docs/use/cli/#sign-in) shows. 2. Export the folder by its id or its title, ignoring case: ```sh observe dashboards export Payments --dir dashboards ``` You see one row per file, with the file, the dashboard id and the title: ```text FILE DASHBOARD TITLE Payments/api-latency.json 3f2a... API latency Payments/checkout.json 9c41... Checkout ``` 3. Commit the `dashboards` directory to Git. Export writes the latest version of every dashboard in the folder that you can see. Each file holds the Spec as indented JSON with a final newline, so a change shows as a small diff. Running it again overwrites the files in place, and leaves alone a file whose dashboard was deleted. `--json` prints the rows as a JSON array. If more than one folder has the title, pass the folder id. Export always writes into a folder directory, including for General. [The directory layout](#the-directory-layout) shows it. ## Apply a directory 1. Run apply with the directory: ```sh observe dashboards apply --dir dashboards ``` 2. Read the table. Each file has one row with its outcome: `created`, `updated`, `unchanged` or `failed`. ```text FILE OUTCOME DASHBOARD VERSION MESSAGE Payments/checkout.json updated 9c41... 4 Payments/api-latency.json unchanged 3f2a... 2 ``` Apply sends each `.json` file to the server, one at a time. Each save gets the summary `Applied from <path>` in the dashboard's history. A file whose Spec matches the latest version saves nothing and shows `unchanged`, so applying the same directory twice adds no versions. Apply never deletes a dashboard: removing a file leaves its dashboard in place. Exporting a folder and applying it adopts every dashboard instead of copying it. [How apply finds the dashboard](#how-apply-finds-the-dashboard) has the rules. A dashboard changed in the web app since the last apply is overwritten by the next apply of its file, with the old version kept in its history. Every save runs the same checks as a save in the web app, so a file whose queries fail or return no data fails with the panels named. When any file fails, apply still sends the others and then exits 1 with `<n> of <total> files failed`. [Why a file fails](#why-a-file-fails) lists the codes. ## Write a file by hand `observe dashboards sample` prints a complete example Spec. `observe dashboards schema` prints the JSON Schema every file must satisfy, so an editor or a CI step can validate a file before it is applied. ```sh observe dashboards sample > dashboards/checkout.json ``` Both are part of the CLI, so they match the Spec your version of `observe` writes and need no server. ## Apply from GitHub Actions 1. Create an Editor key. A Viewer or Commenter key cannot save. 2. Save it as a repository secret named `OBSERVE_TOKEN`. 3. Add a workflow that applies the `dashboards` directory on every push to `main`: ```yaml name: Apply dashboards on: push: branches: [main] paths: ["dashboards/**"] jobs: apply: runs-on: ubuntu-latest steps: - uses: actions/checkout@v7 - name: Install observe run: curl -fsSL https://raw.githubusercontent.com/slashobserve/slashobserve/main/install.sh | OBSERVE_INSTALL_DIR="$HOME/.local/bin" sh - name: Apply env: OBSERVE_SERVER: https://observe.example.com OBSERVE_TOKEN: ${{ secrets.OBSERVE_TOKEN }} run: observe dashboards apply --dir dashboards ``` Set `OBSERVE_VERSION` in the install step to pin a release. The job fails when any file fails, and its log shows the table with each failed file's message. A key saves only where its role and folder access let it edit. It matches no folder entry, so a restricted folder is out of reach unless the key's account is an Admin or created it; see [Service-account keys](/docs/operate/service-account-keys/). ## Reference ### The directory layout ```text dashboards/ checkout.json Payments/ api-latency.json checkout.json Team %2F Ops/ on-call.json ``` - A file directly in the directory belongs to General. - A file in a subdirectory belongs to the folder named by that directory. - The directory name is the folder title with `%` written as `%25`, `/` as `%2F`, `\` as `%5C` and a leading `.` as `%2E`. `Team / Ops` becomes `Team %2F Ops`, so any title survives a round trip. - Export refuses to write a file outside `--dir`, so a folder titled `..` cannot reach a parent directory. - Files and directories whose names start with `.` are skipped. - A path with more than one directory level, such as `Ops/nested/deep.json`, is sent and refused by the server as an invalid path, so its row shows `failed`. - The server's [provisioning directory](/docs/operate/provisioning/) uses the same layout. ### File names on export A dashboard that was applied from a file keeps that file name on export. Any other dashboard is named after its title in lowercase words joined by `-`, such as `api-latency.json`, or `dashboard.json` for a title with no letters or digits. When two dashboards in the folder would get the same name, the one with the lower id keeps it and the others get `-2`, `-3` and so on. ### How apply finds the dashboard The server finds the dashboard for each file in this order: 1. The dashboard last applied from the same path. 2. Otherwise, the one dashboard in the file's folder whose title matches the Spec's `title`, ignoring case. Apply adopts it and remembers the path from then on. 3. Otherwise, a new dashboard, in a new folder if the folder does not exist yet. ### Why a file fails | Code | Meaning | | --- | --- | | `invalid_json` | The file is not JSON; the CLI refuses it before sending. | | `file_unreadable` | The CLI cannot read the file. | | `invalid_spec` | The Spec fails its checks, with the failing panels named. | | `ambiguous` | The folder holds more than one dashboard with the title. | | `provisioned` | The dashboard comes from the server's provisioning directory. | | `version_conflict` | The dashboard got a newer version during the apply; apply again. | | `folder_exists` | The folder exists but you cannot see it. | | `restricted_content` | The Spec reads a datasource only Admins can query, and the folder is open to others. | | `forbidden_role` | You cannot edit the folder or the dashboard. | | `not_found` | The dashboard or its folder no longer exists. | | `invalid_request` | The path is outside the layout. | Details of the codes: - For `ambiguous`, rename one of the dashboards, or apply the file under the path it was applied from. - For `provisioned`, change the provisioning file instead. - `folder_exists` is the same answer as creating a folder with that name, so apply never says what the folder holds. It also never files the dashboard anywhere else. - A folder you can see but not edit answers `forbidden_role`. ### Exit codes and output | Situation | Result | | --- | --- | | Every file succeeded | Exit 0. | | Any file failed | The other files are still sent, then exit 1 with `<n> of <total> files failed`. | | `--dir` missing, or the directory cannot be read | Exit 2 before anything is sent. | | The directory has no `.json` file | A warning and exit 0. | `--json` prints the results as a JSON array of objects with `path`, `outcome`, `dashboard_id`, `version`, `code` and `message`. ### API `POST /api/v1/provision/apply` saves one file and needs the Editor role. The CLI calls it once per file. ```sh curl -X POST "$SERVER/api/v1/provision/apply" -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H 'Content-Type: application/json' \ -d "{\"path\":\"Payments/checkout.json\",\"spec\":$(cat dashboards/Payments/checkout.json)}" ``` `path` is the file's path relative to the directory, with `/` between parts. It is a file name or one folder directory and a file name, ends in `.json`, is at most 512 bytes and has no empty or dot-leading part. `spec` is the file's ObserveSpec. The answer is `200` with the `path`, the `outcome`, the `dashboard_id` and the `version`. A refused file answers with an error code: | Status | Codes | | --- | --- | | `409` | `ambiguous`, `provisioned`, `version_conflict`, `folder_exists`, `restricted_content` | | `422` | `invalid_spec`, with the failing panels | | `404` | `not_found` | | `403` | `forbidden_role` | | `400` | `invalid_request`, for a path outside the layout or a missing `spec` | `GET /api/v1/provision/applied?folder_id=<folder id>` lists the paths applied to the dashboards now in a folder. Export uses it to keep their file names, and it needs the Viewer role. # Home > The page the web app opens on, where you ask Observe Agent, start an observation or import a Grafana dashboard, and see what needs you, what is running and what you opened last. Source: https://slashobserve.com/docs/use/home/ · Markdown: https://slashobserve.com/docs/use/home/index.md Home is the first page you see after you sign in, at `/`. Use it to start work: ask Observe Agent a question, open an observation to keep notes, or bring in a Grafana dashboard. Below that, it lists what needs you, what agents are running and what you opened last. ## Ask Observe Agent 1. Choose **Home** in the sidebar. The **Ask Observe Agent** tab is open. 2. Type a question or a request for a dashboard, or choose one of the example prompts under the card. An example is a button, such as "Which services had the most errors in the last hour?". 3. Send it. The chat opens with the answer. You can save an answer as an observation; see [Chat and follow-ups](/docs/use/chat/). Under the card, **Recent chats** lists your five latest chats. Each row shows how many turns the chat has and the dashboard it is about. **All chats** opens the Chats page at `/chats`. The example prompts follow your datasources, and at most four show. Up to two ask a question about the system. Editors and Admins also get prompts that ask for a dashboard. The prompt that adds a row to a dashboard names one you can edit. ## Start an observation An observation is a shared note where a team keeps what it finds while it works a question; see [Observations](/docs/use/observations/). 1. Choose the **New observation** tab. 2. Enter a **Title**. 3. Optionally enter a **First note** and pick a **Folder**. 4. Choose **Start observation**. The observation opens, and the note is its first text block. Links in the note to a logs search, a trace or a dashboard panel on this app's own address become panel blocks. [New observation](#new-observation) lists the limits and the rules for links. ### Have the agent start the investigation Where [Observe Agent](/docs/use/chat/) is set up, the tab shows **Ask Observe Agent to start**, off by default. Turn it on before you choose **Start observation**. The agent investigates from the note, or from the title when the note is empty. You see what it finds as blocks you can keep or discard. If the run cannot start, the observation still exists and a message says the agent did not start. Under the card, **Your open observations** lists the five open observations you started that changed last. Each row shows how many messages its discussion holds, such as "4 messages", and nothing before the first one. ## Import a dashboard 1. Choose the **Import a dashboard** tab. 2. In the **Grafana dashboard** field, paste the dashboard's JSON, or choose or drop a JSON file. An Admin can paste a dashboard link instead, such as `https://grafana.example.com/d/abc123/checkout?orgId=1`. 3. Optionally pick a **Folder**. 4. Choose **Preview**. Home opens Import from Grafana at `/import` with the dashboard, where you pick the datasources; see [Import Grafana dashboards](/docs/use/import-grafana/). Under the card, **Recent imports** lists your five newest imports. Each row shows who imported it and its panel count, such as "18 panels, 2 placeholders" when some panels came in as placeholders. ### Import from a link A link needs a [connection](/docs/use/switch-from-grafana/#connect) to that Grafana in Settings. Home fetches the dashboard through it with `POST /api/v1/grafana/link`. A failure shows under the field. The reasons are no connection for the link, not a dashboard link, a dashboard the connection cannot read, or "Grafana did not answer. Try again, or paste the JSON." Only Admins can import from a link. Everyone else sees "Paste the dashboard's JSON" in the field. A pasted link answers "Only Admins can import from a link, through a Grafana connection. Paste the dashboard's JSON instead." without calling the server. ### Choose the folder The **Folder** field is "Default folder" until you pick one of the folders you can edit. When you can create dashboards in that folder, the import page opens with it chosen in the folder card. Otherwise the card keeps Automatic. A dashboard over the 8 MiB import limit stays on Home with "This file is larger than 8 MiB, the import limit." The JSON stays in the page's memory only, so reloading `/import` starts over. ## See what needs you Three sections sit below the card, whichever tab is open. **Needs you** shows the three newest items of your [inbox](/docs/use/inbox/) that have a reason. **Open Inbox** opens the inbox. Each row has an action button, and the row itself opens the item. | Item | Button | | --- | --- | | A proposal or a suggested block | **Review** | | A mention or a reply | **Reply** | | A repair you started, or a proposal of yours that was closed | **Open** | | A request for comment access | **Share** | | A request for access to something in General | **Change role** | | A failed run | **Try again** | **Try again** starts the run again and opens the new chat. A reply the agent wrote reads "Observe Agent answered" followed by the question, as in the inbox. **Working now** lists agent runs that are queued, running or canceling. It shows a run when you started it, or when it acts on a dashboard or observation you created, whoever started it. **All agents** opens the [agents](/docs/use/agents/) page. The list refreshes every five seconds while a run is listed. **Pick up where you left off** lists the five dashboards and observations you opened last in this browser. A dashboard row adds its problem count from [dashboard health](/docs/use/dashboard-health/), such as "1 problem". An observation row says who changed it last and when, such as "you added a block yesterday". **Start here** links the places a newcomer can read without asking the agent anything: **Dashboards**, **Logs**, **Traces**, **Observations** and **Docs**. It shows for everyone, so a Viewer who has nothing to work on yet still sees where the team keeps its dashboards and notes. ## Open a dashboard when you sign in You can choose a dashboard to open on sign-in, as [Home dashboard](/docs/use/web/#home-dashboard) describes. That dashboard then opens in place of Home the first time you open `/` without a query string in a browser tab. If that dashboard was deleted or you can no longer view it, Home opens instead and says so. **Clear it** drops the choice. ## Reference ### Tabs and addresses | Tab | Address | Command palette entry | | --- | --- | --- | | **Ask Observe Agent** | `/` | **Ask Observe Agent** | | **New observation** | `/?tab=observe` | **New observation** | | **Import a dashboard** | `/?tab=import` | **Import a dashboard** | An address of `/` with any other query string opens the chat at `/ask` with that query string. The top bar shows today's date, such as "Friday, 13 November", on wide screens. ### New observation The tab takes these fields. | Field | Limit | | --- | --- | | **Title** | 1 to 200 characters. | | **First note** | Optional, up to 4,000 characters. | | **Folder** | The folder the observation lives in. | | **Ask Observe Agent to start** | Off by default; shown only where the agent is set up. | Details of links in the note: - A link to a logs search is `/logs/<datasource>?q=...`. - A link to a trace is `/t/<trace id>?ds=<datasource>`. - A link to a dashboard panel is `/d/<dashboard>?panel=<panel id>`. - Only links on this app's own address become blocks, over the range the link carries. Any other link stays text. - At most 10 links become blocks, and each link once. - A trace link on a ClickHouse datasource becomes a block that reads the trace by its id, as one Tempo trace does. - A link to a panel that uses variables keeps their definitions, with the values in the link's `var-` parameters, or the dashboard's defaults without them. A link that cannot be added is skipped, and one message says how many were and why. The observation still opens. The reasons include a panel that no longer exists, a panel that uses a dashboard variable the dashboard no longer defines (`variable_missing`), and what the server answered, such as a datasource you cannot read. ### Lists on Home | List | Shows | Limit | | --- | --- | --- | | **Recent chats** | Chats you asked in, newest first. | 5 | | **Your open observations** | Open observations you started. | 5, from the 20 newest open ones | | **Recent imports** | Your imports. | 5 | | **Needs you** | Inbox items that have a reason. | 3 | | **Working now** | Queued, running and canceling runs. | 20 | | **Pick up where you left off** | Dashboards and observations you opened. | 5 | Details of **Working now**: - Each row shows the agent's mark and "<agent> is working on <title>". - It shows how long the run has run, or "Queued", then who asked, then the observation or dashboard it works in. - A run you started opens its chat. Another person's or agent's run opens the dashboard or observation. - A run on a dashboard or observation you cannot see is listed without its name. Details of **Pick up where you left off**: - The list lives in this browser's local storage and never reaches the server. - It keeps the last 20 dashboards and the last 20 observations you opened, and shows the five newest of them together. # Inbox > See what asks something of you, a proposal to merge, a block to keep, a mention, a reply, a failed run, a saved health repair or a request for comment access, with the reason it is there and an unread count that follows you across browsers. Source: https://slashobserve.com/docs/use/inbox/ · Markdown: https://slashobserve.com/docs/use/inbox/index.md The inbox lists what asks something of you now: a proposal to merge, a block to keep, a mention, a reply, a failed run, a saved health repair or a request for comment access. Each item shows the reason it is there, and an unread count follows you from one browser to the next. The inbox is a read over the [activity log](/docs/use/activity/), not a second store of events, so it cannot show something that did not happen. It needs the Viewer role or higher and a signed-in person. A service-account key gets 403 `user_session_required`, and the `observe` command line signs in with a key, so it has no inbox commands. ## Work through your inbox 1. Choose **Inbox** in the sidebar, under Home, which opens `/inbox`. A badge on the entry shows the unread count, in the full sidebar and on the icon rail. 2. Read the **Needs you** group. Each item there is marked with its reason: "Proposal", "Suggested block", "Mention", "Reply", "Run failed", "Repaired", "Proposal closed" or "Access request". 3. Select an item to open it. Opening it marks it read. 4. Act on it: merge a proposal, reply to a mention, or open a failed run's chat to ask again. 5. Mark the item done, with **Mark done**. A "Marked done" toast offers **Undo**. On a window 1100 pixels wide or more, a selected row opens in a pane beside the list. The address keeps the view and the item (`view` and `item`). On a narrower window the list stands alone, each row is a link, and following it marks the item read. Each row names who did what and the real title of the dashboard, observation or proposal. It shows the start of the comment for a mention or a reply, and has a dot while it is unread. A reply the agent wrote reads "Observe Agent answered" followed by the question it answered, in place of "replied on" and the title. A connected agent keeps its own name, such as "Ada (via Claude Code)". The list refreshes when new activity arrives. **Load more** fetches the next page, and arrow keys move through the rows. ## Choose what the list shows The tabs **For you**, **Everything**, **Proposals** and **Mentions** are the [views](#views). **For you** is the default. **Everything** also lists "Workspace activity", the events that have no reason. Under the tabs, **Open**, **Unread** and **Done** choose which items the list shows; see [Done and the unread filter](#done-and-the-unread-filter). **Group by dashboard or observation** puts the items about the same dashboard, observation or proposal together under its title, newest group first. The view, the filter, the grouping and the selected item are kept in the address. ## Mark items read or done Two buttons at the right of a row, shown when you hover or focus the row, mark that one item read or unread, and done or, on the Done filter, back in the inbox. **Mark all read** marks the newest item on the page and everything older as read. It shows only while something is unread. Opening an item marks it read, once. Marking it unread again while it is open keeps it unread. The pane of an item has an **Open** button, **Mark as read** or **Mark as unread**, and **Mark done** or, on the Done filter, **Move back to the inbox**. ## Reply or merge from the pane - A proposal opens with its changes, **Merge** and **Discard**. **Open proposal** goes to its page. - A mention or a reply opens as the whole thread, with a **Reply** box that works as it does on the page. `@` asks an agent, and you can edit or delete your own comments. - Any other item shows its text. ## What opens when you open an item - A proposal item reads "proposed" followed by the proposal's title, and opens the proposal. - A mention or a reply opens the thread it is in. On a dashboard that is the dashboard with the activity pane open on the thread (`thread=<thread id>` in the address). On an observation it is the discussion, and on a proposal it is the proposal. - A closed proposal reads "merged your proposal" or "discarded your proposal" with its title, shows the reason given for a discard, and opens the proposal. The same notice is posted as a comment in the proposal's discussion. - A failed run opens its chat. - A repaired item reads "repaired", the number of panels and the dashboard's title, and opens the versions compare of the version the repair saved. An item recorded before the title and panel count were stored reads "Your repair saved version N". - An access request reads "asked for comment access to" followed by the title, and shows the note. It opens the dashboard's Share pane, or for an observation its folder's settings. For something in General, which takes no folder entry, it says to raise the person's role or move the item to a folder first. It then opens People, or API keys for a service account. Marking it done declines it for every recipient. ## Read the inbox from an agent or the API A connected agent signed in as a person reads the same list with the MCP tool `list_inbox`, which marks nothing read. It marks an item done with `set_inbox_item_done`, which takes a `seq` and `done`. Over HTTP: - `GET /api/v1/inbox` lists the items, newest first. - `POST /api/v1/inbox/read` marks the inbox read up to one item. - `PUT /api/v1/inbox/items/{seq}` marks one item read, unread or done. The HTTP routes answer only to a signed-in person's session, so a service-account key gets 403 `user_session_required`. ## Reference ### What asks something of you Each item has a `reason`. An item that matches several rules has the first in this order. Items are from the last 30 days, in folders you can see, and never your own action unless the rule says so. | Reason | The item is | | --- | --- | | `proposal` | A [proposal](/docs/concepts/proposals/) that someone else opened on a dashboard in a folder you can edit, still open. | | `requested_block` | A block someone requested on an observation you created and can edit, still waiting. | | `mention` | A comment by someone else that mentions you by name. | | `reply` | A reply in a thread you wrote in, or a reply an agent run wrote for your run. | | `run_failed` | A run you requested that failed and that nobody has continued. | | `repaired` | A health repair you started that saved a version. | | `proposal_closed` | A proposal you opened that someone else merged or discarded. | | `access_request` | An open request for [comment access](/docs/teams/folders/#ask-for-comment-access). | Details of the rules: - A `proposal` item is one whose proposal is still open. - A `requested_block` item is one whose block is waiting to be kept or discarded. - A `reply` by someone else counts when you wrote earlier in the thread, or when an agent run wrote it for a run you requested. - A `repaired` item comes from a health repair you started from a dashboard or the dashboards list. - An `access_request` item is for a dashboard or observation in a folder you manage, or as an instance Admin when nobody manages it. - An item leaves the inbox when its reason stops being true, for example when the proposal is merged or the failed run is continued. - A comment that mentions you and also replies in a thread you wrote in is one `mention` item, not two. ### Views `view` chooses what the list holds, and `for_you` is the default. | View | Holds | | --- | --- | | `for_you` | Every item with a reason. | | `proposals` | The `proposal` and `proposal_closed` items. | | `mentions` | The `mention` and `reply` items. | | `everything` | Every visible event from others, and every item with a reason. | In `everything`, `reason` is null on the events that have none. An invalid `view` answers 400 `invalid_view`. ### Paging and the item shape `limit` is 1 to 100 and defaults to 50, and an invalid one answers 400 `invalid_limit`. `cursor` takes the `next_cursor` of the previous page, and an invalid one answers 400 `invalid_cursor`. An item is the event as `GET /api/v1/activity` returns it, plus these fields. | Field | Holds | | --- | --- | | `reason` | The reason, or null in the `everything` view for an event without one. | | `unread` | Whether the item is unread. | | `target_title` | The title of the dashboard, observation or proposal the item is about. | | `excerpt` | A short plain-text extract, as described below. | | `question` | The question an agent reply answered, as described below. | Details of `target_title`: it is null when the item has no target, the target was deleted, or it is in a place you can no longer read. Details of `excerpt`: - It is the start of the comment for a `mention` or `reply`, with each mention shown as `@Name`. - It is the error of a failed run, the reason a proposal was discarded, or the note of an access request. - It is plain text of at most 200 characters. - It is null for other items, and for a comment in a thread you can no longer read. Details of `question`: - It is the first line of the thread message that an agent run answered, cut to a title of at most 60 characters, on the `thread.replied` item that run wrote. - It is null on every other item, once that message is deleted or withdrawn, and when you can no longer read the thread. - It never comes from a chat prompt. The rest of an item carries no comment, message or finding text, as in the log. ### Done and the unread filter `filter` chooses which of the items of the view the list holds, and `open` is the default. An invalid one answers 400 `invalid_filter`. | Filter | Holds | | --- | --- | | `open` | Every item you have not marked done. | | `unread` | The open items that are unread. | | `done` | The items you marked done. | `PUT /api/v1/inbox/items/{seq}` takes one of `{"done": true}`, `{"done": false}`, `{"unread": true}` and `{"unread": false}`, and answers 204. Send exactly one of `unread` and `done` in a body. - `{"done": true}` marks an item done. It leaves the `open` and `unread` lists, counts as read, never counts in `unread_count`, and stays done when you read the inbox. - `{"done": false}` brings it back to the open list as read. - Marking a done item unread brings it back as unread. The MCP tool `list_inbox` takes the same `filter`. An item that is done stays done until it leaves the 30 days of the inbox. ### What you have read The server keeps one read position per person, so it follows you from one browser to the next. - `POST /api/v1/inbox/read` takes `{"seq": N}`, the `seq` of the newest item you saw. That event and everything older is read, and the answer is 204. - The position only moves forward, so marking an older `seq` changes nothing. An unknown `seq` is refused with 422 `unknown_seq`. - `PUT /api/v1/inbox/items/{seq}` with `{"unread": true}` or `{"unread": false}` marks that one item, whatever its place relative to the position. - Marking a later `seq` read with `POST /api/v1/inbox/read` sets every item up to it to read again, including those you marked unread. - Until you read once, every item in the last 30 days is unread. Every list answers `unread_count`, the number of unread `for_you` items whatever the view is. The count stops at 100, so 100 means 100 or more. # Investigate > Ask the agent a question about your data and get an answer in an observation, a short written conclusion with up to four evidence panels, that you can pin to a dashboard or turn into one. Source: https://slashobserve.com/docs/use/investigate/ · Markdown: https://slashobserve.com/docs/use/investigate/index.md An investigation asks the agent a question instead of asking it for a dashboard, such as "why did checkout errors rise after 10:00?". The agent reads your datasources, then ends by saving its answer, a finding, into an [observation](/docs/use/observations/). It needs a model; see [LLM providers](/docs/connect/llm-providers/). A plain question sent without the command, such as "how many pods are up?", is answered in the chat without building a dashboard. No observation is made until you choose **Create observation** on the answer, or run `observe save-answer <request-id>`; see [Chat and follow-ups](/docs/use/chat/). ## Start an investigation You need the Editor role or above. 1. Open a chat box. Use Home, or a chat about a dashboard. 2. Type `/investigate`, a space, and your question. The Investigate chip shows above the box. 3. Send it. The agent asks the question instead of building a dashboard. In a chat about a dashboard, the investigation is about that dashboard and its answer appears in the same conversation. Without a dashboard, the send opens a new chat page for it. Every investigation also opens an observation. The observation shows the run while it works and receives the finding's conclusion and evidence when it is saved. [Investigations write into an observation](/docs/use/observations/#investigations-write-into-an-observation) says where it goes and how to write into an existing one with `observation_id`. ### Ask about a panel On a dashboard, **Ask** in a panel's menu opens the [ask box](/docs/use/ask-and-comment/#ask-mode) on the whole panel. It asks the agent privately in your chat about that dashboard. To ask in a thread the team reads, choose the "To:" chip in a comment; see [Ask the agent from a comment](/docs/use/review/#ask-the-agent-from-a-comment). The panel menu item shows only on data panels, when you can comment on the dashboard and a model is connected. While you have unsaved layout changes it reads "Ask (finish the layout first)" and cannot be chosen. The activity pane has no Investigate chip and takes no slash command. A message there that asks the agent is a request in a comment thread; see [Comments, agent requests and versions](/docs/use/review/). To start an investigation about a dashboard, type `/investigate` in a chat about that dashboard. ### Start one from a terminal ```sh observe investigate why did checkout errors rise after 10:00 ``` The command asks the same question and prints the finding with its title, its answer and its address. `--dashboard`, `--panel`, `--from` and `--to` set what it is about. See [CLI](/docs/use/cli/) and [CLI flags for investigate](#cli-flags-for-investigate). ### Start one from an MCP client An agent in your own editor can do the same over [MCP](/docs/use/mcp/). It investigates with its own model and the discovery and query tools, and reads deploy markers with `list_annotations`. It saves the answer into an observation with `create_observation` and `add_block`, and reads earlier ones with `list_observations` and `get_observation`. ## Read the finding In the chat, an investigation's turn shows its steps like a build, with the status "Investigating" while it runs. When it ends, the turn shows the answer: the conclusion, the evidence panels, and when and over which window it was found. On a dashboard, your running investigations show in the activity pane as running entries. Each finding about the dashboard appears there as "Agent found" with the same card and an **Open observation** link. The page is the observation at `/o/<id>`, with the conclusion and the evidence panels as blocks, the discussion and who wrote what; see [Observations](/docs/use/observations/#open-an-observation). The evidence panels always show the finding's own window, not the dashboard's current range. ## Comment on a finding The comments on an answer are the observation's discussion, one thread for the whole page. You write in it as [Observations](/docs/use/observations/#who-can-do-what) describes. - Mention people and the agent the way you do on a dashboard; see [Edit a comment and mention people](/docs/use/review/#edit-a-comment-and-mention-people). - A mention is recorded in the [activity log](/docs/use/activity/). - A comment that asks an agent (`to: agent` over the API, MCP or the CLI) starts an investigation for it; see [Ask an agent from a comment](/docs/use/cli/#ask-an-agent-from-a-comment). - Commenting follows who can see the observation. You need Comment on its folder, and anyone else who can read it sees the discussion but no box and no buttons. Threads that people opened on a finding before the discussion existed were merged into it when the server upgraded. The comment API takes only the observation as a target: a `finding:<id>` target is refused as an invalid target. ## Pin a finding to the dashboard 1. Open the finding's card on the dashboard or in the chat. 2. Choose **Pin to dashboard**. The finding becomes an annotation at the end of the finding's window, tagged `finding`. Its text is the finding's first line and a link to it. Charts on the dashboard then show it as a marker; see [Annotations](/docs/use/annotations/). The card then reads "Pinned to the dashboard" with an **Open dashboard** link, and pinning again changes nothing. Pinning needs Edit on the dashboard, so the button is not shown to a Commenter or Viewer. They see "Pinned to the dashboard" once someone else has pinned it. Over the API, `POST /api/v1/findings/{id}/pin` without Edit answers `403` `forbidden_role` with `needed_access` `edit`. ## Share a finding Move the observation to another folder to share it. Choose **More actions**, then **Move to folder**, as [Observations](/docs/use/observations/#rename-resolve-reopen-and-move) describes. Everyone who can view that folder can then read the answer, and My Dashboards takes no moves. The finding move tool, command and route are gone. Only earlier `finding.moved` events remain in the activity log. ## Make a dashboard from a finding Choose **Make a dashboard** on the finding. It saves the evidence panels as a new dashboard in your My Dashboards and opens it. The server runs every evidence query again before it saves. Anyone who can read the finding can do this, and a finding without evidence panels has no such button. ### What happens to the chat From a chat, the dashboard opens with that chat in the Chat tab of its side panel, where you can keep asking. The server attaches the chat to the new dashboard when it makes it, whichever way you made it: the button, the API route or the `make_dashboard` tool. - The chat stays private to you, and Admins read it without writing. Nobody else sees it on the dashboard. - A chat that is already about another dashboard or observation stays where it is, and the new dashboard opens without it. - A build that is still running in the same chat keeps the chat on whichever dashboard attached it first. Make the dashboard after the build finishes if you want the chat on the built one. ## When there is no finding When the agent ends without saving a finding, the turn reads "The question could not be answered". It then says "The agent ended without writing a finding." and "Ask a narrower question, with the service and the time range." **Try again** asks the same question again. A run that finished but saved nothing reads "The run finished without a finding." The other failures read as they do for a build; see [Read a turn](/docs/use/chat/#read-a-turn). ## Investigate a past incident An Admin can run an investigation as of a past time, to replay an incident that is over or to check a finding against what was known then. ```sh observe investigate --as-of 2026-11-20T10:30:00Z --from now-1h --to now why did checkout errors rise ``` `--as-of <time>`, or `as_of` on `POST /api/v1/observe`, sets the run's now. It is an RFC 3339 time such as `2026-11-20T10:30:00Z`, or epoch milliseconds. Every relative time in the run resolves to it. `--from now-1h --to now` is the hour before that time, and so is every `now` in a query the agent runs. The agent is told the time, and the request and its finding carry it as `as_of`. A retry or continue keeps it for an Admin, so an Editor who retries the run gets `403` `forbidden_role`. Each turn of a chat passes `as_of` again; a later turn without it runs on the live clock. These cases answer `400` `invalid_request`: - a relative time; - a time in the future; - a `--to` later than it; - a run that builds or revises a dashboard. Anyone below Admin gets `403` `forbidden_role`. `as_of` is for an investigation and for an ask about a dashboard or an observation. ## Who can investigate Starting an investigation needs the Editor role or above, and view access on the dashboard it is about. Viewers can read the observations in the folders they can view. Over the API, `POST /api/v1/observe` with `kind` `investigate` from a Viewer or Commenter answers `403` `forbidden_role` with `needed_role` `editor`. **Ask** in a panel's menu, the panel toolbar and the panel's header, and [Ask mode](/docs/use/ask-and-comment/#ask-mode) in the bottom tool bar, ask a question as a private turn of your chat. They do not start an investigation, so they need only Comment on the dashboard and a connected model. A Viewer does not see them. ## Reference ### What a finding is A finding is the agent's answer, written as Markdown of at most 400 words. It carries up to four evidence panels, each a panel whose query the server ran and checked before the finding was saved. It covers one window of time, shown under the answer with when it was found. A finding starts with one plain sentence, names the window it used, and says what it did not check. When two pods or services tie, it leads with the one with the most errors. The answer is saved into an observation, as a text block with the conclusion and one panel block for each evidence panel. Its address is the observation's, `/o/<id>`, which you can share with anyone who can read the observation. The observation is in a folder and follows that folder's access; see [Observations](/docs/use/observations/#who-can-do-what). An investigation about a dashboard files its observation in that dashboard's folder when you can edit it. Otherwise it files it in your My Dashboards, or in General when you have none. It stays there when the dashboard moves. ### What the agent reads - It reads your datasources the way it does for a build. - It reads the [annotations](/docs/use/annotations/) of the dashboard and the global ones, so it can see a deploy or a change beside a spike. It cites the ones that fit with their times. - It reads earlier [observations](/docs/use/observations/) in the folders you can open, as you. When one bears on the question, it cites it by title and `/o/<id>` link and says its numbers are from an earlier time. ### Time zones The web app sends the time zone you read times in. That is the dashboard's zone, or the one in its time zone box, on a dashboard, and your browser's elsewhere. The agent writes every time in the finding in that zone with its label, such as 19:52 IST. A finding that labels its times UTC instead is sent back to the agent to convert. Over the CLI and MCP no zone is known, so times are written in UTC with the word UTC. An API caller can name one with `time_zone`. ### Suggested change and observe-worthy An answer about a dashboard may also carry `suggested_change`, one plain sentence describing a change to the dashboard that would help. The agent never makes the change itself. Nothing applies it until someone starts a revision with it. For an answer given in a dashboard thread, someone can apply it from that thread with `POST /threads/{id}/apply`, `apply_suggested_change` or `observe comments apply`. That posts "Revise the dashboard: <suggested change>" there and starts the revision as them. An answer you can read, such as one in your chat on the dashboard, is also applied as a revision of its dashboard. The revision takes the suggested change as its prompt, with `kind` `revise` and `applies_finding_id` on `POST /api/v1/observe`, `start_run` or `observe --revise --dashboard <id> --apply <finding-id>`. A second apply of the same answer while the first is queued or running, or after it succeeded, returns that run with `replayed` true when it is yours. It answers `already_applied` when the run is someone else's. `observe_worthy` is true when the agent judged that the answer shows a jump, a drop or an error spike worth keeping as an observation. It saves nothing by itself. Both are fields of the run's `finding` in `GET /observe/{id}`, `get_run`, `get_chat` and `observe status --json`. ### CLI flags for investigate | Flag | Meaning | | --- | --- | | `--dashboard <id>` | The dashboard the question is about. | | `--panel <panel-id>` | One panel of `--dashboard`. | | `--observation <id>` | The observation to write into; without it a new observation is made. | | `--at <anchor>` | The spot the question is about; needs `--dashboard` or `--observation`. | | `--block <id>` | A block of `--observation` the question is about. | | `--from <time>` and `--to <time>` | The window to look at, such as `now-6h` and `now`; they go together. | | `--as-of <time>` | Admin only: the time to investigate as of. | | `--private` | Answer privately about `--dashboard` or `--observation`; needs exactly one of them. | | `--no-wait` | Print the request id and exit without waiting. | | `--timeout <duration>` | Stop waiting after this long; the investigation keeps running on the server. | | `--open` | Open the finding in the browser once it is saved. | Details of the flags: - `--at` takes the anchor JSON object or a short form such as `pos:0.4,0.3`. - `--block` comes from `observe o show`; with `--at`, it is the block `--at` points into. - `--as-of` takes epoch milliseconds or an RFC 3339 time in the past, and `--to` must not be later. - `--panel` needs `--dashboard`, and `--block` needs `--observation`. ### Deprecated finding routes The `/api/v1/findings` routes that remain are deprecated adapters over observations: list, read, pin, make a dashboard and panel data. Use the observation's own routes. The finding tools and commands are gone. # Keyboard shortcuts > The keys that view, edit and inspect a panel, move the time range, refresh a dashboard and start TV mode, where to see them in the app, and the keys of the logs page and the trace search. Source: https://slashobserve.com/docs/use/keyboard-shortcuts/ · Markdown: https://slashobserve.com/docs/use/keyboard-shortcuts/index.md A dashboard answers a few keys, the same ones Grafana uses. Use them to open a panel, move the time range or refresh without reaching for the mouse. ## See the shortcuts in the app 1. Open a dashboard. 2. Press `?`. A dialog named **Keyboard shortcuts** lists the keys. On any other page, open the command palette with `⌘K` or `Ctrl+K` and choose **Keyboard shortcuts**. ## Act on a panel `v`, `e`, `i`, `a` and `c` act on the panel under the pointer. With no panel under the pointer, they act on the panel that holds the keyboard focus. 1. Point at a panel. 2. Press `v` to view it at full size. 3. Press `v` again to go back to the dashboard. Hovering a panel also shows **Ask** and **Comment** buttons in its header, which do what `a` and `c` do. They fade in under a mouse or trackpad. On a touch screen, and while the keyboard focus is in the panel, they are always shown. A panel narrower than 240 pixels leaves them and its datasource name out of the header so the title keeps the room. The keys and the panel menu still work there. **Ask** needs the same things as `a`, and the panel menu offers both with the same rule. ## Move the time range Press the first key, then the second within one second. Any other key in between cancels the pair. `t` then `z` zooms the time range out, and `t` then `←` or `→` moves it back or forward; the [dashboard keys table](#dashboard-keys) says by how much. These keys turn the time range into fixed times, so the address of the page keeps the range you moved to. A range that would end in the future ends now instead and keeps its length. They do nothing on a dashboard that hides the time picker. ## Know when keys are ignored The keys do nothing while you type in a field, while a menu or dialog is open, or while you hold `⌘`, `Ctrl` or `Alt`. `v`, `e`, `i`, `a` and `c` also act on no panel while you have unsaved layout changes. `c` then only opens the activity pane. In the full-size view and in TV mode, `c` comments on the panel in the activity pane instead, and with no panel it opens the activity pane. On a copy of a repeated panel, `c` also comments in the activity pane. ## Move around the app The first Tab stop on every page after sign-in is **Skip to the page**, which appears at the top left. Press Enter on it to move the focus to the page's heading and skip the sidebar. When a page opens because you pressed Enter or followed a link, and the focus was on something that went away with the old page, the focus moves to the new page's heading. Focus stays where it is when you open a page from the sidebar, and when the new page puts the focus in a field itself. ### Panes of a dashboard Opening the Share, Activity, Chat or Dashboard JSON pane moves the focus to the pane's heading, on a phone as well. A screen reader then reads the heading, and the keys work inside the pane. A pane that was already open when the page loaded does not take the focus. Escape closes the pane when the focus is inside it or on the button that opened it. The focus returns to the button that opened the pane, which on a phone is the Controls button, and so does the pane's Close button. A pane that was already open when the page loaded returns the focus to its own button in the header: Activity for the Activity and Chat panes, Share for Share, and More for Dashboard JSON. ## Observation page keys An observation page answers `c`, `a` and `Esc` for the canvas, as [Comment and ask on the blocks](/docs/use/observations/#comment-and-ask-on-the-blocks) describes. - `c` and `a` open the composer or the ask box on the whole block under the pointer, or on the one that holds the keyboard focus. With no block there, they turn Comment or Ask mode on, and in that mode they turn it off. - `a` skips a panel block whose panel shows no data. - `Esc` first hides the **Comment** and **Ask** buttons under selected text. It then closes an open composer or ask box, and then leaves Comment or Ask mode for Select. When you have typed, it asks "Discard your draft?" before your text goes. - The keys do nothing while you move or resize blocks, while you type in a field, and for a person who cannot comment. ## Logs page keys The logs page answers keys of its own, described in [Logs and traces](/docs/use/logs-and-traces/). `?` opens the same list in a dialog named Keyboard shortcuts. `/` and `?` do nothing while you type in a field or while a dialog is open. | Keys | What they do | | --- | --- | | `/` | Focus the query. | | `⌘Enter` or `Ctrl+Enter` | Run the query, from the query editor. | | `⌘I` or `Ctrl+I` | Switch between Ask and Query, from anywhere on the page. | | `Ctrl+Space` | Complete a field, label or keyword, in the query editor. | | `j` | Move to the first line when nothing has the focus, then to the next line. | | `k` | Move to the previous line, while a line has the focus. | | `Enter` | Open the line that has the focus. | | `Esc` | Close the open line and return to it. | | `?` | Show this list. | ## Metrics page keys The metrics page answers three keys, described in [Metrics](/docs/use/metrics/). | Keys | What they do | | --- | --- | | `/` | Focus the query. | | `⌘Enter` or `Ctrl+Enter` | Run the query, from the query editor. | | `⌘I` or `Ctrl+I` | Switch between Ask and PromQL, from anywhere on the page. | ## Trace search keys The trace search answers keys of its own too, described in [Logs and traces](/docs/use/logs-and-traces/). | Keys | What they do | | --- | --- | | `⌘I` or `Ctrl+I` | Switch between Ask and Query, from anywhere on the page. | | `⌘Enter` or `Ctrl+Enter` | Run the search, from the Service, Span name and duration fields or from the SQL editor. | | `Enter` | Ask the question, or run the search from Service, Span name or a duration field. | | `Shift+Enter` | Add a line to the question. | ## Trace view keys The waterfall of a trace answers keys of its own while a span row has the focus, described in [Logs and traces](/docs/use/logs-and-traces/). | Keys | What they do | | --- | --- | | `j` or `↓` | Move to the next span. | | `k` or `↑` | Move to the previous span. | | `Enter` | Open the span's details, or close them when they are open. | | `Escape` | Close the open span's details. | | `←` | Collapse the span's children. | | `→` | Expand the span's children. | | `/` | Jump to the **Find in trace** field. | ## Reference ### Dashboard keys | Keys | What they do | | --- | --- | | `v` | View the panel at full size, or go back to the dashboard. | | `e` | Edit the panel, when you may edit the dashboard. | | `i` | Open Inspect for the panel, or close it. | | `a` | Ask the agent about the whole panel. | | `c` | Comment on the whole panel. | | `Esc` | Close the topmost open thing, as listed below. | | `t` then `z` | Zoom the time range out to twice its length. | | `t` then `←` | Move the time range back by half its length. | | `t` then `→` | Move the time range forward by half its length. | | `d` then `r` | Refresh every panel. | | `d` then `k` | Enter TV mode in full screen. | | `f` | Go full screen in TV mode opened from a link. | | `?` | Show the keyboard shortcuts. | | `⌘O` or `Ctrl+O` | Change how chart hover is shared between panels. | | `⌘K` or `Ctrl+K` | Open the command palette, which searches the workspace as you type. | | `⌘\` or `Ctrl+\` | Collapse or expand the sidebar; under 1200 pixels wide it opens the full sidebar over the page. | Details of `a`: - It opens a box on the panel when the panel is a data panel, you may comment on the dashboard and a model is connected. - In the full-size view, in TV mode and on a copy of a repeated panel, it opens the Chat tab on that panel instead. - With no panel it turns Ask mode on, and in Ask mode it turns it off. - See [Ask and comment on a dashboard](/docs/use/ask-and-comment/). Details of `c`: - It opens a composer on the panel when you may comment on the dashboard. - With no panel it turns Comment mode on, and in Comment mode it turns it off. Details of `Esc`, in the order it acts: 1. It closes an open comment or ask box, which leaves the mode on. 2. It closes Inspect. 3. It closes the full-size view. 4. It leaves TV mode and full screen. 5. It leaves Comment or Ask mode for Select. 6. It clears the selected panel. # Logs and traces > Search logs from Loki, ClickHouse, Elasticsearch or OpenSearch and traces from Tempo, Jaeger or ClickHouse with a query or a plain-language question, follow a line to its trace, tail new lines and keep a query as a dashboard panel. Source: https://slashobserve.com/docs/use/logs-and-traces/ · Markdown: https://slashobserve.com/docs/use/logs-and-traces/index.md The logs page and the trace view let you read raw log lines and spans without building a dashboard first. Use them to see what a service logged, follow one request through its trace, or keep a search as a dashboard panel. They read from the datasources an Admin configured, as described in [Connect Loki](/docs/connect/loki/), [Connect Tempo](/docs/connect/tempo/), [Connect Jaeger](/docs/connect/jaeger/) and [Connect ClickHouse](/docs/connect/clickhouse/). Every signed-in role from Viewer can use them. Queries run on the server, so datasource credentials never reach the browser. ## Search logs 1. Choose **Logs** in the sidebar, then a log source. A log source is an Elasticsearch, OpenSearch, Loki or ClickHouse datasource. The page opens at `/logs/<datasource uid>`, and its title names the source and its language, such as **Logs / ClickHouse** with an **SQL** tag. 2. Read the lines the page shows at once. It runs a starting query over the time range at the top and lists the newest lines, so you see what the source holds before you narrow it. 3. Write a query in the language segment of the query card, then press **Run query**, or press Ctrl+Enter (Cmd+Enter on a Mac) in the editor. On Loki, for example: ```logql {service_name="checkout"} |= "error" ``` You see one page of lines, newest first, with a volume chart above them and the fields of the source on the left. 4. Click a value under **Fields**, or choose **Add filter**, to narrow the search without retyping it. 5. Click a line to open it, then choose **Show context** to read the lines around it, or **Open trace** to follow it to its trace. 6. Choose **Copy link** to share the search, **Save search** to keep it, or **Add to dashboard** to turn it into a panel. If you would rather describe what you want, switch the mode switch to **Ask**, as [Ask in plain language](#ask-in-plain-language) describes. Outside a text field, `/` focuses the query and `?` lists the keys of the page, which [Keyboard shortcuts](/docs/use/keyboard-shortcuts/#logs-page-keys) describes. ### Choose a source `/logs` lists the log sources, each with its query language and whether it answers. Under them it lists the saved logs searches you can view, most recently changed first, with their source, folder, who saved them and when. A source or a search opens on its own page. Each source in the list also shows the services it has seen in the last hour. The list shows the first three names and then "+N more", and a click on "+N more" shows the rest, with **Show fewer** to fold them again. A service name opens that source with the service filter applied. On logs that is a pill on the field that holds the service, such as `service_name` on Loki, and for traces it is the service filter. The box above the list filters the sources by the text in a source name or in a service name, so typing `checkout` leaves the sources that hold a checkout service. Every source loads its services on its own, so a slow source shows "Services unavailable" for itself and the others fill in as they answer. Switching to another source keeps the time range and the filter pills and clears the query, unless both are Elasticsearch or OpenSearch, which both speak KQL. An address that carries a search but no source, such as `/logs?q=...`, opens the source you used last on this browser, else the first by name. An old `/logs?ds=<datasource uid>` address opens `/logs/<datasource uid>` with the rest of its query string. [Sources and the sidebar](#sources-and-the-sidebar) describes how the sidebar lists them. ### What the page shows first The page starts as soon as it opens, with a query for the datasource. - On ClickHouse it runs a template that reads `otel_logs` and shows the newest lines of the time range. - On Elasticsearch and OpenSearch it runs `*`, which matches every document, so you can see which services the source holds in the **Fields** column before you narrow the query. - On Loki it runs `{service_name=~".+"}`, which reads every stream that has a `service_name` label. A Loki whose streams carry no `service_name` answers no lines until you pick a label. With a model configured on the server, the query box opens in Ask mode instead, as [Ask in plain language](#ask-in-plain-language) describes. ### Query modes The mode switch at the top left of the query card has up to three segments. - **Ask** takes a question. - **Builder** edits the query as filter chips. - The last segment is named for the datasource's language (**KQL**, **LogQL** or **SQL**) and edits the text. ClickHouse has no Builder segment, because its query is SQL. On Loki the Builder segment is the label browser. It lists the labels of the datasource and their values, and a click on a value puts that matcher into the stream selector the query already holds, replacing the value of the same label, so the rest of the query stays as it is. On ClickHouse, or when the query has no selector yet, the click inserts the matcher at the cursor. On Elasticsearch and OpenSearch the Builder is a row of chips with an **Add a filter** button. A filter picks a field from the index mapping, an operator and a value. The operators are is, is not, is one of, exists, greater than, at least, less than, at most and contains. The page suggests values from the newest lines of the time range. Choosing a filter or removing a chip rewrites the query and runs it. The Builder shows only a flat list of clauses joined by `and`, with `not` in front of a single field match. A query with an `or` at the top, a group, a form prefix or text that does not parse greys the segment, which says "The builder cannot show this query. Edit it as KQL." **Edit as KQL** in the Builder switches to the text without changing it. The page opens in the language segment when the address carries a query. ### Write and run a query In the language segment you write the query yourself. The page shows one page of lines at a time, newest first, 50 by default. The link under the query opens the reference for the language of the source: LogQL on Loki, SQL on ClickHouse, and KQL on Elasticsearch and OpenSearch. - On Loki, write a LogQL query that starts with a stream selector, such as `{service_name="checkout"} |= "error"`. - On ClickHouse, the editor holds the template. Keep `$__timeFilter(Timestamp)` in the `WHERE` clause and a `LIMIT` at the end. - On Elasticsearch and OpenSearch, write KQL, or one of the other two forms in [Query languages on Elasticsearch and OpenSearch](#query-languages-on-elasticsearch-and-opensearch). Ctrl+Space in the editor completes names. It completes the columns of `otel_logs` and the SQL keywords on ClickHouse, the stream labels on Loki, and the mapped fields on Elasticsearch and OpenSearch. Press **Run query**, or Ctrl+Enter or Cmd+Enter in the editor, to run it over the time range at the top of the page. When a run fails, the box says "No results." with the time and size of the last good run, and on Elasticsearch and OpenSearch a **Check the datasource** link. Under the lines a page bar sets 50, 100, 250 or 500 lines per page and moves between pages, as [Paging](#paging) describes. **Live tail**, **Add to dashboard** and **Add to observation** stay disabled until a query has run, and say "Run a query first." #### ClickHouse rules A ClickHouse query must read the time range through a macro such as `$__timeFilter(...)`. When it does not, the server refuses it with a sentence that names the macro with the table's time column, such as `$__timeFilter(Timestamp)` on `otel_logs` and `otel_traces`. A macro inside a comment does not count, because it never runs. So no ClickHouse request reads a table beyond the range at the top of the page. A query that selects no `Timestamp` runs too, and the rows show as a plain table in your own order with the volume chart hidden: ```sql SELECT ServiceName, count() FROM otel_logs WHERE $__timeFilter(Timestamp) GROUP BY ServiceName ORDER BY count() DESC ``` The field counts follow the same rule, except that a query selecting `Timestamp` is counted over the time range even without the macro. Without an `ORDER BY` the rows are ordered by all their columns, so a page never repeats or skips a row. A syntax error names the line and column in the query as you wrote it and the word there, such as `failed at line 2, column 32 of the query, near "GROUP"`. It can also say the query ends too early. It never shows the SQL the server wraps around the query to page it, and the trace SQL view reports errors the same way. ### Query languages on Elasticsearch and OpenSearch An Elasticsearch or OpenSearch datasource runs three query forms. - KQL is the default and what a Kibana user types. - A `lucene:` prefix switches to Lucene, the syntax of Kibana's Lucene mode and of Grafana's Elasticsearch targets. - Text that starts with `{` is a Query DSL body, for aggregations and for a body pasted from Kibana or Grafana. A `kql:` prefix, or `queryLanguage: lucene` on the datasource, changes which form an unprefixed query is. The [Elasticsearch](/docs/connect/elasticsearch/#queries) and [OpenSearch](/docs/connect/opensearch/#queries) pages describe what each form returns, the aggregations that fold into panels, ad hoc filters, lint and paging. The **Language** control under the query box switches between KQL, Lucene and Query DSL. It adds or removes the `lucene:` prefix, and picking Query DSL on an empty box inserts a `match_all` body. The editor highlights JSON as soon as the text starts with `{`. #### KQL on Elasticsearch and OpenSearch The server parses a strict subset of Kibana KQL and refuses the rest with a message at the offset of the construct. A query that Kibana accepts may therefore not paste. The query box shows the same check as you type. It puts a caret under the offending character, says the problem in plain words and, when one edit makes the query valid, shows a button that applies it. - A missing closing parenthesis is closed before the next top-level `and`, or at the end. - A query that reads as Lucene, such as one with `+`, `-` or `~` operators, offers **Switch to Lucene**, which adds the `lucene:` prefix and runs the text as written. - **Fix it with Ask** asks the model to repair the text. - **Open in the builder** shows it as chips when it can. - **KQL reference** opens this section. Nothing runs while the query cannot be read, also when a link opens the page with such a query. The box shows the same card, and the volume strip and the results say nothing ran instead of showing a datasource failure. These constructs are refused: | Construct | Example | Message | Why it is out | | --- | --- | --- | --- | | Nested field queries | `items:{ name:x and qty > 1 }` | "nested queries are not supported" | They need the `nested` mapping type and a `nested` query. | | Leading wildcard in a field name | `*name:x` | "a field name cannot start with \*" | Kibana expands it from the data view, and the server has no data view. | | Escaped whitespace in a bare word | `message:a\ b` | "quote a value that contains spaces" | One escaping rule, quotes, keeps the explorer's filter buttons and the query builder simple. | | A `kql:` prefix inside a query | `kql:a` | "kql: is a form prefix, not a query" | The prefix is read before the parser runs. | Details of what the parser accepts: - Inside a quoted value, `\n`, `\t` and `\r` stand for a newline, a tab and a carriage return, `\"` for a quote and `\\` for a backslash. - A query may hold 200 terms, and the values of one `field:(a or b or ...)` list count separately, up to 5,000, so a large multi-value selection still parses. - Date math in a range value, such as `@timestamp >= now-15m`, is passed to the cluster as written, so the server cannot lint it. - A field the mapping does not have is reported as a warning in lint, and the query still runs. When exactly one mapped field ends the same way as the unknown one, the lint message adds a suggestion. An example is `resource.service.name` for `service.name` after you move a query from Elasticsearch to OpenSearch. The message then adds `did you mean "resource.service.name"?`, and the warning under the editor offers **Use resource.service.name**, which renames the field in the query. KQL values are case sensitive, so a query such as `service.name:checkout and log.level:error` can find no lines when the data says `ERROR`. The server then checks the keyword fields its clauses name, three at most, against the values they hold in the range. - When one of them holds `ERROR` where the query says `error`, the empty result says no document has that value, that the field has the other spelling, and lists up to five of the values it does hold. - When the field has few enough values to list them all and none matches, it lists them without the case remark. The server writes that sentence as `meta.hint` of the query response. The HTTP API and the MCP tool `query_instant` give the same words, so an agent reads it in the step text and in the result's `hint`. ### Share a search The time range, **Live tail**, **Saved searches**, **Save search** and **Copy link** sit in the top bar. On a phone the bar keeps the time range and **Live tail**, and **Save search**, **Saved searches** and **Copy link** are under **More actions**. The address keeps the search as `/logs/<datasource uid>?q=<query>&from=<from>&to=<to>`, so you can share it or bookmark it. A query written from a question also keeps the question as `ask` beside `q`, and the link opens the query with its question above it. Times on the page are in the time zone of your browser, and a range between two moments reads with that zone after it, such as `Nov 18, 19:53 to 19:59 GMT+5:30`. ## Narrow the lines with filters A filter pill narrows the query without retyping it. The row under the query box shows one pill for each filter, such as `service.name: checkout` or `NOT host.name: canary-*`. 1. Choose **Add filter** under the query box. 2. Pick a field, an operator and a value. The field and the value suggest what the datasource holds in the time range, and the operators are is, is not, is one of, exists and between. 3. Choose **Add filter** in the form. The page runs the query again with the pill. The pills are not part of the text in the query box. The results, the log volume, the fields and the patterns all read the query with the active pills added. The address keeps the pills as `f` beside `q`, so a shared link carries both. ### Change a pill Pick a pill to change it. - **Exclude** turns it into its negation and **Include** turns it back. - **Pin** keeps it when you change the query, and **Unpin** lets the next query clear it. - **Pause** keeps the pill in the row but leaves it out of the query until you pick **Resume**. - **Edit** opens the form with the pill's values. - **Delete** removes it. When you run a different query, the pills that are not pinned are cleared and a message says how many, with **Undo** to bring them back and run the query again. A long pill shortens with an ellipsis inside the card, and hovering it or moving focus to it shows the whole text. A saved search stores the query with its pills folded in as text. ### How a pill is applied A pill is applied in the language of the datasource. - On Elasticsearch and OpenSearch it adds a KQL clause to the query. It needs a KQL query, so the row asks you to switch the query to KQL while the text starts with `lucene:` or `{`. - On Loki it goes into the stream selector or a `|` stage. An exclusion on a stream label stays beside the matcher the query already holds, so `{service_name=~".+"}` with `NOT service_name: frontend` runs as `{service_name=~".+", service_name!="frontend"}`. - On ClickHouse it goes into the `WHERE` clause. - On Loki and ClickHouse only the is and is not operators apply. A pill the datasource cannot express, or the query cannot take, is marked "not applied" and left out of the query. The row holds at most 50 pills, and the address holds the pills in about 4,000 characters. A form that would go past either limit says so under the row and adds nothing. ## Read the volume chart The volume strip above the lines counts every line the query matches over the whole time range by level, not only the lines shown. Hover a bar, or focus the strip and walk it with the arrow keys, to see the time and the count for each level in that bucket. The level chips above the bars show a count for each level. A chip hides or shows that level in the bars and in the lines of the page you are on, with a note "Hiding Info lines" beside **Sort**. The count of the other chips and the query do not change, and **All** shows every level again. The chips filter the lines already loaded, not the query, so another page can hold lines of the hidden level. To search for a level, add a filter. Levels such as `err`, `fatal` and `critical` count as errors, `warn` as warnings, `info` and `notice` as info, and anything else, or no level, as other. ### Zoom to a time 1. Drag across the strip to select a time. 2. Choose **Zoom to selection** to narrow the time range to it, or **Clear** to drop the selection. Move either edge of the selection with the arrow keys on its handle, or hold Shift while walking the strip to extend it. On a touch screen the strip shows counts but does not select, because a drag there scrolls the page. ### When the volume is slow or partial The strip comes from its own log volume request, which starts once the lines have answered or failed, so one slow source gets one request at a time. The fields list on the logs page and the trace search statistics wait for the results in the same way. The strip hides while live tail shows its lines. - When the lines time out, the strip says the source is slow instead of starting more requests. - When the volume request does not finish, the strip says so with the server's reason in plain words about your query, never the position in the query the server wrapped. It also says the lines below are complete only when they loaded. **Retry volume** asks again and **Try the last 15 minutes** narrows the range. - On Loki, when the next day would not finish in time, the strip shows the days it counted and shades the older bars as not counted. It says "N lines since <time>" and explains that the datasource ran out of time, and hovering a shaded bar says "Not counted". The log volume request then returns `partial: true` with `counted_from`, and `observe datasources log-volume` prints the same note, so an agent knows the older buckets read zero because they were not counted. [How the volume is counted](#how-the-volume-is-counted) has the exact rules for each datasource. ## Browse fields and their values The column on the left of the results lists the fields of the datasource. The note under **Fields** says where the list comes from, and the search box narrows it by name. - On Elasticsearch and OpenSearch it lists the mapped fields of the index. - On Loki it lists the stream labels and the fields the query shows. - On ClickHouse it lists the columns of the query. Columns you chose for the results come first under **Selected**, and the rest are under **Available**. A badge beside each name says its kind: keyword, text, number, date, boolean, IP, or on Loki a label, a parsed field or structured metadata. A query that matches no lines on Loki shows an empty list, not an error. ### See the top values of a field Open a field to see its top five values with their counts and a bar scaled to the largest. The line under the values says how they were counted. - Where the datasource counts, the counts are exact and cover every matching line. - Where it cannot, the counts come from the newest 1,000 lines and the line says so. On Loki that is the parsed fields and the structured metadata. - Loki counts its index labels in bytes, not lines, and shows a size. - A field the query does not return, or that has no countable values, says "No values in this range." The counts are read after the lines have arrived, so a wide range shows the lines first and the value counts a moment later. On a range wider than six hours the counts also wait for the volume strip to answer, so the two heaviest requests on a busy source do not run together. The label names are asked for after the lines have arrived. When the count times out, the column says so with **Retry** and suggests a shorter range. ### Keep or drop the lines that have a value Click a value to keep only the lines that have it, or its exclude button to drop them. The page rewrites the query and runs it, so **Back** returns to the previous one. - On Elasticsearch and OpenSearch the page adds a KQL clause. A Lucene or Query DSL query is not rewritten, and its buttons stay disabled. - On Loki the page adds a `| field="value"` stage to a log query. - On ClickHouse the page adds a condition to the `WHERE` clause, and a query without one keeps its buttons disabled. On Elasticsearch and OpenSearch a `.keyword` subfield is not listed beside the text field it belongs to. A field filter replaces a query that is only `*` instead of appending to it. ### Resize or hide the column **Hide fields** folds the column to a strip with **Show fields**, and the page remembers the choice. Drag the edge of the column, or focus it and press the left and right arrow keys, to make it wider when long field names are cut off. Double-click the edge to reset it, and the page remembers the width. Below 1,000 pixels wide the column is hidden, and a **Fields** button in the results header opens the same list in a drawer. Choosing a value closes the drawer and runs the query. ## Read the lines The lines the query and its filters match are listed under the volume strip, newest first, 50 to a page. A row shows the time, the level and the message only. A line's stream labels and structured metadata are not written in front of the message, and the open line lists them all. Each row opens as [Open a line](#open-a-line) describes. Live tail swaps the list for the tail, as [Follow new lines with live tail](#follow-new-lines-with-live-tail) describes. ### Results toolbar and columns The row above the lines holds **Sort**, **Wrap**, **JSON** and **Columns**. - **Sort** picks newest first or oldest first, and clicking the **Time** heading flips it. - **Wrap** wraps long lines, and starts on when the page opens on a phone. - **JSON** reformats a line whose body is JSON over several rows. - **Columns** lists the fields found in the loaded lines. Each field you tick becomes a column before the line, written to the address as `cols`. On Elasticsearch and OpenSearch the `service` field is a column until you choose others. The menu on a column heading sorts the loaded lines A to Z or Z to A, moves the column left or right, or removes it. **Sort**, **Wrap** and **JSON** are your own view of the lines, so **Copy link** does not carry them, and neither a running **Live tail**. The person who opens the link sees the same query, filters, columns, time range, page and open line with their own view settings. ### Paging The bar under the lines says which lines are on the page, such as "51-100 of 48,210 hits in range", and sets how many lines a page holds. The header above the lines gains ", page 3" from the second page on. - ClickHouse, Elasticsearch and OpenSearch offer numbered pages and an exact total of the lines that match. - Elasticsearch and OpenSearch stop at the largest offset the index pages to, `max_result_window`. A note under the bar says which page that is and to narrow the time range to reach older lines. An address that names a page past it opens the last page that can be reached, with a note saying which page was asked for, and keeps the page bar. - Loki pages by time from the last line shown, with **Previous** and **Next**. Its running total reads "at least N" until the last page makes it exact, because a Loki page is reached through the page before it. The page and size are in the address as `page` and `size`, so a link to a page opens on it. A Loki address beyond page 1 reopens on page 1 with a note, and a query, filter, datasource or time range change returns to page 1. When a page cannot be read, the bar keeps the last page that loaded and the error shows above it. On Elasticsearch and OpenSearch a note above the bar says "Some shards did not answer; counts may be low" when the store reports a partial answer. Live tail replaces the lines and hides the bar. ## Open a line Click a line, or focus it and press Enter, to open its details. Press `j` and `k` in the list to move to the next and previous line, and press `j` with nothing focused to land on the first line. Only one line is a Tab stop, the one you last had focus on, so Tab crosses the list in one press. Press Escape to close the details and return to the line. The details open in the side panel on the right, beside the results, or inline under the line on a screen narrower than 900 pixels. The panel has three tabs. - **Table** lists the fields of the line. - **JSON** prints the whole line. - **Context** shows the lines around it, as [Context around a line](#context-around-a-line) describes. The panel also offers **Show context**, **Copy line**, which copies the line's text, **Copy link**, and an **Open trace** link when the line carries a trace id. Opening a line adds `line` to the address, closing it removes `line`, and **Copy link** in the line's details copies an address that opens that line. When the linked line is not in the results, the page says so and **Clear** removes `line` from the address. On Elasticsearch and OpenSearch the panel is titled **Document**. Its table groups **Core fields** (time, level, service, trace id, span id and document id) apart from **Other fields**, which hold the rest of the document and its index as `_index`. A field whose value is a JSON object, such as the ClickHouse `LogAttributes` map, shows one row per key, named `<field>.<key>`, one level deep. ### Filter from a field of the line Each field in the table has **Include** and **Exclude** buttons, shown when you hover or focus the row. They add a [filter pill](#narrow-the-lines-with-filters) for the field and its value, and the page runs the query again with it. - On Elasticsearch and OpenSearch **Require** adds an exists pill for a field that has a value. The core fields have no buttons. - On Loki a stream label becomes a pill that goes into the stream selector. A parsed field or structured metadata value becomes a pill that goes into a `|` stage at the end of the query. - On ClickHouse a column or a `LogAttributes` key goes into the `WHERE` clause. A button is disabled in these cases: - The row's pill is already in the row of filters. - The row holds 50 filters. - The value is longer than 200 characters. - On Elasticsearch and OpenSearch, the query is Lucene or Query DSL. ## Context around a line Open a line and choose **Context** (**Surrounding documents** on Elasticsearch and OpenSearch) to see the 50 lines before it and the 50 lines after it, with the line itself marked between them. - When more lines exist on a side than it shows, **Load 10 older** or **Load 10 newer** adds 10 to that side, up to 500. - **Window** widens the search from an hour to 10 minutes or 24 hours, and a side with nothing in the window says so. The server reads both sides in one request, anchored on the line's nanosecond time, so the context is exact. The lines just before are the newest ones older than the line, and the lines just after are the oldest ones newer than it, within an hour on each side. The lines come from the same stream labels on Loki, the same `ServiceName` on ClickHouse, and the whole index on Elasticsearch and OpenSearch. On an Elasticsearch or OpenSearch time field of type `date`, which keeps milliseconds, context is exact to the millisecond. The lines in the anchor's own millisecond are left out on both sides. Scripts call `POST /api/v1/datasources/{uid}/log-context` with the line's `TimeNs` as `anchor`, as [Scripts and the CLI](#scripts-and-the-cli) describes. The MCP tool `log_context` does the same for an agent. ## Follow new lines with live tail **Live tail** shows new lines as they arrive, without rerunning the query by hand. 1. Run a query. 2. Choose **Live tail** in the top bar. 3. Watch the lines arrive. The tail lists them oldest first with the newest at the bottom, so the sort is fixed while it runs and the search order comes back when you leave it. 4. Press **Stop live tail** to end it. Lines that just arrived are marked for a moment, and a status line above the list tells when the tail started and how many lines it received. **Clear** empties the lines shown until you start the tail again. The page keeps the newest 1,000 lines of the last 5 minutes and drops older ones off the top, and the note under the list says so. Scrolling up with the wheel, a touch, the keyboard or the scrollbar pauses the list, so it stops moving under the pointer. The list growing as lines arrive never pauses it, and a button counts what arrived meanwhile. **Jump to newest**, **Resume** or scrolling back to the bottom resumes it. A "New since" divider then marks where the lines that arrived during the pause begin, and a screen reader reads each of them as "new". A tail stops when you press **Stop live tail**, when the query, a filter or the time range changes, or when the server cannot run the query. A tail that cannot start or run shows "Live tail stopped" with the reason, such as the limit of 5 tails, and **Start again**. ### How a tail runs **Live tail** opens one stream to the server, which watches the query and sends new lines as they arrive, so the browser runs no query of its own. The page reads `GET /api/v1/datasources/{uid}/tail?query=...` on a Loki, ClickHouse, Elasticsearch or OpenSearch datasource. The stream sends Server-Sent Events, polls the datasource every second and ends after 30 minutes. [Live tail over HTTP](#live-tail-over-http) lists what a script can read from the same stream. - You may hold 5 tails at a time. - A tail reconnects by itself after a dropped connection or at the server's 30 minute limit, from the newest line it already holds, so no line is lost or repeated. - On every one of these datasources the server reads the last 5 seconds again at each poll and drops the lines it already sent. A line that arrives out of order or is indexed late still appears, and a line stamped in the future does not hide the lines that follow it. - When the store says a poll did not cover everything, such as a failed shard, the stream flags that poll as partial with the store's text. The next polls ask again from the same point for up to three polls, so the missing lines arrive without repeating the ones already shown. ## Group lines into patterns The **Patterns** tab beside **Documents** groups the lines the query matches into templates and counts them. Use it to read a noisy service as a few templates instead of thousands of lines. The tab shows how many patterns there are once they have loaded, and it stays disabled until a query has run. A template keeps the fixed words of a line and writes each number or id as `<*>`. Each row shows these: - the template and its count; - its share of the matching lines; - a small chart of how often it occurred across the time range, with its change over the range ("new" for a pattern that appeared late); - a dot for its level. The heading says how many patterns there are and what share of the documents they cover. **Sort patterns** orders the rows by most lines or by newest. The table shows the nine largest patterns and every pattern with at least 1% of the lines. The rest fold under "9 of 14 patterns shown, 5 cover under 1% each" until you press **Show all**. The page asks for the 20 largest patterns, and when the datasource holds more, **Show 100** appears beside **Show all** and asks for up to 100. ### Keep or drop the lines of a pattern **Filter** keeps only the lines of a pattern and **Filter out** drops them. Both return to **Documents** with the rewritten query, so **Back** returns to the previous one. - On Loki the page adds a regular expression line filter (`|~` or `!~`) after the existing stages. - On ClickHouse it adds a `match(Body, ...)` condition in the `WHERE` clause. - On Elasticsearch and OpenSearch it adds KQL clauses on `message` for the fixed words of the pattern. A query the page cannot rewrite, such as a Lucene or Query DSL query or a ClickHouse query without a `WHERE`, keeps both buttons disabled. **Samples** shows the newest line of a pattern when the server read the lines itself. ### Where patterns come from The note under the table says which source applies. - Loki answers from its pattern index over the whole range when the pattern ingester is on and the query is a bare stream selector. - Otherwise, and on ClickHouse, the page groups the newest 2,000 lines itself, and the counts are for that sample only. - Elasticsearch groups the matching documents with its `categorize_text` aggregation when the cluster has it. - OpenSearch, and a cluster without `categorize_text`, are grouped by the page like ClickHouse. [Pattern templates](#pattern-templates) describes the same grouping for scripts and agents. ## Add to dashboard **Add to dashboard**, in the header of the results, keeps the query as a logs panel on a dashboard you can edit. You need Edit on the target dashboard. The panel is full width and goes at the bottom of the dashboard, inside the last row when that row is collapsed, and the save makes a new version. The save runs the query over the dashboard's time range and refuses a panel that returns no lines there. The panel's menu offers the way back with **Open in Logs** or **Open in Traces**, which opens the explorer with the panel's query and the dashboard's time range. ## Add to an observation **Add to observation**, in the header of the results beside **Add to dashboard**, copies the search you ran into an [observation](/docs/use/observations/) as a logs panel named Logs. The panel keeps the datasource, the query and the time range the page shows. The block stays live on the page, so it runs the query when the page is open. The side panel offers an open observation or a new one, the same as **Add to observation** in a dashboard panel's menu. [Observations](/docs/use/observations/#add-to-an-observation-from-a-panel-or-from-logs) describes what is added and what is refused. When the page was opened from **Logs** in an observation's row of **Add a block**, its address carries `observation=<id>`, and that observation is preselected when it is open. ## Paste a Discover link Paste a Kibana or OpenSearch Dashboards Discover address into the query box or the **Ask** box of an Elasticsearch or OpenSearch datasource. You can also type it into **Ask** and press Ask, and the address is never sent to the model. The page fills in the query, the time range, the columns and the filters that match one value or a list of values. The note under the box says what was filled and how many filters from the address were not applied. Range, exists and custom filters are left out. A Lucene query gets the `lucene:` prefix, the source you are on stays selected, and nothing is sent to the server, because the browser reads the address itself. On a Loki or ClickHouse datasource the address is pasted as plain text. ## Ask in plain language Ask turns a question such as "checkout errors in the last hour" into a query for one datasource. Use it when you know what you want to see but not the query language. It works on the logs page, the trace search and the [metrics page](/docs/use/metrics/#ask-in-plain-language). Ask is off without a model configured on the server. [LLM providers](/docs/connect/llm-providers/) describes how to configure one. Without one, the Ask segment is disabled and says "Add a model key to ask in plain language". ### Ask on the logs page 1. Switch the mode switch at the top left of the query card to **Ask**. 2. Write a question and press Enter or **Ask**. Shift+Enter adds a line, and Esc cancels a question that is still running. 3. The page runs the answer at once. The explanation and any warnings show under the question, and the query shows in the editor below them, where you can still change it. On Elasticsearch and OpenSearch the model answers in KQL, and the Builder then shows the answer as chips when it can. Ctrl+I or Cmd+I steps through the modes the datasource offers from anywhere on the page, the editor included, and skips a mode that is not available. The page remembers the mode you last chose with the switch, the shortcut or **Ask again**, and opens in the query when the address carries one. Editing the query switches to the query segment, with a "From: <question>" line and **Ask again**, which brings the question back. A label from the label browser also switches to the query segment. When the model cannot turn the question into a query, the page says "I could not turn that into a query." with the reason, and switches to the query segment. While the field is empty it lists your 5 latest questions under **Recent**, and Up at the start of the field steps back through earlier ones. This browser keeps the recent questions, apart from the chat's. ### Ask on the trace search With a model configured, the trace search has the same toggle at the top left of the query card, with the question field beside it. The toggle reads **Ask** and **Query**, and on ClickHouse **Ask**, **Search** and **SQL**. 1. Switch to **Ask**, or press Ctrl+I or Cmd+I. 2. Write a question and press Enter. Shift+Enter adds a line, and Esc cancels a question that is still running. 3. The search runs at once. The answer fills Service, Span name, the durations and Errors only, or on Tempo the TraceQL field when the question needs TraceQL. On ClickHouse it replaces any SQL in the address with those fields. A duration the form cannot read is left empty. The explanation, the fields the answer filled as chips, such as **Service** with its value or **Min span duration** with `500ms`, and any warnings show under the question. **Edit the query** switches to Query with the answer's values in the form. The row under the form then shows a "From: <question>" line and **Ask again**, which brings the question back. The address keeps the question as `ask` until you change a field and search again, which drops it because the fields are then your own query. The mode you last chose on either page is the one both pages open in. The trace search opens in Query when the address carries a search field. On ClickHouse it opens in **Search**, or in **SQL** when the address carries SQL. **Recent** and Up bring back earlier questions, kept apart from those of the logs page. When the model cannot turn the question into a query, the page says "I could not turn that into a query." with the reason, switches to Query and puts the cursor in Service. Switching to another source drops the question, because it was answered for the other one. Without a model, the page stays in Query, and the Ask side of the toggle is disabled. ### What Ask writes - On Loki it writes LogQL. - On ClickHouse logs it writes ClickHouse SQL. - On Elasticsearch and OpenSearch it writes KQL, and a `lucene:` query only when KQL cannot say what the question needs. - On a Prometheus datasource it writes PromQL, as the [Metrics](/docs/use/metrics/#ask-in-plain-language) page describes. - For traces it fills the trace search fields: service, span name, minimum and maximum duration, and errors only. On Tempo it writes TraceQL instead when the question needs more than those fields. The query uses the field names and values the datasource really has. ### How Ask checks the answer The server first reads the datasource's metric names, labels, attributes or columns and some of their values, so the query names real ones. On Loki it also offers the values of `detected_level`, the structured metadata level that Loki adds, when no level label is listed. A question about errors then filters after the selector with `| detected_level="error"`. Then it asks the model once. It checks the answer with the query lint and one sample run over the last 15 minutes of the time range, and never runs the full query. When that check fails, it asks the model once more to fix the query, so a question costs at most two model calls. The answer comes with a one-sentence explanation and warnings. A warning can say any of these: - The query reads every stream or every document. - A Lucene query cannot be edited in the explorer's Builder. - A KQL field is not in the mapping. - A ClickHouse query has no `$__timeFilter` or `LIMIT`. - The sample has no matches or, on Prometheus, no series. When the model cannot write a query for the question, or the fixed query still fails its check, the answer says it could not turn that into a query and why. ### Limits on questions - Each person can have 3 questions in flight and ask 60 questions per clock hour. - After the 60th question the answer says to wait, with the minutes left in the hour. - A service-account key counts the same way. - Each question stops after 60 seconds. - A question is at most 2,000 characters. - The server answers at most 10 questions at once, and past that the answer is `agent_busy`. [Ask over HTTP](#ask-over-http) lists the error codes. ## Trace view A trace opens at `/t/<trace id>?ds=<datasource uid>`. Use it to see where a request spent its time, which span failed, and what the service logged while it ran. 1. Open a trace from a row of the [trace search](#trace-search), from **Open trace** on a log line, or from a traces panel. 2. Read the summary under the title. It gives the duration, the number of spans, services and errors, the start time, and the slowest service on the critical path with the time it spent there. 3. Click a span in the waterfall to read its details in the side panel. 4. Choose **Logs for this trace** in the top bar to read what the services logged. The title in the top bar reads **Traces / <source> / <root service> <root span>**, such as **Traces / Tempo / frontend POST /checkout**. The summary ends with the short trace id, and **Copy trace id** beside it copies the whole id. **Open trace** on a log line opens it when the line carries a `TraceId`, `traceID`, `trace_id` or `traceId` field. The value must be a trace id of 16 or 32 hexadecimal characters that is not all zeros. A Loki, Elasticsearch or OpenSearch line opens in the first Tempo datasource, or in the first Jaeger datasource when there is no Tempo, so the trace has to be in that datasource too. A ClickHouse line opens in the same ClickHouse datasource. An address with a trace id and no `ds` opens the only trace datasource when there is one, and otherwise asks which datasource to use. ### Waterfall The view draws the spans as a waterfall under a ruler, and the waterfall scrolls inside the window. Each row is 32 pixels high with the service and operation on the left, the bar in the middle and the span's duration at the right. A dashboard's traces panel draws the same rows. When the query returns more than one trace, the panel shows one at a time with **Previous trace** and **Next trace** buttons and a count such as "Trace 2 of 8". **Open trace** in the panel opens it in the trace view over the dashboard's time range. The controls above and beside the waterfall: - **Find in trace** matches a span's name, service, id, status message or attribute values. The matching text is highlighted, the field counts the matches, and Enter opens the next one, Shift+Enter the previous one. - **Critical path** outlines the chain that decides when the trace ends and dims the rest, and the line under the waterfall says how many spans are on it. The chain starts at the span that finishes last and includes a span that outlives its parent or starts after the parent ended, such as work the parent started and did not wait for. - **Errors only** dims every span that neither failed nor contains a failed span. - **Collapse all** folds every span with children, and **Expand all** opens them again. - The services legend lists each service with its colour and span count. Click a service to dim its spans, and click it again to show them. - The overview strip above the ruler draws the whole trace in one line per span, on the same time columns as the ruler, so a span has the same x in both. Drag on it, or on the ruler, to zoom the time axis to that window, and **Reset zoom** shows the whole trace again. The ruler steps by 1, 2, 2.5 or 5 times a power of ten, so its labels are round numbers, also after you zoom, when the first label is then not at the left edge. A very short window shows three round labels, or two or one on a narrow ruler, rather than its two edges. ### Span details A click on a span shows its details in the side panel on the right, or inline under the span on a screen narrower than 900 pixels. The details list these, in order: - the service and the span's kind (server, client, producer, consumer or internal); - its name; - its status with the message the span set, such as "card declined"; - its duration, share of the trace and start offset; - its span attributes, its resource attributes and its events. Each attribute row offers **Copy value** and, on Tempo, **Search traces where** the attribute is, or is not, that value, which opens the trace search with that TraceQL filter. A value that reads as a number matches both the number and the same text, such as `(span.order.id = 503 || span.order.id = "503")`, because the page cannot tell whether Tempo stored the attribute as a number or as a string. An event, such as an `exception`, shows its name, its offset from the span's start and its attributes, and the span's bar carries a dot at each event. A span's links are listed after its events. Each link shows the linked trace id, which opens that trace on the same datasource at the linked span, the linked span id and the link's attributes. While a span is open the address carries `span=<span id>`, so a copied link opens on that span with its row scrolled into view. The waterfall keeps its full width until a span is open, `j` and `k` move between spans while the panel stays open, and Escape closes it. [Keyboard shortcuts](/docs/use/keyboard-shortcuts/) lists the keys the waterfall answers. On a phone each row stacks the service and operation, with the duration at the right, above a thinner bar, so the whole name shows instead of its first few characters. **Logs for this trace**, **Add to dashboard** and **Add to observation** move out of the top bar into a row under the title, and the legend hint wraps instead of scrolling sideways. ### Logs for a span or trace A span's details end with a **Logs for this span** section. It shows the first lines that carry the span's trace id and span id, read from the Loki or ClickHouse logs datasource, with the count of lines found. A datasource that has not answered after 15 seconds ends in an error with **Retry**, never in placeholders that stay. - **Open in Logs** continues with those lines on the logs page, filtered on the trace id and span id over the span's window plus a minute on each side. - When a span logged nothing, **Try the whole trace** opens the trace's logs instead. - **Logs for this trace** in the top bar opens a side panel with every line of the trace, oldest first, up to the newest 500, and the same **Open in Logs** link. Messages wrap in the panel instead of being cut off. The panel replaces the span details while it is open, because the page shows one side panel at a time, and opening a span closes it. A ClickHouse trace reads its logs from a ClickHouse datasource, and a Tempo trace from Loki. With more than one logs datasource, a select in the section picks one, and the browser remembers the choice. ### Time range and large traces The view looks for the spans in the last 24 hours, or within an hour of the line when you came from the logs page. A trace outside the range says so and offers **Last 7 days** to widen it. The view loads the whole trace up to 20,000 spans. A trace with many repeated sibling spans, such as a batch job's, folds every set of more than 20 siblings with the same service and operation into one hatched row. The row carries their count, their total and slowest durations and how many failed, so the timeline still adds up. - A banner says the trace folds, the find field searches folded spans too, and the services legend counts them. - Open a folded row to see its slowest 50 spans, and **Show 50 more** for the rest. - A search match or a linked span inside a folded group opens the group to it. A trace over 20,000 spans opens with its earliest 20,000 spans by start time. A banner says how many the trace holds and that the rest are not loaded, and **Critical path** is off for it, because the path needs every span. When Tempo did not search every block, a banner says that some spans may be missing. ### Export and share A trace opened from the Logs page or from a trace search shows **Back to logs** or **Back to traces** under the top bar, which returns to that page with the same query and time range. A trace opened from a pasted link, a dashboard or after a reload has no such link, because the page it came from is not known. - **Download JSON**, an icon button in the top bar beside the time range, saves the trace as the browser holds it, the trace endpoint's response, as `trace-<trace id>.json`. - **Copy link** copies the address of the trace with its datasource, time range and open span. - **Add to dashboard** adds a full-width traces panel for the trace under the last row of a dashboard you can edit, with the datasource and the trace id. - **Add to observation** copies the trace into an [observation](/docs/use/observations/) as a traces panel, with the datasource, the trace id and the time range the page shows. The source name in the title opens the trace search on the same source at `/traces/<datasource uid>`. A trace opened without a known source shows **Search traces** in the top bar instead. ## Trace search The trace search finds traces by service, span name, minimum and maximum duration, and errors only. Use it to find the slow or failing requests of a service, then open one in the trace view. 1. Open **Traces** in the sidebar, then a trace source: a Tempo, Jaeger or ClickHouse datasource. 2. Fill in **Service**, **Span name**, a duration or **Errors only**, or leave them empty. 3. Press **Search traces**, or Ctrl+Enter or Cmd+Enter. The search also runs as soon as the page opens, with the fields the address carries, or with none. 4. Read the table, slowest first. Click the **Started** time of a trace, or its dot in the scatter, to open it. Each trace source has its own page at `/traces/<datasource uid>`. The title names the source and its language. On Tempo you can write TraceQL instead of using the fields, and on ClickHouse you can write SQL. `/traces` lists the trace sources and the saved trace searches like `/logs`. That includes the services each source has seen and the box that filters sources by source or service name. A service opens the trace search on that source with the service filter set. An address that carries a search but no source opens the last source you used in this browser, else Tempo when one is configured, else the first by name. An old `/traces?ds=<datasource uid>` address opens `/traces/<datasource uid>`. The time range, **Live tail**, **Saved searches**, **Save search** and **Copy link** sit in the top bar. On a phone the bar keeps the time range and **Live tail**, while **Save search**, **Saved searches** and **Copy link** are under **More actions**. The fields and the **Search traces** button sit in the query card. ### Set the filters Durations take a number and a unit, such as `250ms` or `1.5s`. The minimum and maximum are span durations. A trace matches when a span that also fits the service and span name is that long. A span name with a minimum of `1s` therefore finds nothing when that span runs for 100 ms, even if a later span makes the whole trace slower. On ClickHouse and Jaeger the **Service** field is a box with the services in `otel_traces` or in Jaeger. Open it for the list, type to narrow it, or type a name that is not listed. Press **Search traces**, or Enter in Service, Span name or a duration field, to run it. ### Write TraceQL on Tempo On Tempo you can write TraceQL, which replaces the fields. While the TraceQL field has text the other fields are disabled, and only the TraceQL goes into the address. The link under the TraceQL field opens the TraceQL reference. Enter in the TraceQL field adds a line. A TraceQL syntax error reads "Invalid TraceQL at line 1, column 9 after \"{ name =\": unexpected end of the query." It names the position and the text before it. The API, the CLI and MCP return the same sentence, without the parser's own `$end` and doubled prefix. ### Search a Jaeger source On Jaeger the same place takes a **Search** written as `key=value` pairs, such as `service=checkout http.status_code=500`. It replaces the fields the same way and is how you search on any tag. [Connect Jaeger](/docs/connect/jaeger/#queries) lists the keys. - Jaeger searches an operation or a tag only within one service, so a search with `operation` or a tag and no `service` shows the problem instead of running. - With no filter set the page searches with `minDuration=0s`, which Jaeger answers with its newest traces. ### Keep the search live **Live tail**, named as on the Logs page, runs the search and its statistics again every 10 seconds while the page is open and the range is relative, such as the last 15 minutes. Press **Stop live tail** to end it. It is a refresh and not a stream, because the trace sources have no tail, and the address does not carry it, so a shared link opens without it. On an absolute range **Live** is disabled and says "Live works on a relative time range, like the last 15 minutes." Choosing an absolute range while it runs turns it off. ### Ranges the sources refuse A range that starts in the future runs no search and says so. A call that reaches the datasource anyway, from the API, the CLI or MCP, is refused with `time_range_in_future` and the same sentence. Tempo refuses a search over a longer range than its `max_duration`, 7 days by default. The page then reads "Tempo searches at most 7 days at a time; pick a shorter time range" and offers **Last 7 days**. The API answers `time_range_too_long` with the same text, so a caller can read the limit from the message and retry with a shorter range. The limit is named in days when it is a whole number of days, in hours when it is a whole number of hours and otherwise in minutes, and the button uses the same unit. ### SQL on ClickHouse On ClickHouse the query card has a **Search** and **SQL** switch beside **Ask**, and Ctrl+I or Cmd+I moves through them. **SQL** opens an editor with the search of the fields written as SQL over `otel_traces`, so you can start from it. Ctrl+Space completes the columns of `otel_traces` and the SQL keywords. Press **Run query**, or Ctrl+Enter or Cmd+Enter, to run it. The address keeps it as `q`, and a link or a saved search with SQL opens in the SQL view. It runs through the same path and checks as the SQL of the logs page. - It is one read-only `SELECT`. - It reads the time range at the top of the page through a macro such as `$__timeFilter(Timestamp)`. - The 15 second query limit and the page size apply. - A query that breaks a rule is refused with a sentence that names it, and one ClickHouse cannot run shows the database's message. The rows show as a table with a column per selected column, in the order and up to the `LIMIT` the SQL gives, paged like the search. When the query selects a trace id column, `TraceId` or `trace_id` in any case, each id opens its trace. **Add to dashboard** adds a full-width table panel with the SQL as written under the last row of a dashboard you can edit. **Add to observation** copies it into an [observation](/docs/use/observations/) as the same table panel over the time range the page shows. The scatter, the statistics and **Compare** belong to the search, so the SQL view does not show them. Switch back to **Search** and press **Search traces** to run the fields again. The label beside the source name in the top bar says **SQL** while the SQL view is open and **Search** otherwise, Ask included, because an answer fills the search fields. To draw the spans of one trace from your own SQL, use a traces panel on a dashboard or in an observation. Its query is SQL with `format: "table"` that returns these columns: - `TraceId AS traceID` - `SpanId AS spanID` - `ParentSpanId AS parentSpanID` - `ServiceName AS serviceName` - `SpanName AS operationName` - `Timestamp AS startTime` - `Duration / 1000000 AS duration`, in milliseconds - `SpanAttributes AS tags` ### Results A count line above the results says how many traces are on the page. A scatter above the table plots each trace's duration over time on a log scale, red for traces with errors, with the p95 as a dashed line. A dot opens its trace on click, and hovering a dot highlights its row. The dots are not keyboard stops, so Tab goes straight to the table, where each trace has one link. That p95 is of every trace the search matches in the range, not only the listed ones, so a service filter changes it. The page asks the server for the duration distribution of the matching spans and reads the p95 as the upper edge of the bucket that holds it. While that answer is loading, or when it fails, the line and the ticks fall back to the p95 of the listed traces. A failed answer shows a warning icon beside the count line with the reason. The table opens slowest first, and a column header sorts by that column, ascending, descending, then back to the original order. Each row shows these columns: - **Root service** and **Root span**. - **Duration**, with a bar scaled to the slowest trace shown and a tick at the same p95 as the scatter's line. - **Spans** and **Errors**. **Errors** reads OK, or Failed with the number of error spans. Both show only when every row carries the count. - **Started**, which opens the trace. **Columns** hides a column. On Jaeger the search shows no duration tick and has no comparison, because Jaeger has no trace statistics. On a phone the table becomes a list. On ClickHouse the server sorts every trace the search matches before it pages them, so the first page holds the slowest traces of the range. The sort is in the address as `sort`, such as `sort=-spans`. On Tempo and Jaeger only the traces on the current page are sorted, and the line above the table says so. **Add to dashboard**, beside **Columns**, adds a full-width traces panel with the same query under the last row of a dashboard you can edit, as it does for logs. **Add to observation** copies the search you ran into an [observation](/docs/use/observations/) as a traces panel over the time range the page shows. That panel holds the TraceQL on Tempo, or on ClickHouse a query for the spans of the latest matching trace. #### What each source puts in a row - ClickHouse lists each trace that has a matching span as a whole: the root span's service and name, the number of spans in the whole trace, and the full length of the trace from its first start to its last end, so a row agrees with the trace it opens. With a filter set, a smaller "N matching" under the span count says how many of those spans matched. - Jaeger shows the root span of each trace with the span and error span counts of the whole trace, from the summary Jaeger keeps for it. - Tempo shows the root span of each trace, and sums the span and error span counts from Tempo's per-service stats. When Tempo does not report those stats, both columns are left out. #### Partial results on Tempo When Tempo did not search every block, a **Partial** note says why and which times the found traces cover, with **Keep only** to narrow the range to them. There are two causes. - The page filled up. The note says "Showing the newest 50 traces that match", because the server asks Tempo for the most recent matches first, and a reload shows the same traces. It adds `with (most_recent=true)` unless the TraceQL carries its own `with` hints. - Tempo stopped at its time limit, so some matching traces may be missing. On a long range the server searches Tempo newest first in growing windows, the last hour, then the two hours before it, then four, and so on. It stops once the page is full, so a broad search costs about as much as the newest window that fills it. When the 15 second query limit comes before the range is covered, the server returns the traces it found as a partial result instead of a timeout. The note says these are the newest matches it found and **Next** searches further back. When it found none, the page says Tempo stopped at its time limit before it found a trace, rather than that nothing matched. The explore query and `query_instant` return the same result with `meta.partial` set and the note that some matches may be missing, which `observe traces --ask` prints under the table. The scatter then plots only the times the found traces cover, so a full page that sits in a few seconds is not squeezed against the edge of the range. #### Count spans over time The `trace_stats` MCP tool counts spans and errors per time bucket over the same traces, on Tempo and ClickHouse. - On Tempo its query is TraceQL. - On ClickHouse it is a SQL condition over `otel_traces`, such as `ServiceName = 'checkout' AND Duration > 1000000`. A statement such as `SELECT 1`, a second statement, a comment or unbalanced parentheses is refused with that example. A condition ClickHouse cannot run is reported without the SQL the server built around it. ### Paging The table pages 50 traces at a time, and the bar under it sets 50, 100, 250 or 500 per page. The page and size are in the address as `page` and `size`, and sorting a column resets to page 1. - ClickHouse offers numbered pages and an exact total of matching traces. - Tempo pages by start time from the last trace shown, with **Previous** and **Next**. Its running total reads "at least N" until the last page makes it exact, and there is no total while a search is partial. A Tempo address beyond page 1 reopens on page 1 with a note, because a Tempo page is reached through the page before it. So **Copy link** on a Tempo source leaves the page out, and a shared link opens on page 1. - Jaeger pages by position, like ClickHouse, but only through the newest traces up to the datasource's row limit. A page past that is refused with a message that says to narrow the range or the search. ### Compare selected traces Use a selection to find what the slow or failing traces have in common. 1. Drag across the duration scatter to select traces by time and duration. The dots outside the selection fade, and the selection's start, end and duration floor are handles that the arrow keys move. 2. Read the table, which now shows only the selection. 3. Choose **Keep only the selection** to turn it into the search. **Clear** brings every trace back, and both buttons sit in the header of the scatter. **Keep only the selection** puts the time range and the duration bounds into the fields. On Tempo it puts them into the written TraceQL, and the button is disabled when the query has no spanset to add them to. On Jaeger the bounds replace the `minDuration` and `maxDuration` pairs of the written search. While a selection exists, the **What is different about the selected traces** panel opens beside the scatter, and under it on a screen 1,100 pixels wide or narrower. Jaeger does not offer it. It ranks the attribute values that appear in a larger share of the selected traces than of the other matching traces. Those are span names, kinds, statuses and the span and resource attributes, each with its share of both sets. It reads every span of the newest 50 selected and 150 other loaded traces, says when it could not read them all, and keeps the weaker differences behind **Show N weaker differences**. **Filter** on a row adds that attribute value to the search. On Tempo it appends the condition to the TraceQL, and on ClickHouse it fills the Span name or Service field, so the other attributes have no **Filter** there. Applying a filter, or **Keep only the selection**, switches the query card to Query so the written TraceQL or the filled fields are visible, and drops the Ask question from the address. ## Save a search A saved search keeps what the logs page, the trace search or the metrics page shows, so that anyone with access can open it again. It stores these: - the datasource; - the query as it runs, with its filter pills folded in; - the visible columns of a logs search, the filters of a trace search, or the graph or table choice of a metrics search; - the range as written, such as `now-1h`. A range written like that stays relative, so the search opens on the latest hour and not on the hour it was saved in. 1. Run the search on the logs page, the trace search or the metrics page. 2. Choose **Save search** in the top bar. 3. Enter a title and choose a folder. The title starts as the query with all of it selected, so typing a name replaces it. 4. Save it. To open it again, choose **Saved searches** next to it, or open it from the Logs, Traces or Metrics list or from a folder. A search opened that way shows its title and folder above the query, and the address carries its id as `saved`. **Close the saved search** removes it. The title shows only for a search among the 100 most recently changed that the list holds. ### Change a saved search When you edit the query, the range, the columns, the trace filters or the metrics view, the line says so. To someone with Edit on the search it offers **Update saved search**, which replaces the saved query, filters and range with what the page shows and keeps the title and folder. **Save search** still saves a new search. Someone without Edit sees only that **Save search** saves a new search, and the open one stays as it was saved. The Logs and Traces lists show the saved searches of their kind, up to the 100 most recently changed. They are grouped under their folders the way the dashboards list is. Your My Dashboards comes first, then the other folders you can view, each with its access and a chevron that collapses it. A folder with no saved search of that kind is not listed, and a folder's header counts its searches unless the list is cut at 100. Each row's menu offers **Rename...**, **Move to folder** and **Delete...** to those with Edit on it. ### Who can save and change one A search is saved in a folder, which needs the Create permission there. The folder list offers only the folders where you can create, and a refused save shows the server's message. On the trace search, **Save search** is disabled and says why when you cannot create in any folder. Without a folder a search goes to your My Dashboards, and a service account saves it in General. - Everyone who can view the folder can open the search, and the folder's permissions decide who may change it, as [Folders](/docs/teams/folders/) describes. - Renaming, moving, changing what it searches and deleting a saved search need Edit on it, and a move needs Edit on the target folder too. - A search cannot move into a personal folder, because that would make it private without asking. Save it there instead. - The kind and the datasource never change, so save a new search to change either. The query, filters and range can be replaced, and the result must pass the same rules as a save. - Deleting a folder that still holds a saved search is refused, and deleting a user deletes the searches in their personal folder. ### What a saved search holds A logs search takes a Loki, ClickHouse, Elasticsearch or OpenSearch datasource and needs a query. The logs page saves the query that runs, so the filter pills are folded into the query text and reopening the search shows them as query text, not as pills. A trace search takes a Tempo, Jaeger or ClickHouse datasource, and its query is optional. The query is TraceQL on Tempo, `key=value` pairs on Jaeger, or on ClickHouse the SQL of the SQL view. A trace search on a ClickHouse datasource saves its SQL while the SQL view shows a result, and reopens in the SQL view. Otherwise it saves the fields of the search. A trace search whose minimum span duration is above its maximum is refused with 422 `invalid_saved_search` and "min must not be greater than max", because it could only return nothing. A metrics search takes a Prometheus datasource, as [Metrics](/docs/use/metrics/#save-a-search) describes. The server answers 422 `invalid_saved_search` with the rule in `error` when a save breaks one of these rules: | Field | Rule | | --- | --- | | `title` | At most 120 characters. | | `query` | Not blank, at most 8,000 characters, no NUL character. It may span lines. | | `columns` | At most 20 names of a logs search, each 1 to 256 characters with no comma or control character. | | Trace filters | Only `service`, `span`, `min`, `max` and `errors`. `service` and `span` are at most 200 characters with no control character, and `min` and `max` are durations such as `250ms` or `2s`. | | `from`, `to` | At most 64 characters. | ### Saved searches over HTTP - `POST /api/v1/saved-searches` saves a search. - `GET /api/v1/saved-searches` lists the ones in the folders you can view. `kind`, `folder_id`, `limit` (1 to 100, 20 by default) and `cursor` narrow and page the list. - `PATCH /api/v1/saved-searches/{id}` renames or moves one, or replaces its `query`, `filters`, `from` and `to`. - `DELETE /api/v1/saved-searches/{id}` removes it. The filters of a logs search hold its `columns`, those of a trace search its service, span, duration and errors-only choices, and those of a metrics search its `mode`. A `filters` value replaces all of them, and `null` clears them. Each saved search carries the `url` of the page that reopens it, and each change is recorded in [Activity](/docs/use/activity/). A save with a service-account key also lints the query and answers 422 `query_invalid` when it has an error. A repeat of a search that key already saved answers 200 with `replayed` true instead of making a second copy. `observe saved-searches save`, `list`, `update`, `rename`, `move` and `delete` reach the same operations. So do the MCP tools `save_search`, `list_saved_searches` and `update_saved_search`, and no MCP tool deletes, renames or moves one. ## Reference ### Sources and the sidebar With two or more log sources they are listed under **Logs** in the sidebar, each with its query language. The languages are SQL on ClickHouse, LogQL on Loki and KQL on Elasticsearch and OpenSearch. The trace sources work the same way under **Traces**, with TraceQL on Tempo and Search on Jaeger and ClickHouse. - The five you used last on this browser come first and the rest follow by name, and **More** opens the Logs list or the Traces list. - The order is set when the app loads and stays fixed until you reload, so opening a source does not move it, and the next load puts it first. - A source added or removed meanwhile goes by name without moving the others. - With one source nothing is listed under it, and **Logs** or **Traces** still opens the list. - On the collapsed sidebar the Logs icon opens a menu with a **Logs** link and the same sources. The Traces icon does the same. - On a phone the source line under the page title opens the sources. For an Admin the built-in audit datasource, `slashobserve-audit`, is in none of the sidebar's lists, the collapsed sidebar's menu and the `/logs` list. The default source for a Logs link without one never is it. These open it: - **Open in Logs** on the page under **Audit**, then **Log**; - its address `/logs/slashobserve-audit`; - the phone's source menu; - the command palette. The services of each source come from `GET /api/v1/datasources/{uid}/services`, as [Scripts and the CLI](#scripts-and-the-cli) describes, and the server caches them for about a minute. A trace source's list at `/traces` also shows its services. The same list and filter box apply, and a service opens the trace search on that source with the service filter set. ### Limits and roles - Every signed-in role from Viewer can use the logs page, the trace view, the trace search and Ask. - Each query stops after 15 seconds and returns at most 1,000 rows. - The queries run on the server, so datasource credentials never reach the browser. ### How the volume is counted The volume strip counts per level, and each datasource counts in its own way. - On Elasticsearch, OpenSearch and ClickHouse it counts exactly the lines the results list, so the strip total equals the hits or lines total. The first and last bar hold partial buckets. - Its buckets are whole steps that start at or before the start of the range and end at or after its end, so the bars never leave out the newest lines. On Loki the total can run a little above the line count, by the lines in the two edge buckets that fall outside the range. - On Loki a range of a day or less is counted in one request. A longer range is counted one day at a time, newest first and one request after another, so a week does not have to fit in one request. - On Loki a bar wider than 30 minutes is counted as the sum of equal windows of at most 30 minutes, because Loki reads a wider window far more slowly. - On Loki a line's level is the first of its `level`, `lvl`, `severity_text`, `severity` and `detected_level` labels, including a `level` that a `| json` or `| logfmt` stage extracts. - On ClickHouse the level is the `SeverityText` column, counted per `Timestamp` within the time range whatever the query says. The volume request fails when the query does not select both, and the failure names the column to add. - On Elasticsearch and OpenSearch one aggregation request counts the matching documents per time bucket and per value of the level field, the field the datasource's level role names. With no level field every document counts as other, and a query body with its own `aggs` is refused. A datasource's error text reaches the page without the expanded query, the index names behind a data stream and the exception class names, so a typo reads as the problem and its position. `POST /api/v1/datasources/{uid}/log-volume` takes `query`, `from`, `to` and an optional `buckets` (60 by default, at most 200). It returns `step_ms`, `total`, the `buckets` with their `error`, `warning`, `info` and `other` counts, and `partial` with `counted_from`. It works for Loki, ClickHouse, Elasticsearch and OpenSearch. ### Facet counts Facets count the top values of each label, field or column the query matches over the whole time range. They run through `POST /api/v1/datasources/{uid}/log-facets` and the `log_facets` tool, and `observe logs --facets` prints them. Each field says whether its counts are exact or come from a sample of the newest lines. | Parameter | Meaning | | --- | --- | | `query`, `from`, `to`, `timezone` | The query and its range. | | `fields` | Count only these fields, at most 50, each at most 200 bytes. | | `limit` | Values per field, 1 to 50, 10 by default. | | `sample` | Lines to sample where the datasource cannot count exactly, 100 to 5,000, 1,000 by default. | The counting differs by datasource. - On Loki the index labels of the matched streams are counted exactly from the index volume API, in bytes rather than lines, so those fields carry `unit: bytes`. Parsed fields (`kind: field`) and structured-metadata fields (`kind: metadata`, the detected fields that no parser produced) are counted from the newest 1,000 lines by default, up to 5,000. - Those Loki lines are read from the newest five minutes first and then from windows twice as wide further back, until the sample is full. Loki's detected fields are asked for over only the time the sample covers, so a week does not have to be read whole. When time runs short, the fields are counted over the lines read so far, and `lines_sampled` and the note under each field say how many. - The Loki sample starts at once, beside the index label counts rather than after them. An index label whose count does not finish in time is counted over the sample instead, with `exact: false` and no unit, and its note says "Counted over the newest N lines". A slow index still leaves every field with counts. - On ClickHouse every field is counted exactly with one `GROUP BY` per field. That is each result column except `Timestamp`, `Body`, `TraceId` and `SpanId`, plus the 20 most frequent `LogAttributes` keys as `LogAttributes.<key>`. - On Elasticsearch and OpenSearch one aggregation request counts every field exactly over the whole range, with `sampled: false` and `lines_sampled: 0`, and `sample` is ignored. Without `fields`, the level and service fields come first, then the keyword, boolean, IP and number fields by name, and text fields through their `.keyword` subfield, 20 fields at most. A field named in `fields` that the mapping lacks answers `kind: unknown`. A text field without a keyword subfield, an object, a nested field or a field whose type differs between the matched indices answers its kind with no values. A field says `exact: false` when the server reports a count error bound for it, and `truncated: true` when it has more values than were returned. ### Pattern templates Patterns group the lines a query matches into line templates with counts, the variable tokens written `<*>`. They run through `POST /api/v1/datasources/{uid}/log-patterns` and the `log_patterns` tool, and `observe logs --patterns` prints them. A noisy service reads as a few templates instead of thousands of lines. | Parameter | Meaning | | --- | --- | | `query`, `from`, `to`, `timezone` | The query and its range. | | `limit` | Patterns to return, 1 to 100, 20 by default. | | `sample` | Lines the server reads itself, 100 to 5,000, 2,000 by default. | The `source` of the answer says where the patterns came from. - `source: loki`. On a Loki whose pattern ingester is enabled, a query that is a bare stream selector answers from Loki's pattern index over the whole range. If the index counts fewer lines than the sample size, the server groups the newest lines as below instead, because an ingester that has seen a small share of the lines would claim full coverage. - `source: server`. On a Loki without the pattern ingester, a Loki query with filters or stages, or ClickHouse, the server reads the newest 2,000 lines by default, up to 5,000. It masks numbers, identifiers, addresses and timestamps, and clusters lines that share at least 60% of their tokens. Each pattern's newest line is its sample. - `source: elasticsearch`. The cluster's `categorize_text` aggregation answers over the whole range, each pattern being the words its lines share. OpenSearch has no such aggregation, and a cluster without it or without the licence for it falls back to the `source: server` clustering. Patterns come by count descending, and `truncated` says when more exist. It also says when the server clustering folded lines into the nearest of its 500 clusters or dropped lines past its 5,000. Every pattern carries a `trend` of 30 equal buckets over the range, empty ones included with a count of 0, and a `level` (`error`, `warning`, `info`, `other` or empty). For `source: loki` the level is the first level word in the pattern, and for `source: server` it is the level most of the pattern's lines carry. ### Scripts and the CLI Each page has an HTTP route, and most have a CLI command and an MCP tool. | What | HTTP | CLI | MCP | | --- | --- | --- | --- | | Run a query | `POST /api/v1/datasources/{uid}/query` | `observe logs`, `observe traces`, `observe metrics query` | `query_range`, `query_instant` | | List services | `GET /api/v1/datasources/{uid}/services` | `observe datasources services` | `list_services` | | Count by level | `POST /api/v1/datasources/{uid}/log-volume` | `observe datasources log-volume` | none | | Top values | `POST /api/v1/datasources/{uid}/log-facets` | `observe logs --facets` | `log_facets` | | Group into patterns | `POST /api/v1/datasources/{uid}/log-patterns` | `observe logs --patterns` | `log_patterns` | | Read around a line | `POST /api/v1/datasources/{uid}/log-context` | `observe logs --context` | `log_context` | | Follow new lines | `GET /api/v1/datasources/{uid}/tail` | `observe logs --tail` | none | | Ask a question | `POST /api/v1/datasources/{uid}/draft-query` | `--ask` on `observe logs`, `observe traces` and `observe metrics query` | `draft_query` | `observe logs --tail` polls every 2 seconds and does not read the HTTP stream. [The CLI](/docs/use/cli/) describes `observe logs` and `observe traces`, with `--ask` for questions. #### Run a query Scripts run the same queries as the page with `POST /api/v1/datasources/{uid}/query` and a service-account key: ```sh curl -fsS -X POST "$OBSERVE_SERVER/api/v1/datasources/<datasource uid>/query" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"query":"{service_name=\"checkout\"}","kind":"instant","from":"now-15m","to":"now","limit":100}' ``` The request takes these fields. | Field | Meaning | | --- | --- | | `query` | The query text, 1 byte to 64 KiB. | | `kind` | `range` or `instant`. | | `from`, `to` | The range, both required. | | `timezone` | A time zone name for relative times. | | `max_data_points` | The most points of a range query. Not allowed with `instant`. | | `limit` | Lowers the row limit, 1 to 1,000. It never raises it. | | `page_size` | Pages an instant query, 50 to 500. It cannot be combined with `limit`. | | `page`, `cursor` | The page to read, with `page_size`. | | `sort` | A result column, with a minus in front for descending, such as `-Duration`. Needs `page_size`, and applies to ClickHouse only. | | `as_written` | ClickHouse only. Returns the rows as the query wrote them, with its own `ORDER BY`, `LIMIT` and columns and no `TimeNs` field. Needs `page_size`. | On ClickHouse the explore query refuses a query that does not read the time range through a macro such as `$__timeFilter(Timestamp)` unless it sends `page_size`. `query_range` and `query_instant` without `page_size` follow the same rule. Only a paged query is cut to the range by the server, so a query that selects `Timestamp` still needs the macro there. The refusal names the macro with the time column of the first table the query reads. With `page_size` on ClickHouse, `sort` orders the whole result before it is paged, and the MCP tool `query_instant` takes the same `sort`. A cursor remembers the sort it was made with, so send the same `sort` with every cursor of a walk. A cursor sent without it, or with another, is refused with a message naming the sort. #### List the services of a source `GET /api/v1/datasources/{uid}/services` lists the services a Loki, Tempo, Jaeger, ClickHouse, Elasticsearch or OpenSearch datasource has seen over a recent window, with the label, column or attribute that holds them: ```sh curl -fsS "$OBSERVE_SERVER/api/v1/datasources/<datasource uid>/services?signal=logs&window=1h" \ -H "Authorization: Bearer $OBSERVE_TOKEN" ``` The answer has `datasource`, `signal`, `field`, `window_seconds`, `services` and `truncated`. - `field` is the one the server reads as the service. On Loki it is the first of the labels `service_name`, `service`, `app` and `job` that has values. On Tempo it is the `resource.service.name` attribute, and on Jaeger its list of services. On ClickHouse it is the `ServiceName` column. On Elasticsearch and OpenSearch it is the service field of the datasource, empty when its mapping has none. - `signal` is `logs` or `traces` and defaults to what the datasource holds, with `logs` first on ClickHouse, which holds both. - `window` is a duration such as `15m`, one minute to six hours, and defaults to one hour. Jaeger ignores it and lists every service it retains. - It lists at most 200 services and sets `truncated` when more exist. The server asks the source once, over that window only, and waits at most 5 seconds for it. It keeps the answer for about a minute, so reloading the page does not ask the source again. These errors are not kept: - `504` `query_timeout` or `502` `datasource_unavailable` when a source does not answer in time. - `429` `too_many_requests` when the server's shared upstream slots were busy. - `422` `query_invalid` when the datasource does not hold the signal. Every signed-in role from Viewer can read it, because any Viewer can already query any datasource. In the CLI, `observe datasources services <uid>` lists them, and `observe datasources services --service checkout` asks every source and prints the ones that hold a service whose name contains `checkout`. The MCP tool `list_services` does the same for an agent. #### Read the lines around one line `POST /api/v1/datasources/{uid}/log-context` takes these fields. | Field | Meaning | | --- | --- | | `query` | The query of the line. | | `anchor` | The line's `TimeNs`. | | `before`, `after` | Lines on each side, 0 to 500, 50 by default. | | `window_ms` | How far each side looks, 1,000 to 86,400,000, 3,600,000 (one hour) by default. | The answer has the `anchor` and a `before` and an `after` side, each with its `frames` and `truncated`. #### Live tail over HTTP `GET /api/v1/datasources/{uid}/tail` sends new lines as Server-Sent Events. It takes `query`, `from` (the last 10 seconds by default), `limit` (1 to 1,000, 500 by default) and `timezone`, each given once. - It sends `retry: 3000`, then `event: ready`, and then an `event: lines` frame for each poll with `frames`, `newest`, `truncated`, `partial` and `warning`. - A `: ping` comment arrives every 15 seconds. - It sends `event: error` with a `code` and an `error` when it cannot continue. - It ends after 30 minutes. - A person or key may hold 5 tails, and the server 200. Beyond that the answer is 429 or 503 `too_many_streams`. #### Ask over HTTP Scripts ask a question with `POST /api/v1/datasources/{uid}/draft-query`: ```sh curl -fsS -X POST "$OBSERVE_SERVER/api/v1/datasources/<datasource uid>/draft-query" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"question":"checkout errors","from":"now-1h","to":"now"}' ``` The answer has `query`, `language` (`logql`, `clickhouse_sql`, `traceql` or `filters`), `trace_filters`, `explanation` and `warnings`. A ClickHouse datasource needs `"signal":"logs"` or `"signal":"traces"`. | Status | Code | Meaning | | --- | --- | --- | | 422 | `cannot_translate` | The model cannot turn the question into a query, with a `reason`. | | 503 | `agent_unavailable` | The server has no model. | | 429 | `too_many_requests` | The caller has 3 questions in flight, or has used the 60 of the hour. | | 429 | `agent_busy` | The server is answering 10 questions already. | | 504 | `draft_timeout` | The question did not finish within 60 seconds. | | 502 | `provider_error` | The model provider failed. | | 400 | `invalid_request` | The request is malformed, or the question is over 2,000 characters. | | 404 | `not_found` | The datasource does not exist. | # Metrics > Run PromQL on a Prometheus datasource, see the result as a time series with a legend table or as a table, ask in plain language, and read query errors with their position. Source: https://slashobserve.com/docs/use/metrics/ · Markdown: https://slashobserve.com/docs/use/metrics/index.md The metrics page runs a PromQL query on a Prometheus datasource without building a dashboard first. Use it to check a query before it goes on a dashboard, or to look at a metric once. It reads from the datasources an Admin configured, as [Connect Prometheus](/docs/connect/prometheus/) describes, and it sits beside the [logs page and the trace search](/docs/use/logs-and-traces/) in the sidebar. ## Run a query 1. Choose **Metrics** in the sidebar, then a Prometheus source. With two or more sources they are listed under **Metrics**, and **More** opens the full list at `/explore/metrics`. 2. Type PromQL in the query box, such as `sum by (service) (rate(http_requests_total[5m]))`. The editor completes functions and keywords, and the server checks the query as you type. 3. Press **Run query**, or Cmd+Enter (Ctrl+Enter on Windows and Linux). Press `/` to move the focus to the query box from anywhere else on the page. 4. Read the result under **Graph**, or switch to **Table**. A line above it says how many series or rows came back, the step of a graph and how long the query took. 5. Change the range with the time picker above the results, and the query runs again. Dragging across the chart narrows the range to the part you selected. A query the server finds invalid does not run. The page shows the message with its line and column and a caret under the position. A query that fails on the datasource shows the datasource's message and a **Retry** button. A query that returns no series shows "No data in this range", with a hint to widen the time range or loosen the label matchers. The same query runs from a terminal: ```sh observe metrics query 'sum by (service) (rate(http_requests_total[5m]))' --datasource prom --from now-6h ``` [With the CLI](#with-the-cli-and-mcp) lists the other routes. ## Ask in plain language Use Ask when you know what you want to see but not the PromQL. 1. Switch the mode at the top of the query card from **PromQL** to **Ask**. Ctrl+I or Cmd+I switches from anywhere on the page, and the page remembers the mode you last chose. 2. Write a question such as "requests per second by service over the last hour". 3. Press Enter or **Ask**. Shift+Enter adds a line, and Esc cancels a question that is still running. 4. The page runs the answer at once and shows its explanation and any warnings, such as "No series in the last 15 minutes." Editing the query switches to the PromQL segment, with a "From: <question>" line and **Ask again**, which brings the question back. **Edit as PromQL** switches without changing the query. When the model cannot turn the question into a query, the page says "I could not turn that into a query." with the reason, and switches to the PromQL segment. Without a model the Ask segment is disabled and says "Add a model key to ask in plain language"; [LLM providers](/docs/connect/llm-providers/) describes how to configure one. ### How Ask writes the query The server reads the datasource's labels, the metric names that fit your question with their types, and the values of a service label, so the query names real ones. When the whole catalog is small, it reads every metric name. When the catalog is large, it searches it for the words of your question. Then it asks the model once. It checks the answer with the query lint and one instant run over the last 15 minutes of the range, and never runs the full query. When that check fails, it asks the model once more to fix the query, so a question costs at most two model calls. The limits on questions are the same as on the logs page, and [Ask in plain language](/docs/use/logs-and-traces/#ask-in-plain-language) lists them. ## Find a metric or a label **Browse metrics** opens a browser above the query box with the metrics of the datasource and a search box. 1. Type to filter the list. It shows the first 100 matches, and each metric's help text appears as its tooltip. 2. Choose a metric to see the labels it carries, then a label to see its values. 3. Choose a value to insert a matcher such as `service="checkout"` at the cursor. **Insert metric** puts the metric's name at the cursor. **Back to labels** returns from the values to the label list. **Hide metrics** closes the browser. The names come from the server, which asks the datasource, so the browser never reaches the datasource itself. ## Switch between a graph and a table **Graph** runs a range query and draws each series as a line, with a legend table under the chart that lists the mean, maximum and last value of each series. **Table** runs an instant query at the end of the range and lists one row per series with its labels and value. The choice is in the address as `mode=table`, and with no `mode` the page shows the graph. ## Fix a query that hits a limit The server caps every query by time, series and points, and a datasource may set lower caps. A query that exceeds a limit fails with a message that names the limit it hit. The page then says to add label matchers, aggregate with `sum by (label)`, or narrow the time range. A query that takes too long fails with `query_timeout`, and the page says to narrow the range or aggregate. When the table stops at the server's row limit, a note under the tabs says so. Add label matchers or aggregate to see the rest. A graph's step follows the range and the width of the chart, so a longer range draws coarser points. It never drops below the datasource's scrape interval, as [Connect Prometheus](/docs/connect/prometheus/#step) describes. ## Save a search **Save search** in the top bar keeps the query that ran, with the time range as written and the graph or table choice, in a folder. The folder is your My Dashboards by default, and everyone who can view the folder can open the search. **Save search** stays disabled until a query has run. To open it again, choose **Saved searches** in the top bar, or find it on `/explore/metrics`, which lists saved searches under the sources with their folder and who saved them. The [search](/docs/use/search/) of the workspace finds it too. Opening one runs it on its datasource over the saved range, shows its title and folder above the query, and keeps its id in the address as `saved`. When you change the query, the range or the graph or table choice, someone with Edit on the search gets **Update saved search**, which saves the change into it. **Save search** still saves a new search. Only a Prometheus datasource holds a metrics search. On a phone the same actions sit in the **More actions** menu. ## Add to a dashboard or an observation **Add to dashboard**, in the header of the results, keeps the query as a panel on a dashboard you can edit. You need Edit on the target dashboard. The panel is full width and goes at the bottom of the dashboard, inside the last row when that row is collapsed, and the save makes a new version. The graph becomes a time series panel with a legend table, and the table becomes a table panel with an instant query. **Add to observation** beside it copies the same panel into an [observation](/docs/use/observations/#add-to-an-observation-from-a-panel-or-from-logs), named Metrics, over the range the page shows. Both stay disabled until a query has run, and say "Run a query first." ## With the CLI and MCP - `observe metrics query` runs the same query from a terminal, and `--ask "<question>"` takes a question instead of the query. - `observe saved-searches save --kind metrics` saves a search. - `observe datasources metrics`, `labels` and `label-values` list what the browser lists. - The MCP tools `query_range`, `query_instant`, `list_metrics`, `list_labels` and `list_label_values` do the same for an agent. - `draft_query` answers a question with PromQL. See [Metrics](/docs/use/cli/#metrics) and [Discovering what a datasource holds](/docs/use/cli/#discovering-what-a-datasource-holds) in the CLI page, and [MCP](/docs/use/mcp/). ## Reference ### Sources and addresses - Each Prometheus datasource has its own page at `/explore/metrics/<datasource uid>`. - `/explore/metrics` lists the Prometheus sources with their language and whether they answer. - The five sources you used last on this browser come first in the sidebar and the rest follow by name. The order is set when the app loads and stays fixed until you reload. - With one source nothing is listed under **Metrics**, and **Metrics** still opens the list. - On a phone the line under the page title names the source and PromQL, as it does on the logs and trace pages. With two or more sources it opens the **Metric sources** sheet, and with one there is nothing to switch to. - An address that carries a query but no source, such as `/explore/metrics?q=up`, opens the source you used last on this browser, else the first by name. - The address keeps the source, `q`, `from`, `to` and `mode`, and `ask` when the query was written from a question, so **Copy link** in the top bar copies a query that opens the same way. - With no `from` and `to` the page reads the last hour. ### Keys | Keys | What they do | | --- | --- | | `/` | Focus the query. | | Cmd+Enter or Ctrl+Enter | Run the query. | | Cmd+I or Ctrl+I | Switch between Ask and PromQL, from anywhere on the page. | [Keyboard shortcuts](/docs/use/keyboard-shortcuts/#metrics-page-keys) lists the keys of every page. ### Roles Everyone who can open the app can run a metrics query, as with logs and traces. The query runs as given, so a Prometheus datasource shows what its credentials can read. # Observations > Work one question on a page of text, panel and snapshot blocks that people and agents build together, resolve it with a summary, and publish it as an immutable RCA that a person can share read-only. Source: https://slashobserve.com/docs/use/observations/ · Markdown: https://slashobserve.com/docs/use/observations/index.md An observation is a page about one question, such as why checkout errors rose at 09:12. You and your agents add text, live panels and frozen snapshots to it as you learn, and close it with a one-line summary when the question is answered. You can then publish it as a root cause analysis (RCA) that never changes, and share that read-only. The page has a title, a time range, a folder and an ordered list of blocks. Every change is a recorded [activity](/docs/use/activity/) event, so the log shows who wrote what. ## Work a question on a page 1. Choose **Observations** in the sidebar, then **New observation**. 2. Type a **Title** and pick a shared **Folder** that you can edit, then choose **Create**. An observation in My Dashboards cannot be published, so pick a shared folder if you want an RCA. The page opens at `/o/<id>`. 3. Choose **Add a block**, then **Text**, write what you know in Markdown, and choose **Add**. 4. Choose **Add a block**, then **Panel**, then **From a dashboard**, and pick a data panel. The block is a live copy of the panel on the page's time range. 5. Write in the **Discussion** pane on the right. Mention `@observe` to ask the agent a question about the page. 6. Choose **Resolve** and type a one-line summary. 7. Choose **Publish as RCA**, then **Publish revision 1**, to freeze the page. The same work from a terminal: ```sh observe o new "Checkout errors rose at 09:12" --folder <folder-id> observe o add <observation-id> --text "Errors started right after the 09:10 deploy." observe o resolve <observation-id> --summary "A bad deploy; rolled back at 09:40." observe o publish <observation-id> ``` `observe o new` prints `Created <title> <url>`, and the `<observation-id>` in the next commands is the last segment of that address. `observe o publish` prints `Published revision 1 of <title>`. [MCP](/docs/use/mcp/) tools and the HTTP API do the same; see [Work on one from MCP and the CLI](#work-on-one-from-mcp-and-the-cli). Who may do each step depends on the folder; see [Who can do what](#who-can-do-what). ## Open an observation **Observations** in the sidebar opens the list at `/observations`. It has one row for each observation with its title, folder, state, who opened it and when it last changed, most recently changed first. - The **Open**, **Resolved** and **All** tabs choose which observations show, Open by default. - The search box keeps the observations whose title contains the text. - **Opened by me** keeps the ones you started. - The sort menu orders by last change, creation time or title, in either direction. - **Per page** chooses 20, 50 or 100 rows, and the page numbers with **Previous** and **Next** move through the result. The header says which rows show, as "21-40 of 59". The tab, search, filter, sort, page and page size are in the address, so a link reopens the same view. The checkbox on a row selects it, and the one in the header selects every row on the page. With rows selected, **Resolve** closes them all with one summary and **Delete** removes them. Each counts only the rows you may resolve or delete. The **...** menu on a row offers **Resolve**, **Reopen** and **Delete** for that row when you may do them. Under **Observations** in the sidebar, up to five open observations are listed, indented. Each has a green dot and bold text while it has unread inbox items, and **All observations** follows when more are open. On the icon rail, a dot on **Observations** shows that some are open. An observation opens at `/o/<id>`, and the page updates when someone else changes its blocks, its state or the discussion. An address that is not an observation id, or an observation you cannot see, shows "Observation not found" with a link back to the list and no Retry, because retrying cannot help. **Share** in the top row copies the address of the page, which only people who can see the observation can open. For a read-only link for everyone else, see [Share a revision](#share-a-revision). ## Start an observation **New observation** on the list opens a panel with a **Title** of 1 to 200 characters and a **Folder**. The folder choices are the folders you can edit. With none chosen, the observation goes in My Dashboards when you may create there, and otherwise in General. The folder box names that default before you pick one. **Create** opens the new page. Home has a **New observation** tab with the same two fields plus an optional first note. The command palette's **New observation** opens it. The note becomes the first text block, and links in it to a logs search, a trace or a dashboard panel of this app become panel blocks; see [Home](/docs/use/home/#new-observation). An observation that an [investigation](/docs/use/investigate/) opens is described under [Investigations write into an observation](#investigations-write-into-an-observation). ## Add blocks A person who can edit sees **Add a block**, and a person who can only comment sees **Suggest a block**. The row offers six ways: - **Text** opens a box for Markdown. **Add** or **Suggest** saves it, and `⌘Enter` or `Ctrl+Enter` does the same. `Esc` closes the box and keeps what you typed for when you open it again, and **Cancel** closes it and throws the text away. A word with no break in it, such as a hash or a long address, wraps inside the block instead of widening the page. - **Panel** offers **From a dashboard** and **New query**. **From a dashboard** opens a side panel where you search for a dashboard, then choose one of its data panels. The block is a copy of the panel with its own query. It stays live on the page and follows the page's range, or the last hour when the observation has none. **New query** opens the panel editor on an empty panel with the first datasource, and is disabled when there is no datasource. **Add**, or **Suggest** for a commenter, saves it as a panel block that follows the page's range; see [Edit a panel block](#edit-a-panel-block). - **Logs** opens the logs page with this observation preselected, so you can add a search from there; see [Add to an observation from a panel or from Logs](#add-to-an-observation-from-a-panel-or-from-logs). - **Traces** opens the trace search with this observation preselected, so you can add a search from there; see [Other places that add](#other-places-that-add). - **Metrics** opens the metrics page with this observation preselected, so you can add a query from there; see [Other places that add](#other-places-that-add). - **Snapshot** lists the live panel blocks of the page and is disabled when there is none. Choosing one freezes that panel's data into a snapshot block placed right after it. A panel block can also be frozen from its own menu with **Freeze as snapshot**. A person who can only comment suggests that snapshot, as with any other block. ### Suggest a block An editor's block goes on the page as `live`. A commenter's block is `requested`. It shows with a dashed border and the caption "`<name>` suggests this block", or "Observe Agent suggests this block" when an agent run wrote it. **Keep** makes it live and **Discard** removes it. Both show to an editor, and only **Discard** shows to the person who asked for the block. When the block above a suggestion is a live panel block, the row also says that keeping it adds this block next to the one above and replaces nothing. Resolving does not close the page. A resolved observation still takes blocks from editors and suggestions from commenters, and the row says "This observation is resolved" so nobody is surprised. An editor who does not want more reopens it or discards the suggestion. ### What a panel block shows A panel block's caption names its datasource and its window: "Last hour, live", the page's range, or "Pinned to" the block's own. A snapshot's caption says "Frozen" with the time range of its data. A panel block is drawn as a dashboard panel. Its panel menu has **View as table**, **Inspect**, **Download CSV** and **Save as PNG**, plus **Open in Logs** or **Open in Traces** on a logs or traces panel. **Inspect** opens the panel's data and query in the right pane in place of the discussion, and closing it brings the discussion back. A block that carries variables shows a picker above the panel for each one with stored options, starting at the values it was added with. A choice changes only what you see and is not saved. A textbox, ad hoc filter or group by variable shows its stored value and cannot be changed on the block. ## Edit a panel block A panel block's panel menu has **Edit panel** for an editor and **Suggest an edit** for a commenter. It opens the same panel editor as a dashboard panel, in the right pane in place of the discussion. You get the query, the display and the JSON view, with a preview of the draft over the block's window and with the block's variables. The preview runs with exactly the access the block's own data has. It needs comment access to the observation and the datasource's access, and an Admins-only datasource runs only in an Admins-only folder. Nothing changes until you save. The editor asks first when the draft has changes and you press `Esc`, choose **Close panel editor**, leave the page, open another block, or choose **New query** or **From a dashboard**. **Keep editing** keeps the editor and its draft. **Save** changes the block in place and keeps its width, height and window. A commenter's **Suggest edit** leaves the block as it is and adds the edited copy right after it as a requested block. An editor keeps or discards it like any other suggestion. Keeping it adds a second block, so an editor who wants only the edit then deletes the original. When someone changed the block since you opened it, the editor says so and keeps your draft. When someone deletes the block while your draft has changes, the editor says so and keeps the draft. **Add as a new block**, or **Suggest as a new block** for a commenter, puts it back where the block was, and **Discard** throws it away. A snapshot and a published RCA revision are frozen, so neither offers the editor. Over [MCP](/docs/use/mcp/), `update_block` changes a panel block's `body`. On the [CLI](/docs/use/cli/#observations), `observe o edit-block <block-id> --version <n> --panel-file <path>` does the same. The `--version` is required: it is the block's version from `observe o show`. ## Move, resize and delete blocks Hover a block, or focus it, to show its **Block actions** menu. It offers: - **Move up** and **Move down**, which swap the block with its neighbour. - A **Make ... width** item for each other width. - **Reset height** on a panel or snapshot block with its own height. - **Freeze as snapshot** on a live panel block. - **Delete block** on a live block. Blocks sit side by side in rows of three thirds when the page is wide enough: three thirds, a third and two thirds, or two halves. A block that does not fit the rest of a row starts the next one. **Delete block** on a block an agent wrote asks "Delete this block?" first, because the block cannot be brought back. That covers every run block and any block added by the built-in agent or over MCP. **Edit** on a text block opens its Markdown, and **Save** or `⌘Enter` keeps the change. If someone changed the block first, the editor says so and **Use their version** replaces your text with theirs. Text that is empty is refused; delete the block instead. Editing, moving, resizing and deleting need edit access to the folder. An agent changes one block with `update_block` and its `position`, `width` or `height`, and arranges the whole page with `arrange_blocks`, which needs no version. On the CLI, `observe o arrange <observation-id> <block-id>[:<width>[:<height>]]...` does the same. ### Arrange by hand A person with edit access arranges the page without a menu. - Drag a block by the grip at its top left corner to drop it before or after another block. - Drag the corner at its bottom right to snap its width to a third, a half, two thirds or the full page. On a panel or snapshot block, the same drag sets its height in steps of 20 pixels. - Focus the grip and press the arrow keys to move the block. - Press **Shift** with the left or right arrow to change its width. - Press **Shift** with the up or down arrow to change a panel's height by 40 pixels. Each change is announced. Below 640 pixels of block list width the page shows one column, so the width does not apply. The right dock, when open, can bring the list below that. Arranging never conflicts with a text edit that is open on the same block, because a block's version counts its content and not its place or size. When two people arrange at once, the last arrangement wins. A person who can only comment cannot arrange. ## Set the time range The page's time range sits in the top row, and every panel block follows it unless the block is pinned. With no range stored it reads **Last hour, live**. A person who can edit chooses another range. A quick range such as **Last 6 hours** is stored as the absolute window it means at that moment, so everyone reads the same data. **Last hour, live** clears it. Anyone else sees the range without the picker. ### Pin a block to its own window A panel block's panel menu offers **Pin to this window**, which keeps the window the block shows now, and **Pin to a window**, which opens a time range picker for that block. Dragging across a time series chart pins the block to the dragged range. A pinned block keeps its window when the page's range changes, and **Follow the page** releases it. Pinning needs edit access to the folder. A block added from a dashboard panel's menu arrives pinned to the window it was taken from. One chosen with **Panel**, then **From a dashboard**, follows the page. Over MCP, `update_observation` sets the page's range, and `update_block` sets a block's own `from` and `to` or releases them with `follow_page: true`. On the CLI, `observe o edit --from <time> --to <time>` or `--clear-range` sets the page's range, and `observe o edit-block <block-id> --version <n> --follow-page` releases a block. ## Rename, resolve, reopen and move A person who can edit changes the title by choosing it, typing, and pressing `Enter`, or `Esc` to leave it as it was. An observation that is the one observation made from a chat with no dashboard shares its title with that chat, so renaming one renames the other; see [Chat](/docs/use/chat/#one-title-for-a-chat-and-its-observation). **Resolve** closes the question with a one-line summary of at most 500 characters that says what was found. The summary shows under the title and in the list. A resolved observation stays readable, a person can reopen it, and it can still be published. **Reopen** turns a resolved observation back into an open one. The summary stays stored, so the next **Resolve** starts from it. The page and a published RCA show it only while the observation is resolved. `observe o show` prints it as `Last summary`, and over the API and MCP it is still in `summary` beside `state: open`. **More actions**, then **Move to folder**, opens a panel that searches the shared folders you can edit. My Dashboards is not a choice. Resolving, reopening and moving need edit access, and moving needs it on the target folder too. The state line also shows who started the observation and when, and links to its folder. ## Pin it to a dashboard or make a dashboard from it **More actions** has **Pin to dashboard** when the observation came from a run about a dashboard and you have edit access to that dashboard. It adds an annotation at the end of the observation's range with the title and a link back. Once it is pinned the item reads **Pinned to dashboard**, and pinning again over the API or MCP returns the same annotation. Over the API the observation's `can_pin` says whether you may, and a pin to a dashboard you cannot open answers 404 "dashboard not found". **Make a dashboard**, in **More actions** and in the actions of a live panel block, saves the live panel blocks, or that one block, as a new dashboard in My Dashboards and opens it. Suggested blocks, text blocks and snapshots are left out. The dashboard keeps the variables each block carries and uses the observation's range, or the first panel's when it has none. Every query is run again first. Making it again from the same observation or block opens the one you made first, unless you can no longer see that dashboard, and then a new one is made. Over the API, `new: true` makes another. When the observation came from your own chat and that chat is about nothing else, the chat becomes about the new dashboard and opens in its Chat tab. ## Discuss beside the blocks The discussion is the observation's one comment thread. It sits in a pane on the right of the page at full height on a wide window, and below the blocks on a narrow one. Drag the pane's left edge to make it wider or narrower; it shares its width with a dashboard's activity pane. The **Discussion** button in the top row, which shows the number of messages, hides and shows the pane, and **Close panel** in the pane hides it. The pane lists the messages together with the changes to the page, newest at the bottom. They are grouped under a heading for each day, and each entry shows its author's mark and the time of day. The pane reads up to 500 of the newest such events. The changes it lists are: - Who started the observation, with the title it was created with and its folder. - Who added or suggested each block. A panel block also names its datasource and says it is live, and a snapshot names the panel it froze. - Who changed or removed a block. - Who renamed the observation, from which title to which. - Who moved, resolved, reopened, published or withdrew a revision of it. A removed block is drawn without a name, because the block is gone. A block's name scrolls the page to that block. ### Filter the pane Two lists under the heading filter what the pane shows. **Show** narrows it to messages only or changes only. **Block** narrows it to one block: that block's messages, the changes to it, and the replies that quote those messages. When nothing matches, the pane says so and **Clear filters** shows everything again. ### Write a message A person who can comment writes messages in the box at its foot. A person who can only view the observation sees **Request comment access** there instead, which asks the people who manage the folder; see [Ask for comment access](/docs/teams/folders/#ask-for-comment-access). The control above the box says where the message goes: **On the whole page**, or **On** one block, which is the block chosen in **Block** until you pick another. A message written on a block shows "On" and the block's name with **Show**, which scrolls the page to the block. A message written on a block that has since been deleted shows nothing extra. **Reply** on a message puts "Replying to" and its author above the box, with a button that removes it. The reply then shows the quoted message above its text and reads "replied to" and the quoted author. Each message also has **Add to page** for an editor, or **Suggest for page** for a commenter, which puts the message's text on the page as a text block. The message stays in the discussion as well. Typing `@` opens the picker of people and agents, as in [Edit a comment and mention people](/docs/use/review/#edit-a-comment-and-mention-people). A person can delete a message as described in [Delete a comment](/docs/use/review/#delete-a-comment). Deleting the first message deletes the whole discussion only while nobody else has written in it. ### Ask an agent from the discussion A message that mentions one agent asks that agent a read-only question about this observation. The agent can be `@observe`, one of your connected agents or a service account that takes runs. The message needs Comment on the observation. The run writes nothing on the page, for an Editor as for a Commenter. When it ends, the server posts one status line in the discussion, such as "Answered." with the answer under it. Everyone who can read the observation reads that answer in the discussion. The line is not the model's text, and it never resolves the discussion. [Give an agent a run](/docs/use/agents/#give-an-agent-a-run) describes who you can mention and what happens to the run. ### Messages over the API A message can be about one block of the page or about the whole observation, and a reply can quote the message it answers. Over the API, MCP and the CLI, a message carries `block_id` and `reply_to`. Both are null when the message is about the whole page and quotes nothing. `reply_to` holds the quoted message's `id`, its `actor` and an `excerpt` of its first 200 characters. The MCP comment tools return `reply_to` with the author as `author`, the label the web app shows. Deleting a block keeps the messages written about it, which are then about the whole observation. Deleting a quoted message leaves the reply with no quote. A block that belongs to another observation answers 422 `invalid_block`, and a quoted message that is not in the discussion answers 422 `invalid_reply_to`. Editing a message changes neither. ## Comment and ask on the blocks For a person who can comment on the observation, the page has the same tool bar at the bottom of the screen as a dashboard, with **Select**, **Comment** and **Ask**. It is hidden on a phone, and **Ask** shows only when a model is connected. On a live panel block, Comment mode and Ask mode work as on a dashboard panel. A click names the spot under the pointer, a drag across a time series names the range, and pins mark the threads and your own questions. See [Comment pins](/docs/use/ask-and-comment/#comment-pins) and [Ask mode](/docs/use/ask-and-comment/#ask-mode). On a snapshot or a run block, a click in either mode comments on or asks about the whole block. `c` or `a` with the pointer over a block, or with a block focused, opens the composer or the ask box on the whole block. Tab reaches text, snapshot and run blocks. A panel block's menu and the **Comment** and **Ask** buttons in its header do the same. A comment on the whole block goes into the discussion as a message on that block. A panel block that shows no data, such as a text panel, takes comments but no questions, as on a dashboard. ### Comment on text Selecting text in a text block shows **Comment** and **Ask** under the selection, and `Esc` hides them. In Comment or Ask mode, selecting text opens the composer or the ask box at once. The thread or the question points at the text you selected, up to its first 200 characters. Its pin sits on that text wherever it moves in the block, and when the same words appear more than once, the pin takes the place nearest where you selected them. When the block no longer holds that text, the pin is faded in the block's top right corner and its thread says the text is no longer in the block. ### Questions on the page A question asked on the page is private. Its box says "Only you and Admins can see this.", and the agent reads data and answers without writing anything on the page. Only those private questions get your pins; an investigation that writes into the observation is answered on the page instead. The questions you ask during one visit to the page are turns of one chat, which the [chat list](/docs/use/chat/) keeps. While you move or resize blocks, the pins stay but nothing takes a click or a selection, and an open composer is hidden. It comes back with your text when the change is saved, as it does after you edit the block it is on. If the block goes away while you are writing, your text moves to a box in the corner of the page with **Copy text** and **Discard**, and the rest of the page takes comments again. Once you have typed, `Esc`, **Select** or another tool first asks "Discard your draft?". A requested block takes no comments or questions until it is kept. Over the API, MCP and the CLI, a question names a whole block with `block_id` and no anchor, as in [`observe investigate`](/docs/use/cli/) with `--block` and `--observation`. ## Add to an observation from a panel or from Logs **Add to observation** in a dashboard panel's menu copies that panel into an observation. The item shows for every data panel while you have no unsaved layout changes. 1. Open the panel's menu and choose **Add to observation**. 2. Under **Where**, choose **An open observation** from the open ones you can see, or **A new observation**. A new one asks for a title that starts as the panel's title and a folder, as in [Start an observation](#start-an-observation). With no open observation, only the new one is offered. 3. Choose **Add**. You see "Added to `<title>`", or "Suggested on `<title>`" for a person who can only comment, with **Open** to go there. If the new observation was created but the panel could not be added, the message says so, and **Add** tries again on the same observation. The block takes the time range in the dashboard's address as absolute times, and without one it follows the observation's range, or the last hour. A panel's `repeat` setting is dropped. ### Variables in the copied panel A panel that uses dashboard variables, a `$name` or `${name}` in a query or in the panel's datasource, is copied with the variables it uses. It also keeps the values selected at that moment, so the block shows what you saw. A multi-value selection and **All** expand in the query as they do on the dashboard, because the block keeps the variable's definition. The block says "with `service=checkout`" under its title, and changing the dashboard's selection later does not change the block. These do not count as variables: - The built-in names, which start with two underscores, such as `$__rate_interval`, `$__interval` and `${__user.name}`, because a block runs them as it runs any query. - A `$` before a digit or on its own. - A variable in the panel's title. ### Other places that add - **Add to observation** on the [logs page](/docs/use/logs-and-traces/#add-to-an-observation) adds the search you ran as a logs panel named Logs over the range you are viewing. - **Add to observation** on the [metrics page](/docs/use/metrics/#add-to-a-dashboard-or-an-observation) adds a time series panel named Metrics, or a table panel in the table mode. - **Add to observation** on the [trace search](/docs/use/logs-and-traces/#trace-search) and in the [trace view](/docs/use/logs-and-traces/#trace-view) adds a traces panel: the search you ran, or the trace you are looking at, over the time range the page shows. ## Delete an observation Deleting removes the observation for everyone, with its blocks, snapshots, discussion and RCA revisions, and the public links of those revisions stop working. It cannot be undone. The person who started the observation and can edit it may delete it, and so may anyone who manages its folder. - In the web app, choose **More actions**, then **Delete observation**, on the page, or **Delete** on the list. It asks you to confirm first. - Over HTTP, call `DELETE /api/v1/observations/{id}`, which answers 204. - In the CLI, run `observe o delete <observation-id> --yes`. A pin of the observation on a dashboard is taken off too, when you started that pin or are an Admin. Otherwise the marker stays and its link shows "Observation not found". While an investigation on the observation is queued or running, the delete is refused with `run_in_progress`. Delete it once the run ends or has been stopped. The [activity](/docs/use/activity/) log keeps an `observation.deleted` event with the title. ## Publish as RCA Publishing turns the page into a root cause analysis that never changes. Each publish adds the next numbered revision, so an RCA is a history of what the team believed as the investigation went on. Publishing shares the result with nobody outside the folder; [Share a revision](#share-a-revision) does that. An agent can publish with `publish_rca` and a person with `observe o publish <observation-id>`, which prints `Published revision N of <title>`. Publishing needs edit access to the observation's folder. ### Publish in the web app 1. Choose **Publish as RCA** in the top row of the page. A panel opens, and its address carries `?rca=1` so you can link to it. 2. Choose **Publish revision N**. The page freezes as the next revision and says "Published revision N". **Revisions** in the panel lists each revision with who published it and when. A person who cannot edit sees **RCA revisions** instead, and only when a revision exists, with the note "You can view revisions. Editors publish them." Choosing a revision shows **Open revision N**, its public links and, for a person who can edit, **Withdraw**. **Open revision N** shows the stored revision inside the app at `/o/<observation-id>/rca/<revision>`, for anyone who can see the observation, whether or not it has a public link. The page is the same frozen text and panels a public link shows, with the name of who published it, and a link back to the observation. An observation in My Dashboards must be moved to a shared folder first, as a dashboard must before it is shared. Such an observation does not list `publish` in its `allowed_actions`, and the web page offers **Publish as RCA** with a **Move to folder** button instead of a publish button. ### What a revision freezes - The title, summary, state and time range of the observation when it was published. - The `live` text blocks, as Markdown, in page order. - Every `snapshot` block with its frozen panel and data, and a new snapshot of every `live` panel block, taken in the same step. - Each block's width, and the height of a panel or snapshot block that was set by hand. A revision published before heights were kept has none, so its panels show at the default height for their width. A revision leaves out requested blocks, run blocks, and the query text of every panel. A published copy shows what the data was and never how to query your datasources. A published page lays its blocks out in rows of thirds like the observation page does, from 640 pixels of width up and in one column below that. A block that sits alone at half width takes half the row. Revisions published before this packing existed show such a block at half width too, where they used to give it the whole row. ### When a publish is refused The panel refuses a publish with one of these reasons, and the API answers with the code: | Reason | Code | | --- | --- | | A panel could not be frozen | `panel_failed`, 422 | | The page changed while it was being frozen | `observation_changed`, 409 | | The observation has 50 revisions | `rca_limit`, 409 | | The page has not changed since the latest revision | `rca_unchanged`, 409 | | A panel has more than 2 MiB of data | `snapshot_too_large`, 422 | | The observation is in My Dashboards | `personal_folder`, 409 | Details of these refusals: - **Panel could not be frozen.** Nothing is published, and the answer names the block. The web message names the panel and why, and **Show block** closes the panel and scrolls to that block so you can fix or remove it. Publish again afterwards. - **Page changed meanwhile.** Publishing again takes the new page. - **No change since the latest revision.** A page with no live panel block whose title, summary, state, range and blocks equal its latest revision is refused. Pressing Publish twice, or an agent retrying, never makes a copy. A page with a live panel block always publishes, because each publish takes new data. ### Withdraw a revision A revision never changes, so a slip in one cannot be edited, but the revision can be withdrawn. **Withdraw** asks for confirmation and then deletes the revision and its frozen panels for everyone. It needs Edit on the observation's folder and the same states as publishing. The activity log keeps `observation.rca_withdrawn` with the title and the revision number. A revision that still has a live public link answers `rca_shared` (409). A public link is a person's decision, so a person with Manage on the folder revokes its links first and then withdraws the revision. Links that have already expired go with the revision. Withdrawing the newest revision frees its number, so the next publish takes it again. A person withdraws with `observe o withdraw <observation-id> <revision> --yes` or `DELETE /api/v1/observations/{id}/rcas/{revision}`. No MCP tool deletes anything, so an agent cannot withdraw a revision. ## Share a revision A public link shows one revision of an RCA read-only to anyone who has it, with no sign-in. Making one is a person's decision, as it is for a dashboard (see [Public links](/docs/use/public-links/)). No agent or MCP tool creates, lists or revokes an RCA link, and `observe o` has no verb for it. ### Share a revision in the web app 1. Choose **Publish as RCA**, then choose a revision. You see **Public links, revision N**. 2. Pick **Expires**: No expiry, 1 day, 7 days, 30 days or On a date. **On a date** stops the link at the end of that day in your browser's time zone, and it must be today or later. 3. Choose **Create link**. 4. Choose **Copy**. The full address shows once in a box, with the note "Copy it now. It is not shown again." The list below it shows each link's first characters, whether it is active or expired and when it expires, who made it, and when it was last viewed. **Copy link** stays on a link made since you chose the revision. **Revoke** asks "Revoke this public link?" and then stops the link at once. Creating, listing and revoking links need Manage on the folder. The panel shows the server's reason when you lack it, when the observation is in My Dashboards, when the revision holds data that depends on the viewer, or when the observation already has 20 links. ### Share a revision over HTTP A person with Manage on the folder creates a link with `POST /api/v1/observations/{id}/rcas/{revision}/public-links`, and revokes it with `DELETE /api/v1/observations/{id}/public-links/{link_id}`. The link's address is `<public url>/rca/<token>`, and the token is shown once, when the link is created. A link can expire at a time you choose, and it stops working then; revoking it stops it at once. An observation has at most 20 links across all its revisions, and one more answers 409 `too_many_links`. A link serves the stored revision only, never the live observation, a live panel or a query. It shows who published it by name and by no id. An observation in My Dashboards cannot have a link, and the request answers 403 `forbidden_role`. One in a folder only Admins can read is refused with `409 admins_only_folder`. That answer says to move it to a folder that is not Only Admins, or it names the Admins-only datasource the observation reads, also in a `datasource` field, when it cannot leave. A revision with a snapshot of data that depends on who is viewing, from `${__user.*}` in a query, cannot have a link, because nobody could read it on a public address. The request answers 422 `user_scoped`. ### The public page `<public url>/rca/<token>` opens with no sign-in and shows the SlashObserve name, then: - The title, and a line "Revision N, published by `<name>`, `<date and time>` `<time zone>`", in the time zone of the reader's browser. - "Resolved", or "Open at publish time", and the summary when there is one. - The blocks in page order: text as Markdown, and each panel as its frozen data under the panel's title. A panel's caption is "Frozen" with the observation's time range and its time zone when it had one, and otherwise "Frozen when published". - Blocks side by side in rows of thirds when the page is wide enough. It shows no query, discussion, comment, activity, live panel or other revision, and it runs no query against a datasource. A panel of a type that cannot show on a public link, or that the page cannot draw yet, shows "This panel type is not shown yet." An expired, revoked or unknown token shows "This link has expired or was turned off." When a newer revision has been published since, the page says "Revision N is newer, so this one may be out of date", with N only and no link, because the reader cannot open another revision. `GET /api/v1/public/{token}/rca` carries the number as `superseded_by`, null on the newest. The same notice shows in the app, with **Open revision N** beside it. A person who finds a link to a superseded revision can revoke it, or withdraw the revision once its links are revoked. ## Investigations write into an observation An [investigation](/docs/use/investigate/) opens an observation when it is queued, and its run shows there as a `run` block while the agent works. `POST /api/v1/observe` with `kind` `investigate`, and `observe investigate`, both do this. `POST /api/v1/observe` takes an optional `observation_id` for an investigation, the observation to write into, and `observe investigate` takes it as `--observation`. It must be an observation you can see, or the answer is 404 `not_found`. It must also be one you may comment on, or the answer is 403 `forbidden_role`. An investigation that names an observation with 100 blocks already gets no run block and no `observation_id`, because the page has no room. ### The observation a run creates Without `observation_id`, the server makes a new observation: - Its title is the first non-empty line of the prompt without `@observe`, cut at a word to about 60 characters with "...", or "Investigation" when no line is left or the first line has fewer than 3 characters. - Its range is the window of the investigation, and it has none when the investigation was given no `from` and `to`. - It goes in the folder of the dashboard the investigation is about when you can edit that folder. Otherwise it goes in your My Dashboards when you may create there, and otherwise in General when you may create there. - When no such folder exists, the investigation still runs, writes no observation, and its `observation_id` is null. ### What a saved finding writes When the agent saves its finding, the finding and its conclusion are written in one transaction, and a failure leaves neither. The conclusion becomes a text block that starts with `## <title>` and goes on with the finding's Markdown, cut to the 8,000 characters the server accepts in a text block. One panel block follows for each panel of its evidence, showing the finding's own window. The run block then cites these blocks, and a run adds them once, so saving the finding again adds nothing. The page names each cited block by the finding's heading or the panel's title. An evidence panel that is not valid, or that does not fit in the page's limits, is left out, and the text block is still written. A finding saved by a run that has an observation takes its own id. One saved with no run observation takes the id of the observation it creates. Its `observation_id` names the observation either way. A block is `live` when you can edit the observation's folder at the moment it is written, and `requested` when you can only comment. When the run's observation is gone, hidden from you, or in a folder you cannot comment in, saving the finding fails and writes nothing, instead of opening a second observation. A server error while the observation is opened queues nothing and answers the request with that error. ### Where the answer goes Where the answer goes depends on what the question was asked on. - A question asked on one block puts the run block, the text block and the evidence panels directly under that block, in that order. The blocks below move down by that many places. - A question on the whole page puts them at the end of the page. So does one asked on a block that has been deleted since. The new blocks are full width, and the order, widths and heights you arranged for the other blocks stay as they are. The same rule holds when the agent writes its answer over MCP, when you save an answer from a chat onto the page, and when a commenter asks, whose blocks arrive as `requested` blocks in the same place. ### How a run block looks A run block that finished normally shows the outcome and **View the run** on one line, and **Run details** unfolds the steps and the blocks it cites. A run that failed or was stopped stays unfolded, so its error and the retry control show without a click. A text block written by a run that is longer than 600 characters shows its heading and first paragraph, and **The rest of the answer** shows or hides the remainder. Folding is only how the page is drawn, so the stored block, a published revision and a snapshot always hold the whole text. ### Runs over the API and the CLI `observation_id` on a run is the observation it writes into, and `GET /api/v1/observe/{id}` and `observe investigate --json` carry it. `observe investigate --observation <id>` names the observation to write into, and without it a terminal starts a new one. Starting an investigation again, with `POST /api/v1/observe/{id}/retry` or `observe retry`, writes into the observation of the run when you may comment on it. Otherwise, or when that run had none, the rules for a new observation apply to you. ## Work on one from MCP and the CLI [MCP](/docs/use/mcp/) clients use these tools: - `create_observation`, `get_observation`, `list_observations`, `update_observation`, `move_observation` - `resolve_observation`, `reopen_observation` - `add_block`, `update_block`, `arrange_blocks`, `keep_block`, `discard_block` - `publish_rca`, `list_rcas`, `get_rca` - `pin_observation`, `make_dashboard` The [CLI](/docs/use/cli/#observations) has the same work as `observe o new`, `show`, `list`, `add`, `edit`, `move`, `resolve`, `reopen`, `keep`, `discard`, `edit-block`, `arrange`, `publish`, `rcas`, `pin` and `dashboard`. It also has `observe o delete`, `remove-block` and `withdraw`, which no MCP tool matches because no MCP tool deletes anything. Both reach the HTTP API under `/api/v1/observations`, and a person works on the page in the [web app](#work-a-question-on-a-page). Every observation the HTTP API and the MCP observation tools return carries `message_count`, how many messages its discussion holds, replies included, and 0 before anyone has written one. To read what changed on one observation, filter the [activity](/docs/use/activity/) with `observation_id`. Searching the workspace finds observations too; see [Search](/docs/use/search/). ### List observations over HTTP `GET /api/v1/observations` takes these query parameters: | Parameter | Meaning | | --- | --- | | `folder_id` | Observations in one folder. | | `state` | `open` or `resolved`. | | `q` | A title that contains the text, ignoring case, at most 200 characters. | | `created_by` | `me` keeps the ones you started. | | `sort` | `updated` (the default), `created` or `title`. | | `order` | `asc` or `desc`. | | `limit` | 1 to 100, 20 by default. | | `cursor` | The `next_cursor` of the last page. | | `offset` | At most 100000, and the answer also has `total`. | `title` sorts ascending by default, and the other sorts descending. The list pages in one of two ways: `cursor` and `next_cursor` for the default order, or `offset`, which also answers `total`, the number of observations that match. A cursor cannot be combined with `offset` or with another sort. ## Reference ### Blocks A block is one of these kinds: | Kind | What it holds | | --- | --- | | `text` | Markdown of at most 8,000 characters. | | `panel` | A data panel in ObserveSpec form with its own query. It runs live, over the observation's range or its own `from` and `to`. | | `snapshot` | The data of a panel block frozen at one moment, so the page keeps showing what you saw. | | `run` | The agent run that is investigating, added by the server. | Blocks keep the order of their `position`. A person who can only comment sees positions that count only the blocks they can see, and a suggestion they place at one of those positions lands there once an editor keeps it. Each block has a `version`, and a change or a keep that names an older one is refused with `version_conflict`. Two people never overwrite each other unseen. A block's `width` is `third`, `half`, `two_thirds` or `full`. A block added without one is `full`. ### Limits and codes | What | Limit | Refused with | | --- | --- | --- | | Title | 1 to 200 characters | `invalid_title` | | Summary | 500 characters | `invalid_summary` | | Time range | `from` before `to`, given together, at most 400 days | `invalid_range` | | Text block | 8,000 characters, and no HTML from an agent or MCP client | `invalid_block` | | Block height | 120 to 960 pixels, on a panel or snapshot block only | `invalid_block` | | Variables on a panel block | 20 | `invalid_block` | | Blocks on a page | 100 | `too_many_blocks` | | Panel and snapshot blocks together | 24 | `too_many_panels` | | Frozen data | 2 MiB | `snapshot_too_large` | | Panel size | 63 KiB | `invalid_panel` | | RCA revisions | 50 | `rca_limit` | | RCA public links | 20 across all revisions | `too_many_links`, 409 | These codes also appear: | Code | Meaning | | --- | --- | | `version_conflict` | A change or keep names an older block version. The 409 answer carries the current block as `current`. | | `kind_not_addable` | A `run` block cannot be added through the API. | | `body_not_editable` | Only the body of a text or panel block can be changed. | | `variable_missing` | A panel uses a variable and no value was given in `variable_values`. | | `observation_has_no_dashboard` | A pin was asked for an observation that came from no dashboard. | | `observation_has_no_panels` | **Make a dashboard** found no live panel block. | | `personal_folder` | The observation cannot move into My Dashboards, or cannot publish from it. | | `run_in_progress` | An investigation is queued or running on the observation. | | `rca_shared` | A revision still has a live public link. | A height for a text block is refused with `invalid_block`. A panel must be a valid data panel. One that an agent, an MCP client or a service-account key (the [CLI](/docs/use/cli/) and scripts) adds must also run and return data in its range, the check that the evidence of a [finding](/docs/use/investigate/) gets. An agent or MCP client never writes HTML into a text block, as everywhere else. ### Who can do what An observation lives in one folder and follows that folder's access, as a dashboard does; see [Folders](/docs/teams/folders/). - A person who can view the folder can read the observation. - A person who can comment adds blocks that are `requested`, and takes part in the observation's one discussion, a single comment thread for the whole page. - A person who can edit adds `live` blocks, changes and removes them, moves the observation, resolves and reopens it, and publishes it. - A person who can manage the folder creates public links to its RCA, and deletes any observation in it. - A person who started the observation and can still edit it deletes it. A requested block is not part of the page's settled content until someone who can edit keeps it. Until then only its author, editors and admins see it. Viewers and other commenters read the page without it, in the app, over the API, in MCP and in the CLI. An editor keeps a requested block or discards it, and the one who asked for it may discard it too. An observation in My Dashboards is private to its owner. Over the API and MCP, an observation and each of its blocks carry `allowed_actions`, the actions the caller may take now; [States](/docs/reference/states/#observation) lists them. A block someone requested also shows in the inbox of the person who created the observation, as a "Suggested block" that waits to be kept or discarded; see [Inbox](/docs/use/inbox/). # Public links and TV mode > Share one dashboard read-only with people who have no account through a revocable link that can expire, and show a dashboard on a wall screen in TV mode. Source: https://slashobserve.com/docs/use/public-links/ · Markdown: https://slashobserve.com/docs/use/public-links/index.md A public link opens one dashboard read-only for anyone who has the link, with no sign-in. Use it for a status screen, a vendor, or a wall TV that has no account. TV mode shows a dashboard full screen on a wall display, for people who do have an account. ## Share a dashboard with a public link You need Manage on the dashboard's folder; [Who can create a link](#who-can-create-a-link) explains. 1. Open the dashboard and choose **Share**. 2. Under **Public links**, below "Who has access", pick how variables behave. **Frozen: the values selected now** stores the variable values in the address you are looking at. A variable the address does not set uses the dashboard's default. **Free: viewers choose** lets viewers pick values. 3. Pick **Expires**: **No expiry**, **1 day**, **7 days**, **30 days** or **On a date**. With a date, the link stops working at the end of that day, local time. 4. Optionally enter a **Label**, up to 80 characters, so the list says what the link is for. 5. Choose **Create public link**. The link's address shows once, with **Copy** and "Copy it now. It is not shown again." 6. Send the address to the people who need it. The link always shows the dashboard's latest version, so an edit reaches every screen that has it open at its next refresh. A public link shows no snapshot of a past moment. It cannot be framed in another page, because every response carries `X-Frame-Options: DENY` and `frame-ancestors 'none'`; open it in its own window or screen. The Share pane lists each link with: - its prefix and label; - its variables mode, and the values a frozen link holds; - its expiry, or "No expiry"; - "Expired", or "Not usable: uses the viewer's identity", when the link no longer opens; - who created it and when, and when it was last viewed. ## Revoke a link 1. Open the dashboard's **Share** pane. 2. Choose **Revoke** on the link, then confirm. Revoking deletes the link, so its address stops working at once. A lost link cannot be shown again, because the server keeps only a hash of the token. Create a new link and revoke the old one. ## Choose how variables behave Each link is **Frozen** or **Free**. - A frozen link always uses the selections stored with it, whatever the address says. - A free link lets the viewer choose values of query, custom, interval and datasource variables. The viewer can choose only among the options the server lists for that variable, so nobody can type in a label value the dashboard does not offer. - Textbox, adhoc, group by and constant variables keep the stored selections or the dashboard's defaults. - When you create a free link, the server checks its stored selections against those options. A value that is not an option is refused, instead of making every panel fail for the viewer. The viewer can always change the time range and the refresh interval. The query proxy's limits bound every query whatever the range. ## Who can create a link Creating, listing and revoking public links needs Manage on the dashboard's folder, the level that sets the folder's permissions; see [Folders](/docs/teams/folders/). A link lets people outside the folder's list see the dashboard, so it needs that level. Service-account keys with Manage can call the API too. The agent and MCP clients cannot create or list public links. Publishing a dashboard outside the team is a person's decision. A published RCA revision has its own links; see [Share a revision](/docs/use/observations/#share-a-revision). A dashboard has at most 20 unexpired links, and an expired link stops counting. ### Dashboards that cannot have a link - A dashboard in My Dashboards is private until you publish it, so move it to a shared folder first. - A dashboard whose queries read the viewer's identity through `${__user.*}` has nobody to read on a public link. Creating a link for it is refused. An existing link stops working, and shows as not usable, once a new version starts using `${__user.*}`. - A dashboard in a folder only Admins can read stays inside the team, so no link can be created for it. The same holds for an RCA revision of an observation there. Details of Admins-only folders: - A dashboard with an unexpired link, or an observation whose RCA has one, cannot move into such a folder until the link is revoked. - Its folder cannot be made Admins only until the link is revoked. Both answer `409 admins_only_folder`. - This way a link never reaches content that reads an [Admins-only datasource](/docs/connect/datasources-in-the-app/#who-can-query-it). - A link whose dashboard or observation is in such a folder anyway answers like a link that does not exist. The public view and its panel data refuse such a dashboard as well. ## What a public view shows A public view at `/p/<token>` shows: - the dashboard's title and its panels; - the time range and refresh pickers; - the variables a free link lets the viewer change, while the other variables' values read as one line of text. It never shows query text, annotations, comments, version history or the agent, and it has no link into the app. Its dashboard, panel data and variable requests all go to `/api/v1/public/`, so the viewer needs no account. An address that is unknown, revoked or expired reads "This link has expired or was turned off." A page that is already open shows the same message as soon as a panel refresh finds the link revoked or expired, without a reload. Some panels need the signed-in app. The dashboard list, news and geomap panels show "Not available on a public link" instead. Remote images in text and canvas panels load through the signed-in assets route, so they do not show on a public view. Panel data goes through the same query proxy as the app, which runs only the dashboard's saved queries, and each link may have 8 requests in flight. ## Show it on a wall TV mode shows a dashboard on a wall screen with nothing but its panels. The top row, the variables bar, the links and the activity card are hidden. 1. Open the dashboard. 2. Choose **TV mode** in the dashboard's **More** menu, or press `d` then `k`. Either one also puts the browser in full screen. 3. Press `Esc` to leave both. A hint saying so shows for three seconds when TV mode starts and whenever the mouse moves. When the browser leaves full screen on its own, TV mode ends with it. A browser goes full screen only after a click or a key press, so TV mode opened from a link starts without it. It also starts without when the browser refuses full screen. The hint then also offers `f`, which puts the browser in full screen. TV mode lives in the address, so a TV can open a bookmark straight into it. [TV mode addresses](#tv-mode-addresses) lists the query keys. ### Cycle through dashboards Choose **TV mode for this folder** in the **More** menu to open each dashboard of the same folder in turn, ordered by title. It is not offered for a personal folder. A folder cycle keeps the time range and the auto-refresh, and opens each dashboard with its default variable values. It reads up to 100 dashboards of the folder. ### Sign-in for a TV TV mode is part of the signed-in app, so the screen signs in as someone who can view the dashboard. A public link's view at `/p/<token>` has no TV mode and ignores these keys. A screen without an account opens a public link and shows the whole public view. ## Reference ### TV mode addresses | Query key | Meaning | | --- | --- | | `kiosk=1` | TV mode; `kiosk` alone or `kiosk=true` work too. | | `cycle=rows` | Bring each expanded row to the top of the screen in turn. | | `cycle=folder` | Open each dashboard of the same folder in turn, ordered by title. | | `interval=<seconds>` | Seconds between steps of a cycle. | Details of `interval`: - The range is 10 to 3600, and the default is 60. - A value outside the range is moved to the nearest limit and shown so in the address. `interval=5` becomes `interval=10`. ### Limits of a link | Limit | Value | | --- | --- | | Unexpired links per dashboard | 20 | | Label length | 80 characters | | Requests in flight per link | 8 | | Dashboards in a folder cycle | 100 | ### API Every route except the public ones needs a session or a service-account key with Manage on the dashboard's folder. | Route | Does | | --- | --- | | `GET /api/v1/dashboards/{id}/public-links` | Lists the links. | | `POST /api/v1/dashboards/{id}/public-links` | Creates a link, with an optional `label`, and returns its token and `url` once. | | `DELETE /api/v1/dashboards/{id}/public-links/{link_id}` | Revokes a link, and answers 204. | | `GET /api/v1/public/{token}` | Returns the dashboard for the link; the token is the only credential. | | `GET /api/v1/public/{token}/panels/{panel_id}/data` | Runs one panel's saved queries for the link. | | `GET /api/v1/public/{token}/variables/{name}/values` | Lists one variable's values for the link. | Details of the list: each link has its prefix, label, variables mode, expiry, creator, last view and whether it is usable. It also has a `state`, `active` or `expired`; see [States](/docs/reference/states/). Details of the public view: the answer holds the latest version's Spec with every query's text, the dashboard's tags and its links left out, and the datasources it uses (uid and type). Create a free link that expires at the end of November 2026: ```sh curl -s -X POST "$OBSERVE_SERVER/api/v1/dashboards/$DASHBOARD_ID/public-links" \ -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ -d '{"variables": "free", "selections": {"env": ["prod"]}, "expires_at": "2026-12-01T00:00:00Z"}' ``` The answer is 201 with the link, its `token` and its `url`, and the `url` is the address to share. ### API errors | Status and code | When | | --- | --- | | 400 `invalid_request` | `expires_at` is not an RFC 3339 time, or the mode or label is invalid. | | 403 `forbidden_role` | You do not have Manage. | | 404 `not_found` | The dashboard or link does not exist or you cannot see it, or a public route got a token that is unknown, revoked or expired. | | 409 `personal_folder` | The dashboard is in My Dashboards. | | 409 `admins_only_folder` | The dashboard is in a folder only Admins can read. | | 422 `user_scoped` | The dashboard reads the viewer's identity. | | 422 `invalid_expiry` | The expiry is not allowed. | | 422 `unknown_variable` | A selection names a variable the dashboard lacks. | | 422 `selection_not_allowed` | A free link's selection is not one of the variable's options. | | 422 `too_many_links` | The dashboard already has 20 unexpired links. | | 502 `variable_options_unavailable` | The options could not be read to check the selections. | Details of `admins_only_folder`: - The message says to move the dashboard to a folder that is not Only Admins. - When the dashboard reads an Admins-only datasource and so cannot leave, the message says public links are not available for it and names the datasource. The answer then also has a `datasource` field. A free link also answers 400 `selection_not_allowed` on a public route when a request carries a value that is not one of the variable's options. # Search > Find dashboards, observations, annotations, comments and saved searches by their words, ranked by relevance, showing each person only what they can open. Source: https://slashobserve.com/docs/use/search/ · Markdown: https://slashobserve.com/docs/use/search/index.md Search finds past work by its words. One query covers dashboards, annotations, observations, comments, and saved logs, trace and metrics searches, and ranks the matches together. Use it to find the dashboard that had a panel on `checkout`, the observation that answered a latency question, or the comment where someone explained a spike. You see only what you can open. [Who finds what](#who-finds-what) has the rules. ## Find something 1. Press Cmd+K (Ctrl+K on Windows and Linux), or choose **Search or jump to** in the sidebar. 2. Type at least two characters, such as `checkout latency`. The palette lists matching pages, dashboards and sources, then adds what the server finds in the workspace under a heading for each kind, with the matched words marked. 3. Press Enter to open a result. A comment opens the page of what it is on. 4. Choose **See all results**, or open `/search?q=checkout`, to see every match on the Search page, 20 at a time with **Show more**. One button per kind narrows the list. [Search in the web app](/docs/use/web/#search) describes the palette and the page. From a terminal, run: ```sh observe search checkout latency --kind observation ``` You see one line per result with its kind, title, folder and page, and a snippet of the matched text under it: ```text observation Checkout latency after the 14:00 deploy Payments https://observe.example.com/o/6c1f... ... p99 latency on checkout rose after ... ``` `observe search` prints `No results.` when nothing matches. ## Write a query Every word has to match, either exactly or by its English stem, so `errors` finds `error`. Case and punctuation do not matter. | You write | It finds | | --- | --- | | `checkout latency` | Objects with both words. | | `"checkout latency"` | Objects with the two words next to each other, in that order. | | `checkout or payments` | Objects with either word. | | `checkout -staging` | Objects with `checkout` and without `staging`. | | `chec` | Objects with a word that starts with `chec`. | The last word also matches as a prefix, so a search box can find results while you type. A prefix needs at least two letters or digits. A query that ends in a space, an open quote or a `-` term has no prefix. A hyphen between two words searches both parts, so `demo-shop overview` finds a title written `Demo Shop Overview` or `demo-shop overview`. A hyphen before a digit, as in `node-1`, matches a title written the same way. A hyphen at the start of a word still excludes it, and `-demo-shop` excludes the words `demo shop` written next to each other, whether the title has a hyphen or a space. A query is 1 to 200 characters and holds no control characters. It needs at least one letter or digit outside a `-` term, so `-staging` alone answers 400. ## Search only one kind of object Pass the kind you want, and repeat it for several. In the web app, the buttons on the Search page do this. Over HTTP, add `kind` once for each kind: ```sh curl -fsS -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/search?q=checkout&kind=dashboard&kind=observation&limit=10" ``` The answer is `{"results": [...], "next_cursor": ...}`, best match first. `next_cursor` is `null` on the last page. Pass it back as `cursor` to read the next page. ## Read every page from a script The HTTP endpoint needs the Viewer role or higher and accepts a session or a service-account key. The CLI and MCP accept a key. In the CLI, `--cursor` continues from a `next_cursor`, and `--all` reads every page as one list. `--limit` takes 1 to 50 and is 20 by default. Put a word that starts with `-` after `--`, so the CLI does not read it as a flag: ```sh observe search checkout --kind comment -- -staging ``` The MCP tool `search_workspace` takes `q`, `kinds`, `limit` and `cursor` and returns the same results for the person the agent acts as. Its `snippet` is plain text, and it may return fewer results than `limit` when the page would be too large, so keep reading with `next_cursor`. ## Reference ### What each kind matches | Kind | Title and tags | Text | Query text | | --- | --- | --- | --- | | `dashboard` | Title and tags. | Description, and the titles and descriptions of panels, rows included. | The query of every panel, rows included. | | `annotation` | The first line of its text, and its tags. | The text. | None. | | `observation` | Title. | The summary, and the Markdown of its live text blocks, which hold an investigation's answer. | None. | | `comment` | None. | One message, with each mention read as `@Name`. | None. | | `saved_search` | Title. | The service and span filters of a trace search. | The query of a logs, trace or metrics search. | Details of what is and is not searched: - Only the latest version of a dashboard is searched, so a word that was removed in a later save finds nothing. - A comment is one message, not a whole thread, and a result for it names the object it is on. - Folders, text panel content and prompts are not searched. - A finding's answer lives in its observation, so it is found as that observation. - Query text is searched as plain words, so `http_requests_total` is found by `http_requests_total` and by `requests`. ### Who finds what A result appears only when you can open the object it points to. - A dashboard is found through its folder, and so are its annotations and comments. - An [observation](/docs/use/observations/), its comments and a saved search are found through the folder each is in. - A global annotation, one on no dashboard, and its comments are found by everyone who can read General. - A comment is found by whoever can read what it is on. - Personal folders stay private, Admins included. A result never shows a title or a snippet of something you cannot open, and a move, a delete or an edit changes the results at once. ### Ranking and limits - Results are ranked by how well the words match, and among near-equals the newer object comes first. - A match in a title or a tag counts for more than a match in the text, and a match in query text counts for less. - A title match always beats a text match of the same frequency. - A query returns at most 200 results, so refine the words to see more. - Recency is measured once for a whole search, so paging does not reorder results as time passes, but an edit made while you page can still move a result. ### Request parameters `GET /api/v1/search` takes these query parameters. | Parameter | Meaning | | --- | --- | | `q` | The words to search for. Required. | | `kind` | Only results of this kind: `dashboard`, `annotation`, `observation`, `comment` or `saved_search`. Repeat it for several. | | `limit` | 1 to 50 results, 20 by default. | | `cursor` | The `next_cursor` of the previous page. | ### Result fields Each result has these fields. | Field | Meaning | | --- | --- | | `kind` | One of the five kinds. | | `id` | The id of the object, or of the message for a comment. | | `title` | The title of the object, or for a comment, of what it is on. | | `snippet` | Up to two fragments of the matched text, as `{"text", "match"}` segments of at most 300 characters in all. | | `url` | The page that shows the object, or null for an annotation on no dashboard. | | `folder` | The `id` and `title` of the folder the result is read through, or null for an annotation on no dashboard. | | `target` | For a comment, the `kind`, `id` and `title` of what it is on, else null. | | `thread_id` | For a comment, its thread, else null. | | `updated_at` | When the object last changed, or for a comment, when it was written or last edited. | A segment of `snippet` with `match` set is a matched word. Render a snippet as text, never as HTML. ### Errors - A malformed query or cursor answers 400 `invalid_request` with the reason, such as `q must be 1 to 200 characters`, `q needs a word to search for` or `cursor is not valid`. - A `kind` that is not one of the five answers 400 `invalid_request`. # Switch from Grafana > Move a Grafana team over in order, from connecting a Grafana and importing every dashboard to repairing, checking health, sharing, keeping dashboards in Git and opening old links. Source: https://slashobserve.com/docs/use/switch-from-grafana/ · Markdown: https://slashobserve.com/docs/use/switch-from-grafana/index.md This page walks a team through the move from Grafana in the order that works: each step leaves the dashboards in a better state for the next one. 1. [Connect](#connect) the server to a running Grafana. 2. [Import](#import) every dashboard with its folders in one run. 3. [Repair](#repair) the panels whose queries did not verify. 4. [Check health](#check-health) to find what still returns no data, and what nobody uses. 5. [Share](#share-with-public-links-and-tv-mode) dashboards with people outside the team and on wall screens. 6. [Keep dashboards in Git](#keep-dashboards-in-git) once they are right. 7. [Open old links](#open-old-links) to Grafana dashboards at their new address. [What maps, what changes and what waits](#what-maps-what-changes-and-what-waits) compares the two in one table, and [The API](#the-api) does every step without the web app. The screenshots on this page come from an earlier build of the app, so the sidebar and some labels differ from what you see now. None of them shows the connection form, the import report or the repair queue. ## Before you start You need two things, one on each side. 1. Set `SLASHOBSERVE_SECRET_KEY` on the server; see [Configuration](/docs/reference/configuration/#stored-secrets). The server encrypts each token with a key derived from it, and adding a connection without it fails with `409 secret_key_missing`. 2. In Grafana, create a service account with the Viewer role on the folders you want to bring over, and a token for it. The server only reads from Grafana: `/api/health`, `/api/folders`, `/api/search`, `/api/datasources` and `/api/dashboards/uid/<uid>`. The chat page at `/ask` lists the dashboards you can see below the chat composer, with **Import from Grafana** beside the composer's datasources. ![The chat composer with an Import from Grafana button beside its datasources, above a list of dashboards](images/switch-from-grafana/01-home.png) ## Connect An Admin stores a Grafana URL and a service-account token once, and the server then imports every dashboard from that Grafana, instead of one file at a time. Each dashboard goes through the same importer as [Import Grafana dashboards](/docs/use/import-grafana/), with the same datasource matching, the same report and one import record per dashboard. 1. Open Settings and choose **Grafana connection** in its section list. Only Admins see it. 2. Choose **Add connection**. 3. In the panel that opens, give the connection a name, the Grafana URL and the service-account token, and choose **Add connection**. The token is stored encrypted and is never shown again, not in the web app and not in the API. The server tests the connection as soon as it is saved, and a message says whether the test passed or what failed. A failed test still keeps the connection, so you can fix it with Edit instead of adding it again. From a shell, an Admin key does the same: ```sh printf '%s' "$GRAFANA_TOKEN" | observe grafana connect https://grafana.example.com --token-stdin ``` See [CLI](/docs/use/cli/#import-from-a-grafana) for the output and the exit codes. ### Test a connection again Choose **Test** on the connection. The outcome names how many top-level folders and dashboards the server found, for example `Connected: 12 top-level folders, 340 dashboards.` A Grafana that cannot be reached or refuses the token shows a fixed message such as `Grafana refused the token (status 401).` ### Change or delete a connection Choose **Edit** in the row's menu to change the name, the URL or the token. Leave the token empty to keep the stored one. A new URL needs the token again, so a stored token never reaches another host. Saving tests the connection again. Deleting a connection from the same menu keeps the dashboards it imported. ### Who can connect, and why private hosts are allowed Only Admins can add, change, test, list or delete a connection, or start an import from one. A key needs the Admin role too. The token is never returned by the API, never logged, and only ever sent to the host of the connection's URL. Other outbound fetches, such as news feeds and images, reach only `https` on port 443 and refuse private addresses; see [Outbound access](/docs/operate/outbound-access/). A Grafana connection is the one exception: its URL may be `http` or `https` on any port, and its host may resolve to a private or loopback address, because Grafana usually runs inside the same network as SlashObserve. This is safe to allow only because the person adding the URL is an Admin, who already controls the server's datasources and settings. The host must still be a domain name, not an IP address, and it must be on the outbound allowlist. Adding a connection allows its domain when the list is managed in Settings. It is refused with `403 outbound_domain_not_allowed` when `SLASHOBSERVE_OUTBOUND_DOMAINS` locks the list and does not name it. Deleting the connection removes that entry again unless something else still uses the host. Every request to Grafana keeps the outbound timeout and an 8 MiB size cap, and a redirect is never followed. ## Import 1. Choose **Import** on a connection. 2. Pick **All folders**, or **Choose folders** and tick the ones you want. A folder brings its subfolders with it, and General stands for the dashboards outside any folder. 3. Check the datasource matches. A datasource with no match is flagged: dashboards that use it fail until you pick one. 4. Choose **Start import**. The page shows how many dashboards are done out of the total, and how many failed or were skipped, while the import runs. It keeps showing the run after a reload. When the import ends, the results are grouped: - Failed: the dashboards that could not be imported, each with its Grafana uid and the reason. - Need repair: the dashboards that were imported with unverified or placeholder panels, with their counts and a link to each. - Imported: the dashboards that imported cleanly. - Skipped: the dashboards already imported at the same Grafana version. To stop a running import, an Admin chooses **Stop import** on its progress card. The dashboards it already imported stay. From a shell, `observe grafana import <connection id> --all` does the same; see [CLI](/docs/use/cli/#import-from-a-grafana). ### How datasources are matched Each Grafana datasource of a type SlashObserve queries (Prometheus, ClickHouse, Loki, Tempo, Elasticsearch or OpenSearch) is listed with a choice of your datasources of the same type. The importer's automatic rules prefill the choice, so a datasource of the wrong type is never offered. A datasource whose type has no configured datasource here is listed without a choice, and its panels import as placeholders that say which type is missing. Datasources of other types are counted in one line, and their panels import as placeholders. ### How an import runs The server fetches at most 4 dashboards from Grafana at a time and saves them one after another, and a dashboard that fails never stops the run. A connection runs one import at a time. Any server answers the progress of an import, and each connection keeps its last 20 imports. The connection's last import is the newest finished one. A server that stops hands a running import on, and the next server continues it by skipping the dashboards already handled. An import whose server crashes twice ends failed, and starting it again skips what it already imported. ## Repair The repair queue is the **Imported, not verified** problem filter on the dashboards list, at `/dashboards?kind=imported`. The old address `/import/repair` opens it too. It lists, in the folders you can see, every dashboard whose latest version still has unverified panels or variables or placeholder panels. Editors and Admins can open it from Import from Grafana, and from the Need repair group of an import's results. Each row shows the dashboard's folder, its unverified panels and variables, its placeholders, when it was imported, and its latest repair. A dashboard leaves the list once nothing in it fails. 1. Choose **Repair** on a row to queue one revision by the agent on that dashboard. 2. To queue every listed dashboard in the chosen folder, choose **Repair all**. 3. Open the dashboards when the revisions finish, and send a repair again where one is still failing. Every repair uses this fixed prompt: ```text Repair every panel and variable listed as unverified so its query runs and returns data; keep every other panel unchanged and never delete an unverified panel. ``` A repair that ran but left failures shows as repaired and still failing, and you can send it again. A dashboard with a revision already queued or running is skipped, and so is one with only placeholders, because the agent never edits a placeholder; replace those by hand. Each person can have 20 repairs queued or running, so on a large import run Repair all again when the first ones finish. From an MCP client, read the dashboard with `get_dashboard`, whose `unverified` list names the failing panels and variables, and fix those panels with `update_panels`. ## Check health Repair fixes what failed at import time, but a query that runs can still return nothing, and a move is a good time to drop dashboards nobody opens. Every dashboard is checked about once a day, and the dashboards list marks each one that has any of these: - a panel that fails or returns no data over the last 7 days; - a variable that resolves to nothing; - a duplicate title in its folder; - no opens in 90 days. After a large import, an Admin can choose **Run now** instead of waiting for the hourly run, and an Editor can choose **Repair** on a row to queue the agent on its failing panels. Delete or merge the duplicates and the unopened dashboards before the next step, so nobody shares or commits them. See [Dashboard health](/docs/use/dashboard-health/) for the rules and the API. ![The dashboards list with a Health column that marks some dashboards as failing a query and others as Healthy, a Problem filter and Run now above the list](images/switch-from-grafana/05-health.png) ## Share with public links and TV mode Grafana's public dashboards and kiosk mode have their counterparts here. ![A dashboard with stat and time series panels, the Share button in its top row and the Activity pane with comments and a saved version beside the panels](images/switch-from-grafana/06-shop-overview.png) ### Give someone without an account a public link A [public link](/docs/use/public-links/) lets someone without an account, such as a vendor or a status screen, open one dashboard at `/p/<token>`. 1. Open the dashboard and choose **Share**. You need to manage the dashboard's folder. 2. Create the link, choose whether viewers may change the variables, and optionally set an expiry. 3. Send the `/p/<token>` address. Revoke it from the same pane at any time. A public view runs only that dashboard's saved queries and never shows query text, annotations, comments or the agent. A dashboard in My Dashboards, or one whose queries read the viewer's identity, cannot have a link; [Public links](/docs/use/public-links/#dashboards-that-cannot-have-a-link) lists the cases. ### Show a dashboard on a wall screen TV mode shows a dashboard full screen without the top row, the variables bar, the links or the activity card, and Esc leaves it. Add these keys to the dashboard's address: - `kiosk=true` starts TV mode. - `cycle=rows` scrolls through its rows. - `cycle=folder` moves through its folder's dashboards, which takes the place of a Grafana playlist. - `interval=<seconds>` sets the pace, 60 by default. See [Show it on a wall](/docs/use/public-links/#show-it-on-a-wall). ## Keep dashboards in Git Once a folder is right, export it and commit the files, so a change goes through review like code: ```sh observe dashboards export Payments --dir dashboards observe dashboards apply --dir dashboards ``` Apply saves each file into the dashboard it came from, adopts a dashboard with the same title in the folder, and never deletes one, so a CI job can run it on every merge. It takes the place of Grafana's provisioning files when you would rather not mount a directory on the server. The server's own [provisioning directory](/docs/operate/provisioning/) reads the same layout. See [Dashboards as code](/docs/use/dashboards-as-code/) for the layout, the matching rule and a GitHub Actions workflow. ## Open old links A Grafana dashboard link keeps working with its host changed to SlashObserve's. `/d/<grafana uid>/<slug>` redirects with `302 Found` to `/d/<id>` of the imported dashboard, keeping the slug and the query string, as [Old addresses](/docs/use/web/#old-addresses) describes. `GET /api/v1/grafana/resolve/{uid}` answers the `dashboard_id` and the web `url` of the dashboard imported from a Grafana uid. Any signed-in person can call it, and a uid whose dashboard is in a folder they cannot see answers `404`, like a uid nobody imported. ## The API Everything in the Grafana connection section is also in the HTTP API for Admins and Admin keys, and the repair queue for Editors and Admins. The health list and apply have their own APIs, described in [Dashboard health](/docs/use/dashboard-health/#api) and [Dashboards as code](/docs/use/dashboards-as-code/#api). ### Manage connections ```sh curl -X POST "$SERVER/api/v1/grafana" -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"name":"Production","url":"https://grafana.example.com","token":"<grafana token>"}' ``` The answer is `201` with the connection, its `id` and a `Location` header. | Request | What it does | | --- | --- | | `GET /api/v1/grafana` | Lists the connections, oldest first, never with a token. | | `GET /api/v1/grafana/{id}` | Reads one connection. | | `PATCH /api/v1/grafana/{id}` | Changes `name`, `url` or `token`. A new `url` needs `token` in the same request, and a change to either clears `last_test`. | | `DELETE /api/v1/grafana/{id}` | Deletes the connection and its stored token, and answers `204`. The dashboards it imported stay. | | `POST /api/v1/grafana/{id}/test` | Reads Grafana's health, its top-level folders and the first page of its dashboards, and stores the outcome in `last_test`. | A test of a Grafana that cannot be reached or refuses the token still answers `200`, with `last_test.ok` false. The name is 1 to 100 characters, the URL at most 2048 and the token at most 4096. The URL needs a domain name and no user info, query or fragment. ### Match datasources and list folders `GET /api/v1/grafana/{id}/datasources` lists Grafana's datasources, sorted by name, and `matched_uid` names the datasource of yours each one matches by the importer's automatic rules. Each one also names its `kind`, the type of yours it maps to (`prometheus`, `clickhouse`, `loki`, `tempo`, `elasticsearch` or `opensearch`), and its `candidates`, the uids of your datasources of that kind, which are the only mapping targets an import keeps. - A null `matched_uid` means the datasource needs a mapping. - A datasource of a type SlashObserve does not query has a null `kind`, and its panels import as placeholders. - A `kind` with empty `candidates` means no datasource of that type is configured here: it needs no mapping, and its panels import as placeholders. Give the open matches in the `mapping` of the import, keyed by the Grafana datasource uid or name, or add the Grafana uid to `grafanaUids` in the [datasources file](/docs/reference/datasources-file/) so every later import matches it too. A mapping entry that a dashboard does not use is ignored for that dashboard. `GET /api/v1/grafana/{id}/folders` lists Grafana's folders, sorted by title, with how many dashboards each holds; `general` stands for the dashboards outside any folder. ### Start, follow and stop an import Start the import with every folder, or with the folders you choose (each with its subfolders): ```sh curl -X POST "$SERVER/api/v1/grafana/$ID/imports" -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"folders":"all","mapping":{"Prometheus EU":"prom-eu"}}' ``` The answer is `202` with a `Location` header, `/api/v1/grafana/{id}/imports/{sync_id}`. `folders` is `"all"` or 1 to 1000 Grafana folder uids, and `mapping` has at most 200 entries. | Request | What it does | | --- | --- | | `GET /api/v1/grafana/{id}/imports/{sync_id}` | Follows `total`, `done`, `failed` and `skipped`, and the `results` with each dashboard's uid, title, outcome, dashboard id, unverified and placeholder panel counts and error. | | `POST /api/v1/grafana/{id}/imports/{sync_id}/cancel` | Stops a running import. It ends `canceled` at once, and the dashboards it already imported stay. A dashboard being saved at that moment may still be saved. | The connection's `last_sync` keeps the summary of the last finished run. A second start while one runs answers `409 import_running`, and cancelling an import that is not running answers `409 invalid_transition`. `allowed_actions` on an import is `cancel` while it runs. ### Fetch a dashboard from its link `POST /api/v1/grafana/link` takes a Grafana dashboard link as `url`, fetches the dashboard through the stored connection whose address it is under, and returns it as `json`. `POST /api/v1/imports` takes that value as it is. It needs an Admin, and [Import Grafana dashboards](/docs/use/import-grafana/) lists its answers. ### Read and queue repairs `GET /api/v1/repairs` lists every dashboard, in folders you can see, whose latest version still has unverified panels or variables or placeholder panels, most recently updated first. It shows their counts, when each was imported and its latest repair. Editors and Admins can call it. `folder_id` limits it to one folder, and a folder you cannot see answers 404 `not_found`. `limit` is 1 to 100, 50 by default, and `cursor` reads the next page. A dashboard leaves the list once nothing in it fails. `POST /api/v1/repairs` queues the agent on the dashboards you name in `dashboard_ids` (1 to 100), or on every listed dashboard with `all`: ```sh curl -X POST "$SERVER/api/v1/repairs" -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H 'Content-Type: application/json' \ -d '{"all":true,"folder_id":"<folder id>"}' ``` `folder_id` works only with `all`. Each dashboard gets one ordinary revision with the prompt shown under [Repair](#repair). The answer is `202` with the `queued` request ids and the `skipped` dashboards, each with a reason. Without a configured model provider the call answers 503 `agent_unavailable`. ## Reference ### What maps, what changes and what waits | In Grafana | Here | | | --- | --- | --- | | Folders, nested folders | Folders keep their Grafana titles, and a nested folder becomes one folder titled `Parent / Child`. A missing folder is created, and an existing one with the same title, in any case, is reused. | Maps | | Dashboards outside any folder | General, not your own My Dashboards. | Maps | | Tags and dashboard links | Imported with the dashboard, as they are for a single import. | Maps | | Dashboard uid and version | Kept on the import record as `grafana_uid` and the Grafana `version`, so old links resolve. | Maps | | A dashboard changed in Grafana after the import | Run the import again: a dashboard whose Grafana `version` is newer is saved as a new version of the same dashboard, and the others are skipped. A new version runs every query like any later save, so one whose queries now fail is reported as failed and keeps its last version. | Changes | | A folder titled `My Dashboards` | Lands in the importing Admin's own My Dashboards, because that title names the default folder here; rename it in Grafana before the import to keep it shared. | Changes | | A dashboard imported from a file earlier | Holds its Grafana uid, since only the first import of a uid holds it, so the run updates that dashboard instead of making a copy. | Changes | | Panels whose queries fail | Imported as unverified, then repaired by the agent from the dashboards list or the dashboard. | Changes | | Public dashboards | [Public links](/docs/use/public-links/) from the Share pane. | Changes | | Kiosk mode and playlists | TV mode, which cycles through a dashboard's rows or a folder's dashboards. Playlists themselves stay in Grafana. | Changes | | Provisioning files | The server's provisioning directory, or `observe dashboards apply` from Git. | Changes | | Alerting rules, contact points and silences | Not imported, and there is no replacement here: keep Grafana alerting, or Prometheus rules with Alertmanager. An alert list panel over a Prometheus `ALERTS` query imports as a list, and any other alert list as a placeholder. | Waits | | Library panels and plugin panels | A library panel imports as a normal panel when the export carries its definition and as a placeholder when it does not; a plugin panel imports as a placeholder. Each dashboard holds its own copy of a panel, and there is no plugin mechanism. | Waits | | Dashboard snapshots, embedded panels and scheduled reports | Not built. A public link always shows the latest version and cannot be framed in another page, and nothing emails a dashboard on a schedule. | Waits | | Datasource permissions | Every signed-in person may query every datasource in the [datasources file](/docs/reference/datasources-file/). | Waits | | Users, teams and folder permissions | Stay in Grafana; set [folder permissions](/docs/teams/folders/) here after the import. | Waits | ### Reasons a repair skips a dashboard | Reason | Meaning | | --- | --- | | `active` | A revision is already queued or running on it. | | `nothing_to_repair` | It holds only placeholders, which the agent never edits. | | `not_found` | It does not exist or is in a folder you cannot see. | | `forbidden_role` | You can see it but not edit it. | | `provisioned` | It is a starter dashboard the server keeps current with each release; duplicate it to repair a copy. | | `queue_full` | You already have 20 repairs queued or running; send the request again when they finish. | ### Answers of the Grafana API | Answer | When | | --- | --- | | `403 forbidden_role` | The caller is not an Admin. | | `403 outbound_domain_not_allowed` | `SLASHOBSERVE_OUTBOUND_DOMAINS` is set and does not name the host, or an Admin removed the host from the allowlist. | | `409 secret_key_missing` | `SLASHOBSERVE_SECRET_KEY` is not set. | | `409 token_unreadable` | The server cannot read the stored token with its key. | | `409 import_running` | An import from this connection is already running. | | `409 invalid_transition` | The import is not running, so it cannot be stopped. | | `422 too_many_domains` | The host is not allowed yet and 100 outbound domains are already allowed. | | `502 grafana_unavailable` | Grafana could not be reached, refused the token or gave an answer the server cannot read. | # Webhooks > Send workspace activity to an outside address as signed HTTPS requests that retry in order, set up by an Admin, with what is sent, how to verify the signature and how deliveries fail and recover. Source: https://slashobserve.com/docs/use/webhooks/ · Markdown: https://slashobserve.com/docs/use/webhooks/index.md A webhook posts the events of the [activity log](/docs/use/activity/) to an address you choose, so another system can react to a dashboard save, a failed agent run or a mention without polling. Each event becomes one signed HTTPS request. A request that fails is retried, and a webhook never skips an event or sends a later one first. Only an Admin can create, change, test or delete a webhook, through Settings, the HTTP API below or the [`observe webhooks`](/docs/use/cli/#webhooks) commands. A service-account key with the Admin role can do the same. No MCP tool or agent tool reads or changes a webhook, because a webhook sends workspace activity to an outside address and that is an Admin's decision. ## Set up a webhook Before you start: - The server needs `SLASHOBSERVE_SECRET_KEY` to seal the signing secret; see [Configuration](/docs/reference/configuration/#stored-secrets). Without it, creating a webhook answers `409 secret_key_missing`. - The receiver's domain must be on the [outbound allowlist](/docs/operate/outbound-access/). A webhook never adds its domain to it. - The address must be reachable from the server over `https`; [Address rules](#address-rules) lists what is refused. Then: 1. Open Settings, then Webhooks. Only Admins see this section. 2. Select **Add webhook** at the top of the section. A panel opens beside the page, or at the bottom of the screen on a phone. 3. Enter the name, the https address, the message and the events to send. The message is the signed JSON of [The request](#the-request) by default, or one line of text for Slack or Teams; see [Send to Slack or Teams](#send-to-slack-or-teams). Each group of events shows how many of its events are chosen, its box chooses all of them, and its arrow lists them. 4. Select **Add webhook** at the bottom of the panel. If the address's domain is not on the allowlist, the form says so and links to the Outbound access section, where an Admin can allow it. 5. Copy the signing secret that appears, then select **I have copied it**. The page keeps the secret only until then, and the server cannot show it again. The webhook starts at the end of the log. It sends events that happen after you created it, not older ones; read `GET /api/v1/activity` for what came before. To check the address and your signature code, use **Test** on the webhook's row. It sends a `webhook.test` event signed like any other and reports the outcome, status and duration. ## Watch a webhook in Settings Each webhook in the table shows its owner, address, events and status: - `Sending`; - `Retrying`, after failed attempts; - `Disabled`, with the reason. A retrying webhook also says how many events wait behind the failing one and when the next attempt is due. A webhook delivers in order, so one refused event holds back all the later ones. The table refreshes every few seconds and when you open Attempts, so a webhook that starts failing changes its status without a reload. The menu on a row offers these actions: - Edit opens the same panel with the webhook's values. - Enable or disable the webhook. - **Rotate secret** and delete, each after a confirmation. - **Make me the owner**, after a confirmation, on a webhook someone else owns. - **Skip stuck event** on a retrying webhook; see [Skip a stuck event](#skip-a-stuck-event). Editing or rotating the secret keeps the owner. Over HTTP the status is the webhook's `state`: `sending`, `retrying` or `disabled`; see [States](/docs/reference/states/). ## Choose who a webhook sends for A webhook has an owner, the Admin who created it or the one who took it over on purpose. It sends an event only when its owner could read that event in the activity log at the moment of sending, by the rules in [Who sees an event](/docs/use/activity/#who-sees-an-event). So an event in a folder the owner cannot view is passed over, and an event in a person's personal folder reaches only a webhook that person owns. When the owner is deleted or stops being an Admin, the webhook is disabled with the reason `owner`. Whoever enables it with `enabled: true` becomes its owner, because nobody else could read what it sends. **Make me the owner**, or `PATCH` with `owner: "me"`, makes you the owner of any webhook, so from then on it sends what you can read. ## Manage webhooks over HTTP All of these need the Admin role. | Request | What it does | | --- | --- | | `GET /api/v1/webhooks` | Lists the webhooks. | | `POST /api/v1/webhooks` | Creates one from `name`, `url`, `event_types` and an optional `format`, and returns it with its `secret`. | | `PATCH /api/v1/webhooks/{id}` | Changes `name`, `url`, `format`, `event_types`, `enabled` or `owner`. | | `DELETE /api/v1/webhooks/{id}` | Deletes the webhook and its attempts. | | `POST /api/v1/webhooks/{id}/secret` | Makes a new signing secret and returns it. | | `POST /api/v1/webhooks/{id}/test` | Sends one `webhook.test` event now and returns the attempt. | | `POST /api/v1/webhooks/{id}/skip` | Passes over the oldest event a retrying webhook is stuck on and returns the webhook and the `skipped` attempt. | | `GET /api/v1/webhooks/{id}/deliveries` | Lists the recent attempts, newest first, with `limit` and `cursor`. | Create a webhook for failed runs: ```sh curl -fsS -X POST -H "Authorization: Bearer $OBSERVE_TOKEN" -H "Content-Type: application/json" \ -d '{"name":"Failed runs","url":"https://hooks.example.com/slashobserve","event_types":["run.failed"]}' \ "$OBSERVE_SERVER/api/v1/webhooks" ``` The signing secret, `whsec_` and 43 characters, appears in this response and in the one from `/secret`, and nowhere else. Copy it then; the way to get a new one is to rotate it. Rotating takes effect at once: the next request is signed with the new secret and the old one stops working. What `PATCH` does: - `enabled: false` disables the webhook with the reason `manual`. - `enabled: true` turns it on again, clears the failure count and makes it send at once. - A new `url` keeps the webhook's place in the log, clears the failure count and sends at once, so it carries on from the event it had reached. - `owner: "me"` makes the caller the owner. `event_types` takes the type names from [What is recorded](/docs/use/activity/#what-is-recorded), at least one and each at most once. The [admin changes](/docs/use/activity/#admin-changes) are among them, and a webhook sends one only while its owner is an Admin, so an Admin can forward the audit trail to another system. ## Send to Slack or Teams A webhook's `format` is `generic` (the default), `slack` or `teams`. The signed headers go out in every format, so a receiver you run in front of Slack can still verify them, but Slack and Teams ignore them. - `slack` posts `{"text": "<line>"}`, which a Slack incoming webhook address (`https://hooks.slack.com/services/...`) accepts. - `teams` posts a `message` with one Adaptive Card that holds the line, which a Teams workflow "when a webhook request is received" address accepts. - The line names the actor and the event type, and the title when the event has one, such as `Ada: dashboard.version_created - Checkout`. It never holds more than that, so an event's other data does not reach a chat room. Allow the receiver's domain in Outbound access first, such as `hooks.slack.com` for Slack. Use `format: "generic"` when your own receiver needs the whole event. ## Verify the signature of a request Check every request before you trust it. The signature is an HMAC-SHA256, keyed with the signing secret, of the timestamp `t`, a dot, and the raw request body. The header carries `t` and the lowercase hex of the result as `v1`. 1. Read the raw body before you parse it. 2. Split the header at the commas and read `t` and `v1`. 3. Reject the request when `t` is more than 300 seconds from your clock, which stops a recorded request from being replayed later. 4. Compute the HMAC over `t`, `.` and the body, and compare it with `v1` in constant time. For the secret `whsec_test`, the timestamp `1700000000` and the body `{"ok":true}`, the signature is `85876387ad9d6be57a04653bc0729da757049f58afb10ba6cac3bedaecf4fda3`. Use that to check your code. A Go receiver, using only the standard library: ```go package main import ( "crypto/hmac" "crypto/sha256" "encoding/hex" "io" "net/http" "strconv" "strings" "time" ) func verify(secret, header string, body []byte, now time.Time) bool { var stamp, sum string for _, part := range strings.Split(header, ",") { key, value, _ := strings.Cut(part, "=") switch key { case "t": stamp = value case "v1": sum = value } } sent, err := strconv.ParseInt(stamp, 10, 64) if err != nil || now.Sub(time.Unix(sent, 0)).Abs() > 5*time.Minute { return false } mac := hmac.New(sha256.New, []byte(secret)) mac.Write([]byte(stamp + ".")) mac.Write(body) want, err := hex.DecodeString(sum) return err == nil && hmac.Equal(mac.Sum(nil), want) } func handler(secret string) http.HandlerFunc { return func(w http.ResponseWriter, r *http.Request) { body, err := io.ReadAll(http.MaxBytesReader(w, r.Body, 1<<20)) if err != nil || !verify(secret, r.Header.Get("X-SlashObserve-Signature"), body, time.Now()) { http.Error(w, "bad signature", http.StatusUnauthorized) return } w.WriteHeader(http.StatusNoContent) } } ``` The same check in Python: ```python import hashlib import hmac import time def verify(secret, header, body, now=None): parts = dict(p.split("=", 1) for p in header.split(",")) stamp = int(parts["t"]) if abs((now or time.time()) - stamp) > 300: return False signed = str(stamp).encode() + b"." + body expected = hmac.new(secret.encode(), signed, hashlib.sha256).hexdigest() return hmac.compare_digest(expected, parts["v1"]) ``` ## Skip a stuck event A receiver that keeps refusing one event holds back every event behind it, because a webhook delivers in order. A retrying webhook in `GET /api/v1/webhooks` carries `waiting_events`, the number of events it still has to send (counted up to 100, with `more` true beyond that), and `next_attempt_at`. To pass over the oldest of those events: - choose **Skip stuck event** in the webhook's menu; - run `observe webhooks skip <id>`; - call `POST /api/v1/webhooks/{id}/skip`. The skipped event is never sent to this receiver. It is recorded as a `skipped` attempt with the error `skipped_by_admin`, the failure count goes back to 0 and the webhook sends the next event at once. The call answers `409 nothing_to_skip` when the webhook is not retrying or is disabled, and `409 webhook_busy` while a server is delivering for it, so retry after a few seconds. ## Fix a disabled webhook A disabled webhook sends nothing. Its `disabled_reason` says why: | Reason | Cause and fix | | --- | --- | | `manual` | An Admin disabled it. Enable it again. | | `gone` | The receiver answered `410 Gone`. Fix the address, then enable it. | | `failing` | 50 failed attempts in a row. Fix the receiver, then enable it. | | `owner` | The owner was deleted or stopped being an Admin. Enable it as the new owner. | | `secret_unreadable` | `SLASHOBSERVE_SECRET_KEY` changed. Rotate the secret first, then enable it. | Enable it with `PATCH` and `enabled: true`; it continues from the event it stopped at. Events that happened while it was disabled are still in the log, so after a long outage read `GET /api/v1/activity` with `since` to see what you may have missed. ## Reference ### Address rules The address must be `https` on port 443 with a domain name, with no user name, password or fragment, and at most 2048 bytes. An address that breaks one of these rules answers `400 invalid_request` with a message that names the rule, such as `url must use port 443, got 8443` or `url host: an IP address is not allowed; use a domain name`. Details of the rules: - A receiver on `localhost`, a private IP address or another port is refused on purpose, because the server only calls public addresses. To test against a service on your own machine, publish it behind an https domain with a tunnel or a reverse proxy. - The request goes through the same [outbound access](/docs/operate/outbound-access/) rules as every other call the server makes: a public address only, and the domain must be on the allowlist. - If the domain is not allowed, creating the webhook answers `403 outbound_domain_not_allowed`, and an Admin has to allow the domain first. - If an Admin removes the domain later, the attempts fail with `domain_not_allowed` and the webhook retries until the domain is back. ### Limits | Limit | Value | | --- | --- | | Webhooks on the server | 20; the 21st answers `422 too_many_webhooks` | | Address length | 2048 bytes | | Request body | 64 KiB | | Time the receiver has to answer | 10 seconds | | Age at which an event expires | 24 hours | | Failed attempts in a row before the webhook is disabled | 50 | | Time an attempt is kept | 7 days | An event whose body would pass 64 KiB is never sent. It is recorded as a `skipped` attempt with the error `too_large`, and the webhook moves on to the next event. Changing `SLASHOBSERVE_SECRET_KEY` makes every stored secret unreadable: each webhook is disabled with the reason `secret_unreadable`. ### The request Each request is a `POST` with a JSON body and three headers: | Header | Value | | --- | --- | | `X-SlashObserve-Event` | The event type, such as `dashboard.version_created`, or `webhook.test`. | | `X-SlashObserve-Delivery` | The delivery id, the same for every attempt at one event. | | `X-SlashObserve-Signature` | `t=<unix seconds>,v1=<hex>`, described in [Verify the signature of a request](#verify-the-signature-of-a-request). | The body has the delivery id, the webhook id, the type and the event as the activity API returns it: ```json { "delivery_id": "6c1f0f1e-6a53-4c8e-9c63-2f4d5f0b8a11.412", "webhook_id": "6c1f0f1e-6a53-4c8e-9c63-2f4d5f0b8a11", "type": "dashboard.version_created", "event": { "seq": 412, "type": "dashboard.version_created", "target": {"kind": "dashboard", "id": "3d2e9a5c-1b0f-4c7a-8d41-0e6f2b9a7c10"}, "dashboard_id": "3d2e9a5c-1b0f-4c7a-8d41-0e6f2b9a7c10", "folder_id": "b7a4d0e2-5c19-4f6a-9d3e-8a21c4f7e605", "actor": {"kind": "user", "id": "9f1c2d3e-4a5b-4c6d-8e7f-0a1b2c3d4e5f", "name": "Ada", "origin": null, "client": null, "run_id": null, "label": "Ada"}, "data": {"version": 12, "parent_version": 11, "title": "Checkout", "summary": "Add a latency panel"}, "created_at": "2026-11-11T09:30:00Z" } } ``` `event` follows the rules of [What data holds](/docs/use/activity/#what-data-holds): ids, numbers, titles and enums, never a prompt, a comment or a query. A `webhook.test` body has `"event": null`. Treat unknown fields as allowed, because a later version may add some: the `run.succeeded` event of a health repair that saved a version carries `dashboard_title` and `panels_repaired` in `data` beside the fields every run event has. ### Delivery rules - **At least once.** A request can reach you twice, for example when your answer was lost on the way back. Keep the delivery ids you handled and ignore a repeat. - **In order for one webhook.** A webhook sends its next event only after the previous one was delivered, so a failing event holds back the events behind it. Different webhooks do not wait for each other. - **`seq` is not the order.** Events are ordered by their position in the log, which is not always the order of `seq`; see [Order and resuming](/docs/use/activity/#order-and-resuming). Rely on the order requests arrive in, not on `seq` growing. - **A `2xx` answer delivers the event.** Any other answer, a timeout, a refused connection or a blocked address is a failed attempt. The server does not follow a redirect, so a `3xx` is a failed attempt. - **Retries back off.** The wait before attempt `n + 1` is `min(5 seconds * 2^(n-1), 15 minutes)`, so 5 seconds, 10, 20, and 15 minutes from the ninth failure on. When the receiver answers `429` or `503` with a `Retry-After` header, the server waits that long instead, at least 5 seconds and at most 1 hour. - **An event expires after 24 hours.** An event that is more than 24 hours old when its turn comes is passed over, so a webhook that was down for days does not replay all of it and one bad event cannot hold the webhook forever. - **Some answers stop the webhook.** A `410 Gone` disables it with the reason `gone`, and 50 failed attempts in a row disable it with `failing`. ### Attempts Each attempt is kept for 7 days. Read them with `GET /api/v1/webhooks/{id}/deliveries`, `observe webhooks deliveries` or Attempts in Settings. | Field | Holds | | --- | --- | | Time and duration | When the attempt ran and how long it took. | | Status | The receiver's HTTP status. | | Outcome | `delivered`, `failed` or `skipped`. | | Error code | One of the codes below, when there is one. | The error codes are `status`, `unreachable`, `blocked_address`, `domain_not_allowed`, `too_large` and `skipped_by_admin`. The server never stores or logs the address's path, a header, the request body or what the receiver answered, only that status and code. # Roles > The four instance roles and how a person's role is decided. Source: https://slashobserve.com/docs/teams/roles/ · Markdown: https://slashobserve.com/docs/teams/roles/index.md Every person and every service account has one of four instance roles, from the most to the least permitted: Admin, Editor, Commenter and Viewer. The role says what someone may do across the whole server. A folder can give a person more on that folder; see [Folders and access](/docs/teams/folders/). ## Find out what a role may do | Role | May | | --- | --- | | Admin | Everything an Editor may, plus the Admin pages and settings. | | Editor | Build and change dashboards, create folders, comment and ask the agent. | | Commenter | View dashboards, comment, and send requests to the agent. | | Viewer | View dashboards and versions, and ask for comment access. | Details of each role follow. A Commenter or Viewer also has a private My Dashboards folder, where they can build; see [Folders, keys and actions](#folders-keys-and-actions). ### Admin An Admin may do everything an Editor may, in every folder except other people's My Dashboards. An Admin also has these: - The People and Datasources pages: change roles, sign people out, disconnect their agents, invite, deactivate, reactivate and remove people, and manage teams (see [People](/docs/teams/people/)). - Service accounts and keys, the outbound allowlist, Grafana connections and webhooks. - The Audit pages, which hold the audit log and the Audit folder (see [Activity](/docs/use/activity/#audit-log)). - Read-only access to every chat with Observe Agent. ### Editor An Editor may do these: - Create, edit, import, duplicate, restore and delete dashboards. - Run canvas actions. - Create folders. - Chat with the agent and send it requests. - Comment. - Keep their own saved prompts. - Read the outbound allowlist. ### Commenter A Commenter views dashboards and versions, adds comments, and sends requests to the agent. The agent's changes arrive as proposals. In their own My Dashboards only, a Commenter also creates, imports and edits dashboards and chats with the agent to build them. ### Viewer A Viewer views dashboards and versions only, and can ask for comment access (see [Ask for comment access](/docs/teams/folders/#ask-for-comment-access)). In their own My Dashboards only, a Viewer also creates, imports and edits dashboards and chats with the agent to build them. ## Folders, keys and actions A restricted folder's list can give a person more than their role on that folder, and never less. Edit lets them change, create and start dashboards there, and Admin lets them manage the folder. Every person also has a private My Dashboards folder where they always have Edit, so a Viewer or Commenter can ask the agent for dashboards there. Those runs spend model tokens and let the agent query every configured datasource for them. The exception is a datasource only Admins may read. That is a datasource built into SlashObserve, or one whose audience is set to `admins` in the [datasources file](/docs/reference/datasources-file/) or the app. Every other role, key and public link gets the same answer for it as for a datasource that does not exist, and it is never listed, queried or health-checked for them. An MCP client a person connects has the same reach: it may do over MCP what the person may do in the web app. A key is never on a folder list, so a key has what its role gives. Creating folders, managing saved prompts and the Admin pages follow the role only. A service-account key can never create or revoke keys, whatever its role. A canvas action sends a request to another site on a person's behalf (see [Actions](/docs/operate/outbound-access/#actions)). It needs Edit on the dashboard and a person, so a service-account key cannot run one, whatever its role. Starting an investigation needs the Editor role, so `/investigate` is offered only to Editors and Admins. ## How a role is decided SlashObserve decides a person's role in this order, and the first rule that applies wins: 1. **`SLASHOBSERVE_ADMIN_EMAILS`.** An email address in this list (compared without regard to case) is an Admin, when the person signed in with an address the provider reports as verified. 2. **The first user.** When `SLASHOBSERVE_ADMIN_EMAILS` is not set, the earliest person to have signed in is an Admin. This stays with that person: if they are removed, nobody else becomes the first user. 3. **`SLASHOBSERVE_OIDC_GROUP_ROLES`.** The highest role mapped to a group the person belongs to. When two mapped groups give the same role, the one listed first wins. 4. **A role an Admin chose** on the People page. 5. **Editor**, the default for everyone else. The first three are fixed by the server, so the People page cannot change them. ### Admin emails and verification An entry you add to `SLASHOBSERVE_ADMIN_EMAILS` takes effect at that person's next verified sign-in, not at the next restart. The restart only keeps Admin for people who already got it from this list. A provider that never sends `email_verified`, such as Microsoft Entra ID, makes no one an Admin through this list. The server logs `admin email signed in unverified` with the person's id at each such sign-in. Map an admin group with `SLASHOBSERVE_OIDC_GROUP_ROLES` instead. Releases before the verified check granted Admin from this list to an unverified address too, and the restart keeps that Admin. After upgrading, check the People page for Admins whose role comes from the list, and remove any address you do not trust from it. ## Map OIDC groups to roles 1. Choose a group for each role you want to set, as your identity provider names it. 2. Set `SLASHOBSERVE_OIDC_GROUP_ROLES` to a comma-separated list of `group=role` entries: ```text SLASHOBSERVE_OIDC_GROUP_ROLES=platform-admins=admin,engineering=editor,support=commenter,contractors=viewer ``` 3. Restart the server. A person gets the mapped role at their next sign-in. The list holds up to 100 entries, and each splits on its last `=`. The role is `admin`, `editor`, `commenter` or `viewer`. A group name is 1 to 256 bytes without control characters, and cannot contain a comma. Groups come from the `groups` claim of the ID token, a JSON array of strings. The server asks for the `groups` scope only when the provider lists it in `scopes_supported` in its discovery document (Dex does; Google rejects unknown scopes), and it reads the claim whenever the token has one. At most 200 groups are kept, each 1 to 256 bytes without control characters; others are dropped. Without a `groups` claim a person has no groups. ## Change someone's role An Admin chooses a role for the person on the People page; see [People](/docs/teams/people/). That applies only to someone whose role is not set by `SLASHOBSERVE_ADMIN_EMAILS`, the first-user rule or a group. A change applies to the person's next request, not at their next sign-in. An open web app learns of it when its tab becomes visible again, or when an action it tried is refused with `forbidden_role`, and then reloads what the person may see and do. A client that uses a key sees it on the next call, and `GET /api/v1/auth/session` returns the current role. ## Know when a role changes SlashObserve recomputes a role every time the person signs in, and for everyone when the server starts. - Changing `SLASHOBSERVE_OIDC_GROUP_ROLES` applies at the next restart. A group change reaches a person at their next sign-in. - Removing an entry from `SLASHOBSERVE_ADMIN_EMAILS` applies at the next restart. Adding one applies at that person's next verified sign-in. - Existing people become Editors when you upgrade, and the rules above are applied at the first start. ## Reference ### Refusals A request the role does not allow is refused with `403` and the code `forbidden_role`. On dashboards, folders, runs, pins, annotations and the public links of a dashboard or of an observation's RCA, the body says what would let it through: - `needed_access` is `view`, `comment`, `edit` or `manage`, with the `folder_title` it applies to. - `needed_role` names the role, for a route that needs a role. The web app shows it as "it needs Edit on Payments". A refusal anywhere else carries only the code and the message. ### Role order The roles rank Viewer, Commenter, Editor, Admin, from lowest to highest. A route that needs a role accepts that role and every higher one. # Folders and access > How folders hold dashboards, observations and saved searches, and who can see or change them. Source: https://slashobserve.com/docs/teams/folders/ · Markdown: https://slashobserve.com/docs/teams/folders/index.md A folder groups dashboards and decides who can see or change them. Use folders to keep a team's work together, and restrict a folder when only some people should open it. Every dashboard lives in one folder. A folder also holds the [observations](/docs/use/observations/) in it, the answers of investigations included, and the logs, trace and metrics searches saved in it. The folder's access rule covers all three: whoever can view the folder can read its dashboards, observations and saved searches, and the levels below decide who may change them. A finding is an answer written into an observation, so it follows the folder its observation is in. A new install has one folder, General, and every dashboard that existed before folders is in it. General is open to everyone by role, and it cannot be renamed, deleted or restricted. ## Restrict a folder to some people A folder is open until you list someone. Once it has a list, only the people on it, the person who created the folder and Admins can see it. 1. Open the **Dashboards** page and choose **Folder settings** on the folder. You need the Admin level on the folder; see [Levels](#levels). 2. Choose **Only the people and groups below**. The page says it restricts nothing until someone is listed. 3. Type an email address or a group name, choose a level (**View**, **Comment**, **Edit** or **Admin**) and choose **Add**. An instance Admin gets suggestions from the people who have signed in as they type an address. Everyone else types the address, and a group is always typed as its name. 4. Repeat for each person or group. The folder is restricted from the first entry. Everyone else now gets no trace of the folder's dashboards: they are missing from lists, search, tags and datasource counts, their panel data, events and comments are refused, and the agent cannot reach them. Removing the last entry opens the folder to everyone again. From the CLI, `observe folders permissions grant <folder-id> --email <address> --level edit` adds an entry, and `observe folders permissions show <folder-id>` lists them. See [the command line](/docs/use/cli/#folders). An entry can also name a [team](/docs/teams/people/#teams) as a group. ## Create, move and delete things Editors and Admins create folders: on the Dashboards page, choose **New folder**. A title is 1 to 100 characters and unique without regard to case. No shared folder can be called My Dashboards or General. - Anyone with Edit on a folder moves its dashboards into another folder where they have Edit, on the Dashboards page. A move needs Edit on both folders and saves no version. - Anyone with Edit deletes a dashboard from its row menu on the Dashboards page or from the dashboard's **More** menu, after a confirmation. - Anyone with Edit on a saved search renames, moves or deletes it from its row menu on the folder's page. - Anyone with Edit moves an observation, with the finding in it, from the observation's **More actions** menu. - A folder can be deleted only when it holds no dashboards, observations or saved searches. A folder's page lists its dashboards, and below them its **Observations**, with their state and when they last changed, and its **Saved searches**, which appears only when the folder has some. An empty folder you cannot edit says "Your access" with your level and who to ask. It offers no chat or import button, because those start dashboards in your My Dashboards, not in the folder. ## Make a folder Admins only An Admins-only folder has no list, and only Admins see it, the person who created it included. Only an Admin chooses **Only Admins** in the folder settings. General and My Dashboards cannot be made Admins only. Its row on the Dashboards page reads "Only Admins". Listing someone or opening the folder ends it. From the CLI, an Admin key runs `observe folders admins-only <folder-id> --yes`. Over REST, `PUT /api/v1/folders/{id}/permissions` with `{"entries": [], "admins_only": true}` does the same. The folder is the only place for content that reads Admin-only data; see [Admins-only folders in detail](#admins-only-folders-in-detail). ## My Dashboards Every person has one personal folder, My Dashboards, that only they see. Admins cannot see it either. A dashboard there is private: nobody else can open it, find it in a list or search, or reach it through the agent. Every new dashboard you make starts there unless you choose a folder. That covers dashboards from the chat, including a stopped build kept with **Save what was built**, and imports whose export names no folder. A service-account key has no My Dashboards, so its new dashboards go to General unless it names a folder. ### Publish a dashboard from My Dashboards 1. Open the dashboard's **Share** pane. 2. Choose a folder where you have Edit. 3. Choose **Publish**, read who will be able to open the dashboard, and confirm. Or choose **Publish to folder** in the dashboard's row menu on the Dashboards page. Publishing moves the dashboard with its versions, comments and link, and saves no version. Nothing moves into My Dashboards; to keep a private copy of a dashboard, duplicate it into My Dashboards. A move into My Dashboards answers `409 personal_folder`. ### What you can do in My Dashboards You have Edit in My Dashboards whatever your role. A Viewer or Commenter can ask the agent for dashboards there, keep what a stopped build made, and edit and delete them. They publish only to a folder where an entry gives them Edit. An agent run in My Dashboards spends model tokens and queries every configured datasource for that person. My Dashboards has no list and cannot be renamed, shared or deleted. It is the first folder on the Dashboards page, and its row there reads "Only you". When a person's account is deleted, their My Dashboards and every dashboard, observation and saved search in it are deleted with it, like their saved prompts. ## Ask for comment access A person who can view a dashboard or an observation but not comment on it can ask the people who manage its folder for Comment access. Asking changes nobody's access. 1. Open the dashboard's activity pane or the observation's discussion. Under the note that says you cannot comment, choose **Request comment access**. 2. Write an optional note of one line, at most 200 characters. 3. Choose **Send request**. The request goes to the people who manage the object's folder: the person who created the folder while they are an Editor or Admin, and the people an entry gives Admin. When nobody manages the folder that way, as for General, it goes to the instance Admins. The person who asked is never told who received it, beyond what the Share pane already shows them. Each of them gets an `access_request` item in their [inbox](/docs/use/inbox/) that names who asked, the dashboard or observation and the note. Opening it goes to the dashboard's Share pane, or for an observation to its folder's settings, where an entry with Comment or higher gives the access. General takes no entry, because it cannot be restricted. A request for something in General says so in the inbox item and opens People, where the Admin raises the person's role, or API keys for a service account. The other way is to move the item to a folder and grant it there. From the CLI, `observe access request dashboard:<id> --note "<note>"` asks and `observe access requests` lists what waits for you. MCP clients have `request_comment_access` and `list_access_requests`; see [the command line](/docs/use/cli/) and [MCP](/docs/use/mcp/). ### How a request ends A person has at most one open request on each dashboard or observation. A request closes in one of these ways: - The person who asked can now comment there. A folder entry gives them Comment or higher, or their role, or a service account's role, was raised to Commenter or higher. The activity log records `access_request.granted`, with who changed the access and who had asked, beside the `access_request.opened` event of the request. - Someone who received it marks the inbox item done, which is how a request is declined. It then leaves every recipient's open inbox. - It is 30 days old. A change to a person's groups reaches folder access only at their next sign-in, so it does not close a request. Mark the item done once they can comment. After a request closes, the person can ask again. A service-account key may ask too. Because keys match no entry, its request is granted by raising the service account's role. ## Reference ### Open, restricted and Admins-only folders The folder's settings page switches a folder between three kinds: | Kind | Who sees it | | --- | --- | | Open (**Everyone, by role**) | Everyone, with the access their role gives. It has no list. | | Restricted (**Only the people and groups below**) | The people and groups on its list, the person who created it and Admins. The list holds at most 50 entries. | | Admins only (**Only Admins**) | Admins only, the person who created it included. It has no list. | In an open folder, Admins manage, Editors edit, Commenters comment and Viewers view. ### Levels Each entry gives a level. A person gets the higher of the level their role gives and the highest entry that matches them, on the folder and on every dashboard in it. An entry can give a Viewer or Commenter more and never gives anyone less. | Level | May | | --- | --- | | View | See the folder and its dashboards. | | Comment | Also comment and reply, and send a request to the agent, whose change reaches the dashboard as a proposal. | | Edit | Also change dashboards and create them in the folder. | | Admin | Also rename the folder, delete it and change its list. | Details of Edit: - Change and restore dashboards, and edit their details. - Run canvas actions. - Ask the agent to suggest a panel change. - Create, duplicate or import dashboards into the folder. - Move or delete the folder's dashboards. Some rules that follow: - A Viewer or Commenter given Edit edits in that folder, including creating dashboards and starting them with the agent, and given Admin manages it. - An Editor given View or Comment still edits, and an Admin entry makes them the folder's Admin. - Admins have the Admin level on every folder except other people's My Dashboards. - The person who created a folder manages it while they are an Editor, and keeps seeing it when it is restricted, even if the list does not name them. - Creating, duplicating and importing a dashboard need Edit on the target folder. A new dashboard from the agent goes to your My Dashboards, where you always have Edit. - Creating a folder needs the Editor role. An entry used to give a Viewer or Commenter nothing beyond their role. Now an existing entry at Edit or Admin lifts them, so review the lists of restricted folders after you upgrade. ### Entries An entry names a person by email address or a group by its name. A person has to have signed in once before an entry can name them, and an unknown address is refused with `422 unknown_user`. Groups come from the `groups` claim of the ID token, as in [Roles](/docs/teams/roles/), and a person's groups are read at each sign-in. A change to a group therefore reaches folder access at the person's next sign-in. A service-account key matches no entry, because entries name people and groups. A key therefore sees a restricted folder only when its service account is an Admin or created the folder. To let automation work in a restricted folder, use a key of an Admin service account. ### What the Dashboards page shows Restricted folders on the Dashboards page show `Your access: <level>` in their header. The page shows 50 dashboards per page. A folder that runs onto the next page repeats its header there, marked "Continued from the previous page". A folder header counts the folder's dashboards while no search or filter is set. With a search or filter, it counts the folder's matching dashboards only when all matches fit on the one page, and shows no count otherwise. Folder settings tells a person who cannot manage the folder `Your access to this folder is <level>. Only folder Admins can change it.` ### Folder routes and commands A key that manages the folder, such as one of an Admin service account, can change the list with `observe folders permissions show`, `grant`, `revoke` and `open`. An Admin key makes a folder Admins only with `admins-only`. See [the command line](/docs/use/cli/#folders). Over REST, `GET /api/v1/folders/{id}/permissions` reads the list, and `PUT` replaces all of it in one call. `{"entries": [], "admins_only": true}` makes the folder Admins only. | Error | When | | --- | --- | | `409 general_folder` | Renaming, deleting or restricting General. | | `409 folder_not_empty` | Deleting a folder that holds dashboards, observations or saved searches. | | `409 personal_folder` | Moving a dashboard into My Dashboards. | | `422 unknown_user` | An entry names an address nobody has signed in with. | ### The Audit folder The [Audit folder](/docs/use/activity/#audit-folder) is an ordinary Admins-only folder that the server made. Each folder in `GET /api/v1/folders` carries a read-only `audit`, true for that one whatever it is now called and false for every other folder. The same flag is `audit` in the MCP `list_folders` result, and `observe folders list` marks that folder `(Audit folder)`. The Dashboards page leaves that folder out, and so can any other client. These leave the Audit folder's dashboards out of the rows, the total and the paging alike, and change nothing else: - `GET /api/v1/dashboards?exclude_audit=true` - MCP `list_dashboards` with `exclude_audit: true` - `observe dashboards list --exclude-audit` These do the same for the tag list and its counts: - `GET /api/v1/dashboards/tags?exclude_audit=true` - `observe dashboards tags --exclude-audit` Without the option, every dashboard the caller can see is listed, as before. ### How the agent uses folders The agent works as the person or key that asked. The request needs Comment on the dashboard's folder, and the server checks it when the request is queued and again when a worker starts it. A new dashboard from the chat goes to the requester's My Dashboards, or to General for a key. A request whose person lost access or was deleted in between fails with a message saying so. ### What a caller without access sees Over the API and MCP, a dashboard or a folder the caller cannot see answers `404 not_found`. That is the same answer as an id that does not exist, so a guessed id never confirms that a hidden dashboard exists. A dashboard the caller can see but not change answers `403 forbidden_role`. ### Old folders titled My Dashboards A shared folder already titled My Dashboards keeps working but should be renamed. An import that names My Dashboards goes to the importer's default folder. ### Admins-only folders in detail An Admins-only folder is the only kind that can hold a dashboard, observation or saved search that reads an [Admins-only datasource](/docs/connect/datasources-in-the-app/#who-can-query-it). While it holds one, listing someone or opening the folder is refused with `409 restricted_content`, which names the datasource and the content to move first. It is also the only place an answer that read Admin-only data can go. An Admin's run in it may read the [audit trail](/docs/reference/audit-queries/). A `restricted` answer from a private chat is shared, saved, pinned or applied only into it (see [Answers that read Admin-only data](/docs/use/chat/#answers-that-read-admin-only-data)). Elsewhere that is refused with `409 restricted_answer`. These move only to another Admins-only folder, and the folder that holds them is not listed or opened while they are in it. Both are refused with `409 restricted_answer`, which names the content to move first. - A dashboard or observation that holds such an answer. That covers a version a run saved, the answer a dashboard was made from, a proposal a run opened, a pinned finding, a block and a thread reply. - A dashboard or observation that a `restricted` run was about. - An answer about another dashboard or observation that is in an Admins-only folder now. A copy of a dashboard or observation that holds such an answer goes only into an Admins-only folder, and is refused elsewhere with `409 restricted_answer`. A copy comes from duplicating the dashboard, making a dashboard from the observation or pinning the observation onto a dashboard. The copy then holds the answer too, so it stays in Admins-only folders as well. While a run about a dashboard or observation in an Admins-only folder has not ended, the same two are refused with `409 restricted_answer` and a message to wait for the run to end. What the run writes may still read Admin-only data. An Admins-only folder has no [public links](/docs/use/public-links/). Choosing **Only Admins** for a folder that holds a dashboard or an RCA with an unexpired public link, or moving such a dashboard or observation into it, is refused with `409 admins_only_folder`. Revoke the links first. ### Access request routes `POST /api/v1/access-requests` takes `{"object": {"kind": "dashboard", "id": "<id>"}, "note": "<note>"}`, with `observation` as the other kind, and answers the request. `GET /api/v1/access-requests` lists the open requests on the folders you manage. Both need the Viewer role or higher. Errors: - `409 request_open` means you already have an open request. The body carries `requested_at`, the time of the open request, and a message that names it. The web app says how long ago it was made, and the CLI and MCP print the time. - `409 already_can_comment` means you can already comment. - `404 not_found` means the dashboard or observation is not visible to you, the same answer as an id that does not exist. # Saved prompts > Save a prompt once, keep it private or share it, and run it again from the chat home, the picker or the CLI. Source: https://slashobserve.com/docs/teams/saved-prompts/ · Markdown: https://slashobserve.com/docs/teams/saved-prompts/index.md A saved prompt is a name and the text of a request to the agent. Save the prompts you send often, such as "build a latency dashboard for checkout", and run them again with one click. Each prompt belongs to the person who saved it and is either private or shared with everyone on the server. Running a prompt sends its text to the agent as a new request, exactly as if you had typed it. The agent must be on; see [LLM providers](/docs/connect/llm-providers/). ## Save and run a prompt You need the Editor or Admin role to save a prompt. 1. Open the chat home or any conversation and choose **History**. 2. Point at one of your chats and choose the bookmark button (**Save prompt**). On a device without hover the button is always visible. 3. Check the name and the text, choose **Only me** or **Everyone on this server**, and choose **Save prompt**. The panel starts with the first three words of the prompt as the name and the whole prompt as the text. 4. Open the chat page: go to `/ask`, or open Home and choose **Ask Observe Agent**. Your prompt is listed under the example prompts. 5. Choose **Run** on its row. The prompt is sent at once and the conversation opens. The bookmark button appears on a chat whose request came from the chat box and was not about an existing dashboard. A chat you started by running a saved prompt has it too. A comment revision, an investigation and a follow-up message on an existing dashboard have none. ## Run a prompt from the keyboard Type `/` as the only line in the prompt box of Home or of the chat page. The picker lists the prompts that match what follows the slash. - The arrow keys move through the list. - **Enter** fills the box with the prompt, and does not send it. Edit the text if you want, then press **Enter** again to send. - **Esc** closes the picker. ## Run a prompt from the CLI `observe run` lists the prompts shared with everyone, and `observe run <name>` runs one. The name matches without regard to case, and its words may be unquoted. A key sees only shared prompts, so share a prompt in the web app first. A key can run one when its service account is an Editor or Admin. See [CLI](/docs/use/cli/). ## Change, share or delete a prompt A prompt you can edit has a menu (the three dots) on its row in the chat page list, with **Edit**, **Share with everyone** (or **Make private**) and **Delete**. Deleting a shared prompt removes it for everyone, and `observe run` stops finding it. Only the owner can edit a prompt. An Admin can also edit and delete any shared prompt, but cannot see another person's private prompts. ## See who changed a shared prompt The [audit trail](/docs/reference/audit-queries/#event-data) records a shared prompt being saved, changed, made private and deleted, and a prompt being shared. Each event names who did it and which of the name, text and sharing changed, and never holds the text. A successful change to a prompt that is private before and after is not recorded. A refused or failed request on a private prompt is, with the route and the prompt's id but never its name or text. ## Reference ### Who can use saved prompts | Role | Saved prompts | | --- | --- | | Admin | Create, run and change their own, and change or delete any shared prompt. | | Editor | Create, run and change their own, and run shared prompts. | | Commenter | See and run shared prompts. The API refuses a change. | | Viewer | See and run shared prompts. The API refuses a change. | Running a prompt starts a new dashboard, which needs Edit on some folder, and every person has Edit on their own My Dashboards (see [Roles](/docs/teams/roles/) and [Folders and access](/docs/teams/folders/)). A Commenter or Viewer therefore sees and runs every shared prompt, which starts a dashboard in their own My Dashboards, and keeps no prompts of their own. Creating and editing prompts stays with Editors and Admins. ### Limits | Item | Limit | | --- | --- | | Name | 1 to 64 characters. | | Text | 1 to 4000 characters. | | Prompts per person | 100. | | Prompts in a list | 500, your own first. | A name holds letters, numbers, spaces, `-` and `_`, and starts and ends with a letter or number. Runs of spaces collapse to one. The text needs at least one visible character. It cannot contain control characters other than newlines and tabs, or the bidirectional override characters; see [Text rules](/docs/reference/text-rules/). A name is unique among your own prompts and among shared prompts, ignoring case, so you cannot share a prompt whose name another shared prompt already has. ### What the chat page shows The list sits under the example prompts and the dashboards. Each row shows the name, a preview of the text, and who can use it. - **Only me** is your private prompt. - **Everyone** is your prompt shared with everyone. - **By** and the owner's name is someone else's shared prompt. The list shows 5 rows and a **Show all** button, labelled with the total, for the rest. It is hidden when there are no prompts to show or the agent is off. The Home page (`/`) has no list, only the picker. ### What the picker shows The picker orders matches as follows: names that start with the text after the slash, names that contain it, then prompts whose text contains it. It shows the first 50. ### HTTP API | Route | Role | Use | | --- | --- | --- | | `GET /api/v1/prompts` | Viewer | List your prompts and the shared ones. | | `POST /api/v1/prompts` | Editor, signed in as a person | Create one from `name`, `body` and `shared`. | | `PATCH /api/v1/prompts/{id}` | Editor, signed in as a person | Change at least one of `name`, `body` and `shared`. | | `DELETE /api/v1/prompts/{id}` | Editor, signed in as a person | Delete one. | A service-account key cannot create, change or delete a prompt. # People > How people join, how an Admin invites, deactivates, reactivates and removes them, how teams share folders, and what happens to what they made. Source: https://slashobserve.com/docs/teams/people/ · Markdown: https://slashobserve.com/docs/teams/people/index.md The People page lists everyone who has signed in, and the people invited who have not signed in yet. Only Admins see it. Use it to invite people with a role, to stop someone from signing in, and to group people into teams that share folders. A person appears the first time they sign in through the identity provider, when the sign-in rules allow their email (`SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS`, see [OIDC](/docs/connect/oidc/)). Their role follows [Roles](/docs/teams/roles/). ## Invite people An invite gives a person a role before their first sign-in. No email is sent. You send the sign-in link yourself. 1. Choose **People** in the sidebar, then **Invite people**. 2. Enter the email, pick the **Role** the person should have, and confirm. The dialog shows the sign-in link, which is the `/login` page of your server. 3. Choose **Copy** and send the link. The invite appears under **Pending invites**, where you can change its role, choose **Copy sign-in link** again or choose **Withdraw**. From the CLI, `observe people invite <email> --role <role>` does the same, `observe people invites` lists pending invites, and `observe people uninvite <invite id>` withdraws one. See [`observe people`](/docs/use/cli/#people). When someone first signs in with that email and the identity provider says the email is verified, they get the invited role. It shows as set by the Admin who invited them, and the pending invite is gone. ### Limits of an invite An invite lets no one in that the sign-in rules refuse. - An email outside `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` cannot be invited. The API answers 422 `email_domain_not_allowed`. - With `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS=*`, a sign-in whose email is not verified gets the usual role and leaves the invite pending. - Admin emails and identity-provider group roles still decide the role over an invite, as [Roles](/docs/teams/roles/) describes. An email that has already signed in cannot be invited. The API answers 409 `already_member`; change that person's role in the table instead. Only a first sign-in uses an invite. Someone who signed in before keeps their role, even if the identity provider later gives them the invited email. An invite left unused, such as one used by an unverified sign-in, stays pending until you withdraw it. ## Deactivate a person Deactivating stops a person from signing in and ends what they have open. 1. Open the person's menu on the People page and choose **Deactivate**. 2. Confirm. In the same moment the server does these: - It deletes every session of the person, so their open tabs return to the sign-in page. - It disconnects every agent they connected over MCP. - It refuses their next sign-in with "This account was deactivated by an Admin. Ask an Admin to reactivate it." Everything they made stays where it is: dashboards, versions, observations, comments, proposals and folder grants. Agent runs they requested that are still queued fail when an agent picks them up, and webhooks they own stop. Service-account keys they created keep working, because a key acts as its service account and not as the person. Revoke those keys on the API keys page if they should stop. You cannot deactivate yourself. The last active Admin cannot be deactivated, and a deactivated Admin does not count as an Admin, so the last active Admin's role cannot be lowered either. Deactivating someone who is already deactivated changes nothing. Deactivation applies to the identity provider account the person signed in with. Remove the person at the identity provider too, so they cannot come back with a new account. ## Reactivate a person Choose **Reactivate** in the menu of a deactivated person. They can sign in again at once, with the role the rules give them. The agents they had connected stay disconnected until they connect them again. ## Remove a person Removing deletes the person for good. Only a deactivated person can be removed. 1. Open the deactivated person's menu and choose **Remove**. 2. Read the dialog. It says how many dashboards, observations and saved searches are in their My Dashboards, because those are deleted with them. 3. Confirm. Their saved prompts, stars, views, inbox state and folder grants are deleted too. What they made in shared folders stays, under the name it was saved with: dashboards and their versions, observations, comments, proposals and activity. Service accounts and API keys they created stay and keep working. Removal cannot be undone. If the same identity-provider account signs in later, it joins as a new person with an empty My Dashboards. Removing the first user hands the first-user Admin rule to nobody, so keep another Admin or set `SLASHOBSERVE_ADMIN_EMAILS` first. ## Share folders with a team A team is a named group of people that an Admin keeps in SlashObserve, for when your identity provider sends no groups or not the ones you need. 1. On the People page, under **Teams**, choose **New team** and enter a name. 2. Choose **Add person** on the team's row and pick each member. The X on a member removes them. 3. Open a folder's settings and add the team's name as a group entry; see [Folders and access](/docs/teams/folders/). Every member gets that level. From the CLI, `observe teams` has `list`, `create <name>`, `delete <team id>`, `add <team id> <person id>` and `remove <team id> <person id>`. See [`observe teams`](/docs/use/cli/#teams). ## Teams A team's name works like a group from the identity provider in a folder's access list. A change to a team applies at each member's next request, with no new sign-in. A team never changes anyone's role, because roles come only from the identity provider's groups and the rules in [Roles](/docs/teams/roles/). A team name is 1 to 100 characters without control characters. Names are unique without regard to case, but a folder entry matches the exact name. A team with the same name as an identity-provider group adds its members to that group's entries. Deleting a team ends what its name gave its members. Folder entries for the name stay and match no one until a team or an identity-provider group of that name exists. Removing a person also removes them from every team. ## Find who changed a role or an invite Role changes, invites, deactivations, reactivations, removals and sign-outs everywhere are recorded in the Audit log. Choose **Audit** in the sidebar. Only Admins read it; see [Activity](/docs/use/activity/#admin-changes). ## Reference ### Who may call what `GET /api/v1/users`, the `/api/v1/invites` routes and the `/api/v1/teams` routes take an Admin signed in or an Admin service-account key. An agent with an Admin key can therefore list and invite people through [`observe people`](/docs/use/cli/#people) and manage teams through [`observe teams`](/docs/use/cli/#teams). Inviting a pending email again answers 200 and changes its role. No MCP tool manages people or teams. Who may sign in, with which role and with which access, is an Admin's decision, as a webhook is. ### Routes that need a signed-in Admin These routes need an Admin signed in to the web app: | Route | Use | | --- | --- | | `PATCH /api/v1/users/{id}` | Change a person's role. | | `DELETE /api/v1/users/{id}/sessions` | Sign a person out everywhere. | | `POST /api/v1/users/{id}/deactivate` | Deactivate. | | `POST /api/v1/users/{id}/reactivate` | Reactivate. | | `DELETE /api/v1/users/{id}` | Remove a deactivated person. | A service-account key cannot call them, because keys never end another person's sessions or connected agents. The `observe` CLI and MCP have no command for them. ### Errors | Status and code | When | | --- | --- | | 409 `not_deactivated` | Removing an active person. A deactivated person's `personal_items` gives the counts the removal deletes: `dashboards`, `observations` and `saved_searches`. | | 409 `cannot_deactivate_self` | Deactivating yourself. | | 409 `last_admin` | Deactivating the last active Admin, or lowering that Admin's role. | | 409 `already_member` | Inviting an email that has signed in. | | 422 `email_domain_not_allowed` | Inviting an email the sign-in rules refuse. | | 404 `not_found` | An unknown person or invite. | # ObserveSpec > The JSON document SlashObserve stores for each dashboard version, and what it contains. Source: https://slashobserve.com/docs/concepts/observespec/ · Markdown: https://slashobserve.com/docs/concepts/observespec/index.md ObserveSpec is the JSON format of a SlashObserve dashboard. Every saved version of a dashboard is one ObserveSpec document, and the web app, the agent, MCP clients, the API and the Grafana importer all read and write the same one. The current format is version `0`, and each document says so in `specVersion`. You work with it when you export a dashboard as JSON to keep it in Git, edit it by hand, apply it from the CLI, or read and write it through the API and MCP. For example, this is a whole dashboard with one panel: ```json { "specVersion": "0", "title": "Checkout traffic", "time": { "from": "now-6h", "to": "now" }, "panels": [ { "id": "p_rps", "type": "timeseries", "title": "Requests per second", "gridPos": { "x": 0, "y": 0, "w": 24, "h": 8 }, "datasource": "prom", "queries": [ { "query": "sum(rate(http_requests_total{service=\"checkout\"}[$__rate_interval]))" } ] } ] } ``` The panel names its datasource by the `uid` `prom` and holds no address or credential. Its query runs when someone opens the dashboard, over the range at the top. Adding a panel adds an object to `panels`, and saving the change makes the next [version](/docs/concepts/versions/). ## Why a spec The server checks a document against one closed JSON Schema (unknown fields are refused) and against a set of rules the schema cannot express before it stores anything. Because every writer produces the same document, there is one validator and one stored shape, whether a person, the agent or an MCP client wrote the dashboard. Three choices in the format follow from how dashboards are used here: - Datasources are named by the `uid` you give them in the [datasources file](/docs/reference/datasources-file/). A document holds no URL, address or credential for a datasource. - Every panel has a string `id` that stays the same across versions. [Comments](/docs/concepts/versions/#comments) anchor to it, and the diff between two versions names the panels that changed. - The agent and MCP clients write a whole document with `update_dashboard`, or only the panels that changed with `update_panels`. The agent starts with an authoring guide and reads the JSON Schema with `get_spec_guide`, and an MCP client gets both from the same tool. The agent sees a dashboard over 16 KiB as an outline, and the server refuses any document over 1 MiB. A Grafana dashboard is not stored as is. The importer converts it into this format and keeps a `placeholder` panel for each panel it cannot convert yet (see [Import Grafana dashboards](/docs/use/import-grafana/)). ## Export and edit the JSON Open the **More** menu of a dashboard. - **Export spec JSON** downloads the document of the version you are viewing. **Dashboards as code** next to it opens the guide to keeping these files in Git and applying them from the CLI; see [Dashboards as code](/docs/use/dashboards-as-code/). - **Edit details** changes the title, description and tags and saves them as a new version. It needs Edit on the dashboard and works on the latest version. - **Edit Spec JSON** opens "Dashboard JSON" beside the dashboard with the whole document of the latest version, so variables, dashboard links and time settings can be edited there. To edit the JSON: 1. Choose **Edit Spec JSON** and change the document. It checks the document as you type and lists one line per problem, such as `/panels/0/type: "timeseriesx" is not a panel type.` 2. Choose **Save as version N**. It saves the edit with the note you give, or "Edit the dashboard JSON", and runs every panel query as any whole-document save does. A version saved by someone else meanwhile is merged when it changed other things. When it changed the same things, the pane lists them with **Reload version N**. Closing the pane with unsaved edits asks "Discard your JSON edits?". ## An example A larger one is `spec/examples/checkout-service-health.json` from the repository. It has one variable, two Prometheus panels and a ClickHouse table: ```json { "specVersion": "0", "title": "Checkout service health", "description": "RED metrics and error logs for checkout", "tags": ["checkout", "red"], "time": { "from": "now-6h", "to": "now" }, "refresh": "30s", "variables": [ { "name": "pod", "type": "query", "datasource": "prom", "multi": true, "includeAll": true, "query": "label_values(http_requests_total{service=\"checkout\"}, pod)" } ], "panels": [ { "id": "p_rps", "type": "timeseries", "title": "Requests per second by pod", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "prom", "unit": "reqps", "queries": [ { "query": "sum by (pod) (rate(http_requests_total{service=\"checkout\",pod=~\"$pod\"}[$__rate_interval]))", "legend": "{{pod}}" } ] }, { "id": "p_p99", "type": "timeseries", "title": "p99 latency", "gridPos": { "x": 12, "y": 0, "w": 12, "h": 8 }, "datasource": "prom", "unit": "s", "queries": [ { "query": "histogram_quantile(0.99, sum by (le) (rate(http_request_duration_seconds_bucket{service=\"checkout\"}[$__rate_interval])))" } ], "thresholds": [ { "value": 0.25, "color": "warning" }, { "value": 0.5, "color": "critical" } ] }, { "id": "p_errlogs", "type": "table", "title": "Error logs by message (ClickHouse)", "gridPos": { "x": 0, "y": 8, "w": 24, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT Body AS message, count() AS n FROM otel_logs WHERE ServiceName = 'checkout' AND SeverityText = 'ERROR' AND $__timeFilter(Timestamp) GROUP BY message ORDER BY n DESC LIMIT 20" } ] } ] } ``` ## The dashboard `specVersion`, `title`, `time` and `panels` are required. The rest is optional, and an absent field means its default. | Field | Meaning | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `title` | 1 to 200 characters. | | `description` | Up to 2000 characters. | | `tags` | Up to 20 unique tags of 1 to 40 characters: lowercase letters, digits, `_`, `.` and `-`, each starting with a letter or digit. | | `time` | The default range, `from` and `to`. A value is relative, such as `now-6h`, `now-1d/d` or `now/fy`, or an RFC 3339 time. | | `refresh` | An auto-refresh interval such as `30s`, `1m`, `1h` or `1d`. | | `timePicker` | What the time picker offers: `hidden` removes it, `refreshIntervals` (1 to 20) replaces the auto-refresh choices and `quickRanges` (1 to 30 of `display`, `from` and `to`) the preset ranges. A `refresh` that is not in `refreshIntervals` is still allowed, and the default choices are `5s`, `10s`, `30s`, `1m`, `5m`, `15m`, `30m`, `1h`, `2h` and `1d`. | | `liveNow` | `true` refreshes the dashboard every 5 seconds until someone picks another interval, when `refresh` is absent; a `refresh` wins. | | `timezone` | `browser`, `utc` or an IANA zone such as `Asia/Kolkata`. Relative times resolve in this zone, and every panel draws its times in it unless the panel sets its own `timezone`. | | `weekStart` | The first day of the week for `now/w`: `monday` (the default), `sunday` or `saturday`. | | `fiscalYearStartMonth` | The month the fiscal year starts in for `now/fy` and `now/fQ`, from 0 (January, the default) to 11 (December). | | `nowDelay` | How far behind the real time `now` is for every relative time, such as `30s` or `1m`, in seconds, minutes or hours. | | `cursorSync` | How hovering one time chart shows on the others: `off`, `crosshair` or `tooltip`. | | `variables` | Up to 20 [variables](/docs/concepts/datasources-and-variables/#variables). | | `links` | Up to 20 links: a `title` with a `url` (and optionally `newTab`, `keepTime`, `includeVars`, `tooltip`), or `"type": "dashboards"` with `tags` to list the other dashboards that carry every tag (`asDropdown` shows one menu). | | `panels` | 1 to 200 panels, counting the children of rows. | ### Relative times A relative time is `now`, optionally moved by an offset such as `-6h` or `+1d`, and optionally rounded with a slash and a unit, such as `/d`. The units are `s`, `m`, `h`, `d`, `w`, `M` and `y`; rounding also takes `fy` (the start of the fiscal year) and `fQ` (the start of the fiscal quarter). Rounding a `from` goes to the start of the period and rounding a `to` goes to its last millisecond, so `now/d` to `now/d` is the whole of today. Days, weeks, months, years and every rounding are calendar steps in the dashboard's `timezone`, so `now/d` starts at midnight in that zone and a day that changes the clock lasts 23 or 25 hours. Seconds, minutes and hours are exact durations. With `browser`, the web app sends the browser's zone to the server; without a zone, and with `utc`, times resolve in UTC. `nowDelay` moves `now` back before anything else, for both ends of the range. ## Panels and layout ### Ids and grid position Every panel has an `id`, a `type` and a `gridPos`. An `id` starts with a letter, continues with letters, digits, `_` or `-`, is at most 64 characters, and is unique across the whole dashboard, row children included. `gridPos` places a panel on a grid 24 columns wide with `x` (0 to 23), `y` (0 to 10000), `w` (1 to 24) and `h` (1 to 100). `x + w` cannot exceed 24, and panels cannot overlap. ### Responsive layout The web app draws every panel at its saved `gridPos` when the screen is wide enough for it. When a panel would be narrower than its type reads well at, about 160 pixels for a stat, 180 for a gauge, 240 for a chart and 300 for a table, the panels beside it wrap onto more lines and widen to fill the grid; below 768 pixels every panel takes the full width. This changes only what you see: the saved `gridPos` stays as it is, and the layout editor always shows it. A panel with `responsive: false` keeps its saved size at every width down to the single-column view; it may move to another line when a panel beside it wraps, but it is never widened. A save that changes an existing panel's width or height sets `responsive: false`, whether the change comes from the layout editor, the panel editor, the agent, MCP or the CLI; a new panel, an import and a restored version keep what they carry. The panel menu's **Keep this size** sets it, and **Make responsive** removes it. ### Panel types A data panel also has a `title` (up to 200 characters), a `datasource` and `queries`. A `table`, `logs`, `nodeGraph`, `traces`, `flamegraph`, `geomap` or `alertlist` panel always runs its queries as instant queries, whatever `instant` says. Its `type` is one of `timeseries`, `stat`, `gauge`, `bargauge`, `table`, `piechart`, `heatmap`, `histogram`, `state-timeline`, `logs`, `barchart`, `status-history`, `trend`, `xychart`, `candlestick`, `nodeGraph`, `traces`, `flamegraph`, `geomap`, `canvas` or `alertlist`. The agent's prompt lists only the common options of each type, and a Spec may use any option the schema has. The other panel types are: - `text`, which holds up to 20,000 characters of Markdown in `content` (required), rendered sanitized. - An image in the Markdown loads through the server, and only from an https address on an allowed domain (see [Outbound access](/docs/operate/outbound-access/#images-and-geojson)); otherwise the panel shows its alt text. - Its optional `mode` is `markdown` (the default), `html` (sanitized HTML) or `code` (the content shown as code, with `code.language` and `code.lineNumbers`). - `code.language` is `plaintext`, `json`, `yaml`, `xml`, `sql`, `go`, `typescript`, `markdown` or `html`. - People and Grafana imports can write `html`; the agent and MCP clients cannot (see [Maps, canvases and actions](#maps-canvases-and-actions)). - In `markdown` and `html` modes HTML is cleaned before it is drawn: scripts, styles, forms, embedded frames, SVG and event handlers are removed, links keep only http, https and mailto addresses, and every image loads through the server. - Inline `style` attributes keep colours, fonts, spacing, borders, sizes and simple layout, and drop positioning, backgrounds with images, `var()` and anything that loads a resource. - Whatever the HTML draws stays inside its panel. - Variable values are inserted as text in all three modes, never as HTML. - `dashlist`, which lists other dashboards on this server. Its `display` takes `query` (text to match, up to 200 characters), `tags` (up to 10), `limit` (1 to 100, 10 by default), and `keepTime` and `includeVars`, which carry the time range and the variable selections into each link. - `news`, which lists the latest items of one RSS or Atom feed. Its `display.feedUrl` is an `https` address of up to 2000 characters, and the server fetches it only when its domain is on the outbound allowlist (see [Outbound access](/docs/operate/outbound-access/#news-feeds)). - `dashlist` and `news` have no datasource and no queries. - `row`, described below. - `placeholder`, which only the importer writes. It carries the `reason` the panel could not be converted (up to 500 characters) and the Grafana `sourceType` (up to 100). The agent may move or delete one but never creates or edits one. ### Panel timezone, time overrides and step A data panel can set its own `timezone` (`browser`, `utc` or an IANA zone), which draws that panel's times in this zone instead of the dashboard's; the queries keep the dashboard's range and zone. It can also set: - `timeFrom` (such as `now-1h`) and `timeShift` (such as `1d`), which override the dashboard's time range (the panel header names the override, and `hideTimeOverride: true` hides that note without changing the queries). - `interval` (the same forms as a query's) and `maxDataPoints` (10 to 11000), which shape the step of its queries. - `description` (up to 2000 characters), `transparent: true` to draw it without a border or background, and `titleHidden: true` to keep the title as the panel's name for menus and screen readers without showing it. - `display`, a small set of options that depend on its type, such as the legend of a `timeseries` or the `header` of a `table`. ### Time series, trend and candlestick display options The legend of a `timeseries` or `trend` panel: - is a `list` or a `table` (`legendMode`). - may show `legendValues`, each any reducer (the percentiles `p1` to `p99` and `variance`, `step`, `diffperc`, `logmin` and `countAll` among the numbers, and the four that are not numbers: `allIsNull` and `allIsZero` answer true or false, `allValues` and `uniqueValues` list the values as text). - sorts by a number reducer or by name (`legendSortBy`, `legendSortDesc`). - takes a width when it sits on the right (`legendWidth`). - hides all-zero or empty series (`legendHideZero`, `legendHideEmpty`). `legend` is `bottom` (the default), `right` or `hidden`, and `tooltip` is `single` (the default), `all` or `hidden`. When `legendMode` is absent the legend is a table if `legendValues` is not empty and a list otherwise. A panel with one series shows its legend only when `legendValues` is not empty, since the legend then carries the values. A `timeseries`, `trend` or `candlestick` tooltip that lists all series: - is sorted by `tooltipSort` (`none` for series order, `asc` or `desc`, which is the default). - can drop zero values with `tooltipHideZeros`. - can show the running total of a stacked series with `tooltipCumulative`. - is clipped to `tooltipMaxWidth` and `tooltipMaxHeight` pixels (100 to 2000). A `timeseries`, `trend` or `candlestick` panel can hide its x axis with `xAxis: "hidden"` (`shown` by default). A `candlestick` panel draws only its open, high, low, close and volume fields unless `includeAllFields` is `true`, which draws its other number fields as lines. `flatColor` paints a candle whose open equals its close, a color token or a hex color, and adds a Flat swatch to the Up and Down legend; without it a flat candle takes the up color. `mode` is `candles+volume` (the default), `candles` or `volume`, and `candleStyle` is `candles` (the default) or `ohlcbars`. `colorStrategy` decides which candles are up: `open-close` (the default) compares the close with the same candle's open, and `close-close` compares it with the previous candle's close. `upColor` (`ok` by default) and `downColor` (`critical` by default) are the candle colors. `open`, `high`, `low`, `close` and `volume` name the number field that holds each value; without a name the panel looks for a number field called that, in any case. A `candlestick` legend takes the same `legendValues`, `legendMode`, `legendSortBy`, `legendSortDesc` and `legendWidth` as a `timeseries` one; with legend values or table mode it lists every drawn series (open, high, low, close, volume and any extra) through the shared legend instead of the Up and Down swatches. ### Table display options A `table` panel's `display` takes `header` (shown by default) and `footer` (up to 5 reducers, each shown as a footer row over the number columns), and also: - `cellHeight` (`sm`, the default, `md` or `lg` row padding, or `auto`, which fits each row to its content). - `maxRowHeight` (20 to 1000 pixels, the tallest an `auto` row or a `dynamicHeight` cell grows). - `frameIndex` (0 to 99; the table shows only that frame when the data has several and no transform merges them, the last one when the index is past it, and every frame when absent). - `typeIcons` (an icon for the column type before each header). - `pagination` (pages of rows sized to the panel, with previous and next buttons). - `frozenColumns` (0 to 10 columns from the left that stay in view while the table scrolls sideways, which also fixes the column widths). - `sortBy` (a column name, as written in the header) with `sortDesc`, which set the sort the table starts with. - `footerFields` (column names; the footer then covers only those columns). - `footerCountRows` (a footer row with the number of rows). The footer and the row count cover the rows left after filtering. ### Heatmap display options A `heatmap` panel colors its cells with `colorMode`: `opacity` (the default) varies the opacity of `colorFill` (a semantic color; the first series color when absent), and `scheme` takes the color of the ramp `colorScheme` names (the same names as the field prop, `blues` when absent). `colorSteps` (2 to 128) quantizes the colors into that many steps and is continuous when absent, `colorMin` and `colorMax` fix the counts that get the first and last color (the data otherwise; a scheme starts at the lowest count and opacity at zero), and `colorReverse` flips the ramp. `colorScale` (`linear`, the default, or `exponential`) and `colorExponent` (0.1 to 2, 0.5 when absent) bend the opacity of the opacity mode only. `cellGap` (0 to 25 pixels) and `cellRadius` (0 to 10) shape the cells, `showValues` (`auto` where the text fits, `always` or `never`, the default) writes each count in its cell, and `cellUnit` and `cellDecimals` format the counts in the cells, the tooltip and the color legend. `hideBelow` (0 when absent) and `hideAbove` leave out cells whose count is at or below, or at or above, them, and those cells do not count toward the color range. With `calculate` on, `xBuckets` and `yBuckets` choose the buckets: `{ "mode": "size", "value": 60 }` makes columns of 60 seconds (a y bucket is `value` wide in the unit of the data) and `{ "mode": "count", "value": 30 }` makes that many columns or rows; with no `value`, `size` picks a round step (about 16 rows, or the sample step for columns) and `count` keeps the default of 16 rows and one column per sample. `yBucketScale` (`linear`, `log` or `symlog`, else the heatmap's `yScale`) spaces the calculated rows and `yBucketLogBase` (2 or 10, 2 when absent) sets the base of the log and symlog scales; only calculated rows use them, because bucket series and ordinal rows are drawn at equal heights. `xBucketScale` and `xBucketLogBase` do the same for the columns: a `log` or `symlog` scale spaces them by the logarithm of the time, with 16 columns when `xBuckets` has no count, and a `size` is then a step in scaled units and not seconds. A heatmap panel whose data holds the output of the `heatmap` transformation (a frame with `xMin`, `yMin`, `yMax` and `count`) draws those cells directly, whatever `calculate` says, and ignores the other frames. `rowsLayout` says how bucket series are named: `auto` (the `le` label), `le` or `ge` (the series name is the upper or lower bound; `ge` rows are de-accumulated from above) or `unknown` (ordinal rows). `rowsValue` names the field that holds the cell value when the data is already bucketed in rows: each frame that has a number field of that name keeps only that field. `yUnit` and `yDecimals` format the row labels (the field's unit when absent), `yMin` and `yMax` crop the rows, `yReverse` puts the first row on top, and `yAxis` (`left`, `right` or `hidden`), `yAxisWidth` (0 to 400 pixels) and `yAxisLabel` set the row axis. `tooltip` is `single` (the hovered cell, the default), `all` (every row of the hovered column) or `hidden`; `tooltipHistogram` adds a bar per row for the hovered column, `tooltipColorScale` marks the count on the color scale, and `tooltipMaxWidth` and `tooltipMaxHeight` (100 to 2000 pixels) clip it. `exemplars` (on by default) draws the exemplars of queries with `exemplar: true` as diamonds in `exemplarColor` (the foreground color when absent), placed by time and value. `legend: "hidden"` removes the color legend under the chart. ### Traces display options A `traces` panel filters the spans it draws. A span matches when it satisfies every filter that is set: `spanSearch` (text found, in any case, in its service, operation, id, attribute keys or attribute values), `serviceNames` and `spanNames` (the span's service or operation is one of the names, or none of them with `excludeServices` or `excludeSpanNames`, which compare whole names), and `minSpanDuration` and `maxSpanDuration` (milliseconds, ends included). The spans that do not match are dimmed and a note counts the matches, and `matchesOnly: true` hides them instead, keeping the indentation of the spans that stay. `criticalPathOnly: true` shows only the spans on the critical path, the chain that decides how long the trace takes: from the end of the trace it takes the span that finishes last, then the span that finished last before that one started, and descends into each the same way, so spans that ran at the same time as a later-finishing sibling are left out; a span that ends after its parent, or starts after the parent ended, still counts. When both options are on, only the spans that match and sit on the critical path stay. ### State timeline and status history display options A `state-timeline` or `status-history` panel sizes its bars with `rowHeight`, the share of each row the bar fills (0.1 to 1), and a `status-history` panel sizes its cells with `columnWidth`, the share of each cell's width (0.1 to 1). When either is absent the bar leaves a 2 pixel gap under it and a cell a 1 pixel inset on each side. `mergeValues` (on by default) joins consecutive samples with the same value into one segment, and `alignValue` (`left`, `center` or `right`) places a `state-timeline` segment's text. `perPage` (1 to 100) shows that many rows at a time, with previous and next buttons and a page indicator, and the row height follows the rows on the page. These two types take the same `legend`, `legendMode` and `legendWidth` as a time series, where the legend lists the states and clicking one hides its segments, and `tooltip` (`single`, `all` or `hidden`), `tooltipSort`, `tooltipHideZeros`, `tooltipMaxWidth` and `tooltipMaxHeight`. `legendValues`, legend sorting and legend calculations do not apply to them. Their `fill` field prop (0 to 100) sets how opaque the bars are, and `lineWidth` (0 to 10) draws a border around them. A timeline written without `fill` is opaque and one written without `lineWidth` has no border, and a `fill` of 0 is drawn opaque. `spanNulls` joins a gap between two values into the earlier state: `true` joins every gap and a number joins gaps up to that many milliseconds. ### Values on stat, gauge, bar gauge and pie chart panels A `stat`, `gauge`, `bargauge` or `piechart` panel shows one value per number field, reduced by `reduce`. Three optional `display` keys change that. - `allValues: true` shows one value per row of each field instead, at most `limit` rows per field (1 to 5000, 5000 when absent), labelled by the first text field of the row, else the field's name when it has a single row, else the row's time, else its row number. - `fields` picks the fields to show: a field name, or a pattern written between slashes such as `/^cpu/`, and `/.*/` for every field, text fields included. When `fields` is absent the panel shows the number fields. Time fields are never shown as values. ### Stat display options A `stat` panel has more optional `display` keys. - `justify: center` centers the name and the value in each tile. - `titleSize` and `valueSize` set the font size of the name and the value in pixels (1 to 200), where the tile otherwise uses 13 and 28. - `percentChange: true` shows the change between the first and last value of the range next to the value, with an arrow and, for screen readers, the words "up" or "down". - `percentChangeColor` colors only the arrow: `standard` (up is green, down is red), `inverted` (the reverse) or `value` (the color of the value). - `wideLayout: true` puts the name and the value on one row when a tile is at least 200px wide and twice as wide as it is tall; when it is absent or `false` the name sits above the value. - `percentSize` sets the font size of the percent change in pixels (1 to 200), and `graphStyle: line` draws the sparkline as a line without the area under it (`area` by default). - `graph` (on by default) draws that sparkline in each tile, and `graph: false` leaves it out. - `textMode` is `value`, `name`, `valueAndName` or `none`; `name` shows the name as the tile's text, and when it is absent the name appears with the value only when the panel has several tiles. - `orientation` lays the tiles out in one row (`horizontal`), one column (`vertical`) or to fit the panel (`auto`, the default). ### Pie chart display options A `piechart` panel has more optional `display` keys. - `sliceLabels` is a list of `name`, `value` and `percent` written on the slices that are big enough, with `titleSize` for the name and `valueSize` for the rest (1 to 200 pixels, 12 by default). - Its legend takes `legend` (`bottom`, `right` or `hidden`), `legendMode` (`list` or `table`), `legendShow` (a list of `value` and `percent`, both by default), `legendSortBy` (`name` or `value`), `legendSortDesc` and `legendWidth`, and clicking an entry hides its slice. - Its tooltip takes `tooltip` (`single`, `all` or `hidden`), `tooltipSort` (`none`, `asc` or `desc`), `tooltipHideZeros`, `tooltipMaxWidth` and `tooltipMaxHeight`. - `pieType` is `pie` (the default) or `donut`. - `sort` orders the slices by value: `desc` (largest first, the default), `asc` or `none` (the order of the data); the legend keeps the order of the data. ### Gauge and bar gauge display options A `gauge` panel draws a marker at each threshold on its arc unless `thresholdMarkers` is `false`, and its `thresholdLabels: true` writes the value of each threshold, formatted with the field's unit, along the arc. A gauge narrower than 120 pixels leaves those labels out, and one narrower than 160 pixels shortens its value to at most six characters, first with fewer decimals and then, for a number without a unit, with a K, Mil or Bil scale; a mapped text, the no-value text and a value that would round to zero stay as they are. A `bargauge` panel draws its bars as `barStyle` `basic` (a filled track) or `lcd` (equal cells lit up to the value), horizontal or vertical by `orientation` (`auto` by default). Its `valueMode` is `color` or `text`, which both draw the value in the foreground color with the threshold icon and word beside it, or `hidden`, which leaves the value out and keeps the threshold icon and word. Its `namePlacement` is `auto` (the name over a horizontal bar and under a vertical one), `top` (over both), `left` (in front of a horizontal bar) or `hidden`, and `showUnfilled: false` leaves out the unfilled part of the track. `minWidth` and `minHeight` keep each gauge or bar at least that many pixels (1 to 2000), the panel scrolls when they do not fit, and a bar gauge's `maxHeight` caps the height of a horizontal bar. `titleSize` and `valueSize` set the size in pixels (1 to 200) of the name and the value text of a gauge or a bar gauge. ### Bar chart display options A `barchart` panel takes its categories from the first text field, else the time field, unless `xField` names one. When every frame holds one row, as an instant query returns, and `xField` is absent, each frame is one category, named by its text field or else by its series label (see [Queries and datasources](#queries-and-datasources)), and the bars of one number field form one series. More `display` keys shape the bars and the labels: - `orientation` is `auto` (the default), `horizontal` or `vertical`. - `barWidth` (0.97 by default) and `groupWidth` (0.7 by default) are the shares of the space a bar and a group of bars fill, above 0 and at most 1. - `barRadius` (0 to 0.5, 0 by default) rounds the bar ends as a share of the bar width, and `fullHighlight: true` highlights the whole category on hover. - `colorByField` names a number field whose thresholds and colors color each bar. - `xTickRotation` (-90 to 90 degrees, 0 by default), `xTickSpacing` (the least pixels between labels, 0 to 500, 0 for automatic) and `xTickMaxLength` (1 to 200 characters) shape the category labels. - `valueSize` (6 to 100 pixels, 12 by default) sizes the value text. - `legend`, `legendMode`, `legendValues` (up to 8 reducers), `legendSortBy`, `legendSortDesc`, `legendWidth` (40 to 2000), `tooltip`, `tooltipSort`, `tooltipHideZeros`, `tooltipMaxWidth` and `tooltipMaxHeight` work as on a time series, except that `tooltipSort` defaults to `none` and there are no `legendHideZero`, `legendHideEmpty` or `tooltipCumulative` options. - `showValues` (`auto` where the text fits, `always` or `never`; `auto` by default) writes each bar's value on it. ### Histogram display options A `histogram` panel counts every number field into buckets. `bucketCount` (1 to 1000) or `bucketSize` (above 0) sets them, `bucketOffset` shifts them, and `combine: true` counts all fields together. `stack` is `none`, `normal` (the default) or `percent`. The legend and tooltip options are the same as a bar chart's, with `tooltip` `all` by default. ### XY chart display options An `xychart` panel's `display` takes: - `show`: `points` (the default), `lines` or `points+lines`. - `xField`, the field on the x axis. - `pointSize` (1 to 40, 5 by default), and `pointSizeMin` and `pointSizeMax` (1 to 100, 4 and 30 by default), the sizes of the smallest and largest points when a size field is mapped. - `series`, up to 20 mappings that each pick a frame and its fields: `query` (a ref), `frame` (a frame name, or a pattern written between slashes), `x`, `y`, `size`, `color` and `name`. - `legend`, `tooltip` and their options, the same as a bar chart's. A `trend` panel takes `xField` as well. ### Node graph and alert list display options A `nodeGraph` panel's `layout` is `layered` (the default), `grid` or `force`, and `wheelZoom: true` zooms it with the scroll wheel. An `alertlist` panel shows up to `limit` alerts (1 to 100, 20 by default) ordered by `sort` (`alphaAsc`, the default, `alphaDesc`, `importance`, `timeAsc` or `timeDesc`). Its `viewMode` is `list` (the default) or `stat`, which shows a count. ### Logs display options A `logs` panel shows its lines newest first (`order`), with `wrap` and `showTime` off, and has more optional `display` keys. - `showLabels: true` writes each line's unique labels after the time, and `showCommonLabels: true` writes the labels shared by every line once above the list; with one series every label is common. - `details: false` turns off expanding a line, and `detailsMode: sidebar` shows the fields of the chosen line in a column beside the list instead of under the line. - `prettify: true` indents a message that is a JSON object or array. - `dedup` shows one line for messages the strategy counts as equal and writes "Repeated N times" beside it: `exact`, `numbers` (numbers are ignored) or `signature` (letters and numbers are ignored), `none` by default. - `controls: true` adds a bar above the list to change the order, wrapping, time and deduplication while looking at the panel; the choices are not saved. - `fontSize: small` draws the lines at 11px, and `highlight: true` colors `key=value` pairs and upper case level words in a message. - `lineFields` (1 to 20 names) builds each line from those fields, or labels, joined by a space instead of the message, and skips a name the data lacks. - `showAttributes: false` hides the labels that `showLabels` writes on each line. - `timePrecision: ns` writes the time with nine digits after the second, using the digits the time carries and zeros after the millisecond otherwise (`ms` by default). ## Maps, canvases and actions These options are all optional. ### Geomap A `geomap` panel can load map tiles and draw several layers. Without `layers`, one marker layer is drawn from the panel's data with the flat options `location` (`auto`, the default, `coords` or `geohash`), `latField`, `lonField`, `geohashField`, `sizeField`, `colorField`, `markerSize` (1 to 100, 5 by default) and `markerSizeMax` (1 to 100, 15 by default). Its `display` takes: - `view`: `fit`, `world`, `coords` or a region (`north-america`, `south-america`, `europe`, `africa`, `west-asia`, `south-asia`, `south-east-asia`, `east-asia`, `australia` or `oceania`). - `basemap`: `outline` (the default), `carto`, `esri`, `osm`, `xyz` or `none`, with `basemapTheme`, `basemapLabels`, `esriServer`, `basemapUrl` for `xyz`, `basemapAttribution` and `basemapOpacity`. `basemapMinZoom` and `basemapMaxZoom` (whole levels from 0 to 18) are the zoom levels an `xyz` tile server serves: tiles are requested only at those levels, and outside them the nearest served level is scaled. `noRepeat: true` draws the basemap and tile layers once, instead of repeating the world sideways when it is narrower than the panel. - `lat` (-85 to 85), `lon` (-180 to 180) and `zoom` (1 to 18), the centre and zoom of the `coords` view. - `minZoom`, `maxZoom` and `zoom`: `minZoom` and `maxZoom` are 0 to 18, `minZoom` cannot exceed `maxZoom`, and when all three are set `zoom` lies between them. - Fit and controls: `fitLayer`, `fitLastOnly`, `fitPadding`, `sharedView`, `showZoom`, `mouseWheelZoom`, `showAttribution`, `showScale`, `showMeasure`, `showDebug` and `tooltip` (`details` or `none`). ### Geomap layers `layers`: up to 10 layers, each with a `type` (`markers`, `heatmap`, `geojson`, `dayNight`, `route`, `photos`, `network`, `carto`, `esri`, `osm` or `xyz`) and the options of that type, such as `query`, `location`, `latField`, `lonField`, `rules` and `opacity`. - A markers layer can draw a fixed label with `text` (or a label per row with `textField`, which wins when both are set), placed with `textOffsetX` and `textOffsetY` (pixels from -100 to 100), `textAlign` (`left`, `center` or `right`) and `textBaseline` (`top`, `middle` or `bottom`, measured against the marker center; without it the label sits below the marker). - `fillOpacity` (0 to 1, 0.8 when absent) sets how opaque the marker symbols are inside the layer's `opacity`, and `symbolAlign` (`left`, `center` or `right`) with `symbolVerticalAlign` (`top`, `center` or `bottom`) moves each symbol by one marker radius against its point while the label stays on the point. - `symbolField` names a field whose values pick the symbol of each row, by name (`circle`, `square`, `triangle`, `star`, `cross`, `x`) or by a path ending in `/<symbol>.svg`, and any other value draws a circle; it wins over `symbol`. - `rotation` turns every marker by a fixed number of degrees (-360 to 360), and `rotationField` turns each marker by its own angle, wrapped around by default or stopped at -360 and 360 with `rotationMode` `clamp`; the field wins over `rotation`. - `location` `wkt` reads the position from the field named by `wktField` (else a field called `wkt` or `geometry`): only `POINT (lon lat)` text places a marker, with an optional `SRID=...;` prefix and in any case, and rows holding lines, polygons or anything else count as having no location. - `showLegend: true` lists the layer in the map legend at the bottom right: its name, then one swatch for a fixed color, one entry per threshold step (the lower bound in the field's unit, the base step as Base) when the color field has thresholds, else the smallest and largest color values; absent means no legend. - A heatmap layer without `weightField` gives every point the `weight` (0 to 1, 1 when absent); with `weightField` the values are scaled by the largest value and then into `weightMin` to `weightMax` (0 to 100, 0 and 1 when absent), and a weight above 1 draws as 1. - A network layer draws its edges in `edgeColor` when set, else in the node `color`, with `arrow` (`none`, `forward`, `reverse` or `both`) and `lineWidth` (1 to 20). - A heatmap layer's `radius` (1 to 100) and `blur` (0 to 100) are 15 when absent. - A geojson layer reads `source` (`countries` or `usa-states`) or an https `url`, and styles what it draws by `rules`: up to 20 of a feature `property`, an `operation` (`eq`, `neq`, `lt`, `lte`, `gt` or `gte`), a `value` and a `color` or `opacity`, where the first rule that matches a feature applies. - `lookup` reads the position from `lookupField` through a `gazetteer` (`countries`, `usa-states` or `airports`). - A markers layer takes a fixed `color` and a `symbol` (`circle`, `square`, `triangle`, `star`, `cross` or `x`), and every layer takes a `name` (up to 100 characters) and `tooltip`. - A tile layer (`carto`, `esri`, `osm` or `xyz`) takes `theme` (`auto`, `light` or `dark`), `labels`, an Esri `server` (`streets`, `world-imagery`, `world-physical`, `topo`, `usa-topo` or `ocean`), a `url` for `xyz` and an `attribution` of up to 200 characters. - A day and night layer draws the sun when `showSun` is `true`, and the night in `nightColor`. - A photos layer reads each photo from `imageField`, in a `shape` of `square` (the default) or `circle`, with a `border` of 0 to 20 pixels. - A day and night layer shows the night at the end of the dashboard time range, or at its start with `nightAt` `from` (`to` when absent). - A photos layer shows each whole photo inside its frame, or fills the frame and cuts the photo to it with `crop: true`, and `shadow: true` adds a drop shadow. - When `layers` is set, the list is the whole layer set, so the flat marker options (`location`, `latField`, `lonField`, `geohashField`, `sizeField`, `colorField`, `markerSize`, `markerSizeMax`) are refused with `geomap_layers_conflict`. ### Canvas panels A `canvas` panel takes a background (`backgroundColor`, `backgroundImage`, `backgroundSize`), a border (`borderColor`, `borderWidth`, `borderRadius`), `panZoom`, `infinitePan` and `tooltip`. An image is `{ "url": "https://..." }` or `{ "field": "<field>" }`. A canvas panel holds up to 50 `elements` and up to 100 `connections`. Each element has an `id`, a `kind` and a position in `left`, `top`, `width` and `height`, which are percentages of the panel body from 0 to 100 (`width` and `height` above 0). The kinds are `metric`, `text`, `rectangle`, `ellipse`, `icon`, `button`, `server`, `triangle`, `cloud`, `parallelogram`, `windTurbine`, `droneTop`, `droneFront` and `droneSide`. An element can also set: - `placement`, with a `horizontal` of `left`, `right`, `leftright`, `center` or `scale`, a `vertical` of `top`, `bottom`, `topbottom`, `center` or `scale`, and the numbers `left`, `right`, `top`, `bottom`, `width` and `height` they use. It wins over the percentages when present: the numbers are pixels of the panel body, or percent on an axis whose mode is `scale`. - `field`, the field of the panel's data it is bound to. - `fill`, `stroke`, `textColor`, `iconColor` and `accentColor`, each a color, or `field` to take the bound field's threshold or mapping color. - `borderWidth` (0 to 20 pixels), `radius` (0 to 100, 0 by default), `fontSize` (8 to 72, 14 by default), `align` (`left`, `center`, the default, or `right`), `valign` (`top`, `middle`, the default, or `bottom`) and `rotation` (-360 to 360 degrees). - `backgroundImage`, `backgroundSize` (`original`, `contain`, `cover`, `fill` or `tile`) and `image`, which are images as above. - `icon`, the name of an icon (lowercase letters, digits and `-`, up to 64 characters), `server` (`single`, `stack`, `database` or `terminal`) and `buttonStyle` (`primary`, `secondary`, `success` or `destructive`). - `rateField`, which gives a `windTurbine` its rate, and `yawField`, `rollField` and `pitchField`, which give a `droneTop`, `droneFront` and `droneSide` its angle. - `links` and `actions`, up to 10 each, and `oneClick`. An icon's `stroke` and `strokeWidth` (a whole number of pixels from 0 to 20, 0 by default) draw its outline; no outline is drawn while the width is 0. `textTemplate` is a text of 1 to 200 characters whose `${...}` data references, such as `${__data.fields.cpu}` and `${__value.text}`, are replaced with the element's field values, and a reference to a missing field becomes an empty string; it is never combined with `text`. A connection joins two elements by their ids in `from` and `to`, and can set `color`, `field`, `width` (1 to 10, 2 by default), `path` (`straight`, the default, or `curved`), `vertices` (up to 20 points of `x` and `y`, 0 to 100), `lineStyle` (`solid`, `dashed` or `dotted`), `arrow` (`none`, `forward`, `reverse` or `both`), and `widthField` with `minWidth` and `maxWidth` (1 to 10). ### Actions An element's `actions` are HTTP requests that a person triggers from the panel: ```json { "title": "Deploy", "method": "POST", "url": "https://deploy.example.com/api/deploy", "body": "{\"env\": \"${env}\"}", "confirm": "Deploy to ${env}?", "variables": [{ "key": "env", "name": "Environment" }] } ``` - A `url` is an `https` address with the host written out; `${name}` references may appear only after the host. - `headers` and `query` take `name` and `value` pairs. Credentials and transport headers (such as `Authorization`, `Cookie` or a name containing `token`, `secret` or `password`) are refused with `action_header_not_allowed`, because the server adds what it needs. - The `url`, `body` and header and query values may reference declared variables, `__from`, `__to`, `__user.login`, `__user.email`, `__user.name`, `__user.id`, `__value.raw`, `__value.text`, `__value.numeric` and `__data.fields.<field>`. Any other name is refused with `unknown_variable`. - `oneClick` on an element (`action` or `link`) needs at least one action or link. - A person with Edit on the dashboard runs an action, and the server sends it on their behalf to an allowed domain; see [Actions](/docs/operate/outbound-access/#actions). An action is sent as the latest saved version describes it, and it carries no credentials. - `variables` lists up to 10 values the person types when running the action, each a `key` (letters, digits and underscores, starting with a letter, unique within the action) and a `name` for the form; `${key}` refers to the typed value in the `url`, `body` and header and query values, and shadows a dashboard variable of the same name. - `method` is `GET`, `POST` (the default), `PUT`, `PATCH` or `DELETE`, and `contentType` is `application/json` (the default), `text/plain` or `application/x-www-form-urlencoded`. - `title` is up to 100 characters, `body` up to 10,000, `headers` up to 10 pairs and `query` up to 20, each with a `name` of up to 64 characters and a `value` of up to 1000, and `confirm` (up to 500 characters) is the question asked before it runs. - `color` is the color of the action's button. - `oneClick` (fields only; a canvas element keeps its own `oneClick`, and one set on a canvas element's action is refused with `invalid_reference`) makes a click on the cell, tile, gauge or bar run the action when it is the field's only link or action. ### Field actions Field props take `actions` too (1 to 10), on any panel and on any override, with the same fields, and a stat tile, gauge, bar gauge or table cell offers them (the table cell type `actions` shows them as buttons). ### What the agent and MCP clients cannot write People and imports write HTML text panels, canvas actions and field actions. The agent and MCP clients cannot add or change them, and cannot write HTML tags in any text panel: a save that does is refused with `html_not_allowed` or `action_not_allowed`. They may still move or delete such a panel or element. ## Queries and datasources ### Query fields A data panel has 1 to 26 `queries`. A query has the text in `query` (1 to 20,000 characters) and, optionally: - `ref`, its name for overrides, which defaults to `A`, `B`, `C` by position. - `legend`, a template such as `{{pod}}`, up to 200 characters. - `datasource`, to run this query on a datasource other than the panel's. - `instant`, to ask for one value per series instead of a range. - `format`, one of `timeseries`, `table`, `heatmap` or `logs`. - `interval`, the smallest step: a duration such as `30s`, or `${name}` naming an `interval` variable, which then gives the step the viewer selected, `$__auto` included. - `intervalFactor`, a whole number from 2 to 10 that multiplies the query's step, as Grafana's resolution 1/N does. - `exemplar`, on a Prometheus range query, to also fetch its exemplars, which a time series and a heatmap draw. - `hide`, to keep the query out of the panel's data. ### Series labels A Prometheus series without a `legend` is named like `up{job="api", pod="checkout-0"}`, and overrides, `fillBelowTo` and Grafana imports match that name. Legend rows, tooltip rows and the categories of an instant bar chart show a shorter label instead when the panel has more than one series: the values of the labels that differ between its series, joined by a space in the label order of the first series, with the metric name first only when it differs, and `<no label>` for a series that has none of them. Two series of different queries that end up with the same label show their query ref before it. ### Query language and macros The query language follows the datasource: PromQL for Prometheus, a single SQL `SELECT` for ClickHouse, LogQL for Loki, TraceQL or a trace id for Tempo, `key=value` pairs or a trace id for Jaeger, and KQL for Elasticsearch and OpenSearch, with `lucene:` before a Lucene query and a body that starts with `{` for Query DSL. `$name`, `${name}` and `${name:format}` insert the value of a variable. Macros such as `$__rate_interval` for Prometheus and `$__timeFilter(Timestamp)` for ClickHouse expand when the query runs, from the time range and step of the request. On ClickHouse, `$__conditionalAll(condition, $variable)` writes `(condition)`, or `1=1` when the variable selects All. `$__conditionalAll(condition, otherwise, $variable)` writes `(otherwise)` instead of `1=1` when the variable selects All, and the otherwise condition cannot use that variable. ### Datasource selection A datasource is a uid from the datasources file or `${name}`, naming a datasource variable. When the panels of a dashboard read more than one datasource, each panel header names the datasources that panel reads; on a dashboard that reads one, no header names it. ### Ad hoc and group by variables An `adhoc` variable filters Prometheus, Elasticsearch and OpenSearch queries automatically, and filters ClickHouse queries that leave out `$name` only when it sets `applyToAll`. An `adhoc` variable's `default` and `baseFilters` are lists of up to 20 filters, each with: - a `key`. - an `operator` (`=`, `!=`, `=~` and `!~`, plus `<` and `>` on ClickHouse, Elasticsearch and OpenSearch, which compare as numbers when both sides are plain numbers and as text otherwise). - a `value`. - an optional `condition` (`and`, the default, or `or`, on ClickHouse, Elasticsearch and OpenSearch). - the chip texts `keyLabel` and `valueLabel`, which change what is shown and never what is filtered or put in the URL. Filters combine left to right and `or` starts a new group, so `a, b, or c` means `(a AND b) OR c`. `baseFilters` are always applied, never shown and never in the URL, and form one more group that is ANDed with the selected filters as a whole, so a selection cannot loosen them. Prometheus can only AND label matchers, so a Prometheus variable that uses `<`, `>` or `or` makes its queries fail with an error that names it. An `adhoc` variable can set `keys` (up to 100 unique names), which the filter picker offers instead of asking the datasource, and `listedValuesOnly: true`, which makes the picker accept a filter only when its key and value are picked from the lists it shows (the value list comes from Prometheus label values); absent means any text may be typed. A `groupby` variable can set `keys` (up to 100 unique label names) in the same way for its label picker. ### Other variable options - Any variable can set `skipUrlSync: true` to stay out of the URL: its selection is not read from `var-<name>` and not written to it, and it starts from its default on every load. - A `query` variable can set `staticOptions` (up to 50 `text` and `value` pairs, where a `value` may be empty) that are offered next to the query results, before them by default and after them or merged and sorted with `sort` through `staticOrder` (`before`, `after` or `sorted`); an option with an empty `value` is never part of All. `refresh: "never"` runs no query and offers only the `staticOptions`. See [Datasources and variables](/docs/concepts/datasources-and-variables/). ## Expressions A query can be an expression instead of datasource text: it has a required `ref` and an `expression` object, and no `query` or `datasource`. The server computes it from other queries of the same panel, after they have run. The `type` of the expression says what it does: - `math` takes `math`, arithmetic over query refs written `$A` or `${A}`, such as `$A * 2` or `abs($A) / $B`. - `reduce` takes an `input` ref and a `reducer` (`mean`, `min`, `max`, `sum`, `count`, `last` or `median`), and turns each series into one number. `mode` says what happens to a value that is not a number: `strict` (the default) gives no number for a series that has one, `dropNonNumbers` leaves it out, and `replaceNonNumbers` swaps it for `replaceWith`, which that mode requires and every other mode refuses. - `resample` takes an `input` ref, a `window` such as `1m`, a `downsampler` (`mean`, `min`, `max`, `sum` or `last`) and an `upsampler` (`pad`, `backfill` or `fillNA`), and puts the series on a regular grid of that width. - `threshold` takes an `input` ref, an `evaluator` (`gt`, `lt`, `withinRange`, `outsideRange`, `withinRangeIncluded` or `outsideRangeIncluded`) and `params`, one number for `gt` and `lt` and a lower and an upper number for the range evaluators, and turns each number into 1 or 0. A ref that the panel does not have, or expressions that depend on each other in a circle, are refused when the document is saved. A query that an expression reads can set `hide` to stay out of the panel's data. The server runs a hidden query only when an expression that is itself shown names it. An expression that cannot be computed, such as a `resample` whose input is a single number instead of a time series, fails with status `422` and the code `expression_error`. ## Reusing another panel's results A panel can show the results of another data panel of the same dashboard, as Grafana's `-- Dashboard --` source does. Its only query is `{"source": {"panel": "<id>"}}`, and it has no `datasource`, `interval`, `maxDataPoints`, `timeFrom` or `timeShift` of its own, because it takes them from the source panel. The source must be a data panel with queries that neither repeats nor itself reuses another panel, and a panel cannot reuse itself. The server runs the source panel's queries once, under the source's cache key, so both panels share one run. `withTransforms: true` applies the source panel's transforms to the results before the panel's own `transform` list. `adHocFilters: true` filters the reused rows in the browser by the selections of every ad hoc variable of the dashboard, after the source panel's transforms (when `withTransforms` is set) and before the panel's own: a filter keeps the rows whose field named by its key passes the operator (`=`, `!=`, `=~` and `!~`, the regular expressions matching the whole value, and `<` and `>`, which skip empty cells), the variable's base filters apply too, groups and `or` combine as for queries, and a frame with no field of that name is left as it is. The panel's `overrides` match the source's query refs. A reusing query can set `hide`, which leaves the panel without data. The response of a reusing panel names the source in `meta.source_panel`. ## Field options, overrides and transforms A data panel carries its display options directly, and an override repeats the same options for the series or fields it matches. The options are: - `unit`, `decimals`, `min`, `max`, `fieldMinMax`, `thresholds` and `thresholdMode`, `color`, `colorMode`, `colorScheme`, `colorBy`, `displayName`, `noValue`, `mappings`, `links`. - For charts, `style`, `fill`, `lineStyle`, `lineDash`, `lineColor`, `fillColor`, `pointColor`, `showValues`, `lineInterpolation`, `lineWidth`, `points`, `pointSize`, `pointShape`, `pointStrokeWidth`, `spanNulls`, `insertNulls`, `neutral`, `nullAsZero`, `barAlignment`, `barWidthFactor`, `barMaxWidth`, `thresholdsStyle`, `stack`, `axis`, `hidden`. - For the axes, `axisLabel`, `axisSoftMin`, `axisSoftMax`, `scale`, `logBase`, `linearThreshold`, `axisCenteredZero`, `axisWidth`, `axisGrid`, `axisBorder` and `axisColor`. ### Minimum, maximum and display names `fieldMinMax: true` makes a gauge or bar gauge range each field by its own values when it has no `min` or `max`, instead of one range shared by every field; other panel types already range each field by itself. `displayName` may use `${__field.name}`, `${__field.displayName}`, `${__series.name}`, `${__data.refId}`, `${__field.labels}` and `${__field.labels.<label>}`, and dashboard variables as `$name`, `${name}`, `[[name]]` and `${name:format}` (`raw`, `csv`, `text`, `pipe`, `json`, `percentencode` or `queryparam`); several selected values are joined with a comma and a space, and All reads `All`. A name that is not known is left as written. ### Data links A link with `oneClick: true` is a data link on stat, gauge, bar gauge and table panels: when it is the only data link, the whole tile, bar, gauge or cell is the link. A field has up to 20 `links`, each a `title`, a `url` of up to 2000 characters, `newTab` and `oneClick`. A link `url` is a relative address or starts with `http:`, `https:` or `mailto:`; any other scheme, `javascript:` and `data:` included, is refused with `unsafe_link` at `/links/N/url` (dashboard links) or at the `url` of the panel, override or canvas element link. A `url` that starts with a variable is checked when it is drawn, and a link whose address is unsafe then is not shown. A link `url` may use `${__url_time_range}`, which becomes `from=...&to=...` for the time range of the page, and `${__all_variables}`, which becomes `var-<name>=<value>` for every dashboard variable's selection (an All selection is written as `$__all`), next to `${name:queryparam}` for one variable. A link to `/dashboards/by-title?title=<title>` opens the one dashboard you can see with that title (an exact match first, else a match that differs only in case) and carries `from`, `to` and the `var-` parameters over; when several dashboards or none match, it opens the dashboards list filtered by the title. On those panels a field's actions show in the same menu after its links (a bar gauge shows its actions in a menu of their own), and a `oneClick` action that is the field's only link or action runs from the whole tile, gauge, bar or cell, after the same confirm dialog a menu item opens. ### Lines and points - `style` is `line` (the default), `bars` or `points`. - `lineInterpolation` is `linear`, `smooth`, `stepBefore` or `stepAfter`, and stacked series always draw linear. - `lineStyle` is `solid` (the default), `dashed`, `dotted` (round dots) or `square` (square dots as long as the line is wide), and `lineDash` is a dash length and a gap length in pixels, 1 to 100 each, that replaces the pattern of a dashed line. - `lineColor`, `fillColor` and `pointColor` fix the color of the line, the area fill (still drawn at the `fill` opacity) and the points, and each falls back to the series color; the legend and tooltip keep the series color. - `showValues: true` prints each visible point's value above it, formatted as the tooltip formats it, and leaves out a label that would touch the previous one. - `lineWidth` is 0 to 10 pixels (2 by default; 0 draws no line, so a filled series shows only its fill). - `points` is `auto` (a marker on samples with no neighbour, the default), `always` or `never`, and `pointSize` is the marker diameter in pixels, 1 to 40 (4 by default), which also sizes the markers of the `points` style. - `pointShape` is `circle` (the default) or `square` and `pointStrokeWidth` is the width of the marker outline, 0 to 20 (0 by default); an `xychart` panel draws both, and time series and trend panels draw the shape. - `spanNulls` is `false` (the default, a gap breaks the line), `true` (every gap is joined) or a number of milliseconds (gaps up to that long are joined). - `insertNulls` is a number of milliseconds or `true`: a series with a longer pause between two samples breaks its line there, and `true` means longer than the query's own resolution, which is the step the panel data reports for that query; a series that also sets `spanNulls` then joins only up to its own limit. - A state timeline and a status history break a state the same way: it ends one interval (or the written number of milliseconds) after its last sample. - `nullAsZero` draws a series' missing values as 0 (`false` by default). ### Neutral value, bars and threshold style - `neutral` is the value a gauge's bar grows from instead of the minimum, upward or downward to the value; a neutral value outside the range is held at the nearest end. - `barAlignment` puts a bar `before`, at the `center` (the default) or `after` its sample, `barWidthFactor` is the share of the space between samples a bar fills, 0.05 to 1 (0.6 by default), and `barMaxWidth` caps a bar at 1 to 200 pixels (64 by default). - `thresholdsStyle` draws the thresholds on the chart as `off`, `line`, `dashed` (the default), `area`, `line+area`, `dashed+area` or `series` (the line takes the color of the threshold band its value is in), and the first series on the left axis decides it for the panel. ### Axes The axis options belong to the axis a series draws on, and the first series on an axis decides its settings. - `axisLabel` is up to 100 characters of text beside the axis. - `axisSoftMin` and `axisSoftMax` widen the automatic range to include them but never cut data, while `min` and `max` are hard limits that win over them. - `scale` is `linear` (the default), `log` (with `logBase` 2 or 10, 10 by default; values at or below zero are not drawn) or `symlog` (linear within `linearThreshold` of zero, 1 by default, and logarithmic outside). - `axisCenteredZero` makes the range symmetric around zero. - `axisWidth` fixes the width of the axis in pixels (0 to 400), `axisGrid` shows or hides its grid lines (by default only the left axis, or the right one when there is no left axis, draws a grid), `axisBorder` draws a line along the axis, and `axisColor` is `text` (the default) or `series` (the axis takes the color of its first series). Only `timeseries`, `trend` and `candlestick` panels draw the line style and axis options, so other panel types ignore them and a Grafana import reports them there. ### Series display and stacking - `valueTransform` draws a series `negativeY` (below zero, mirrored, while the legend and tooltip keep its real values) or `constant` (a flat line at its first value). - `hideInLegend` and `hideInTooltip` leave a series out of the legend or the tooltip but keep it drawn, and `hidden` leaves it out of the chart. - `stackGroup` (up to 50 characters, `A` by default) makes series stack with the others of the same group only, and `fillBelowTo` is the name of another series: the area between the two is filled, in the series' color at its `fill` (20% when `fill` is 0), and it is ignored for a stacked series or a name no series has. Only `timeseries` and `trend` panels draw these five options. A percent stack always uses a 0 to 100% axis whatever the scale. ### Table cells and columns A `table` panel also takes `cell`, which sets how a column draws its cells. Its `type` is: - `auto` (the plain cell, colored by thresholds and colored mappings). - `text` (colored by the threshold, mapping or field `color`). - `background` (filled with that color, with text chosen for contrast; `wholeRow` fills the whole row). - `gauge` (a bar over the column's range, `gaugeStyle` `basic` or `lcd`). - `sparkline` (a mini chart of an array of numbers, such as the `Trend` column of a `timeSeriesTable` transform, drawn with the column's `style`, `fill`, `lineInterpolation`, `lineWidth`, `points`, `pointSize`, `spanNulls`, `min`, `max`, `axisSoftMin` and `axisSoftMax`). - `json` (a disclosure with the pretty-printed value). - `image` (the value is an https address, drawn through the server, with `imageAlt` and `imageTitle`). - `links` (the field's data links as anchors). - `pill` (the value split on commas into labels). - `actions` (one button per field action, with the value kept for screen readers). - `markdown` (the value drawn as sanitized markdown, the same renderer as a text panel; it shows one line unless `dynamicHeight` is true, which lets the cell grow up to the table's `maxRowHeight`). `valueMode` (`color`, `text`, the default, or `hidden`) sets how a gauge or sparkline cell shows its value, and `wrap` lets the cell's text wrap onto several lines. A column's field actions also show in the menu beside its cell's value, and a one-click action runs from the whole cell. Other panel types ignore `cell`, and the agent's prompt does not list it. A `table` column also takes: - `width` and `minWidth` (20 to 2000 pixels). - `align` (`auto`, the default, right-aligns numbers and left-aligns the rest, or `left`, `center`, `right`). - `filterable` (a button in the header opens a checklist of the column's distinct values and keeps the rows that match). - `inspect` (a button in every cell opens its full value in a dialog). - `hideHeader` (the header text is hidden visually but still read by screen readers). - `wrapHeader` (the header text wraps onto several lines). - `fieldDescription` (a tooltip on the column header; it is named apart from the panel's `description` because field props sit beside it on the panel). - `tooltipField` with `tooltipPlacement` (`auto`, the default, `top`, `bottom`, `left` or `right`), which show the value of another field in the same row as a tooltip on this column's cells. A column with `width` has exactly that width, the other columns share what is left and never get narrower than their `minWidth`, and the table scrolls sideways when they do not fit; with none of them set the browser sizes the columns from their content. ### Colors `colorMode` chooses how a color is picked: - `palette` (the series palette, the default when no `color` is set). - `paletteByName` (a palette color from a stable hash of the series name, so a series keeps its color when others come and go). - `fixed` (the `color`, the default when one is set). - `shades` (the `color` in a step lighter or darker per series). - `thresholds` (each series takes the color of the threshold its value reaches). - `scheme` (each value or series takes a color from the ramp `colorScheme` names, by its place between the field's `min` and `max`, else the data range). `colorScheme` is one of `greenYellowRed`, `redYellowGreen`, `blueYellowRed`, `yellowRed`, `bluePurple`, `yellowBlue`, `blues`, `reds`, `greens`, `purples`, `oranges`, `viridis`, `magma`, `plasma`, `inferno`, `cividis` or `warm`; every ramp is built from the theme's own colors, so light and dark themes follow it. `colorBy` is the value of a series that picks its color under `thresholds` and `scheme`: `last` (the default), `min` or `max`. Time series and trend panels draw every `colorMode`, while stat, gauge, bar gauge, table cells with colored values, bar chart and XY chart draw `scheme`; stat, gauge, bar gauge, table, bar chart, pie chart and XY chart already color values by their thresholds. ### Value mappings `mappings` change how a value is shown: a field has up to 50, each can set a `text` (up to 200 characters), a `color`, or both. Each mapping matches in one of four ways: - `value`, a text of 1 to 200 characters that equals the value, or the number it spells. - `range`, a pair `[from, to]` of numbers, either of them `null` for no limit, with both ends included. - `regex`, a pattern of up to 500 characters. - `special`, one of `null`, `nan`, `empty`, `true` or `false`. The first mapping that matches wins. A missing, `NaN` or empty value is matched only by a `special` mapping, and shows `noValue` (up to 100 characters) or a dash when none does. ### Thresholds and color names A field has 1 to 10 thresholds, strictly ascending by `value`, and the first step may leave out `value` to act as the base color. `thresholdMode` is `absolute` (the default), where each `value` is in the field's unit, or `percentage`, where it is a percent of the range from the field's `min` to its `max`. A color is `ok`, `info`, `warning`, `critical`, `text` (the theme's text color, which follows the light and dark themes) or a `#rrggbb` hex value. Beside a stat, gauge or bar gauge value, a step colored `ok`, `info`, `warning` or `critical` is named by that word, and a step with any other color by its value in the field's unit, such as `80%`. ### Units A unit is one of the Grafana unit ids the schema lists (the agent's prompt lists only the common ids and `suffix:` and `prefix:`, but a Spec may use any of them), such as `reqps`, `s`, `bytes`, `percentunit` or `radbq`, or custom text: `suffix:` or `prefix:` with 1 to 20 characters after it, or `time:`, `si:`, `count:` or `currency:` with 1 to 40. The text after `time:` is a date format, `si:` a symbol that scales by 1000 with SI prefixes (`si:mF` starts at milli), `count:` text after a K, Mil or Bil scaled number, and `currency:` a symbol before a scaled number. ### Reducers A reducer turns a field into one value, for a stat, gauge, bar gauge, pie chart or canvas `reduce`, a legend value, a table footer and a `reduce` or `groupBy` transform. The names are `last`, `lastNotNull`, `first`, `firstNotNull`, `min`, `max`, `mean`, `median`, `sum`, `count`, `range`, `delta`, `diff`, `stdDev`, `distinctCount` and `changeCount`, and also `variance`, `step`, `diffperc`, `logmin`, `countAll` and the percentiles `p1` to `p99`. Legend values and the `reduce` and `groupBy` transforms take `allIsNull`, `allIsZero`, `allValues` and `uniqueValues` as well, and an override's `value` match takes `allIsNull` and `allIsZero`. ### Overrides An override has a `match`, which selects by `query` (a `ref`), `series`, `seriesRegex`, `field`, `fieldType`, `value` or `fields`, and at least one option to apply. - A `value` match selects the number fields whose `reducer` result compares to `value` with `op` (`eq`, `neq`, `lt`, `lte`, `gt` or `gte`). A `value` reducer may also be `allIsNull` or `allIsZero`, whose true result compares as 1 and false as 0. - A `fields` match selects by position: `first` the first field of each frame, `firstTime` the first time field of each frame, and `all` every field. A panel has at most 50 overrides. ### Transforms `transform` is an ordered list of up to 20 steps that reshape the result in the browser after the query runs. The steps are `merge`, `seriesToRows`, `organize`, `reduce`, `joinByField`, `filterFieldsByName`, `calculateField`, `sortBy` and `limit`. - `merge` and `seriesToRows` take only `queries`, which every step takes (see [Using transforms](#using-transforms)). - `organize` takes `exclude`, `rename` (a map from the old name to the new one) and `order`, up to 100 each. - `reduce` takes `reducers` (1 to 10) and a `mode` of `seriesToRows` (the default, one row per series) or `reduceFields` (each number field reduced where it is). A number reducer gives a number field, `allIsNull` and `allIsZero` a true or false field, and `allValues` and `uniqueValues` a text field. - `joinByField` takes the `field` to join on and a `mode` of `outer` or `inner`. - `filterFieldsByName` takes `include`, `includeRegex`, `exclude` and `excludeRegex`. - `calculateField` takes an `alias` for the new field and an `expr` such as `Value #A * 2`, or `reduceRow` to reduce each row. - `sortBy` takes a `field` and `desc`, and `limit` takes a `count` from 1 to 100000. ### Field and row transform steps Seven more steps reshape single fields and filter rows: - `convertFieldType` (`conversions` of `field` and `to`: `number`, `string`, `time`, `boolean`, `enum` or `other`, with `dateFormat` and `joinWith`). - `formatString` (`field`, a `format` of `upper`, `lower`, `title`, `trim`, `substring`, `sentence`, `pascal`, `camel`, `snake` or `kebab` and, for `substring`, `start` and `end` from 0 to 10000). - `formatTime` (`field`, a date `format` made of `YYYY YY MM M DD D HH H hh h mm ss SSS A a`, and `utc`). - `renameByRegex` (`regex` and `renameTo`, where `$1` is a captured group). - `filterByValue` (`keep` of `include` or `exclude`, `match` of `any` or `all`, and up to 20 `filters` of `field`, `op` (`gt`, `gte`, `lt`, `lte`, `eq`, `neq`, `null`, `notNull`, `regex` or `range`) and `value`, or `from` and `to` for `range`). - `filterByRefId` (`include` lists the query refs to keep). - `extractFields` (`field`, `format` of `auto`, `json`, `kvp`, `delimiter` or `regexp`, `paths`, `delimiter`, `regex`, `replace` and `keepTime`). ### Label and layout transform steps Eight more steps reshape frames by their labels and layout: - `labelsToFields` (`mode` of `columns` or `rows`, `include` to keep some labels, `valueLabel` to name the value field after a label). - `joinByLabels` (`value` is the label whose values become columns and `on` the labels to join on). - `partitionByValues` (`fields`, `keepFields`, and `naming` of `labels`, `name` or `append`). - `prepareTimeSeries` (`format` of `wide`, `many` or `long`). - `timeSeriesTable` (one row per series with a trend and a reduced value, `stats` choosing the reducer per query ref, `lastNotNull` by default). - `rowsToFields` (each row becomes a field, with `mappings` of a column `field` to `name`, `value`, `unit`, `min`, `max`, `decimals`, `displayName`, `noValue` or `color`). - `configFromData` (reads field settings from the frame of the `configQuery` ref, with `mappings` of `field` to `unit`, `min`, `max`, `decimals`, `displayName`, `noValue` or `color` and an optional `reducer`, and applies them to the number fields or to the fields `applyTo` matches). - `concatenate` (puts the fields of every frame side by side, and `nameMode` of `drop`, `field` or `label` with `nameLabel` says where the frame name goes). ### Grouping and computing transform steps Seven more steps group rows and compute new data: - `groupBy` (one row per distinct combination of the `by` fields, with `aggregate` entries of a `field` and its `reducers`, each giving a `<field> (<reducer>)` column; only those fields are kept; a reducer here may be any reducer, so `allIsNull` and `allIsZero` give a true or false column and `allValues` and `uniqueValues` a text column). - `groupToNestedTable` (the same `by` and `aggregate`, with the rows of each group in a nested table that opens from the row, and `hideHeaders` to drop its header). - `groupingToMatrix` (a matrix of the `row` field by the `column` field holding the `value` field, the first three fields unless named, and `empty` of `empty`, `zero`, `true` or `false` for cells without data). - `heatmap` (counts the samples of the time series into the cells of a time column and a value row, with `xBuckets` and `yBuckets` of a `mode` of `size` or `count` and a `value`, `yScale` of `linear`, `log`, `symlog` or `ordinal` (each distinct value is its own row, in order of first appearance) with `yLogBase` of 2 or 10, `xScale` of `linear`, `log` or `symlog` with `xLogBase` of 2 or 10, and one output row per non-empty cell with `xMin`, `yMin`, `yMax` and `count`; `keepOriginalData` puts the original frames before it). - `histogram` (counts every number field into `bucketCount` or `bucketSize` buckets shifted by `bucketOffset`, or all of them together with `combine`). - `regression` (a least squares `model` of `linear` or `polynomial` with a `degree` of 1 to 5, 2 by default, fitted from the `x` field to the `y` field and added as a series named after the `y` field and "regression", at `predictions` evenly spaced points). - `transpose` (fields become rows and rows become fields, `firstName` names the first column, `restName` the others and `empty` fills missing cells). ### Location transform steps Two steps add locations to rows so a map can draw them: - `fieldLookup` (looks the `lookupField` text field, the first text field by default, up in the built-in `gazetteer` of `countries` (the default) or `usa-states` by name or code, and adds `lat` and `lon` fields, empty where nothing matched). - `spatial`, whose `source` says where a row is: `mode` `auto` (the default) takes fields named lat, latitude, lon, lng or longitude, else a field named geohash; `coords`, `geohash` and `lookup` name the fields, and a lookup takes a `gazetteer`. Its `action` is one of: - `prepare` (the default) adds `lat` and `lon`. - `calculate` adds a field named by `field` with the `calc` `heading` (degrees, the default), `distance` (meters) or `area` (square meters of the polygon the rows outline, repeated on every row) measured from the previous located row. - `modify` with `modify` `lineBuilder` (the default) turns each row into a two-row frame from the `source` to the `target` location, or `asLine` keeps the located rows in order for the map's route layer. A lookup step waits for its gazetteer to load and changes nothing until it has. ### Options added to the first transform steps The first steps take more options: - `organize` adds `include` (keep only the listed fields, before `exclude`, `rename` and `order`). - `reduce` adds `includeTime` (reduce the time field too), `labelsToFields` (add each label as a column) and `fields` or `fieldsRegex` (reduce only those number fields). - `joinByField` adds the `mode` `outerTabular` (an outer join that keeps repeated keys as separate rows instead of pairing them). - `filterFieldsByName` adds `variable` (keep the fields named by the variable's selection; an unset selection or All keeps every field). - `sortBy` adds `then`, further `field` and `desc` keys that break ties. - `limit` takes `count` as `${name}` to read the row count from a variable (an unset selection or All keeps every row). - `calculateField` adds: - `unary` (`fn` of `abs`, `exp`, `ln`, `floor`, `ceil` or `round` on a `field`, the first number field when none is named). - `index` (the row number, or with `percentile` its place from 0 to 1). - `cumulative` (a running `sum` or `mean` of a `field`). - `window` (a moving `mean`, `stdDev` or `variance` of a `field` over `size` rows or a `share` of the rows, `trailing` or `centered`). - `replace` (keep only the time field and the new field). - the operators `%` and `^` in `expr`. - field names with spaces in `expr` (write spaces around the operator, as in `Value #A (lastNotNull) - Value #B (lastNotNull)`; a name that holds its own ` - ` is ambiguous and cannot be used). - `include` (with `reduceRow`, the names of the number fields to reduce; names the frame lacks are skipped). ### Using transforms Any step can carry `queries`, a list of query refs: the step then reshapes only the frames of those queries and passes the others through unchanged, and a list that matches no frame changes nothing. Field names match a field's name or its series name, and a step that names a field the data does not have changes nothing. Prefer a query that returns the shape you need, and use a transform when it cannot. ## Rows and repeats A `row` panel has a `title`, a `gridPos`, a `collapsed` flag and its child panels in `panels`. The children are always nested in the row, whether it is collapsed or not, and each keeps its own `gridPos`. `repeat` on a data panel or a row names a variable and draws one copy for each selected value, with All meaning every value of the variable. On a data panel, `repeatDirection` is `h` or `v` and `maxPerRow` (default 4) sets how many copies share a row. The web app draws at most 50 copies and adds a note when it leaves values out. The variable has to be declared. ## Validation A save checks a document in layers. The schema rejects unknown or malformed fields. Further rules reject what a schema cannot express, such as duplicate panel ids or variable names, overlapping panels, thresholds that do not ascend, and references to undeclared variables. The server then checks that every datasource uid is configured and runs the queries (see [How the agent builds a dashboard](/docs/concepts/agent/)). A document that fails a check is refused with `422` and the code `invalid_spec`. The body lists the problems in `issues`, at most 50 (a last `too_many_issues` entry says how many were left out), each with a path into the document, a code and a message. ## Where the schema is The schema is `spec/schema/observespec.v0.json` in the repository. Its `$id` is `https://slashobserve.com/schemas/observespec.v0.json`, and the documentation site publishes it at that address, so editors and validators can fetch it there. Over MCP, `get_spec_guide` returns the authoring guide, the schema and an example for a model that has not seen them (see [MCP](/docs/use/mcp/)); inside an agent run it returns only the schema. A document cannot carry a `$schema` field, because the schema refuses unknown fields. # How the agent builds a dashboard > The tool loop the built-in agent runs, what a save checks, whose permissions it uses, and the limits, guards and failure codes of a run. Source: https://slashobserve.com/docs/concepts/agent/ · Markdown: https://slashobserve.com/docs/concepts/agent/index.md The built-in agent turns a prompt into a saved dashboard version by calling tools against your datasources. It writes no dashboard text of its own. The only dashboard a run produces is a complete [ObserveSpec](/docs/concepts/observespec/) document saved through a tool, and a run that only answers a question ends in a saved finding. The agent is on only when an LLM provider is configured; see [LLM providers](/docs/connect/llm-providers/). For example, you type "show checkout error rate and p95 latency by route" in the chat home. The agent lists the real metrics and labels in your Prometheus, drafts one panel, runs its query to see that it returns data, and saves it. It repeats that for each panel, and when it finishes, the panels become version 1 of a new dashboard in your My Dashboards. A run starts from a prompt in the chat home, from `observe <prompt>`, from a follow-up on an existing dashboard, or from a comment that asks for a revision. The conversation page shows the steps the tools report and the result. While a run works, it also shows the short sentences the model writes before its tool calls, live. They are never stored, so once the run ends only the result stays. An agent that reads the run over MCP or the CLI sees the same text as `live_text` while the run is running. ## Watch, stop and keep a run The person who asked can watch the run, cancel it, continue it and keep what it built. [Chat](/docs/use/chat/#watch-the-build) shows these controls in the web app. 1. Watch. The conversation page lists each step. A queued request shows its place in the queue, such as "Queued, position 3". 2. Cancel. Only the person who asked can cancel a queued or running request. A queued request is canceled at once, and a running one stops within a few seconds, after the model or tool call in flight returns. 3. Continue. The person who asked can continue a stopped build. It starts a new run from the panels already built, with an optional note for the agent. 4. Keep. A run that fails writes no version and keeps its build for 7 days. **Save what was built** saves the build as a new dashboard, or as the next version when nobody saved the dashboard since the build started. The request stays failed and keeps its failure code. A canceled run keeps its build like any other stopped run, and a version saved before the cancel took effect still counts. A stopped build is saved or continued, never both. A run the server restarts continues from its build. Each server runs `SLASHOBSERVE_AGENT_WORKERS` requests at once, 8 by default, and the rest wait in the queue. A free worker takes the waiting request whose requester has the fewest runs in progress, then the oldest. One request that applies a change to a dashboard runs at a time, so other revisions of that dashboard wait behind a run that does not end, and nobody else can cancel it. Investigations and questions do not wait on the dashboard. ## The tool loop The model starts with these: - The prompt. - The configured datasources and whether each is healthy. - The authoring guide and an example. - For a revision, the current version of the dashboard. It then works in this order: discover, draft, lint, run, save, and repair if the save is rejected. Details of the authoring guide: - It is a core plus one section per datasource type: Prometheus, ClickHouse, Loki, Tempo, Jaeger, and one shared by Elasticsearch and OpenSearch. - The system text carries only the sections of the configured types. - An Admin's runs also get a section on the built-in audit datasource, which no one else can read. - The JSON Schema is not in that text. The model reads it on demand with `get_spec_guide`, which inside a run returns only the schema. Details of a revision's current version: - When that version is over 16 KiB as compact JSON, the model gets an outline instead. - The outline has the title, default time range, refresh, tags, links and variables in full. - It has one line for each panel with its id, type, title, row and position. - It has the full JSON of the panel the request was asked about and of any panel whose id the prompt names. - The model reads the JSON of other panels with `get_panels`. Details of an anchored question: - When the question points at a spot on a panel or an observation block, the brief names it in one sentence, such as `The request points at "the row payments, authorize_card, card declined (440), last hour".` - The words after "points at" are the anchor's description, as `list_comments` shows it in `at`, with the values the person saw there when the web sent them. - The whole is quoted, cut at 500 characters, and has `&`, `<` and `>` written as `&`, `<` and `>` so it cannot open or close a tag. - It is treated as data, never as an instruction, and a block is named by its id. - A run with no anchor gets no such sentence. - The server refuses an anchor with control, bidirectional override or hidden characters in any of its text, as it does for a thread message. ### Discover The model calls independent discovery tools together in one turn, and uses only names it found in this run or that are already in the dashboard. What each tool finds depends on the datasource: | Datasource | Tools and what they find | | --- | --- | | Prometheus and the OpenTelemetry tables of ClickHouse | `list_metrics`, `list_labels` and `list_label_values` find real metric names, label names and label values. | | ClickHouse | `get_schema` and `sample_rows` list the tables and columns and read a few rows. | | Loki | `list_labels` and `list_label_values` find stream labels and values. `sample_rows` reads lines. `list_metrics` lists stream label keys. | | Jaeger | `list_label_values` finds services and the operations of one service. `get_schema` lists every service with its span names. Tags are free-form. | | Tempo | `list_labels` and `list_label_values` find TraceQL attributes and values. `get_schema` lists every service with its span names, plus the attributes. | | Elasticsearch and OpenSearch | `list_labels` and `list_label_values` find fields and a field's top values. `get_schema` lists indices or the fields of one. `sample_rows` reads documents. | Details of the Loki tools: - `list_labels` and `list_label_values` are narrowed by a stream selector in `metric`. - `sample_rows` reads up to 20 lines of the last 15 minutes from every stream or from a stream selector in `table`. - `list_metrics` with a stream selector as `scope` lists each stream label key with the number of streams that carry it. Details of the Elasticsearch and OpenSearch tools: - `get_schema` lists the indices of the index pattern or, with a `table`, the fields of one index. - `sample_rows` reads up to 20 of the newest documents. These tools work across datasources: - `list_services` lists the services a log or trace datasource has seen in a recent window, one hour by default and at most six hours, or finds which datasources hold one, and names the field a query filters on. - On logs, `log_facets` counts the top values of each field a query matches, `log_patterns` groups the matching lines into patterns and `log_context` reads the lines around one. `logs_for_trace` reads the lines that carry a trace id. - On traces, `get_trace` reads one trace, `trace_stats` counts spans, errors and durations over a filter and `compare_traces` ranks what differs between two sets of traces. - `list_annotations` shows deploy markers beside a spike, `list_folders` names the folders a request may place a dashboard in, and `list_datasources` says whether each source is healthy. For a new dashboard, the model first calls `list_metrics` with a `scope` that covers the request, such as `{job="checkout"}` or a ClickHouse table. It gets every metric family in the scope in one result, with its type, unit, label keys and series count. Go, process, `promhttp_` and scrape runtime families and `up` are only counted, unless the scope names `__name__`. It plans one panel per family, or a table for a group of related families, and sets `planned_panels` from that plan. A family the request covers ends in a panel, or in the `summary` of the last save with the reason it was left out. ### Draft, lint and run The model drafts the panels. `lint_query` parses each new or changed query and reports syntax and policy problems without running it. `query_range` and `query_instant` run a query and return a compact summary, so the model can check that a query returns data. These ad hoc queries run with tighter limits than a saved dashboard; see [Datasources file](/docs/reference/datasources-file/). ### Save | Tool | Saves | | --- | --- | | `create_dashboard` | A new dashboard with a full document. | | `update_panels` | A new version of an existing dashboard, from a patch that holds only what changed. | | `update_dashboard` | A new version from a full document, for rewriting a dashboard whole. | | `import_grafana_dashboard` | A Grafana dashboard that the prompt contains. | | `get_panels` | Nothing. It reads the full JSON of up to 20 panels by id, with the variables, before the model changes them. | Details of the `update_panels` patch: - It holds the panels to add or replace, the ids to delete, moves, the variables, and a `dashboard` field for the default `time`, the `title`, the `tags` and the `links`. - The server merges the patch into the version it builds on and validates the whole result, so changing one panel of a large dashboard costs a small save. - A key present in `dashboard` replaces that value whole, and a key left out keeps the current one. When the prompt contains Grafana dashboard JSON, the model calls `import_grafana_dashboard` instead of rewriting it. The agent may import only JSON that the prompt contains. ### Repair The model repairs the panels the server names when it rejects a save, as [What a save checks](#what-a-save-checks) describes. ### Advice returned with a save Every accepted save, into a build or by an MCP client, also returns advice that never rejects a save: - `uncovered` names up to 50 families of the caller's last scoped inventory that no panel query names, and `uncovered_total` counts them all. A histogram, summary or counter is covered when a query names any of its series. - `notes` lists up to 20 hints. They are a time series or bar chart query with no `legend`, a stat, gauge, bar gauge or time series with no `unit`, and a stat with no `description`. On a build save or an `update_panels` save only, they also name a query, custom, textbox, interval or constant variable that an earlier version used and this save left without a user. - A save into a build lists the panel hints only for the panels it added or changed, and the finished version lists them for the whole dashboard. The model is told to finish only when `uncovered` is empty or the `summary` of its last save says why each family in it was left out. ## The build A run does not save versions as it goes. Every accepted `create_dashboard`, `update_dashboard` or `update_panels` goes into a build, an unsaved copy of the dashboard that only the person who asked can watch. Each save into the build is checked like a version save, so every panel's queries are verified as the panel arrives. The build becomes one version when the agent finishes, either with `finish` set on its last save or with an answer that has no tool call. When the requester can no longer edit the dashboard, it becomes a [proposal](/docs/concepts/proposals/) instead; see [When the requester cannot edit](#when-the-requester-cannot-edit). Nothing shows in the dashboard list, a folder or the history before that, and an intermediate panel never becomes a version. ### One panel per save The agent builds every dashboard panel by panel. A new dashboard has no id until the build commits, so the model saves and reads its build without a `dashboard_id`. 1. The first save is `create_dashboard` with the title, time range, variables and one panel. `row` names the row the panel belongs to, and `planned_panels` (1 to 200) is the number of panels the model expects the finished dashboard to have. 2. Every other panel is its own `update_panels` call, with the panel alone in `upsert` and `row` naming its row. A new row is created with its first panel. 3. A save that adds or changes more than one panel is rejected. A revision changes one panel per `update_panels` call, so a change to many existing panels takes one call each. Deletes, moves, variables and dashboard fields may go with the panel. Each save checks only the panel it adds or changes, so a build of 100 panels does not rerun the queries of the panels already built. `planned_panels`, `finish` and `row` exist only for the built-in agent, and MCP clients keep one version per accepted save. The planned count is an estimate. The web app shows it beside the number of panels built, and a finished build commits even when fewer panels were built than planned. A save that changes the planned count says so in its step, and the finish save's step names the panel it added. ### Panel placement The server places each new panel at the first free spot of its row. It scans from the row's top line left to right, and moves what is below only when the row grows. In a build the server owns every position: - It reads only `w` and `h` from a panel the agent sends. - It keeps a panel the agent sends again where it is. - It places a panel again only when its size or row changes, at the spot a `layout` entry asks for when that spot is free, else at the first free spot of its row. The agent may leave a new panel's size out, or send only its width. The server then uses the panel type's default size. It gives the panel the width of a same-type panel whose line it continues and the height of the line it joins, and a full-width time series 7 units of height. A size the agent sends is kept. When a new dashboard's build becomes a version, whether the agent finished it or a person saved what was built, the server tidies the layout: - It widens the panels of every line that does not fill 24 columns, keeping their order, row and height. - It puts the legend of a full-width time series with several series on the right unless the agent set one. A revision's lines are left as they are, and rows keep the place the server gave them. `update_dashboard` in a build keeps the build's position for every panel it already holds and places a new panel the same way. Each accepted save tells the model the rows of the build, the positions in the row it saved into and any gaps, within 1.5 KiB, so it never needs a read to know what exists. It also names the free end of that row's last line and its height, so the model can size the next panel to fill it. ### Saving early The first save must come early. From the sixth model call since the session started, its history was shortened, or the last accepted save, reads are refused and only a save can run. The call before gets a note to save next. - A suggest run, which proposes one panel for the panel editor, gets 12 calls instead of 6, with the note at the 11th. - An investigation, which saves a finding, gets 12 calls by default, with the note one call before. `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` sets it from 6 to 60 for investigations that need longer, on the server and for connected agents alike. - Reads in the same call as a save always run, and so do the reads of the call right after a rejected save, so the model can look into why a save was rejected. - Two turns in a row in which every call was refused end the run with `no_progress`. ### Answers without a tool call - If the model answers without a tool call while fewer panels than planned are built, its answer is dropped and its conversation is shortened the same way as after a cut-off, with a note that it is told once. Its next answer without a tool call saves what is built. - If the model answers without a tool call in a new-dashboard or revision request that has saved nothing, it is told once that its text is not kept and to call `save_finding`, which keeps its answer in the chat, or save a panel. Its next answer without a tool call ends the run with `no_tool_call`. ### Cut-offs and shortened conversations If a model call is cut off at the output limit or runs past the per-call time limit, the agent shortens its conversation and goes on. It keeps the last few calls, the build and the names it already discovered. A second cut-off with no accepted save in between ends the run with `output_limit` or `call_timeout`. After an accepted save, once the conversation passes `SLASHOBSERVE_AGENT_SESSION_RENEW_KIB` (256 KiB by default), it is shortened the same way, so a long build stays inside the model's context window. Details of shortening: - It keeps the last 4 turns of the conversation, up to 32 KiB, and cuts their older tool results to 2 KiB. - It puts the build, the reason and a list of up to 4 KiB of the metric, label and table names the agent found in front of them, so the agent does not discover them again. - The names are sent to the model and never written to the server's logs. - Older read results are also left out of what is sent once they add up to 64 KiB, while the last 4 turns stay in full. - Only the model's view is shortened: the run keeps everything it read. - A shortened conversation is not a fresh session, and neither has a count of its own that ends the run. ## Limits A run has no cap on model calls and runs one save per turn. It ends when it finishes, is canceled, reaches `SLASHOBSERVE_AGENT_RUN_TIMEOUT` or `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` when that is set, loses its claim on the request, or stops making progress. Three rejected saves in a row end it. ### Guards The guards steer before they stop. Every refusal and every stop shows as a step that names its rule, such as "Refused query_range: ..." or "Stopped: ...". Details of repeated calls: - A run that keeps asking a read it already made is first answered, then refused. - A successful read is answered once more from its first result with a note. - A failed read or a query result runs again, and a third identical call is refused. - A save identical to an earlier one is refused. Details of a finding: - When a read was refused because the run reached its window of model calls, the finding the run then saves ends with a line saying reading stopped early and how many reads were refused, so its counts are not taken for complete. - A finding that says a metric is missing is sent back once when no `list_metrics` call of the run set `scope`. - A finding that says there was no deploy is sent back once when the run did not read `list_annotations`. Details of the time zone: - A request may name the person's time zone, as `time_zone` on `POST /api/v1/observe`, which the web app always sends. - The brief tells the model to write times in it with its label. - `save_finding` answers `wrong_time_zone` for a finding that labels times UTC without ever using that label. - A retry or continue keeps the zone, and without one times stay UTC. Details of reads that could not be checked: - A datasource read that ends in `query_timeout`, `datasource_unavailable` or `too_many_requests` is marked as could not check. - Its error carries a `note` telling the model the read says nothing about whether the data exists, and its step reads "could not check". - The run remembers the datasource until the same tool reads it successfully, so the finding ends with a line naming each datasource that could not be checked and why. - An empty `list_metrics` search carries a `note` that a service, job or pod is usually a label value, to be listed with `scope` before the model says a service has no metrics. Details of what stops a run: - A run that is stopped after three rejected saves names the panels that kept failing in its reason. - An investigation or a question answered with a finding says "the finding was rejected in 3 saves in a row" instead. It names the evidence panels that failed (`evidence-1` is the first panel sent) and the last issue codes. It adds that a datasource did not answer in time when every issue was a timeout, an unavailable datasource or a busy server. - A finding rejected for such evidence tells the model to send it again without those panels and to say that their data was not read. - A save that changes no panel, changes a panel for the fifth time, or deletes a panel and adds another, gets a note, and the fourth such save in a row ends the run with `no_progress`. The server enforces these guards at its MCP tool boundary on every run session, so an agent you connect that takes runs meets the same guards; see [MCP](/docs/use/mcp/#the-run-session-enforces-the-guards). ### Tool results and failures - A tool result over its size limit goes back to the model as a `result_too_large` error that names the parameters that narrow that tool's answer, such as `search` and `limit` for `list_metrics` or `get_panels` instead of `get_dashboard`. - A save result is never an error for its size, because the save already happened. Its panel list is cut to fit and marked `truncated`. - A tool that fails, such as a datasource that does not answer, goes back to the model as a `tool_failed` error without the error's own text, and the run goes on. - A tool call ends the run only on a broken internal invariant: a cancellation, a lost claim on the build, or a tool that panicked (`tool_panicked`). ### Timeouts and model calls A run has no time limit by default. `SLASHOBSERVE_AGENT_RUN_TIMEOUT` sets one of at least `1m`. Model calls stream. An attempt that receives nothing for `SLASHOBSERVE_LLM_IDLE_TIMEOUT` (180 s by default, `0` for none) is retried with backoff, like a rate limit or a server error, up to 4 attempts within `SLASHOBSERVE_LLM_REQUEST_TIMEOUT`. A single model call, retries included, is stopped after 10 minutes by default. `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` sets that limit and `0` removes it. There is no cap on model calls, but `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` can bound what one attempt spends. When an attempt's estimated cost has reached it, the agent starts no further model call and the request fails with `budget_exhausted`, keeping its build. The call that crossed the limit has already run its tool calls, so a finishing save is kept. See [Run cost](/docs/connect/llm-providers/#run-cost). More details of a run: - The first call of a session, before any save to the build, runs one reasoning step higher than `SLASHOBSERVE_LLM_EFFORT`: `low` becomes `medium`, `medium` becomes `high`, and any other value stays. - Every other call caps its output at half of `SLASHOBSERVE_LLM_MAX_TOKENS`, but at least 8192 and never above it. A call cut off at that lower cap is sent once more at the full value. - While a run is in flight, the server renews its claim on the request every 5 seconds, so a long run is not picked up by a second worker. - A run that ends without an accepted save writes no version. - A run shows its most recent 1000 steps per attempt. ## What a save checks Before it stores a version, the server runs the queries itself, whatever the model checked earlier. Besides validating the document, it runs queries over the dashboard's default time range and with each variable at its default, hidden queries included. A default range longer than 400 days is checked over its last 400 days, the longest range the query routes accept, so the save is not refused for it and no check query reads more. ### Which queries run Which queries run depends on the tool: - `create_dashboard` and `update_dashboard` run every query of every panel and every query variable. - `update_panels` runs only the queries that changed against the version it builds on. These are the panels whose query text, datasource, type, `timeFrom`, `timeShift`, `maxDataPoints` or `interval` changed, the panels that use a variable whose query changed, and the variables that changed. A new panel counts as changed, but an edit of only a panel's title or position, or a change to `tags` or `links`, runs nothing. A panel the patch did not touch is not run again, so a query that has started failing since the last save does not block a patch that leaves it alone. - `update_panels` runs every query when it changes the default `time` to a different `from` or `to`, because each panel's check depends on that range. A panel that returns nothing over the new range rejects the save. It runs every query too when it changes the title of a dashboard whose queries use `$__dashboard`. The model is told to keep such a panel and widen the range, not delete the panel to make the save pass. ### Rejections The save is rejected when: - a query fails, or a datasource uid is not configured. - none of the queries of a panel returns data, except on an `alertlist` panel, where no firing alerts is normal, and on a panel that reads only the audit trail. A signed-in person can keep such a panel from the [panel editor](/docs/use/edit-panel/#save-as-a-new-version), marked "Unverified"; the agent, MCP clients and the CLI cannot. - the document breaks a rule of the format, such as overlapping panels or an undeclared variable. The rejection lists each problem with the path of the panel or variable and a code. Every rejection in a run lists `failing_panels`, the ids of the panels the problems belong to, with a line that says how to repair them. The step of a rejected save names the first problem's path, and a refused input names the reason. The model fixes only the panels it names and saves again. Three rejected saves in a row end the run with an error that names the last issue codes, and an accepted save into the build resets the count. ### Changes made meanwhile When the dashboard changed while the agent was revising it, the server moves the build onto the latest version. It does so at the commit, or as soon as a new session would start on the older build. That works as long as the build changed no dashboard setting and none of the panels the newer versions changed. The agent's panels are checked again on the latest version, and a commit that hit the change is retried at once. Otherwise the build is discarded and the run restarts once from the latest version. If it changes again, the run fails with `conflict`. ### Revisions A revision starts from the current document and keeps panel ids, positions and everything the prompt does not ask to change, so [comments](/docs/concepts/versions/#comments) stay attached to their panels. A comment on a panel asks to change that panel unless it says otherwise. The save tools reject a document that does any of these: - It creates or edits a placeholder panel. - It writes HTML tags in a text panel. - It adds or changes the actions of a canvas element, a panel's fields or an override; see [Maps, canvases and actions](/docs/concepts/observespec/#maps-canvases-and-actions). The model is told not to delete an unverified panel or its queries to make a save pass; see [Import Grafana dashboards](/docs/use/import-grafana/). ## Whose permissions it uses The agent acts as the person or key that asked. The server checks the request when it is queued and again when a worker starts it. The saved version records the requester as its author and the request that asked for it, and the version menu on the dashboard shows "Agent" as the one who saved it. The tool-level roles do not apply inside a run, because the requester was already checked. Each run carries an `intent`: | Intent | Does | | --- | --- | | `ask` | Reads and answers. | | `apply` | Changes a dashboard. | | `suggest` | Proposes one panel. | A new-dashboard request is an `ask` until it saves its dashboard, and then an `apply`. Run listings show the `intent` and the run's `kind`, `build` or `investigate`; a private ask lists as `investigate`. Each run also carries `investigation`, true when it was started as an investigation that opens or writes into an observation, and false for an ask from the Chat tab, the canvas, a thread or Ask this on an observation. It is set when the run is queued and never changes: saving, sharing, showing on a page or withdrawing an answer leaves it as it was. ### Where a new dashboard goes A new dashboard goes to the requester's My Dashboards, where every person has Edit, or to General for a key. A request can name a folder the requester can create in: the agent reads the folders with `list_folders` and passes one as `folder_id`. A folder it cannot create in is refused and never replaced by another. ### Changing a dashboard from Home A request on Home that asks to change a dashboard that already exists is answered with a finding, because a Home run only builds new dashboards. 1. The agent finds the dashboard with `list_dashboards` by the id or exact title in the request. 2. When exactly one matches, it passes that dashboard's id as `ask_on_dashboard_id` on `save_finding`, and the server stores it only if the requester can view the dashboard. 3. The finding then carries `ask_on`, the dashboard's `dashboard_id` and `title`, so the web app can start a revision there with the same prompt. 4. When none or several match, the finding lists the candidates and carries no `ask_on`. A run never changes its own mode, and only a run on Home takes `ask_on_dashboard_id`. ### Who may ask - A follow-up, a revision or a comment sent to the agent needs Comment on the dashboard's folder. A person who can comment but not edit may ask, and their change becomes a [proposal](/docs/concepts/proposals/) that someone who can edit merges; see [Folders and access](/docs/teams/folders/). - A [suggestion](/docs/use/edit-panel/) for one panel still needs Edit. - An investigation that writes into an observation needs the Editor role. A question asked in a thread on an observation needs only Comment on it and is answered in the thread, writing nothing on the observation's page, whoever asks it. - These runs count toward the same limit as any other, at most 5 revisions queued or running on a dashboard. ### Private asks A private ask is a question about one dashboard or one observation, asked in a chat of yours. Start it with `observe investigate --private`, `start_run` or `POST /observe` with `kind` `ask` (the default) and a `dashboard_id` or `observation_id`, or `observe --dashboard <id>`. It needs Comment on what it is about, and it does not count toward the investigation limits. It writes nothing anyone else reads: - No observation is opened or written, and no dashboard version is saved. - Its activity events are seen only by you and Admins. - Its run and its answer are read only by you and, read only, by Admins. #### Share the answer Once it has an answer you can share it with `observe share-answer <request-id>`, `share_answer`, or `POST /observe/{id}/share`. 1. The server opens a comment thread on the dashboard or observation, at the same panel, block or spot. Your question is your message and the agent's answer is its reply. 2. On an observation it also writes the answer onto the page. 3. With a thread id, the two are added to that thread instead, which must be on the same dashboard or observation. 4. Everyone who can read the thread then reads the answer and its evidence. They read the run itself, read only, with `GET /observe/{id}`, `get_run` or `observe status`, while the chat stays yours. Details of a shared answer: - Their reads are recorded in the audit trail like yours. - Someone who can reply in the thread may apply the answer's suggested change there. - The run names that thread as `shared_thread_id`, which only you see. - A run is shared once, and sharing needs Comment there. - An answer whose evidence reads a datasource only Admins can query, or whose run read one, can only be shared on content in a folder only Admins can read, and is otherwise refused with `restricted_answer`. #### Withdraw the answer While nobody else has written in that thread, you can withdraw the answer back to only you. Use `observe comments withdraw <thread-id>` or `DELETE /threads/{id}/share`. It deletes the shared question and its answer, or the whole thread when the share opened it, and makes the run a private ask again, which you can share later. On an observation the run and its answer leave the observation's lists. The answer's text that was written onto the page stays there as page content until an editor removes it. No MCP tool withdraws, because none deletes. ### When the requester cannot edit The server checks the requester once more when the build commits. When they can still comment on the dashboard but can no longer edit it, or the run acts in propose mode, the build is saved as a [proposal](/docs/concepts/proposals/) and not as a version. - The proposal belongs to the run, so a second attempt of the same run adds a revision to it and does not open another. - The run succeeds with `result_kind: proposal` and no `result_version`. - The comment that asked for it stays open, because nothing was saved. - Someone who can edit the dashboard merges or discards the proposal, and the run's last step says "Proposed for an Editor to merge". - **Save what was built** still needs Edit, so it is not offered to a requester who can only comment. ### Tools in a run The server has 110 tools: MCP clients get 109, every one except `save_finding`, which only a run offers. The built-in agent gets 30 in a new-dashboard or revision request and 29 in a suggestion, which leaves out `save_finding`. An investigation is offered only the read tools and `save_finding`. The other 80 tools are for MCP clients only, so the agent never writes or resolves a comment reply, never edits an observation's blocks, never merges a proposal and never claims a run. They are: - the comment, observation, proposal, RCA, inbox, saved search, pin, home dashboard and claim tools; - the dashboard version, move and duplicate tools; - `create_folder`, `rename_folder`, `create_annotation`, `update_annotation`, `list_activity`, `list_dashboard_health`, `list_dashboard_viewers`, `list_mentionable_people`, `request_comment_access`, `list_access_requests` and `recheck_datasource`; - `get_run`, `get_run_build`, `start_run`, `cancel_run`, `retry_run`, `list_runs`, `rename_run`, `pin_run`, `unpin_run`, `archive_run`, `list_chats` and `get_chat`; - `run_dashboard_health`, the six audit trail tools, `save_run_answer`, `share_answer`, `apply_suggested_change`, `search_workspace` and `draft_query`. [MCP](/docs/use/mcp/) lists each with its role. `list_observations` and `get_observation` are offered to the built-in agent in every run, so it can read the observations that earlier answers were saved into, as the person who asked and only the ones they may open. An investigation cites what it used by the observation's title and `/o/<id>`. Its tool descriptions and input schemas are the ones MCP clients read, except where a run behaves differently: - The run names the dashboard and its version, so the agent's `update_dashboard` and `update_panels` take no `dashboard_id` or `parent_version`. `get_panels` without `dashboard_id` reads the dashboard being worked on, its build included. - Its saves take `finish`, `planned_panels` and `row`, and its `update_panels` takes one panel. - Its `create_dashboard` takes `folder_id` only on the first save of a build, which the server keeps with the build until it becomes a version. - Inside a run `get_spec_guide` returns only the JSON Schema, because the guide and the example are already in the agent's system text. Over MCP it returns the guide with the sections of the configured types, the schema and the example. When a revision request comes from a comment, the server resolves that thread itself once a version is saved. When a message that mentions an agent started the run, the server instead posts one status reply in that thread when the run ends, whatever the outcome, and leaves the thread as it is. A reply that could not be posted, because the dashboard was locked or the write failed, is tried again every minute for up to a day. The agent also reads the thread's earlier messages with the request. ### Data sent to the provider The agent sends what its tools return to the LLM provider, including names, label values, sampled rows and query results. See [LLM providers](/docs/connect/llm-providers/). ## The agent process The server starts `observe-agent` as a child process, which claims the built-in agent's runs and works them through the same MCP tools as a connected agent does. The server enforces the guards and the limits and stores the saved result. The claim answer to the built-in agent carries the model settings, which no other claimer receives, so the sidecar needs no provider configuration of its own. The sidecar reaches the server only over the loopback address, with a token that is new for every start of the process. The server refuses that token on any request that carries a forwarding header (`Forwarded`, `X-Forwarded-For`, `X-Forwarded-Host`, `X-Forwarded-Proto` or `X-Real-Ip`). A reverse proxy on the same host that adds none of them, such as nginx with a bare `proxy_pass`, still reaches the server from loopback. So configure it to send `X-Forwarded-For` or keep `/mcp` off it. When an LLM provider is configured, the server looks for `observe-agent` on `PATH`. It does not start when the binary is missing or when `SLASHOBSERVE_HTTP_ADDR` names a host other than a loopback address or all addresses. Without a provider it makes neither check. ## MCP clients use their own model An MCP client such as Claude Code runs the loop itself, with its own model, against the same tools at `<public url>/mcp`. The server needs no LLM provider for that. Each call is checked against the role of the key's service account and the folders it can see, and a save goes through the same validation and query check as above. The client can also read and answer comments, which the built-in agent cannot. A version saved this way records `mcp` as its origin and the client's name. See [MCP](/docs/use/mcp/) for the tools and the setup. ## Reference ### Failure codes A failed run records one failure code beside its message, in `failure_code` on the request. Every request records `trigger`, what started it: `person` when the requester asked, and `mention` when a mention of the Observe Agent in a comment did. | Code | Meaning | | --- | --- | | `run_timeout` | The whole run ran out of time. | | `call_timeout` | One model call did not answer in time. | | `rate_limited` | The provider answered 429 after its retries. | | `provider_error` | Any other provider or network failure. | | `output_limit` | The model ran out of output tokens. | | `no_tool_call` | The model finished without saving. | | `refused` | The model refused. | | `validation_exhausted` | Three rejected saves in a row. | | `no_progress` | The run stopped making progress. | | `budget_exhausted` | The run reached the server's cost limit. | | `conflict` | The dashboard changed twice while the agent was revising it. | | `lease_expired` | The server lost track of the run, such as after a restart, or its save found its build taken over by a newer attempt. | Runs from v0.1.0 may show `turn_limit`, a model-call cap later versions removed. ### Usage fields The request's `usage` reports these: | Field | Meaning | | --- | --- | | `failed_calls` | Model calls that failed. | | `retries` | Extra HTTP attempts inside model calls. | | `tool_calls` | Tool calls made. | | `model_ms`, `tool_ms` | Time spent in model calls and in tools. | | `max_save_output_tokens` | The most output tokens of one save. | | `build_saves` | Saves into the build. | | `compactions` | Times the session history was shortened, including after an early stop with panels still planned. | | `renewals` | Compactions after the history passed the renewal size. | | `nudges` | Steering messages before reads are refused. | | `save_now_refusals` | Reads refused for lack of a save. | | `stalled_turns` | Turns in which every call was refused. | | `one_panel_refusals` | Saves refused for changing more than one panel. | | `cost_usd` | The estimated cost in US dollars of the attempt that finished the request, from the server's price table. It is `null` when the model has no price. | A run that fails on its first model call has `usage` with `model_calls` 0 and `failed_calls` 1. See [Run cost](/docs/connect/llm-providers/#run-cost) for the price table. ### Settings that shape a run | Variable | Default | Effect | | --- | --- | --- | | `SLASHOBSERVE_AGENT_WORKERS` | 8 | Requests one server runs at once. | | `SLASHOBSERVE_AGENT_RUN_TIMEOUT` | none | Time limit of a run, at least `1m`. | | `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` | none | Cost limit of one attempt. | | `SLASHOBSERVE_AGENT_SESSION_RENEW_KIB` | 256 | Conversation size after which it is shortened, from 32 to 4096. | | `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` | 12 | Model calls an investigation gets before only a save runs, from 6 to 60. | | `SLASHOBSERVE_LLM_IDLE_TIMEOUT` | 180 s | Time without output after which a call is retried, `0` for none. | | `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` | 10 minutes | Time limit of one model call, retries included, `0` for none. | | `SLASHOBSERVE_LLM_EFFORT` | `medium` on Anthropic, nothing sent on OpenAI | Reasoning effort. | | `SLASHOBSERVE_LLM_MAX_TOKENS` | 16000 | Output limit of a model call. | [Configuration](/docs/reference/configuration/) describes every variable. # Datasources and variables > How a dashboard names its datasources, the eight variable types, and how multi-value, All, datasource and ad hoc variables work, with the formats and limits. Source: https://slashobserve.com/docs/concepts/datasources-and-variables/ · Markdown: https://slashobserve.com/docs/concepts/datasources-and-variables/index.md A datasource is a configured connection to a backend such as Prometheus or Loki, and a dashboard names each one by `uid`. A variable lets a viewer change what a dashboard's queries use, so one dashboard serves many services or environments without anyone editing the document. Use a datasource uid in every panel, and add variables when viewers need to filter, switch service or switch environment. Both are fields of the [ObserveSpec](/docs/concepts/observespec/) document. For example, a dashboard can offer a `job` dropdown, and the viewer's choice replaces `$job` in every query: ```json "variables": [ { "name": "job", "type": "query", "datasource": "prom", "query": "label_values(up, job)", "multi": true, "includeAll": true } ], "panels": [ { "id": "p_up", "type": "timeseries", "title": "Up by job", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "prom", "queries": [{ "query": "sum by (job) (up{job=~\"$job\"})" }] } ] ``` Here `prom` is the uid of a datasource, and the viewer can pick one job, several jobs or All. ## Datasources The `uid` of an entry in the [datasources file](/docs/reference/datasources-file/), or of a datasource an Admin [added in the app](/docs/connect/datasources-in-the-app/), is the name a dashboard uses. A uid is up to 40 letters, digits, `_` or `-`, starting with a letter or digit. The entry's `type` decides the query language and which macros a query may use. It is `prometheus`, `clickhouse`, `loki`, `tempo`, `jaeger`, `elasticsearch` or `opensearch`. A data panel sets `datasource`, and any of its queries can set its own `datasource` to use a different one. A `query`, `adhoc` or `groupby` variable sets `datasource` too. A save is rejected with `unknown_datasource` when a uid names no configured datasource. So renaming or removing a uid breaks the next save of every dashboard that uses it. ### Check that a datasource is healthy 1. As an Admin, open the Datasources page. Each row shows the datasource's health and, when it is unhealthy, the cause the server knows, such as the HTTP status the datasource answered. 2. Choose **Recheck** on a row to run a fresh check. 3. Over the API, `GET /api/v1/datasources` returns each uid with its type, health and `source`. An unhealthy one carries `message` and `detail`. `POST /api/v1/datasources/{uid}/recheck` runs a fresh check. `list_datasources` does the same over MCP and in the built-in agent, `recheck_datasource` over MCP, and `observe datasources recheck` from the CLI. The agent is also told which datasources are healthy before it starts. A recheck skips the 10 second cache of health results, and checks of one datasource are at least 2 seconds apart, so a retry loop cannot hammer it. ## Variables A variable gives the viewer a control, and its selection fills `$name` in the queries. To add one, declare it in `variables` and write `$name`, `${name}` or `${name:format}` in a query. 1. Pick the type that gives the control you want; the [types table](#variable-types) lists them. 2. Give it a `name` that starts with a letter and continues with letters, digits or `_`, up to 40 characters. 3. Set the fields of its type. A `query` variable needs `datasource` and `query`, a `custom` variable needs `options`, and a `constant` variable needs `value`. 4. Use it in a query. Without a selection the variable starts at its `default`. Variable names are unique, and a document has at most 20 variables. The value in the URL is `var-<name>`, so a link keeps a viewer's selection. `skipUrlSync: true` keeps the variable out of the address: its selection is not read from `var-<name>` and not written to it, so a shared link does not carry it. The optional `label`, `description` and `hide` change how the control looks. `hide: label` drops the name and `hide: variable` drops the control, and neither drops the selection. ### Variables that depend on each other Variables are resolved in the order they are declared. A `query` variable's query can use only variables declared before it, so a `service` variable can feed a `route` variable but not the reverse. It cannot use an `adhoc` variable. Panel queries can use any variable. When a viewer changes a variable, the variables whose queries use it reload their values. ### Pick what a variable starts at With no `default`, a variable starts at a value that depends on its type: - A `query` or `custom` variable starts at All if it sets `includeAll` and at its first value if not. - An `interval` variable starts at `$__auto` if it sets `auto` and at its first option if not. - A `textbox` variable starts at its text, or empty. - A `datasource` variable starts at the first matching datasource. ## Let viewers pick several values Set `multi: true` on a `query` or `custom` variable to let the viewer pick several values, and `includeAll: true` to add All. A `default` can be one value, an array of values for a `multi` variable, or `"$__all"` for All. `"$__all"` needs `includeAll` and is given alone. A `custom` or `interval` default has to be one of its options. How a selection reaches the query depends on its format. Write the format in the query, as in `${job:pipe}`, or leave it out and the server picks one from where the variable sits. So `pod=~"$pod"` in PromQL, `{app=~"$app"}` in LogQL and `{ resource.service.name =~ "$service" }` in TraceQL work for one value, several values and All. In SQL, `ServiceName IN ($service)` works for several values. In a search query string, `service.name:$service` matches any of the selected values. All becomes the full list of values, formatted the same way, except in the `regex` format, where it becomes `.*`. Set `allValue` to send your own text for All instead, such as `.*`. The server uses `allValue` without a format. [Formats and All](#formats-and-all) has the rest. ## Let viewers allow their own values Set `allowCustomValue: true` on a `query` or `custom` variable to let the viewer enter a value that is not in its list. A `custom` variable refuses a value outside its `options` unless it sets `allowCustomValue`. A `query` variable accepts any value either way. ## Switch a whole dashboard between datasources A `datasource` variable lets a viewer switch a whole dashboard between datasources of one type, such as a production and a staging Prometheus. 1. Declare the variable with `type: "datasource"` and a `datasourceType`: `prometheus`, `clickhouse`, `loki`, `tempo`, `elasticsearch` or `opensearch`. Add `regex` to keep only the uids it matches, and `default` with a uid, never a `${name}`. 2. Write `${name}` as the `datasource` of a panel, of a query, of a `query` variable, of an `adhoc` variable or of a `groupby` variable. 3. The query runs on the selected datasource, and its macros follow the variable's `datasourceType`. The form is exactly `${name}`, so `$name` and `${name:format}` are not datasource references. A viewer picks exactly one datasource, so the variable has no `multi` or `includeAll`. The variable lists only datasources of its `datasourceType`, so the same query text runs on whichever one the viewer picks. This is `spec/examples/datasource-variable.json` without its title and time range: ```json "variables": [ { "name": "ds", "type": "datasource", "datasourceType": "prometheus", "default": "prom" }, { "name": "job", "type": "query", "datasource": "${ds}", "query": "label_values(up, job)" } ], "panels": [ { "id": "p_up", "type": "timeseries", "title": "Up by job", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "${ds}", "queries": [ { "query": "sum by (job) (up{job=~\"$job\"})" } ] } ] ``` A `query`, `adhoc` or `groupby` variable can use `${name}` only when the `datasource` variable is declared before it. A panel or panel query can use any `datasource` variable. The save refuses a bad reference: | Code | Cause | | --- | --- | | `unknown_variable` | `${name}` names no variable. | | `invalid_reference` | `${name}` names another type of variable. | | `variable_order` | The `datasource` variable is declared later. | The Datasources page and the datasource filter on the Dashboards page count a dashboard under a datasource variable's `default`. A datasource variable with no `default` adds nothing to those counts. `datasourceType` has no `jaeger` value, because the ObserveSpec schema does not list Jaeger there yet. A panel names a [Jaeger](/docs/connect/jaeger/) datasource by its uid. ## Set a minimum step with an interval variable An `interval` variable can also set how fine a panel's queries are. 1. Declare an `interval` variable with `options` such as `1m` and `5m`. Set `auto: true` to add `$__auto`, which chooses a step from the time range. 2. Write `${name}` as the `interval` of a panel or of a query. 3. The query's step is at least the step selected in that variable. The form is exactly `${name}`, and the variable must be an `interval` variable. An undeclared name is rejected as `unknown_variable` and another type as `invalid_reference`. A query's own `interval` wins over the panel's. `$__interval` in the query follows the step, so a coarser step also widens it. `$__auto` uses the variable's `autoSteps` and `autoMin`. A query can also set `intervalFactor`, a whole number from 2 to 10, to multiply its step after the minimum is applied. An instant query passes the selected step on as its minimum interval, and the factor does not apply to it. ## Ad hoc filters An `adhoc` variable lets a viewer add key, operator and value filters to every query on one datasource. 1. Declare the variable with `type: "adhoc"` and a `datasource`. 2. The viewer adds filters in the control, such as `service = checkout`. 3. The filters apply to queries on Prometheus, ClickHouse, Elasticsearch and OpenSearch datasources. They filter Prometheus, Elasticsearch and OpenSearch queries automatically, and ClickHouse queries only through `$name` or with `applyToAll`. A Loki, Tempo or Jaeger query takes no ad hoc filters. The operators are `=`, `!=`, `=~` and `!~`, plus `<` and `>` on ClickHouse, Elasticsearch and OpenSearch. The filter picker offers `<` and `>` on ClickHouse only, though a Spec may set them on the others. How the filters reach the query depends on the datasource: - On Prometheus the filters are added as label matchers to every selector in every query on that datasource, and a query cannot refer to the variable. Prometheus can only AND label matchers, so a variable that uses `<`, `>` or `or` makes its queries fail with an error that names the operator or condition. - On ClickHouse a query uses the variable explicitly, as `$name` in a `WHERE` clause such as `AND $name`. It becomes the filters joined by `AND`, or `1 = 1` when there are none. A filter that starts an `or` group opens a new group, so `a, b, or c` is `(a AND b) OR c`. `<` and `>` compare as numbers when both sides are plain numbers and as text otherwise. - On Elasticsearch and OpenSearch every ad hoc variable filters every query on its datasource, and filters joined with `or` become a `should` group. The [Elasticsearch](/docs/connect/elasticsearch/#ad-hoc-filters) page describes the clauses. A ClickHouse variable with `applyToAll` also filters every query on its datasource that leaves out `$name`. It does this through `additional_table_filters` on the tables the query reads, and each table gets only the filters whose key is one of its columns. Without `applyToAll`, a query that leaves out `$name` ignores the filters. The Grafana importer sets `applyToAll` on every ClickHouse, Elasticsearch and OpenSearch ad hoc variable. ### Start with filters in place `default` is up to 20 filters that the dashboard uses until a viewer changes them. Each filter has a `key` (1 to 200 characters), an `operator`, a `value` (up to 500 characters, possibly empty), an optional `condition` (`and` or `or`) and optional chip texts `keyLabel` (up to 200 characters) and `valueLabel` (up to 500), which change only what the chip shows. Without a `var-<name>` parameter the dashboard uses these filters, and a link that sets the parameter replaces them. `var-<name>=` with nothing after the equals sign means no filters, which is how a viewer clears the saved ones. A filter with `condition: "or"` is written in the URL with a leading `|`, as `var-<name>=|key|op|value`. ### Always apply some filters `baseFilters` take the same objects, up to 20, and are always applied. They are never shown and never in the URL. They are one more group that the selected filters cannot loosen. ### Limit what the picker offers `keys` (up to 100) are the keys the filter picker offers instead of asking the datasource. `listedValuesOnly: true` makes the picker accept a filter only when its key and value come from the lists it shows, and the value list comes from Prometheus label values. An operator outside the six is a schema error when the Spec is saved. A key that is not a label name (Prometheus, Elasticsearch and OpenSearch) or a column name (ClickHouse) fails the save checks. ### Let viewers group by labels A `groupby` variable lets a viewer pick labels, up to 20, and adds them to the grouping of every aggregation in every query on its datasource, as Grafana does, so the queries need no change. It works on Prometheus datasources only. Its `default` lists the labels selected from the start, and `keys` (up to 100 label names) are the labels its picker offers. A query that writes `$name` gets the labels there and no automatic grouping. An aggregation written with `without` keeps a picked label by dropping it from its `without` list. ## Reference ### Variable types Each type has its own fields. A query refers to a variable as `$name`, `${name}` or `${name:format}`. | Type | Fields | Values | | --- | --- | --- | | `query` | `datasource`, `query`, `regex`, `sort`, `refresh`, `staticOptions`, `staticOrder`, `multi`, `includeAll`, `allValue`, `allowCustomValue`, `default` | The result of the query on its datasource. | | `custom` | `options`, `multi`, `includeAll`, `allValue`, `allowCustomValue`, `default` | The listed options, up to 200. | | `constant` | `value` | The one value, up to 2000 characters. It has no control. | | `interval` | `options`, `auto`, `autoSteps`, `autoMin`, `default` | Durations such as `1m` or `1h`, plus `$__auto` when `auto` is set. | | `textbox` | `default` | Free text up to 200 characters. | | `datasource` | `datasourceType`, `regex`, `default` | The uids of the configured datasources of that type. | | `adhoc` | `datasource`, `applyToAll`, `default`, `baseFilters`, `keys`, `listedValuesOnly` | Key, operator and value filters that the viewer adds. | | `groupby` | `datasource`, `default`, `keys` | Labels the viewer picks to group by. | Every variable also takes `name`, `label`, `description`, `hide` and `skipUrlSync`. Details of a `custom` variable: - Its `options` are strings, or `{ "text": "Production", "value": "prod" }` objects. - An object shows `text` in the picker while the selection, the URL and the queries use `value`. Details of an `interval` variable: - `options` takes up to 50 unique durations, each a number from 1 to 99999 and a unit of `ms`, `s`, `m`, `h`, `d`, `w` or `y`. - `autoSteps` is a whole number from 1 to 1000, and `autoMin` is a duration. ### Query variables A `query` variable's `query` depends on the datasource: | Datasource | Query | | --- | --- | | Prometheus | `label_values(label)` or `label_values(selector, label)`. | | ClickHouse | One `SELECT`, whose first column gives the values. | | Loki | `label_values(label)` or `label_values({selector}, label)`. | | Elasticsearch, OpenSearch | `label_values(field)` or `label_values(query, field)`. | | Tempo, Jaeger | No query variables. | The [Loki](/docs/connect/loki/#variables-and-discovery) and [Elasticsearch](/docs/connect/elasticsearch/#variables-and-discovery) pages describe the Loki and search forms. A `query` variable lists at most 1000 values. Details of `regex`: - It keeps only the values it matches, or the part of each value it captures. - Named groups `text` and `value` set what the picker shows and what is selected. - A `text` group alone keeps the whole value. Details of `sort`, which orders by the shown text: - `alpha` and `alphaDesc` compare by character, so every capital letter sorts before every lowercase letter. - `alphaCaseInsensitive` and `alphaCaseInsensitiveDesc` compare by character after lowercasing, so `a` comes before `B`. Values that differ only in case keep a fixed order, capitals first. - `num` and `numDesc` compare by the first number in each value, and values with no number come first in `num`. - `natural` and `naturalDesc` compare digit runs as numbers and other text by character, so `a9` comes before `a10`. With equal numbers, the longer run comes first, so `007` comes before `7`. Details of `refresh`: - `"never"` runs no query and offers only its `staticOptions`. - `"load"`, the default, runs the query when the dashboard opens, and again when a variable it depends on changes. It does not run when the time range changes, so the values keep the time range the dashboard opened with. - `"timeRange"` also runs the query again whenever the time range changes. Details of `staticOptions`: - It holds up to 50 `text` and `value` pairs. - They are offered next to the query results, before them by default. - `staticOrder` set to `after` puts them after the results, and `sorted` merges them with the results and sorts with `sort`. - A value that the query also returns appears once. - The values list of a `query` variable carries the same texts when its regex captures them. ### Formats and All A selection reaches the query in one of these formats: | Format | Result for `a` and `b` | | --- | --- | | `regex` | `(a\|b)`, with regular expression characters escaped. | | `pipe` | `a\|b` | | `csv` | `a,b` | | `singlequote` | `'a','b'` | | `doublequote` | `"a","b"` | | `sqlstring` | `'a','b'`, with SQL escaping. | | `raw` | The value itself. It allows one value and refuses several. | When a reference gives no format, the server picks one from where the variable sits and which datasource runs the query: | Datasource | Where the variable sits | Default format | | --- | --- | --- | | Prometheus, Loki, Tempo | In a `=~` or `!~` matcher | `regex` | | Prometheus, Loki, Tempo | Anywhere else | `raw` | | Jaeger | Anywhere | `raw` | | ClickHouse | Inside a quoted string | `raw` | | ClickHouse | Outside quotes | `sqlstring` | | Elasticsearch, OpenSearch | Inside a quoted string | The one value, JSON-escaped; several values need a format such as `${var:pipe}` | | Elasticsearch, OpenSearch | Outside quotes | `"a"` for one value, `("a" OR "b")` for several | Details of All in the `regex` format: - It becomes `.*`, or `.+` inside the stream selector of a Loki query, because Loki refuses a selector whose every matcher can match an empty value. - After the selector, in a label or line filter, it stays `.*` so lines without the label are kept. Details of `allValue`: - It sends your own text for All, and the server uses it without a format. - On Loki, use `.+` there too, because `.*` is refused when it is the only matcher in the selector. Details of the full list: - It is used only when it has at most 1000 values and 64 KiB of text and every value can be substituted safely. - Otherwise a query that uses it fails. The fix is to use the `regex` format, set `allValue` or narrow the variable query. ### Limits | Limit | Value | | --- | --- | | Variables in a document | 20 | | Variable name | 40 characters | | Values a viewer may select | 100, each at most 1024 bytes | | Values a `query` variable lists | 1000 | | `custom` options | 200 | | `staticOptions` | 50 | | `interval` options | 50 | | Ad hoc filters in `default` or `baseFilters` | 20 each | | Ad hoc or group by `keys` | 100 | | Group by labels | 20 | | Datasource uid | 40 characters | # Versions > How every save becomes a version, how to see who made it and what changed, restore an old one, and how comments attach to panels. Source: https://slashobserve.com/docs/concepts/versions/ · Markdown: https://slashobserve.com/docs/concepts/versions/index.md Every save of a dashboard is a new version, numbered from 1 in a single line. You look at versions to see who changed a dashboard and what changed, and to go back to an earlier state. A version holds the whole [ObserveSpec](/docs/concepts/observespec/) document as it was saved, so no version depends on another, and nothing edits a version after it is written. For example, Sam renames the dashboard and saves, and it goes from version 4 to version 5 with the summary `Rename to "Checkout latency"`. Version 4 is still there. If the rename was a mistake, you restore version 4, and the dashboard becomes version 6 with the contents of version 4. ## Compare versions 1. Open a dashboard and choose **Compare versions** in the version menu. The History page lists the versions, newest first, each with **View**, **Compare** and **Restore**. 2. Choose **Compare** on a row to diff it with the version before it. To compare any two, pick them in the **From** and **To** menus. Version 1 can be compared with an empty dashboard. 3. Read the changes. They are grouped under the dashboard, each panel and each variable, and each is marked Added, Removed, Changed or Reordered. 4. Choose **View** to open the dashboard at that version. The header then reads "v3 of 5" and not "Live". Panels are matched by id across versions. A panel whose title or position changed shows as a change to that panel, not as a removal and an addition. Over the API, `GET /api/v1/dashboards/{id}/diff?from=3&to=5` returns the same changes as JSON pointers into the document. `from` defaults to the version before `to`, `to` defaults to the latest, and `from=0` diffs against an empty document. In the CLI, use `observe dashboards diff <dashboard-id> --from 3 --to 5` and `observe dashboards versions <dashboard-id>`. Over MCP, use `list_dashboard_versions` and `diff_dashboard_versions`. ## Restore a version 1. Open the History page. 2. Choose **Restore** on any version except the latest, and confirm. 3. The dashboard gets a new latest version that is a copy of the one you chose, marked "Restored from v3", with the summary "Restore version 3". Nothing is deleted, so the versions in between stay in the history, and you can restore again to go back. Deleting the dashboard is the only way versions go away: **Delete dashboard** in the **More** menu or a row menu, or `DELETE /api/v1/dashboards/{id}`, deletes every version with it, and it cannot be undone. A restore checks the document and that its datasources are still configured, but it does not run the queries again. Restoring a known-good version therefore does not fail because a datasource is briefly down. The restored version keeps the list of panels and variables that were unverified when it was first saved. Restoring needs Edit on the dashboard's folder, so a Commenter or Viewer never sees a **Restore** button. A provisioned starter dashboard refuses a restore with `409` and the code `provisioned`, and a connection in propose mode gets `proposal_required` from `restore_dashboard_version`. See [Roles](/docs/teams/roles/) and [Folders and access](/docs/teams/folders/). Over the API it is `POST /api/v1/dashboards/{id}/versions/{version}/restore` with the `parent_version` it builds on, and it can answer `409` like any save. Over MCP it is `restore_dashboard_version`, and in the CLI `observe dashboards restore <dashboard-id> --version 4`. ## Duplicate a dashboard 1. Choose **Duplicate...** in a dashboard's **More** menu, or in its row menu on the Dashboards page. 2. Choose a title, which starts as "<title> copy", and a folder you can create dashboards in. The folder starts as the dashboard's own folder when you can create there. 3. Confirm. The latest version is saved as version 1 of a new dashboard, and the new dashboard opens. Duplicating needs View on the dashboard and Edit in the folder you choose. The copy starts its own history: earlier versions, comments, agent requests and the import record stay with the original, and its version 1 reads "Duplicated from "<title>" version 7". Like a restore, it checks that the datasources are still configured but does not run the queries again, and it keeps the list of unverified panels and variables. Over the API it is `POST /api/v1/dashboards/{id}/duplicate` with a `title` and an optional `folder_id`. Over MCP it is `duplicate_dashboard`, and in the CLI `observe dashboards duplicate <dashboard-id> --title "Checkout copy"`. ## Save over a newer version A save names the version it builds on. If someone saved a newer version in the meantime, `POST /api/v1/dashboards/{id}/versions` refuses the save with `409` and the code `version_conflict`, and the response gives `latest_version`. To merge instead, add `"merge": "auto"` to that request. `POST /api/v1/dashboards/{id}/panels`, `observe dashboards panels`, `update_dashboard` and `update_panels` have no such option and always try the merge. The server merges a stale save when it changed different panels, variables or settings than the newer versions did. It saves the merged document on top of the latest version after its queries run. The response carries `merged_from` with the version the save was based on and the version it was merged onto. When the newer versions changed the same panel, variable or setting, the save is refused with `409` and the response lists them under `conflicts`. Read the latest version, redo your change on it, and save again. ## Comments A comment is anchored to a panel id and to the version it was written on, or to the whole dashboard. It does not move when later versions change the panel. Replies join the thread of the comment they answer and take the same version and panel. Commenters, Editors and Admins can comment; Viewers cannot. A thread is open until someone resolves it. When it is resolved with a version, the thread shows "Resolved by version N", and a revision that the agent made from the thread records its own version there. Because the anchor is the panel id, keep the id when you change a panel. A panel with a new id is a different panel to its comments. If the latest version no longer has the panel, the comment stays but its `panel_present` is `false`. The agent and MCP clients keep ids when they revise a dashboard. MCP clients and the CLI can list, reply to and resolve comments; see [MCP](/docs/use/mcp/) and [CLI](/docs/use/cli/). ## Reference ### What saves a version | Action | Version summary | | --- | --- | | The first save, which is version 1 | The summary given, from the agent, the web app, the API or a Grafana import. | | Saving a layout, or a panel from the panel editor | The summary you give. | | **Duplicate** or **Remove** in a panel's menu | `Duplicate "<title>"` or `Remove "<title>"`. | | **Edit details** in the **More** menu | `Rename to "<title>"` when only the title changed, otherwise "Edit dashboard details". | | **Edit Spec JSON** in the **More** menu | The note you give, or "Edit the dashboard JSON". | | **Add panel** in the **More** menu | `Add "<title>"` unless you add a note. | | The agent creating or revising a dashboard | Written by the server from what the build changed. | | `update_dashboard` over MCP | The summary the client sent, or "Update dashboard". | | `update_panels` over MCP | The summary the client sent, which is required. | | `observe dashboards apply` | `Applied from <path>`. | | A file provisioned from disk | `Provisioned from <path>`. | | `POST /api/v1/dashboards/{id}/versions` | The `summary` in the request. | | `POST /api/v1/dashboards/{id}/panels` | The `summary` in the request. | | A restore of an older version | "Restore version N", or the summary given. | Editing the details asks for no summary. Saving a layout or a panel asks for a short one. Details of the agent's versions: - One version per request, saved when the agent finishes, so the rows it builds along the way never appear in the history. - Saving what a stopped run built is one version too. - A build that comes back to an earlier version is recorded as a restore of it. - The summary is written from what the whole build changed; see [Chat](/docs/use/chat/). Details of MCP and API saves: - A save a connected agent makes this way carries the summary the agent wrote. That text is agent-written, and nothing marks it as checked, so read it as the agent's claim. - `POST .../panels` takes only the panels to add, replace, remove or move. It runs only their queries, like `update_panels` and `observe dashboards panels`. Moving a dashboard to another folder saves no version. A [proposal](/docs/concepts/proposals/) saves none either until a person who can edit merges it. ### What a version records Each version keeps a summary of 1 to 500 characters, the time, and who or what made it. - The author, which is a person or a service account. When the agent saves a version, the author is the person or key that asked for it. - The origin, one of `web`, `cli`, `mcp` or `api`, and for `mcp` the client's own name, such as `claude-code`. The client's name is what the client reports about itself and is not verified. The origin is a label and never decides what someone may do. - The agent request that saved it, if there was one. It is what tells a version saved by an agent from one a person saved, together with the author label below. - The version it was restored from, if it is a restore. ### The author label Every author is shown with one label, the same in the web app, the CLI and MCP. | Saved by | Label | | --- | --- | | A person or a service account | Their name, such as `Ishan`. | | An MCP client outside a run | The name and the client, such as `Ishan (via Claude Code)`, or `Ishan (via MCP)` when the client sent no name. | | An agent run | `Observe Agent for` and whoever asked, such as `Observe Agent for Ishan`. | The version menu, the History page and the activity feed show that label. Versions and dashboards in the API carry it as `actor.label`. The Dashboards page's **Made by** column shows the label of version 1, then the channel (Web, CLI or API) for a direct save, and its tooltip adds the email or "service account". The **Made by** filter lists each person with their email, and the dashboard header names the client of a dashboard made over MCP. ### Routes, commands and tools | Task | HTTP | CLI | MCP | | --- | --- | --- | --- | | List versions | `GET /api/v1/dashboards/{id}/versions` | `observe dashboards versions` | `list_dashboard_versions` | | Read one | `GET /api/v1/dashboards/{id}/versions/{version}` | `observe dashboards show` | `get_dashboard` | | Compare | `GET /api/v1/dashboards/{id}/diff` | `observe dashboards diff` | `diff_dashboard_versions` | | Save | `POST /api/v1/dashboards/{id}/versions` | | `update_dashboard` | | Save some panels | `POST /api/v1/dashboards/{id}/panels` | `observe dashboards panels` | `update_panels` | | Restore | `POST /api/v1/dashboards/{id}/versions/{version}/restore` | `observe dashboards restore` | `restore_dashboard_version` | | Duplicate | `POST /api/v1/dashboards/{id}/duplicate` | `observe dashboards duplicate` | `duplicate_dashboard` | Details of the diff: - `to` must be at least 1 and `from` at least 0. - `from` must be lower than `to`, or the answer is `400` `invalid_request`. - Each change has an `op`, a `path`, and the `from` and `to` values where they apply. Details of a restore: - The summary is at most 500 characters over the API and at most 200 over MCP. - The restore answers `201` with the new version, and `Location` points at it. # Investigate > Ask the agent a question about your data and get back an answer in an observation, with the panels that show it, and the request, limits and API behind it. Source: https://slashobserve.com/docs/concepts/investigate/ · Markdown: https://slashobserve.com/docs/concepts/investigate/index.md An investigation asks the agent a question, such as why the checkout error rate is up, instead of asking it for a dashboard. The agent reads your datasources with its read tools and ends the run by saving one finding, an answer written into an [observation](/docs/use/observations/). The finding is the answer: the agent's final text is discarded, as it is in every run. For example, you ask "why did checkout errors rise after 10:00?" about the Checkout dashboard. The agent queries the error and latency series, then saves a short conclusion with up to four panels as evidence. The conclusion and the panels appear in an observation at `/o/<id>`, filed in the dashboard's folder. [Investigate](/docs/use/investigate/) covers asking from the web app. This page covers what an investigation is, what it may do, and how to start one from the CLI, the HTTP API and MCP. ## Start an investigation 1. Sign in once with a service-account key with the Editor role, as [CLI](/docs/use/cli/#sign-in) shows. 2. Ask the question: ```sh observe investigate why did checkout errors rise after 10:00 ``` The command follows the run while the agent reads your datasources, then prints the finding with its title, its answer and its address. 3. Narrow the question with a flag. `--dashboard <id>` makes the question about a dashboard, and `--panel <panel-id>` narrows it to one of its panels. `--from now-6h --to now` sets the window the agent looks at. ```sh observe investigate --dashboard <id> --panel <panel-id> --from now-6h --to now what changed ``` 4. To write into an observation you already have, pass `--observation <id>`. Without it, the server starts a new observation. From the HTTP API, send `POST /api/v1/observe` with `kind` set to `investigate`: ```sh curl -fsS -X POST -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ "$OBSERVE_SERVER/api/v1/observe" \ -d '{"kind": "investigate", "prompt": "why did checkout errors rise after 10:00", "dashboard_id": "<id>", "from": "now-6h", "to": "now"}' ``` The answer is `202` with the request, and its `Location` header is `/api/v1/observe/{id}`. `GET /api/v1/observe/{id}` returns the finding once the run succeeds, and the request lists with `kind` `investigate`. The request carries the id of the observation it writes into as `observation_id`, or null when no folder allowed a new observation. An MCP client investigates with its own model. It reads data with the read tools, saves the answer into an observation with `create_observation` and `add_block`, and reads earlier ones with `list_observations` and `get_observation`. It does not call `save_finding`. ## What the agent does The agent investigates with the same read tools it uses to build dashboards, and these as well: - `list_annotations`, so it sees deploy markers beside a spike. - `list_observations` and `get_observation`, so it can read earlier observations in the folders the requester can open, as evidence. - `save_finding`, which ends the run. It does not get the dashboard save tools in an investigation, because an investigation never changes a dashboard. Investigations therefore do not wait for other requests on the same dashboard. ## Where the answer goes The answer lives in an observation: a text block that starts with `## <title>`, and one panel block for each evidence panel. The blocks and the finding are written in one transaction, so a failure leaves neither. Each answer has the address of its observation in the app, `/o/<id>`, where its evidence panels run against the stored queries. The `url` of a finding is that address. The observation follows the access of the folder it is in, so someone who cannot read it gets `404`, never `403`. These rules decide the folder: - An investigation about a dashboard files its observation in that dashboard's folder when you can edit it. - Otherwise it files it in your My Dashboards, or in General when you have none. - The observation stays where it was filed when the dashboard moves. [Observations](/docs/use/observations/#investigations-write-into-an-observation) describes the blocks and the rules in full. ## Pin a finding or turn it into a dashboard Two deprecated routes act on a finding. `POST /api/v1/findings/{id}/pin` pins the finding to its dashboard as an [annotation](/docs/use/annotations/). `POST /api/v1/findings/{id}/dashboard` saves the evidence panels as a new dashboard in the caller's My Dashboards, after running their queries again. Details of pinning: - The annotation sits at the end of the finding's window, tagged `finding`. - Its text is the finding's first line and its `/findings/<id>` path. - Pinning needs Edit on the dashboard. - Pinning a finding twice returns the same annotation, with `200` the second time and `201` the first. ## When an investigation fails A run that ends without saving a finding fails with the failure code `no_finding`. The agent is reminded once to save a finding before the run fails. Retry it with `POST /api/v1/observe/{id}/retry` or `observe retry`. ## Reference ### Request fields | Field | Meaning | | --- | --- | | `kind` | `investigate`. | | `prompt` | The question. | | `dashboard_id` | The dashboard the question is about. | | `panel_id` | One panel of that dashboard. Needs `dashboard_id`. | | `observation_id` | An existing observation to write into. | | `from`, `to` | The window the agent looks at. Both or neither. | | `as_of` | Admin only. Runs the investigation as of a past time. | Details of `from` and `to`: - Each is a relative time such as `now-1h`, epoch milliseconds or an RFC 3339 time. - `from` must be before `to`, and the two may be at most 400 days apart. - Without them the agent looks at the last hour. - With `as_of`, `to` must not be later than `as_of`. Details of `observation_id`: - The answer is `404` `not_found` when you cannot see the observation. - The answer is `403` `forbidden_role` when you cannot comment on it. - Without it, the server starts a new observation. Details of `as_of`: - It is an RFC 3339 time or epoch milliseconds in the past, and a relative time is refused. - Every relative time in the run, such as `now-1h`, resolves to it. - `observe investigate --as-of <time>` sets it; see [Investigate a past incident](/docs/use/investigate/#investigate-a-past-incident). ### Who may start one, and limits - Starting an investigation needs the Editor role or above, and view access on the dashboard when one is named. - A caller may have 3 investigations queued or running at once. The fourth answers `429` `too_many_requests`. - The instance may have 10. Beyond that the answer is `429` `agent_busy`. - The answer is `503` `agent_unavailable` when no model is configured. - A question asked privately with `kind` `ask` and a `dashboard_id` or an `observation_id`, or `observe investigate --private`, is a different request: it needs Comment access, counts toward none of these limits, and keeps its answer on the request until its asker files it as an observation. Use `POST /api/v1/observe/{id}/observation`, `observe save-answer` or `save_run_answer`. - `panel_id` that is not a panel of the dashboard's latest version answers `422` `unknown_panel`. ### The finding | Part | Limit | | --- | --- | | Markdown | At most 400 words and 4,000 characters, as plain Markdown with no HTML. | | Evidence | Up to 4 data panels, with ids `evidence-1` to `evidence-4` in the order the agent sent them. | | Window | The window the finding was made for. | Details of the evidence: - The server runs every evidence query when the finding is saved. - It refuses a panel whose query fails or returns no data, and the agent repairs or drops the panel. - When a datasource did not answer in time, the agent drops those panels and says in the text that it did not read their data. Details of the markdown: - The server appends a note when reads were refused after the run reached its limit of model calls (12 by default, set by `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS`), or when a datasource did not answer. - That note counts toward the 400 words and the 4,000 characters. A finding has the id of its observation when the save creates it, and its own id when the run already had an observation. Its `observation_id` names the observation either way. ### The finding API is deprecated The finding tools `create_finding`, `list_findings` and `move_finding`, the command `observe findings`, the route `POST /api/v1/findings/{id}/move`, the comment target `finding:<id>` and the search kind `finding` are removed. The routes that read a finding, pin it and make a dashboard from it remain under `/api/v1/findings` as adapters over observations that the web app still reads. Every finding route answers with a `Deprecation` header, and a finding carries its `observation_id`. Use `/api/v1/observations`, `create_observation` with `add_block`, `list_observations` and `observe o` instead. ### `observe investigate` flags | Flag | Meaning | | --- | --- | | `--dashboard`, `--panel` | The dashboard, and one of its panels, the question is about. | | `--observation` | The observation to write into, by id. | | `--from`, `--to` | The window, both or neither. | | `--at`, `--block` | The spot or block of an observation the question is about. | | `--as-of` | Admin only. The time to investigate as of. | | `--private` | Answer privately about `--dashboard` or `--observation`. | | `--no-wait` | Print the request id and exit. | | `--timeout` | Stop waiting after this long. The run keeps going. | | `--open` | Open the finding in the browser once it is saved. | ### Tools of the built-in agent `save_finding` is also offered in a new-dashboard or revision request that only asks a question. There the answer stays on the request, where its asker and Admins can read it, until the asker files it as an observation. # Proposals > How a change from someone who cannot edit, or from a connection in propose mode, waits as a proposal until a person who can edit merges or discards it. Source: https://slashobserve.com/docs/concepts/proposals/ · Markdown: https://slashobserve.com/docs/concepts/proposals/index.md A proposal is a change to a dashboard that is saved for review instead of into the dashboard. It holds a whole [ObserveSpec](/docs/concepts/observespec/) document and the version it builds on, and it changes nothing until a person who can edit merges it. Merging saves it as the next [version](/docs/concepts/versions/) of the dashboard. For example, Sam has Comment access to the Checkout dashboard but cannot edit it. Sam asks the built-in agent to add a latency panel. The dashboard stays as it is, and a proposal titled "Add p95 latency panel" appears in its top row as "1 proposal". An Editor opens it, reads the changes, and chooses **Merge**, which saves version 6 of the dashboard. ## Review a proposal 1. Open the dashboard. When it has open proposals, the top row shows "1 proposal" or "N proposals", with "N+" when more than one page of them is open. 2. Choose that button, then choose a proposal. The list shows each title, its author, when it was opened and "Behind" when the dashboard has moved on. A proposal also opens from the [inbox](/docs/use/inbox/) and from `/proposals/<id>`. 3. Read the page. It shows the title, who proposed it and when, a line such as "Open, based on version 3. The dashboard is now at version 5.", the summary, and the list of changes by panel, "Variable <name>" and "Dashboard settings". Below that, a field-by-field difference from the version the proposal builds on shows each query or option before and after, as the [version history](/docs/concepts/versions/) shows two versions. 4. Choose **Merge**, or choose **Discard** and optionally give a **Reason (optional)**. A toast reads "Merged as version N" with **Open dashboard**. A link on the page opens the dashboard at the version the proposal builds on, or at the merged version once it is merged. The proposal's discussion, a comment thread on the proposal, sits beside the page on a wide window and below it on a narrow one. The count in the top row follows the `proposal.updated` event of the dashboard's event stream, sent when a proposal is opened, gets a revision, is merged or is discarded, so every open copy of the dashboard updates it without a reload. A discarded proposal's page shows its reason under the state line. You cannot merge when you lack Edit on the dashboard. In that case the page says "Only someone who can edit this dashboard can merge a proposal." in place of **Merge**. The author still sees **Discard**, with the note "You can discard this one because you opened it." ## Resolve a conflict A proposal can be behind: the dashboard has a newer version than the one the proposal builds on, the `behind` field is true, and `latest_version` names that version. Behind is no problem by itself, because a merge puts the proposal's changes on top of the latest version. A conflict exists when the proposal and a newer version changed the same panel, variable or setting. The merge is refused until you choose a side for each conflict. 1. Open the proposal. Each conflicting row says in words which panel, variable or setting changed on both sides, and shows the panel's title on the dashboard and in the proposal. 2. Choose "Keep the dashboard's" or "Take this proposal's" for every row. **Merge** stays disabled with "Choose a side for each conflict first" until you have chosen for every row. 3. Choose **Merge**. When you kept the dashboard's side of a conflict, the toast adds which panels, variables or settings the proposed change was dropped for. A change that fails the checks once merged onto the latest version says "This change cannot be merged as it is" and has no choice. Discard the proposal or ask its author to fix it. If the author added a revision while you were reading, the merge says "This proposal has a newer revision. Review it and merge again." and the page reloads the proposal. A merge that saved nothing reads "Merged without a new version". That happens when the result equals the latest version, for example when the proposal changed only units the dashboard already changed and you keep the dashboard's side of each. ## Make a proposal You do not create a proposal with its own route. You save, and the save becomes a proposal when you cannot save directly. 1. Send the save with `propose_if_needed: true`: ```sh curl -fsS -X POST -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ "$OBSERVE_SERVER/api/v1/dashboards/$DASHBOARD_ID/versions" \ -d '{"parent_version": 5, "summary": "Add p95 latency panel", "propose_if_needed": true, "spec": {...}}' ``` 2. When you have Comment but not Edit, or your connection is in propose mode, the answer is `202`. The body has `proposal_id`, `revision` and `opened`, and the `Location` header names the proposal. 3. Read the proposal with `GET /api/v1/proposals/{id}`. The save is checked as any other save is. A document that does not parse or whose queries fail is refused with `422` and opens no proposal. `POST /api/v1/dashboards/{id}/panels` takes `propose_if_needed` too. The MCP tools `update_dashboard` and `update_panels` always propose when they must, and answer `proposed` with the `proposal_id`. The built-in agent does the same. ## Change a proposal you opened Save again. A person or key has at most one open proposal on a dashboard, and a run of the built-in agent has at most one as well. A later save by the same author adds a revision to the open proposal and does not open another. The new revision keeps what the earlier revisions changed when it can be combined with the new save. Where both changed the same panel, variable or setting, it takes the new save. When they cannot be combined, the new revision holds the new save alone. Each revision is kept with the version it builds on. `revision` on a proposal is the newest one, and a merge names the revision the caller read. The proposal's `title` is the newest revision's summary, so the title and the summary under it agree. ## Merge or discard from the API, MCP and the CLI `POST /api/v1/proposals/{id}/merge` needs Edit on the dashboard and a connection that is not in propose mode. 1. Read the proposal and note its `revision` and its `conflicts`. 2. Merge, with one choice per conflict: ```sh curl -fsS -X POST -H "Authorization: Bearer $OBSERVE_TOKEN" \ -H "Content-Type: application/json" \ "$OBSERVE_SERVER/api/v1/proposals/$PROPOSAL_ID/merge" \ -d '{"revision": 2, "choices": [{"kind": "panel", "id": "p1", "take": "theirs"}]}' ``` 3. The answer is `200` with the proposal's summary fields, without `spec`, `changes`, `diff` or `conflicts`. `merged_version` holds the new version, and the `Location` header points at it. The `take` of a choice is `ours` to keep the dashboard's newer version of the unit, or `theirs` to take the proposal's. `POST /api/v1/proposals/{id}/discard` closes a proposal without saving it, with an optional body `{"reason": "..."}`. From the command line, `observe proposals list`, `show`, `merge` and `discard` do the same; see [the CLI](/docs/use/cli/#proposals). The MCP tools `list_proposals`, `get_proposal`, `merge_proposal` and `discard_proposal` are the routes above as tools; see [MCP](/docs/use/mcp/). ## Reference ### Who gets a proposal | Caller | Save with `propose_if_needed: true` | Save without it | | --- | --- | --- | | Editor, connection not in propose mode | A new version. | A new version. | | Commenter | A proposal, `202`. | `403`. | | Connection in propose mode | A proposal, `202`, even for an Editor. | `403`. | | Viewer | `403`. | `403`. | Details of a connection in propose mode: - It can never write a version directly, even when its person is an Editor. - It cannot merge a proposal, and answers `403` with the code `propose_mode`. - It cannot remove panels or variables. Such a save answers `409` with the code `proposal_required` and a `removed` list that names them, and nothing is proposed. The agent asks its person to remove them. ### Merge and conflicts `GET /api/v1/proposals/{id}` returns the proposal with these extra fields. | Field | Holds | | --- | --- | | `spec` | The proposal's whole document. | | `changes` | What the proposal adds, changes, removes or moves compared with the version it builds on. | | `diff` | The same comparison field by field, in the shape of `GET /api/v1/dashboards/{id}/diff`, with the old and new value of each field. | | `conflicts` | The units that a merge cannot combine, listed while the proposal is open and behind. | Details of a merge: - The body must name the `revision` the caller read, a positive 32-bit integer. `409` with the code `proposal_changed` and the newest `revision` says the author added a newer one. - `choices` takes at most 400 items, each with a `kind` of `panel`, `variable` or `setting`, the unit's `id` and a `take` of `ours` or `theirs`. - A merge that leaves a conflict without a choice answers `409` with the code `version_conflict` and the `conflicts` list; sending a choice for each succeeds. - It runs the same checks as any save, and the new version records the proposal it came from as `merged_proposal_id`. - When the result equals the latest version, nothing is saved, and the proposal closes as merged with no `merged_version`. - The agent's `merge_proposal` step reads "Merged proposal as version N", or "Merged proposal; it saved no new version because the dashboard already had everything kept", and adds which proposed changes were dropped because the dashboard's own was kept. ### Discard - The author and anyone who may merge can discard. - The `reason` is trimmed and at most 500 characters, and it must not contain the NUL character. A longer reason answers `400` with the code `invalid_request`. - The proposal then shows the reason as `close_reason`. - The reason is not copied into the activity log, which never carries free text. Read it from the proposal. - A proposal that is already merged or discarded answers `409` with the code `invalid_transition` and the actions that are allowed. ### What a close tells people - When someone other than the author merges or discards a proposal, an author who is a person gets a `proposal_closed` item in the [Inbox](/docs/use/inbox/), with the reason as its excerpt for a discard. A proposal opened with a service-account key notifies nobody. - Merging or discarding posts a comment in the proposal's discussion, written as the person or key that closed it. A merge posts "Merged as version N." or "Merged." when no version was saved. A discard posts "Discarded." and adds "Reason: ..." when there is one. - A failed post never undoes the close. ### States A proposal is `open`, `merged` or `discarded`. Its `allowed_actions` list what the caller may do now. `update` is a new save by the author, which has no route of its own. [States](/docs/reference/states/) lists the moves and who may make them. Each step is an entry in [Activity](/docs/use/activity/): `proposal.opened`, `proposal.updated`, `proposal.merged` and `proposal.discarded`. Deleting the dashboard deletes its proposals. ### Routes | Route | Does | | --- | --- | | `GET /api/v1/dashboards/{id}/proposals` | Lists the proposals of a dashboard. | | `GET /api/v1/proposals/{id}` | Returns one proposal with its document, changes and conflicts. | | `POST /api/v1/proposals/{id}/merge` | Merges it. | | `POST /api/v1/proposals/{id}/discard` | Discards it. | Details of the list: - It shows the open proposals unless `state` is `merged`, `discarded` or `all`. Any other `state` answers `400`. - `run_id` narrows it to the proposal that one agent request opened, however many the dashboard has. A run's status on the dashboard uses it, and shows plain "Proposal" until it knows the state. - `limit` is 1 to 100 and defaults to 50, and `cursor` continues from `next_cursor`. ### MCP tools - `update_dashboard` and `update_panels` save a proposal in the cases above and answer `proposed` with the `proposal_id`. - A save on an older version merges onto the latest one when it changed none of the panels, variables and settings that the newer versions changed. - `list_proposals`, `get_proposal`, `merge_proposal` and `discard_proposal` are the routes above as tools. # Scheduled jobs > How the server runs background jobs on a schedule, once across all servers, with a lease that a crashed server gives up on its own, and the list of every job with its interval. Source: https://slashobserve.com/docs/concepts/scheduler/ · Markdown: https://slashobserve.com/docs/concepts/scheduler/index.md The server runs recurring background work, such as deleting old activity events, as scheduled jobs. Each job has a name and an interval, and it runs once per interval across all the servers that share a database, never once per server. For example, `activity_prune` runs every hour. If you run three servers against one Postgres, one of them runs it at 10:00, one of them runs it at 11:00, and the others skip each run. You do not configure the schedule, and you do not start a second scheduler. You see jobs in two places. The `jobs` table of the database has one row per job, and [two metrics](#metrics) report runs. A failed run also leaves a `job.run` event in the audit trail. ## How a job runs Every server registers the same jobs when it starts. It then looks for due jobs at start and every 15 seconds after. 1. The server writes or updates one row per job in the `jobs` table. A job seen for the first time is due at once. When a newer server changes a job's interval, the row takes the new interval and keeps its next run time. 2. A server claims a due job with a lease. The claim is one database statement, so two servers looking at the same moment never both get the job. 3. The server runs the job in its own goroutine. A long job, such as the dashboard health check, never holds up a short one that is due at the same time. 4. When the job ends, the server records the outcome and releases the lease. The next run is due one interval after this run started. A job that runs every 5 minutes and starts at 10:00 is due again at 10:05, whether it succeeded or failed. A failing job is retried on its normal schedule. ## What happens when a server stops The lease lasts the job's interval, at most 10 minutes. When the lease ends, the job's context is cancelled, so a job must stop when its context is done. - A server that crashes mid-run leaves its lease behind. The first server that finds the job due after the lease ends takes it over. - A server that shuts down mid-run gives the lease back at once and records no outcome. Another server runs the job without waiting for the lease to end. - A job that ignores its context is not killed. Once its lease has ended another server may start the job again, and the late result of the first run is not recorded. ## Run the health check now An Admin can start the `dashboard_health` job from the dashboards list with **Run now**; see [Run now](/docs/use/dashboard-health/#run-a-check-now). The run takes the job's lease like a scheduled run and is recorded with a `trigger` of `manual`. No other job can be started by hand. When the job already holds a lease, the request records a `job.run` event with the outcome `denied` and the reason `already_running`. ## Reference ### Columns of a job row | Column | Holds | | --- | --- | | `name` | The job name, the primary key. | | `every_seconds` | The interval. | | `next_run_at` | When the job is next due. | | `leased_by`, `lease_until` | The server that holds the job and when its lease ends. | | `last_started_at`, `last_finished_at` | When the last run began and ended. | | `last_outcome` | `succeeded` or `failed`. | | `last_error` | A short description of a failure. | Details of `last_error`: - It holds `key=value` pairs: `error_type`, and when they apply `sqlstate`, `errno` and `panic_type`. - It never holds the error's own text, which can echo queries or credentials. - A job that panics records `error_type=scheduler.panicError` and `panic_type=<Go type of the panic value>`. ### The audit event of a run The transaction that writes the outcome also records one `job.run` audit event in two cases. It records one when a person started the run, whatever its outcome, and when the run failed, whoever started it. A scheduled run that succeeds records none, and neither does a job stopped by a shutdown. | Field | Value | | --- | --- | | Target | Kind `job`, with the job name as the id. | | Actor | The person who started a manual run, or the system for a scheduled failure. | | `trigger` | `schedule` or `manual`. | | `duration_ms` | How long the run took. | | Outcome | `success`, or `failed` with the reason `job_failed`, or `panic` when the job panicked. | ### Jobs | Job | Interval | What it does | | --- | --- | --- | | `scheduler_heartbeat` | 5 minutes | Does nothing. | | `dashboard_health` | 1 hour | Runs the [dashboard health check](/docs/use/dashboard-health/#the-health-check). | | `activity_prune` | 1 hour | Deletes old [activity](/docs/use/activity/#retention) events. | | `webhook_deliveries_prune` | 1 hour | Deletes [webhook](/docs/use/webhooks/#attempts) attempts older than 7 days. | | `oauth_prune` | 1 hour | Deletes expired OAuth data. | | `run_tokens_prune` | 1 hour | Deletes expired run tokens and stale agent worker records. | | `agent_requests_sweep` | 1 minute | Settles stuck agent requests. | | `audit_partitions` | 24 hours | Keeps the audit table's partitions. | | `audit_export` | 10 minutes | Posts audit events to a receiver, when configured. | Details of `scheduler_heartbeat`: - Every server registers it. - It keeps a row in the `jobs` table and a series in the metrics from the first start, so you can tell the scheduler runs before any other job exists. Details of `oauth_prune`: - It deletes expired OAuth codes, tokens and sign-in requests. - It deletes grants that expired or were revoked more than 30 days ago. - It deletes clients that registered over 24 hours ago and never signed in, which [MCP](/docs/use/mcp/) clients leave behind. Details of `run_tokens_prune`: - It deletes expired run tokens. - It deletes the records of agent workers whose grant or service account is gone. Details of `agent_requests_sweep`: - It fails agent requests that ran out of attempts, which is 2. - It ends requests whose run was canceled. - It expires requests that no agent claimed within 10 minutes. - It retries thread replies that did not post in the last 24 hours. - It deletes expired build records. Details of `audit_partitions`: - It keeps the audit table's daily partitions 14 days ahead and drops those older than `SLASHOBSERVE_AUDIT_RETENTION`; see [Configuration](/docs/reference/configuration/#audit). - Every server also runs it once at start. - For 7 days after the audit table's migration, it also records an audit event for each activity event an older server wrote without one; see [Upgrades and backups](/docs/operate/upgrades-and-backups/). Details of `audit_export`: - It exists only when `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` is set. - It keeps one server posting audit events to the receiver for the whole lease, and the next run starts as that one ends; see [Audit export](/docs/operate/audit-export/). ### Metrics | Series | Type | Labels | Meaning | | --- | --- | --- | --- | | `slashobserve_scheduler_jobs_total` | counter | `job`, `outcome` | Runs that ended. | | `slashobserve_scheduler_job_running` | gauge | `job` | 1 while this server runs the job. | The `outcome` is `succeeded`, `failed`, or `interrupted` for a run stopped by a shutdown. # Run in production > Put TLS in front of the server, set the public URL and trusted proxies, keep live streams open, check the health endpoints and run behind a connection pooler. Source: https://slashobserve.com/docs/operate/production/ · Markdown: https://slashobserve.com/docs/operate/production/index.md Use this page when you put SlashObserve behind a reverse proxy or load balancer for real users. It applies to every install; [Run on Kubernetes](/docs/operate/kubernetes/) covers the Helm chart, and [Observe SlashObserve](/docs/operate/observe-slashobserve/) covers the dashboard that watches the server. ## Put TLS in front The server speaks plain HTTP and has no TLS settings. Terminate TLS in a reverse proxy or load balancer, then tell the server the address people use. 1. Set `SLASHOBSERVE_PUBLIC_URL` to that address, scheme and host included, for example `https://observe.example.com`. 2. Register `https://observe.example.com/api/v1/auth/callback` with your identity provider. 3. Start the server and sign in through the proxy. The session cookie is now marked `Secure` and uses the `__Host-` prefix. Use an `http` address only for local development. With `http` the cookies are not marked `Secure`. Details of what the public URL controls: - It is the base of the OIDC redirect URI. - It is the one origin the MCP endpoint accepts in an `Origin` header. - It is the trusted origin for the cross-origin check on cookie-authenticated writes. ## Keep live streams open The server sends four Server-Sent Events streams. Do not buffer them or time them out in the proxy: - `GET /api/v1/dashboards/{id}/events` - `GET /api/v1/activity/stream` - `GET /api/v1/audit/stream` - `GET /api/v1/datasources/{uid}/tail` Every stream ends after 30 minutes, and browsers reconnect on their own. Past a stream limit the server answers `429` (per person) or `503` (per server process) with the code `too_many_streams`. Also set your proxy to: - Allow request bodies of at least 8 MiB, the size limit of a Grafana import and of an MCP request. - Keep `/metrics` off the public internet, because it needs no sign-in (see [Metrics](/docs/operate/metrics/)). - Send `X-Forwarded-For` or another forwarding header when it runs on the same host as the server, so the server can tell its traffic from the built-in agent's; see [The agent process](/docs/concepts/agent/#the-agent-process). ## Record the real client address Set `SLASHOBSERVE_TRUSTED_PROXIES` to the addresses or CIDR ranges your proxy connects from. The audit trail then records the person's address and not the proxy's. ```sh SLASHOBSERVE_TRUSTED_PROXIES=10.0.4.0/28,10.0.9.12 ``` Unset, which is the default, the client address is the address the connection came from, and the server ignores `X-Forwarded-For`. Set, the server reads `X-Forwarded-For` only on a connection from a listed address. It takes the rightmost address in the header that is not itself listed, so a client cannot choose its own address by sending the header. Follow these rules: - List every proxy that appends to the header, such as a CDN and the load balancer behind it. An address you leave out is taken for the client. - List the narrowest range your proxy or Ingress controller connects from, never the whole pod network. A client inside a listed range can send any address it likes. - Do not list a range with no network bits, such as `0.0.0.0/0` or `::/0`. The server refuses it at startup. - Expect a load balancer that writes `ip:port` into `X-Forwarded-For`, as some cloud ones do, to record the proxy's own address. The server does not accept an entry with a port. The check that keeps the built-in agent's token off forwarded requests still uses the connection's own address. It refuses the token on any request that carries a forwarding header. ## Serve the app over HTTP/2 Serve the proxy over HTTP/2. The server itself speaks HTTP/1.1, which lets a browser fetch about six files at once. The first visit loads the app's script files, about 35 on the entry page and 270 KB gzipped, and over HTTP/2 they load in one wave. Two proxy settings matter: - A proxy that recompresses responses must pass `Content-Encoding: br` through and key its cache on `Accept-Encoding`, which the server lists in `Vary`. - A proxy can cache files under `/assets/` for a year, because they carry a content hash in their name and `Cache-Control: immutable`. Details of compression: - Files under `/assets/` ship brotli-compressed at build time, and the server sends that copy to a browser that accepts `br`. - The largest file, the shared vendor chunk, is about 19 percent smaller than its gzip copy (200 KB against 246 KB). - Every other response is compressed with gzip. ## Check that the server is healthy Point your load balancer or orchestrator at these endpoints. | Endpoint | Meaning | | --- | --- | | `GET /healthz` | Liveness. It checks nothing else, so use it to decide whether to restart. | | `GET /readyz` | Readiness. It returns 200 when Postgres answers and no migration is pending, and 503 otherwise. | The `/readyz` body names each check: ```json {"status":"ok","checks":{"database":"ok","migrations":"ok"}} ``` A failing check shows `error` in the body and logs `readiness_check_failed`. Datasources never affect `/readyz`; an unreachable Prometheus shows up as a datasource health problem, not as a server that is down. The image's Docker health check runs `slashobserve-server healthcheck`. It requests `/readyz` on the listen address and exits 1 unless it answers 200. ## Behind a connection pooler A transaction-mode pooler such as PgBouncer breaks the two things that need one Postgres session for a long time. They are `LISTEN`, which carries live dashboard updates and wakes the agent workers, and the lock that makes concurrent migrations safe. To keep them working: 1. Point `SLASHOBSERVE_DATABASE_URL` at the pooler. 2. Point `SLASHOBSERVE_DATABASE_DIRECT_URL` straight at Postgres, at the same database. 3. On PgBouncer 1.21 or newer, set `max_prepared_statements` above `0` so the server's prepared statements work in transaction mode. On an older PgBouncer, add `default_query_exec_mode=exec` to `SLASHOBSERVE_DATABASE_URL`. Live updates and migrations with their lock use the direct URL, and every other query uses the pooled one. Without the direct URL behind a transaction pooler, live updates and the migration lock do not work. Each server keeps 3 connections open on the direct URL for `LISTEN`, and one more while it migrates, so count 4 per server in Postgres' `max_connections`. For several servers, see [Run more than one server](/docs/operate/scaling/). ## Reference ### Direct URL errors If the direct URL fails, the server stops at startup and logs one of these codes. | Code | Cause | | --- | --- | | `database_direct_url_mismatch` | The direct URL reaches another database than the pooled one. | | `invalid_database_direct_url` | The direct URL is not a valid PostgreSQL connection string. | | `database_unavailable` | The direct URL does not connect; the log has `connection` set to `direct`. | ### Stream limits | Stream | Per person | Per server process | Ping | | --- | --- | --- | --- | | Dashboard events | 20 | 1000 | 15 seconds | | Activity stream | 5 | 500 | 15 seconds | | Audit stream | 5 | 20 | 5 seconds | | Log tail | 5 | 200 | 15 seconds | The dashboard events stream also tells the page within 5 seconds when the person's own role changes. It ends at the first ping after its session or key stops being valid, or after the person can no longer see the dashboard. ### The image The image carries `observe-agent` at `/usr/local/bin/observe-agent` beside `slashobserve-server`. The server starts `observe-agent` whenever a model provider is configured. The base is `distroless/base-nossl`, which has glibc for the `observe-agent` binary and still runs as the non-root user `nonroot`. # Upgrades and backups > Back up Postgres, upgrade the server and return to an older version. Source: https://slashobserve.com/docs/operate/upgrades-and-backups/ · Markdown: https://slashobserve.com/docs/operate/upgrades-and-backups/index.md This page shows how to back up Postgres, move to a newer version, and go back when you must. SlashObserve is under active development, and releases before 1.0 can include breaking changes. Before you upgrade, read the [changelog](https://github.com/slashobserve/slashobserve/blob/main/CHANGELOG.md) for each release between your version and the new one. A release that has breaking changes lists them under "Breaking changes". ## Back up Postgres Postgres is the only state. It holds everything people make in the app: dashboards, observations, comments, folders, people, teams and invites, webhooks, the datasources added in the app and the activity log. 1. Take a dump before every upgrade, and on a schedule: ```sh pg_dump --format=custom --file slashobserve.dump --dbname "<the SLASHOBSERVE_DATABASE_URL value>" ``` If your connection string carries pgx-only parameters such as `pool_max_conns`, remove them first, because `pg_dump` does not understand them. 2. Keep `SLASHOBSERVE_SECRET_KEY` with the dump. The credentials of datasources added in the app, the Grafana connection tokens and the webhook signing secrets are in the dump encrypted with it. They cannot be read after a restore without the same key. 3. Keep the rest of the configuration in your own secret and config management. That is the datasources file, the OIDC settings and the LLM key. 4. Protect the dump like the database itself, because it contains session and key hashes and your dashboards. To restore, create an empty database and run `pg_restore --dbname "<database URL>" slashobserve.dump`. For the [demo](/docs/operate/demo/), which runs Postgres in Compose: ```sh docker exec slashobserve-astronomy-postgres-1 pg_dump -U slashobserve slashobserve > slashobserve.sql ``` ## Upgrade 1. Take a backup. 2. Find your current version in the table under [Migrations](#migrations), and read the sections it names. They say what a migration changes, what to stop first, and what you lose if you go back. 3. Pull the new image tag (or build your own image) and replace the container. On Kubernetes, see [Upgrade and roll back](/docs/operate/kubernetes/#upgrade-and-roll-back). 4. Watch the log. The server applies pending migrations at startup, each logged as `applied migration` with its version. 5. Wait for `/readyz` to return 200, which it does once the migrations are done. Migrations run under a Postgres lock, so starting several servers at once is safe: one migrates and the others wait. A migration that an older server cannot live with says so in its section below, and then you stop every old server first. [Run more than one server](/docs/operate/scaling/) covers a rolling upgrade. ## Go back to an older version The server runs migrations forward only, and never runs a migration's down section. To go back, restore the backup you took before upgrading rather than running the older image against a migrated database. The migration sections below also give the `goose down-to <version>` command that undoes a migration by hand, and what its down section deletes. Run it with the goose command line tool, against the database, from a checkout of the release that applied the migrations. Pass `-dir internal/db/migrations` and the database URL. The table of applied versions is `goose_db_version`. Going backward is the one jump that is not supported. ## Reference ### Migrations With `SLASHOBSERVE_DATABASE_DIRECT_URL` set, migrations and their lock run on that connection. Before 1.0, a release never edits a migration that an earlier release shipped, and the server applies every pending migration in order. So you can upgrade from any 0.x release directly to a later one without stopping at the releases between them. The [changelog](https://github.com/slashobserve/slashobserve/blob/main/CHANGELOG.md) names a release whose migration rewrites existing data. Pick the section for the version you run now: | You run | Read | | --- | --- | | 0.1.4 | [Upgrading from 0.1.4](#upgrading-from-014) | | 0.1.3 | [Upgrading from 0.1.3](#upgrading-from-013), then the section above it | | 0.1.2 | [Upgrading from 0.1.2](#upgrading-from-012), then the sections above it | | 0.1.1 or earlier | [Upgrading from 0.1.1 or earlier](#upgrading-from-011-or-earlier), the migration notes after it, and the sections above it | | An early release | [Upgrading from an early release](#upgrading-from-an-early-release), then the sections above it | | A release before roles and folders | [Upgrading from a release before roles and folders](#upgrading-from-a-release-before-roles-and-folders), then the sections above it | ### Upgrading from 0.1.4 Migration 91 is new. It adds a nullable `as_of` column to agent requests and to findings. The column holds the past time an Admin ran an investigation as of, and is null for a run on the live clock. An older server ignores the new columns, so servers of both versions can run together. To go back, run `goose down-to 90` against the database before starting an older binary. The down section drops both columns, so every recorded `as_of` is lost. ### Upgrading from 0.1.3 Migrations 74 to 90 are new, and there are no migrations 76 to 78. They add the audit trail and its export position, the audience of a datasource, Only Admins folders, anchors and agent columns on threads, chats, the record of starter dashboards, observation block heights, run intent, read restrictions on runs and a delete trigger for dashboards. Migration 91 came with 0.1.5, so read [Upgrading from 0.1.4](#upgrading-from-014) as well. Take the backup first. Migration 74 copies every activity event into the new audit table, keeping only the data keys each audit action allows. It puts events from the 24 months before the migration into one partition per UTC month and older events into one per UTC year. It leaves out an activity event dated after the migration, which it counts in a notice. Retention drops a partition only once its end is older than `SLASHOBSERVE_AUDIT_RETENTION`, so backfilled history older than two years is kept until the end of its year. During a rolling upgrade, servers still on the older version keep writing activity events without an audit event. So for 7 days after the migration the `audit_partitions` job, and every server at start, records an audit event for each activity event that has none. Migrations 81, 82, 84 and 87 run outside a transaction, add each check constraint and foreign key as `NOT VALID` and validate it afterwards, and build their indexes concurrently. None of them holds a write lock for its whole run. Migration 82 backfills chats for earlier requests and migration 87 sets the intent and kind of every run, both in batches of 1000 rows. Migrations 82 and 87 also add triggers that fill the chat, the intent and the kind of a request that an older server writes while it is still running. The server records an audit event for every sign-in, change, refusal, tool call and query, and keeps them for `SLASHOBSERVE_AUDIT_RETENTION`, one year by default. So the database grows with its use. Before the first start: - Set `SLASHOBSERVE_AUDIT_RETENTION` to the history you want. - Read [Audit trail](/docs/operate/audit/). - Set `SLASHOBSERVE_TRUSTED_PROXIES` when a load balancer or ingress controller sits in front of the server, so the recorded client address is the caller's and not the balancer's. [Configuration](/docs/reference/configuration/) lists both settings and `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT`, which copies the trail to a log pipeline and sends nothing while it is unset. On `SIGTERM` the server now also ends the requests that are still open after 10 seconds; see [Shutdown and leases](#shutdown-and-leases). To go back, run `goose down-to 73` against the database before starting an older binary. From 0.1.5 that also runs the down section of migration 91. The down sections undo the new tables and columns, and some also delete data the older schema cannot hold: - Migration 74 drops the audit table with every audit event in it, its detached partitions included, and migration 85 drops the export position. - Migration 87 puts each run's `source` back from its intent and deletes the investigation requests that continue another. - Migration 82 drops the chats table, which holds each chat's title, pin and archive mark. - Migration 81 drops the anchors and agent columns of threads and deletes the threads of observations that have an anchor or a block. - Migration 79 drops the Only Admins mark of folders, so such a folder, which has no access list, reads as open again. - Migration 75 drops the audience of datasources, so every datasource can be queried by everyone again. - Migration 84 drops block heights and sets a block of a third or two thirds width to half width. - Migration 88 drops the read restriction marks of runs and the flags on copied answers. ### Upgrading from 0.1.2 Migrations 49 to 73 are new, and there is no migration 66. They add tables and columns for chats, inbox item states, webhook formats, per-person thread read marks, dashboard viewers and view days, home dashboards, datasources added in the app, people invites and deactivation, teams, chat-only findings, observation pins, run time zones and access requests. Take the backup first. Migrations 74 to 90 came with 0.1.4 and 91 with 0.1.5, so read [Upgrading from 0.1.3](#upgrading-from-013) and [Upgrading from 0.1.4](#upgrading-from-014) as well. Migrations 59, 62 and 73 replace a check constraint on the activity log, which scans the whole log under a lock that blocks reads and writes. Migrations 50 and 73 rebuild `activity_inbox_idx` with a plain `CREATE INDEX`, which blocks writes to the log, and so every change that records activity, until it finishes. Like migration 43, the cost grows with the log, so when it holds millions of events, upgrade when little is changing. Migration 63 records the earliest person to have signed in as the first user, the person the first-user rule of [Roles](/docs/teams/roles/) names. Migration 71 sets a reply time on every finished request that was started from a thread message, in one `UPDATE`. To go back, run `goose down-to 48` against the database before starting an older binary. That also runs the down sections of migrations 74 to 91 listed above. The down sections undo the new tables and columns, and some also delete data the older schema cannot hold: - Migration 73 drops access requests and deletes their activity events, and migration 70 drops each request's time zone. - Migration 65 deletes every finding that no observation holds, which is a chat answer nobody saved. - Migration 64 drops teams and their members, so folder entries that named a team match no one. - Migration 63 drops invites and the deactivation marks, so a person an Admin deactivated can sign in again. - Migration 62 drops the datasources added in the app, with their stored credentials, and deletes their activity events. Dashboards that use them then have no datasource to read from. - Migration 59 deletes the activity events of admin changes, which is the Audit log. - Migration 58 deletes saved metrics searches. - Migration 52 drops each webhook's format, so Slack and Teams webhooks send the generic payload again, and deletes the deliveries skipped by an Admin. - Migrations 50 and 72 drop the inbox's per-item read and done marks, 53 drops the thread read marks and the dashboard viewers, and 60, 61 and 68 drop dashboard view days, home dashboards and observation pins and dashboard links. - Migrations 49, 51, 54, 55, 57, 67, 69 and 71 only drop the columns they added, such as the chat a request belongs to (49), the link from a retry to its request (54), the reason a proposal was discarded (55) and the label of a public link (57). Migration 56 drops the hourly count of query drafts. ### Upgrading from 0.1.1 or earlier Release 0.1.2 ships `observe-agent` in the image, on `distroless/base-nossl`. The image is about 44 MB larger to pull (19 MB to 63 MB compressed on arm64). The compose stack raised the server memory limit from 256M to 512M for the same reason. The built-in agent runs as the `observe-agent` sidecar, a separate process the server starts, instead of inside the server process. Memory per server grows by about 50 MiB, the idle size of the `observe-agent` child. Run sessions of connected agents get the built-in agent's guards. The server does not start with a model provider in two cases: - `observe-agent` is missing from `PATH`. - `SLASHOBSERVE_HTTP_ADDR` names a host other than a loopback address or all addresses. It also adds migrations 26 to 48, and the notes below on migrations 35, 36, 37, 41 and 43 apply to that jump. ### Migration 35, run states Migration 35 adds a `state` column to agent requests and checks it against `status`. A server older than this release fails its queue writes against it, so stop every old server, or at least its agent workers, before the first new server starts. To go back, run `goose down-to 34` against the database before starting an older binary. ### Migration 36, persisted Grafana imports Migration 36 moves Grafana imports into the database and copies each connection's last import into it. An import that an older server runs during the upgrade stays on that server and is not shown by the new ones, so finish or avoid imports while servers of both versions run. To go back, run `goose down-to 35` before starting an older binary. It writes each connection's newest finished import back to the connection. ### Migration 37, outside agents taking runs Migration 37 adds the assignment columns on runs, `run_tokens`, `agent_workers`, `oauth_grants.mode` and `service_accounts.takes_runs`. A server older than this release claims runs without looking at who they are assigned to, so stop the old servers before any run is assigned to an outside agent. To go back, check that no run is assigned to an outside agent, then run `goose down-to 36` against the database before starting an older binary. ### Migration 41, findings become observations Migration 41 gives every finding an observation and makes `findings.observation_id` required. A finding that an investigation saved keeps the observation of its run. Every other finding becomes a resolved observation with the finding's id. It is filed in the folder the finding was in, else its dashboard's folder, else the saver's My Dashboards, else General. The finding's text becomes a text block, and each evidence panel becomes a panel block. The comment threads of a finding are merged into one discussion on its observation, which is reopened when any of them was open. The activity of a finding moves to its observation and that observation's folder. Take the backup first. Stop every old server before the first new one starts, because an older server saves findings without an observation and opens threads on a finding, which the new schema refuses. To go back, run `goose down-to 40` against the database before starting an older binary. The down section has costs: - Threads that were merged stay merged, and are not split into their original threads again. - The observations that were made from findings are deleted with everything on them, so edits, blocks and resolves made on them since the upgrade are lost. The observation of a run is kept. - A finding with no dashboard comes back filed in the folder of its observation, so a finding that a service account saved with no folder comes back filed in General. ### Migration 43, the inbox Migration 43 adds `inbox_cursors`, one read position per person, the `inbox_reason` SQL function and the partial index `activity_inbox_idx` on the activity log. The index is built with a plain `CREATE INDEX`, which blocks writes to the activity log, and so every change that records activity, until it finishes. At the default 180 day retention the build is short, but a log that holds millions of events can take a minute or more, so upgrade when little is changing. An older server ignores the new objects, so servers of both versions can run together. To go back, run `goose down-to 42` against the database before starting an older binary. Everyone's read position is lost, and the next inbox shows the last 30 days as unread. ### Upgrading from an early release Upgrading from an early release changes the dashboard format. Migration 10 rewrites every stored dashboard version from the earlier ObserveSpec v0 shape to evolved v0, in one transaction at startup. Take the backup first, because this migration cannot be reverted and an older image cannot read the rewritten versions. The server refuses to start if a stored version cannot be upgraded to a valid Spec, for example one that grows past the size limit. The log shows `migration_failed` with `migration_version` 10, the `dashboard_id` and the `dashboard_version` that failed, and never the title or any Spec content. The database is left unchanged, and you either restore the backup or fix that version. ### Upgrading from a release before roles and folders Upgrading from a release before roles and folders also changes access. The migrations put every existing dashboard in the General folder and make every existing person and service account an Editor. The first start then applies the rules in [Roles](/docs/teams/roles/). Set `SLASHOBSERVE_ADMIN_EMAILS` before that first start; otherwise the earliest person who signed in becomes the Admin. ### Shutdown and leases On `SIGTERM` the server stops accepting requests, gives running requests 15 seconds, and hands a running agent request back to the queue without using up an attempt. After 10 seconds it ends the requests still open, such as live tails, event streams and `/mcp` streams. Each one records its audit event before the server writes its last buffered audit events and exits. A worker holds a 60-second lease on its request and renews it every 5 seconds while the run is in flight. A crash instead leaves the lease to expire, so the next process picks the request up within a minute. # Security model > What SlashObserve protects, which settings an operator should choose for a safe deployment, and the limits and checks the server applies to sign-in, dashboards, datasources, the agent, outbound requests, keys and connected agents. Source: https://slashobserve.com/docs/operate/security-model/ · Markdown: https://slashobserve.com/docs/operate/security-model/index.md This page describes what the server protects and what you decide as the person who runs it. Each section lists the guarantees the server keeps, so you can tell what you still have to configure. ## Harden a new deployment Work through these settings before you give people access. 1. Put TLS in front and set `SLASHOBSERVE_PUBLIC_URL` to the address people use; see [Run in production](/docs/operate/production/#put-tls-in-front). 2. Set `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` to your own domains, so only they can sign in; `*` allows every account, so do not use it on a shared provider; see [Sign-in with OIDC](/docs/connect/oidc/). New people are Editors by default, so allow in only people you would trust to create and change dashboards. 3. Set `SLASHOBSERVE_ADMIN_EMAILS` for the first Admins; see [Roles](/docs/teams/roles/#how-a-role-is-decided). 4. Set `SLASHOBSERVE_SECRET_KEY` before anyone adds a datasource in the app, and keep it with your database backups. 5. Keep `/metrics` on an internal network, or set `SLASHOBSERVE_METRICS=false`; see [Metrics](/docs/operate/metrics/). 6. Leave the outbound allowlist empty until a dashboard needs a domain, or fix it with `SLASHOBSERVE_OUTBOUND_DOMAINS`; see [Outbound access](/docs/operate/outbound-access/). 7. Give each tool its own service account with an expiry; see [Service-account keys](/docs/operate/service-account-keys/). 8. Set `SLASHOBSERVE_TRUSTED_PROXIES` to the narrowest range your proxy connects from, so the [audit trail](/docs/operate/audit/) records the real client address. ## Sign-in and roles - **Sign-in.** Only accounts from your OIDC provider, and only in the allowed email domains, get a session. The server stores sessions and keys only as SHA-256 hashes, and they are random tokens. - **Cookies.** Session cookies are `HttpOnly` and `SameSite=Lax`. The server refuses a cross-origin write made with a cookie. `SLASHOBSERVE_PUBLIC_URL` is the trusted origin. - **Roles.** Every person and service account has an instance role (see [Roles](/docs/teams/roles/)), and the server checks it on every API route. - **What only Admins can do.** An Admin can see everyone who has signed in, invite people, sign them out, deactivate or remove them, and manage service accounts and keys. An Admin can also open the Datasources page, manage Grafana connections and webhooks, read the Audit log, and change the outbound allowlist (unless `SLASHOBSERVE_OUTBOUND_DOMAINS` locks it). The activity log records what an Admin changes about people, keys, integrations and access, without any secret; see [Activity](/docs/use/activity/#admin-changes). - **What every person can do.** Every person, Viewers included, can ask the agent for dashboards in their My Dashboards. That spends model tokens and lets the agent query every configured datasource for them. - **An admin email needs a verified address.** An address in `SLASHOBSERVE_ADMIN_EMAILS` makes a person an Admin only when the provider reports it as verified. A provider that lets people set an unverified address cannot be used to claim an Admin's address. ## Dashboard access - **Folders hide dashboards.** A restricted folder (see [Folders and access](/docs/teams/folders/)) is hidden from everyone who is not on its list, did not create it and is not an Admin. It is hidden in lists, search, tags, datasource dashboard counts, panel data, comments, events, import records and the agent. The server filters lists by the folders the caller can see, so a failed lookup shows nothing rather than everything. It re-checks access on each request, including at every ping of an event stream. - **Keys and folders.** A key matches no folder entry, so only an Admin key reaches a restricted folder. A My Dashboards folder is hidden from everyone but its owner, Admins included. - **Share links need sign-in.** The Share pane copies a dashboard or panel address with the time range and variable values, and grants nothing. Someone without access to the folder sees "Dashboard not found" after they sign in, the same page as for an id that does not exist. - **Public links open one dashboard without sign-in.** Someone who manages a dashboard's folder can create a [public link](/docs/use/public-links/), the one way to show data to people with no session. The next list says what the server limits on that link. What the server limits on a public link: - The token is 32 random bytes, shown once and stored only as a SHA-256 hash with a 12 character prefix. Request logs replace it with `:token`. - The routes under `/api/v1/public/` take no query text. They return the latest version's Spec with every query's text, the dashboard's tags and its links left out. - They run only that dashboard's saved queries, under the proxy's limits, with 8 requests in flight per link. - A free link accepts a variable value only when it is one of the options the server lists for it. - Links are refused for dashboards in My Dashboards and for dashboards whose queries read the viewer's identity. - Revoking deletes the link at once, and the server answers every public route with `Cache-Control: no-store`. - A public link cannot be embedded in another site, because framing stays refused. ## Datasource credentials and queries ### Credentials stay on the server Datasource credentials never reach the browser. - The datasources list returns health only, with no address, user or secret. - Only an Admin can read a datasource's address and login. - No route returns a stored credential. The server seals passwords, tokens, API keys and header values with `SLASHOBSERVE_SECRET_KEY` and writes them, never reads them back. - An address given in the app passes the outbound allowlist and address checks. Only an Admin can add, change or remove a datasource; see [Add datasources in the app](/docs/connect/datasources-in-the-app/). - A query error shows the datasource's own error text, truncated and never naming an address, so people can fix a query from it. That holds for datasources in the file and in the app, so point a datasource only at a store whose error text everyone who can run a query on it may read. The browser gets panel data from the server's query proxy. The proxy runs only the queries stored in a saved dashboard, and it rejects any query text sent to it with `403 query_not_in_spec`. ### The three exceptions to saved queries - **The draft preview.** A signed-in user who can comment on the dashboard can run an unsaved panel's queries before saving, under the same limits as the agent's tools. Service-account keys cannot. The observation panel editor's draft preview (`POST /api/v1/observations/{id}/blocks/preview`) does the same for a signed-in user who can edit or comment on the observation. A datasource only Admins may query answers there only in an Admins-only folder. - **The build data routes.** `/api/v1/observe/{id}/build/panels/{panel_id}/data` and `/api/v1/observe/{id}/build/variables/{name}/values` run the queries of the dashboard an agent request is still assembling, which is not a saved version yet. Only the signed-in user who made the request, and a signed-in Admin, can call them, and for a revision only while the caller can still view the dashboard. Anyone else gets 404, and a service-account key gets `403 user_session_required`. They load the stored build on the server, run under the same limits as the agent's tools, and never cache or share results. - **The explore query.** `POST /api/v1/datasources/{uid}/query`, behind the logs page and trace view, runs a query the caller writes against one datasource. It works for any signed-in role from Viewer and for service-account keys, under the same limits, and never caches or shares results. People who can see a dashboard see how far its revision has come, never the build's panels. The revisions list (`GET /api/v1/dashboards/{id}/revisions`) is visible to every viewer of the dashboard. It carries a stopped build's progress counts, besides the continue note a person gave. The build's title is shown only to the person who asked, and is null for everyone else. ### Every query is bounded Whatever a prompt or a client asks for, each query has a timeout and limits on series, points and rows, applied on the server. The server queries ClickHouse only as a read-only user. ## The agent and its builds - **Only the requester saves a stopped build.** When an agent run fails, the server keeps its build for 7 days. The person or key that made the request can save it as one version with `POST /api/v1/observe/{id}/build/save`. Its role must be Editor or higher, and it must be able to edit the dashboard (or create dashboards, for a new one). Nobody else can, and the route answers them 404. No query runs when it is saved, because the agent checked each step as it made it. - **Admins can read every chat, and only read it.** `GET /api/v1/observe?scope=all` lists everyone's requests for an Admin and answers anyone else 403. `GET /api/v1/observe/{id}` lets an Admin open any request with `read_only: true` and no allowed actions. `GET /api/v1/observe/{id}/build` and the build data routes let an Admin read another person's build the same way. Cancel, continue, retry, rename, pin, archive and build save stay with the requester. An investigation's finding in someone's personal folder stays hidden, as does a build on a dashboard in someone's personal folder. - **Only the requester cancels or continues a request.** `POST /api/v1/observe/{id}/cancel` and `POST /api/v1/observe/{id}/continue` answer anyone else 403, or 404 for a new-dashboard request they cannot see. No role or folder level overrides that. Continue also needs the access that starting a run needs, and it answers 409 when someone saved a newer version of the dashboard after the build started. A run that does not end holds back other editors' revisions on its dashboard until its limits, its requester or a run time limit end it. - **The built-in agent's token only works beside the server.** The agent process claims runs with a token that is new at each start. The server accepts it only from a loopback peer on a request with no forwarding header, and it lists only the four claim tools; see [The agent process](/docs/concepts/agent/#the-agent-process). - **Draft questions are capped.** Each person or key may start 60 draft queries per clock hour, a count every server shares, on top of the limits on concurrent drafts. A refused one answers `429 too_many_requests` and calls no model. - **The agent can only save dashboards.** Its only product is a dashboard definition that the server validates, and no code or markup written by the model is rendered. The server refuses a save from the agent or an MCP client when it writes HTML in a text panel (`html_not_allowed`) or adds or changes a canvas or field action (`action_not_allowed`), so only people and imports can create them. Through MCP, a key can also list datasources, run bounded queries and sample rows, and create and update dashboards. ## Outbound requests and the browser - **Outbound requests are allowlisted.** The server fetches content from other sites only for domains on the allowlist, which starts empty. It uses only `https` to public addresses, and refuses private, loopback and metadata addresses even when a name resolves to one. This covers news feeds, images, map tiles, GeoJSON files and actions. The server checks redirects hop by hop, and sends no cookies or credentials. A canvas or field action also needs Edit on the dashboard and a confirmation in the browser, and the server never follows a redirect for it. See [Outbound access](/docs/operate/outbound-access/). - **Two exceptions to public addresses.** A Grafana connection an Admin configures may use `http` and a private address, because the Grafana being migrated usually runs inside the same network. A datasource an Admin adds in the app may use `http` and a private address, and an IP address or a single-label host while the allowlist is unlocked, because the stores it queries usually run inside the same network. - **Datasource addresses are re-checked.** The server checks the allowlist for these datasources every 10 seconds and at start. A datasource whose domain is removed, or whose IP address is no longer allowed once `SLASHOBSERVE_OUTBOUND_DOMAINS` locks the list, turns Unavailable. The server never connects to a link-local, cloud metadata or unspecified address, even when a name resolves to one. - **Webhooks are an Admin's decision.** Only an Admin, or a key with the Admin role, can send workspace activity to an outside address, and no agent or MCP tool can. A webhook sends only what its owner could read when it sends. It signs each request with an HMAC and a timestamp, and keeps its secret sealed with `SLASHOBSERVE_SECRET_KEY`. It goes through the same outbound rules, so it cannot reach a private address or an unlisted domain. See [Webhooks](/docs/use/webhooks/). - **The browser loads nothing from other sites.** Every response carries a strict `Content-Security-Policy`. Scripts, stylesheets, images, fonts and connections come only from the server's own origin. Images may also be `data:` or `blob:` URLs, and inline styles are allowed. Plugins, frames, media and `<base>` are refused. So even if a sanitizer were ever bypassed, injected script could not run or send data to another site. Images and GeoJSON from other sites reach the browser only through the server, which fetches them from allowlisted domains; see [Outbound access](/docs/operate/outbound-access/#images-and-geojson). - **Links are limited to safe schemes.** A link in a dashboard, panel, override or canvas element whose address starts with a scheme other than `http`, `https` or `mailto` is refused when the Spec is saved (`unsafe_link`). That holds over the API, the CLI and MCP alike, and the browser drops such a link from a stored Spec as well. - **HTML in text panels is sanitized.** HTML written by a person or imported from Grafana passes through one allowlist in the browser before it is drawn. The sanitizer removes scripts, styles, forms, embedded frames and event handler attributes. It removes links and images with any scheme but http, https and (for links) mailto. It also removes inline style declarations that load a resource or read a variable. Every image loads through the server, so the policy above still decides what the browser fetches. - **Framing is refused.** Responses carry `X-Frame-Options: DENY` and `frame-ancestors 'none'` in the policy. - **Other headers.** Responses also carry `X-Content-Type-Options: nosniff` and `Referrer-Policy: strict-origin-when-cross-origin`. - **`/metrics` needs no sign-in.** The series hold route templates, codes and model names and no ids, user names or query text. Anyone who can reach the route can read them, so keep it on an internal network or block it at the proxy, or set `SLASHOBSERVE_METRICS=false`; see [Metrics](/docs/operate/metrics/). ## Keys - **Keep keys short-lived.** Prefer an expiry and one service account per tool or person. Revoke on the API keys page when a laptop or pipeline is retired. - **Keys from a file are the operator's.** `SLASHOBSERVE_SERVICE_ACCOUNTS_FILE` lets the server create service accounts and their keys at boot from files on its own disk; see [Service-account keys](/docs/operate/service-account-keys/#declare-service-accounts-in-a-file). Anyone who can write those files or the server's environment can mint a key with the listed role, so protect them like the database URL. - **The file stays the one place that decides.** The server stores only the key's hash and never logs it. It never takes over an account that was created in the web app, and it refuses role changes and revocation of a file key through the API. ## Connected agents (OAuth) People connect their own MCP clients, such as Claude Code, VS Code and Cursor, to `<public url>/mcp`. Each client then acts as the person who approved it. - **SlashObserve is its own authorization server.** It uses the person's web session, which the identity provider created, for the approval page, and issues its own tokens. It never hands the identity provider's tokens to a client. - **Clients register themselves.** Dynamic client registration is open, and a registered redirect URI must be `https` or `http` on `localhost`, `127.0.0.1` or `[::1]`, with no fragment. A redirect must match a registered one exactly, except that a loopback address may use any port. An unknown client or an unregistered redirect never receives a redirect. - **PKCE with S256 is required.** Codes last 60 seconds and work once, and a code used twice disconnects the connection it produced. Clients are public, so no client secret exists. - **Codes and tokens are stored only as SHA-256 hashes.** The server never logs a code, a token, the `state`, a redirect URI or a client name. - **Access tokens last 1 hour and refresh tokens 30 days, replaced on every use.** Using an already replaced refresh token more than 10 seconds later disconnects the connection. Inside 10 seconds it only fails, so a client with two processes does not lose its connection. A connection ends at 90 days whatever its use, and the person then approves again, which passes through the identity provider's sign-in. - **`/mcp` takes only a bearer token.** A service-account key or an OAuth access token works there, and a session cookie is ignored. A request with an `Origin` header other than `SLASHOBSERVE_PUBLIC_URL` is refused with `403 forbidden_origin`. - **Tokens are bound to `<public url>/mcp` and accepted nowhere else.** Changing `SLASHOBSERVE_PUBLIC_URL` therefore disconnects every connected agent. - **A connected agent has exactly the person's role and folder access, read again on every request.** Deleting a person disconnects their agents. - **The client's name is a self-chosen label.** The server freezes it when the client registers, shows it on the approval page with the host the browser returns to, and never uses it in an access decision. A client can claim any name, and can only mislabel writes made as the person who approved it. - **Abuse limits.** Registration, authorization, token and revocation requests are rate limited. The database caps unused clients at 1000, pending approvals at 10000 and connected agents per person at 20. The registration, authorization, token and revocation rate limits are totals divided among the live servers; the per-client token limit is per server. ### Cut someone off To cut someone off: 1. Remove them at the identity provider. 2. Deactivate them on the People page; see [People](/docs/teams/people/). This ends their sessions, disconnects their agents and refuses their next sign-in. **Sign out everywhere** only ends sessions and connections, a connection approved but not yet completed included, and the person can sign in again. # Audit export > Send every audit event to an OpenTelemetry collector or any OTLP/HTTP logs receiver, in order and at least once, with the settings, the record layout and the metric to watch. Source: https://slashobserve.com/docs/operate/audit-export/ · Markdown: https://slashobserve.com/docs/operate/audit-export/index.md The audit trail can be copied as it grows to a log pipeline you already run. Set `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` and the server posts each audit event as an OTLP log record, so a collector, a SIEM or a log store can keep a copy of the trail. Nothing is sent while the setting is unset. ## Send the audit trail to a collector 1. Point the server at an OTLP/HTTP receiver: ```sh SLASHOBSERVE_AUDIT_OTLP_ENDPOINT=http://collector:4318 ``` The server posts to this URL followed by `/v1/logs`. 2. If the receiver needs a token, write the headers to a file, one `Name: value` per line, and point the server at it: ```text Authorization: Bearer <token> ``` ```sh SLASHOBSERVE_AUDIT_OTLP_HEADERS_FILE=/run/secrets/audit-otlp-headers ``` Keep the file out of the image and mount it as a secret. 3. Restart the server. A bad value stops it at start with the name of the setting. 4. Watch `slashobserve_audit_export_lag_seconds` fall to near 0, as [Watch the export](#watch-the-export) describes. The first export starts at the oldest event the audit table still holds, so a new setting sends the existing history before the new events. The server never logs the endpoint, the header values or the text of a receiver's answers. ## Watch the export `slashobserve_audit_export_lag_seconds` is the time between the newest audit event in the database and the last event the export sent. Alert on it staying high for several minutes. Before the first event is exported, it is the span of the events the audit table holds. It stays above 0 in these cases: - The receiver refuses events. - No server runs the `audit_export` job. - A long-running transaction in the database hides newer events from the export until it ends. Every server that has the export set reads the lag from the database every 15 seconds, whether or not it holds the job. One scrape of any such server shows the real lag, and it never reads `0` just because the job is not running. A server without the export set exposes the series at `0` and never updates it, so read it from a server that has the export. See [Metrics](/docs/operate/metrics/) for the other audit series. ## Know what is guaranteed While the receiver accepts events within the audit retention period (`SLASHOBSERVE_AUDIT_RETENTION`), every event is delivered at least once and in order. The export does not change retention. The daily `audit_partitions` job still deletes a partition once it is older than the retention period, whether or not its events were exported. When the receiver was down, or refused every request, for longer than that, events were deleted before they could be sent. To keep the copy complete: - Keep the retention period longer than the longest receiver outage you accept. - Alert on `slashobserve_audit_export_dropped_total{reason="retention"}`, `slashobserve_audit_export_dropped_total{reason="refused"}` and `slashobserve_audit_export_rejected_total`. ### How the server finds a retention gap The server notices when the event at the stored position is older than the oldest event the table still holds and the next event does not directly follow it. It logs a warning with the size of the gap and adds one to `slashobserve_audit_export_dropped_total{reason="retention"}` for each gap. It then continues with the oldest event that is left. The server finds a gap at the start of a run and after a failed attempt, so it can take a few minutes to show. A caught-up export on a quiet system reports nothing when retention deletes its last event, because the next event follows it directly. A sequence number skipped by a rolled-back change can, rarely, make a harmless report. The server counts events it gave up on in other ways as `refused` and in `slashobserve_audit_export_rejected_total`. ## Handle a receiver that refuses events The server retries a failed post with the same events and a growing wait from 1 second to 1 minute. It honours a `Retry-After` header of the receiver up to that limit. This holds for a network error, a timeout and every status except `400`, `413` and `422`. A `401`, `403` or `404` means the endpoint or the headers are wrong. The export keeps trying and skips nothing until you fix the setting. ### When the receiver answers 400, 413 or 422 The receiver has refused the request itself. The server halves the batch and tries again, down to one event. An event the receiver still refuses alone is skipped. The position moves past it, `slashobserve_audit_export_dropped_total{reason="refused"}` counts it, and the log names its sequence number and the status. Skipping is for one bad event among good ones. After 3 events in a row are skipped with none accepted in between, the server stops skipping. It treats the refusal as a configuration problem, keeps the position where it is, retries with the growing wait like a `401` or `404`, and logs once that the receiver refuses every event. That is what a wrong service behind the endpoint looks like. An accepted event resets the count, and a restart does too. ### When the receiver answers 200 with a partial success A receiver can answer `200` and still refuse some records in its `partialSuccess` answer, for example records that are too large or too old. The server treats those as final. It moves the position past them, adds their count to `slashobserve_audit_export_rejected_total` and logs the count and the status. ## Understand how delivery works One server holds the export at a time, through the `audit_export` job described in [Scheduler](/docs/concepts/scheduler/). It reads events in the order they were committed, from a position stored in the database, and posts up to 500 at a time as OTLP JSON. The position moves only after the receiver answers with a `2xx` status, so a failed post sends the same events again. A restart, or another server taking the job over, continues from the stored position. Delivery is at least once. The position write that follows a `2xx` answer is not cut short when the job's lease ends. A database timeout can still fail it, and so can a crash, a lost database connection or any other failed write between the answer and the write. The same batch of up to 500 events is then sent again, and again each time the write fails, until a position write succeeds. So an event can reach a receiver more than twice. Receivers should deduplicate on the event id. `slashobserve.audit.id` identifies an event, so a receiver or a query can drop the repeats. The request goes out through the same dialer as the datasources, so the endpoint is an operator choice and is not held to the [outbound domain list](/docs/operate/outbound-access/). - It does not follow redirects. - A direct connection to a link-local address, such as a cloud metadata address, is refused. - It honours `HTTP_PROXY`, `HTTPS_PROXY` and `NO_PROXY` like the datasources do, so a collector behind a proxy can be reached. When a proxy is used, the server connects only to the proxy, and the proxy decides which addresses it will reach. ## The record Each event is one log record in the `slashobserve.audit` scope, under the resource `service.name = slashobserve`. | OTLP field | Holds | | --- | --- | | `timeUnixNano` | When the event happened. | | `eventName` and `event.name` | The action, such as `dashboard.update`. | | `body` | The line the Audit page and `observe audit` show for the event. | | `severityNumber` | 9 (`INFO`) for `success`, 13 (`WARN`) for `denied` and `unknown`, 17 (`ERROR`) for `failed`. | | `traceId` | The event's trace id, when it has a valid one. | The attributes use the standard names where one exists: `user.id`, `client.address`, `user_agent.original`, `http.route`, `http.request.method` and `http.response.status_code`. Every other field is under `slashobserve.audit.`, for example `slashobserve.audit.outcome`, `slashobserve.audit.category`, `slashobserve.audit.actor_name`, `slashobserve.audit.target_kind` and `slashobserve.audit.run_id`. A field an event does not have is left out. The full list of fields is in [Audit queries](/docs/reference/audit-queries/#fields). ### Query text in the export The data of a `query.run` and of an `audit.search` event carries the query text, and the export sends it to the collector as it was recorded. Before the server cuts the text at 4 KiB and stores it, it replaces these secrets in it by `***`: - The user and password of a URL, as in `scheme://user:pass@host`. - The credential arguments of the ClickHouse functions and engines `s3`, `s3Cluster`, `gcs`, `azureBlobStorage`, `hdfs`, `url`, `mysql`, `postgresql`, `mongodb`, `redis`, `remote`, `remoteSecure`, `jdbc` and `odbc`. The same goes for the arguments of `deltaLake`, `iceberg`, `hudi`, `s3Queue`, `azureBlobStorageCluster`, `MaterializedPostgreSQL` and `MaterializedMySQL`. These are access keys, secrets, passwords, connection strings and the values of `headers(...)`. - The value after `password`, `passwd`, `pwd`, `secret`, `token`, `api_key`, `access_key` or `secret_key`. This also covers a name with a prefix such as `access_token`, `client_secret` or `X-Api-Key`. The forms are `key=value`, `key: value`, `key!=value` or `key=~value` in any case, with quoted, unquoted, unterminated or escaped values. - The credential after `authorization` with any scheme (the scheme word stays), and a `Bearer` token. - AWS access key ids, JSON web tokens and PEM private key blocks, wherever they appear. Everything else is stored as typed and travels through the export. A secret in a form this list does not name, such as a password in a free-text log search, is in the trail and in the collector, with the retention and readers of each. Give the collector no wider an audience than the Admins who can read the trail. ## Reference ### Settings | Variable | Default | Notes | | --- | --- | --- | | `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` | unset | An absolute `http` or `https` URL of an OTLP/HTTP receiver. | | `SLASHOBSERVE_AUDIT_OTLP_HEADERS_FILE` | unset | A file of request headers for a receiver that needs a token. It needs the endpoint. | Details of the settings: - The endpoint URL may have a path. It must not have a query, a fragment or user info. - The headers file is the only place a header value is read from. - Each line of the headers file is a header name, a colon and a value. A name appears once, and a value is not empty and holds no control character. The file needs at least one header. - Setting the headers file without the endpoint stops the server at start. ### Delivery numbers | Value | Number | | --- | --- | | Events per post | Up to 500 | | Wait between posts when caught up | 5 seconds | | Wait after a failed post | 1 second, growing to 1 minute | | Time limit of one post | 30 seconds | | Events skipped in a row before the export stops skipping | 3 | | How often a server reads the lag | 15 seconds | # Audit trail > What the audit trail records and leaves out, where it is stored, how retention and write pressure work, which metrics and log lines to watch, who can read it, how it is backed up and the settings that control it. Source: https://slashobserve.com/docs/operate/audit/ · Markdown: https://slashobserve.com/docs/operate/audit/index.md The audit trail is the server's record of who did what, through what, to what and how it ended. This page is for the person who runs the server: how long it keeps events, what to watch, who can read it and how to back it up. For reading and searching the trail, see [Audit queries](/docs/reference/audit-queries/) and [Activity](/docs/use/activity/#audit-log). For copying it to another system, see [Audit export](/docs/operate/audit-export/). ## Check that the trail is healthy The trail needs no setup. To check it, look at these signals in [Metrics](/docs/operate/metrics/) and the logs. | Signal | Meaning | | --- | --- | | `slashobserve_audit_dropped_total` | Any increase is a lost event, except `undeclared_key`, which counts a data key an action did not declare while the event itself was stored. | | `slashobserve_audit_buffer_events` | Events in the buffer of this server at the last flush, out of 5,000. | | `slashobserve_audit_write_seconds` | The time of each attempt to write a batch, a timed out attempt included. | | `slashobserve_audit_partitions_ahead` | Should read 14. Below 14 means the `audit_partitions` job is not running. | | `audit batch not written` and `audit request event not written` | Log lines with an `error_code` and, for a database error, the `sqlstate`. | `/metrics` exports no counts of events by action, person or outcome, because it is open to anyone. Read those through the trail. Alert on `slashobserve_audit_dropped_total` increasing and on `slashobserve_audit_partitions_ahead` below 14. ## Change how long events are kept `SLASHOBSERVE_AUDIT_RETENTION` sets how long events are kept. The default is `8760h`, one year. The value is a Go duration from `24h` to `87600h`. 1. Set the variable, for example `SLASHOBSERVE_AUDIT_RETENTION=4380h`. 2. Restart the server. A value that does not parse or is out of range stops it at start with the name of the setting. 3. Check that `slashobserve_audit_partitions_ahead` reads 14 after the start. The `audit_partitions` job applies the period, and it runs at every start. So a shorter period drops the partitions that are now too old at that start, and the server cannot restore a dropped partition. A longer period does not bring back what was already dropped. The job drops each partition whose end is at or before the start of the UTC day that contains the time one retention period ago. So an event is never deleted before it is older than the period, and with daily partitions it can stay up to a day longer. The monthly and yearly partitions of upgraded history stay until their whole span is past the period. A run that drops partitions records an `audit.prune` event with the number of partitions and the date they were cut off at. If the job fails at start, the server logs `audit partitions not prepared` with the `error_code` `audit_partitions_failed` and keeps running. The activity log has its own period, `SLASHOBSERVE_ACTIVITY_RETENTION`; see [Activity](/docs/use/activity/#retention). ## Let Admins read the trail Admins, and Admin service-account keys, read the trail. | Way in | Rule | | --- | --- | | HTTP | Every route under `/api/v1/audit` needs the Admin role, and the live stream checks it again every 5 seconds. | | MCP | The six tools `search_audit_events`, `get_audit_event`, `list_audit_facets`, `get_audit_histogram`, `aggregate_audit_events` and `list_audit_fields` need an Admin. | | CLI | `observe audit` with `search`, `show`, `facets`, `histogram`, `aggregate`, `fields` and `export` needs an Admin key. | | Datasource | `slashobserve-audit`, named Audit trail, is built in and its audience is Admins. It cannot be edited or removed. | | Folder | The Audit folder is Admins only and holds four starter dashboards on that datasource. | Every read of the trail is itself recorded, so the trail shows who searched it. A datasources file entry with the uid `slashobserve-audit` stops the server at start with the error code `audit_datasource_failed`. The server creates the Audit folder once, at the first seeding, or adopts an existing folder named Audit that is Admins only. While the folder exists, the server brings the starters up to date at every start. A folder an Admin deletes is never created again; see [Audit folder](/docs/use/activity/#audit-folder). If a folder named Audit already exists and is not Admins only, the server logs a warning and adds no starters until the folder is made Admins only. If seeding fails, the server logs `could not add the Audit folder's starter dashboards` with the `error_code` `audit_folder_failed` and tries again at the next start. ## Copy the trail to another system Set `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` to make one server at a time post the stored events to an OTLP/HTTP logs receiver, through the `audit_export` job. [Audit export](/docs/operate/audit-export/) has the steps, the retry rules, the record layout and the metrics. The server reads events in the order they were committed, from a position kept in the `audit_export_cursor` table of the same database. It moves the position only after the receiver answers with a `2xx` status. So delivery is at least once and in order for the events the receiver accepts, and a receiver should drop repeats by `slashobserve.audit.id`. Events the receiver refuses are not delivered: - When it answers `400`, `413` or `422` for a single event, the exporter moves past that event and counts it in `slashobserve_audit_export_dropped_total{reason="refused"}`. - Events it refuses in a partial success reply are counted in `slashobserve_audit_export_rejected_total` and are not sent again. Watch both counters when the copy must be complete. Three points for the operator: - The export copies stored events. An event dropped before it was stored never reaches the receiver, and an `audit.gap` event does. - Delivery is guaranteed only while the receiver accepts events within the retention period. Retention still drops partitions that were not exported, and `slashobserve_audit_export_dropped_total{reason="retention"}` counts the gap. - Each record carries the event's `data` as the JSON string `slashobserve.audit.data`, the client address and the user agent. That includes the query text of audit searches, so give the receiver the same access controls as the trail. ## Back up and restore the trail The trail is in the same Postgres database as everything else, so the dump in [Upgrades and backups](/docs/operate/upgrades-and-backups/#back-up-postgres) holds it, and so does the export position. The table holds client addresses, user agents, actor names and the query text of audit searches, so protect the dump like the database. The `audit_partitions` job runs at start. A server that starts on a restored database creates the missing partitions from today on, and it drops the partitions that are older than the retention period. Rolling back with `goose down-to 48` drops the audit table with every event in it; see [Upgrades and backups](/docs/operate/upgrades-and-backups/#upgrade). ## Understand write pressure Events reach the table by one of two paths. A change writes its event inside the change's own transaction, so the buffer below never holds it. The two commit or roll back together. The request's own event is written straight to the database with a 5 second limit when its outcome is `unknown`, or when it is not a read, a tool call, a query or `denied`. If that write fails with an error a retry can fix, such as a timeout, a lost connection, a lock that was not available or a read-only database during a failover, the writer retries it. The server logs `audit event queued to be written again`. If the error cannot be fixed by a retry, or the retry queue is full, the event is lost. `slashobserve_audit_dropped_total{reason="record_failed"}` counts it, and the server logs `audit request event not written` with the `error_code` `audit_record_failed`. Reads, tool calls, queries and `denied` events go into an in-memory buffer on each server instead. The buffer holds 5,000 events. The writer takes up to 500 at a time and writes them once a second, or sooner when 500 are waiting. A write that takes more than 5 seconds is cut off. | Situation | What happens | | --- | --- | | The buffer is full | The recorder waits up to 100 milliseconds for room, then drops the event and counts it as `buffer_full`. | | A batch fails with an error a retry can fix | The writer keeps the batch and writes it again at each flush, for as long as the database stays unavailable. New events queue behind it. | | A batch times out 3 times in a row, or Postgres cancels it | The writer splits it in half and writes the halves separately. | | A batch fails with an error a retry cannot fix | The writer drops the batch and counts its events as `write_failed`. | | A batch was already stored by an earlier attempt | The server logs it as already stored and does not write or count it again. | | The server stops | The writer waits up to 5 seconds for requests still running, then writes what is left for up to 5 seconds. Events it cannot write count as `write_failed`. | ### How a drop shows - `slashobserve_audit_dropped_total` increases, by `reason`. A series appears when its first drop happens. - The next batch that is written carries one `audit.gap` event, whose `data.lost` is how many events were lost since the last one. Find it with the query `action:audit.gap`. - The server logs `audit batch not written` at `WARN`, with the `error_code` `audit_write_failed` and the `sqlstate` of a database error. The buffer is in memory. Events in it when a server is killed or crashes are lost, and neither a counter nor an `audit.gap` event records them. ## Reference ### What is recorded Every request under `/api/v1` and every mounted endpoint, such as `/mcp` and the OAuth endpoints, passes through the audit recorder. Health checks and the static web files do not. | Kind | What the trail holds | | --- | --- | | Changes | One event for each change, written in the same database transaction as the change. | | Failed changes | When a request that should have recorded a change ends without a committed event, the recorder writes a `failed` event for it, with the reason `rolled_back` unless the request had a better one. | | Unconfirmed changes | When the recorder cannot confirm whether the event committed, it writes an `unknown` event with the reason `commit_check_failed`. | | Redirects | A redirect status (301, 302, 303, 307 or 308) on an audited route is recorded with the outcome `unknown`. | | Denied requests | A request answered with 401, 403 or 429, or with 404 on a route that names its target, is recorded as `denied`. A refused request on a route with no audit action is recorded as `request.refuse`. | | Repeated refusals | Repeated `auth.login_failed`, `auth.credential_rejected` and `auth.csrf_rejected` events are folded into one event a minute, with the count in `data.count`; see [Audit queries](/docs/reference/audit-queries/#fields). | | Tool calls | One `agent.tool_call` event for each MCP tool call, with the tool name, the outcome, the reason and the duration. The arguments and the result are not recorded. | | Datasource queries | One `query.run` event for each query, with the datasource uid and the time range it read. The query text is not recorded. | | Reads | Views of a dashboard, an observation, a public link, a chat and a run, and lists of chats and runs. | | Audit reads | A search, an export and each opening of the live stream are recorded as `audit.search` and `audit.export`, with the query text cut at 4 KiB. | | System | Server start and stop, applied migrations, provisioning, scheduled job runs, `audit.prune` and `audit.gap`. | Listing dashboards, folders and search results, and reading a dashboard version, are not recorded; each route says so in its declaration in the API description. An event keeps only the data keys that the catalog in `internal/audit/catalog.go` declares for its action. The server drops any other key, counts it as `undeclared_key`, and stores the rest of the event. ### Repeated reads Some reads are recorded once in 10 minutes and not each time. This holds for an audit search, a chat or run view and a chat or run list, and a query on the audit datasource. A dashboard, observation or public link view is recorded each time. The server remembers these reads in memory, in a separate table for each kind, with room for 10,000 entries. A restart forgets them, and so does a second server, which records the read again. When a table is full, a new read is recorded each time until older entries expire. ### Where it is stored The trail is one table, `audit_events`, in the server's own Postgres database. There is no other store. Every server writes to it, and each event carries the `server_id` and `server_version` of the server that recorded it. The table is partitioned by `occurred_at`: - New events go into one partition for each UTC day, named `audit_events_YYYYMMDD`. - Events copied from the activity log at upgrade are in monthly and yearly partitions; see [Upgrades and backups](/docs/operate/upgrades-and-backups/#upgrade). - The schema has no default partition, so an event dated for a day with no partition has nowhere to go. The `audit_partitions` job prevents this by creating the partitions for today and the next 14 days. It runs once at every server start and then daily. The database refuses `UPDATE`, `DELETE` and `TRUNCATE` on the table. No API route, MCP tool or CLI command changes or deletes an event. The only removal is retention dropping a whole partition. A row holds the actor's name and role as they were when the event happened, the client address, the user agent, the request id and the `data` keys of its action. For an audit search it holds the query text. The table has indexes on action, actor, target, run and request, and a full-text index. It grows as events are recorded, and nothing but retention shrinks it. The code gives no figure for its size. ### Settings The audit settings are environment variables only; there are no configuration file keys. The Helm chart has no audit values. Set them under `env` in the values, as [Run on Kubernetes](/docs/operate/kubernetes/) describes. The chart has no value that mounts an extra file, so it gives the headers file no mount. | Variable | Default | Meaning | | --- | --- | --- | | `SLASHOBSERVE_AUDIT_RETENTION` | `8760h` | How long events are kept, from `24h` to `87600h`. | | `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` | unset | An absolute `http` or `https` URL of an OTLP/HTTP receiver, with no query, fragment or user info. Unset turns the export off. | | `SLASHOBSERVE_AUDIT_OTLP_HEADERS_FILE` | unset | A file of `Name: value` request headers, one per line, with no repeated name and at least one header. It needs the endpoint. | | `SLASHOBSERVE_TRUSTED_PROXIES` | unset | The proxies the server trusts for the client address the trail records; see [Put TLS in front](/docs/operate/production/#put-tls-in-front). | [Configuration](/docs/reference/configuration/#audit) lists the settings with the rest of the server's. ### Writer limits The writer's limits are fixed in the code and have no setting. | Limit | Value | | --- | --- | | Buffer | 5,000 events on each server | | Batch | 500 events | | Flush | Every second | | Wait for room in a full buffer | 100 milliseconds | | Write timeout | 5 seconds | | Repeated reads | Recorded once in 10 minutes, 10,000 remembered for each kind | | Partitions kept ahead | 14 days | # Logging > Set the log level and format, find the cause of a failed request, run or startup in the logs, and see what the server never logs. Source: https://slashobserve.com/docs/operate/logging/ · Markdown: https://slashobserve.com/docs/operate/logging/index.md The server writes JSON logs to standard error by default. Use this page to set the level, to follow a failure from a line to its cause, and to know what a log line never holds. The server does not log secrets, prompt text, query text or tool results. It never logs the database URL, the OIDC client secret or the LLM key. ## Set the log level and format Set `SLASHOBSERVE_LOG_LEVEL` to `debug`, `info`, `warn` or `error`; the default is `info`. Set `SLASHOBSERVE_LOG_FORMAT` to `json` or `text`; the default is `json`. On Kubernetes, the chart values `logLevel` and `logFormat` set them. ```sh SLASHOBSERVE_LOG_LEVEL=debug SLASHOBSERVE_LOG_FORMAT=text slashobserve-server ``` The built-in agent runs in a child process, `observe-agent`, and logs at the same level. The server copies the child's log lines into its own log with `component=observe-agent`. ## Find out why a request failed Every line about a failure carries a short fixed `error_code` and the ids that locate it. The server logs no error message from a driver or library, because it can echo a query, a connection detail or a credential. 1. Find the line for the failure and read its `error_code`, such as `tool_failed`, `session_lookup_failed` or `readiness_check_failed`. 2. Read the ids on the line, such as `agent_request_id`, `dashboard_id`, `principal_id` or a datasource `uid`. 3. For an agent request, look it up with `observe status <id>` or `GET /api/v1/observe/{id}`. 4. For an HTTP request, take the `request_id` and match it to the response's `X-Request-Id` header and to the audit event the request records. One id joins all three. Details of the other fields on an error line: - `error_type` is the Go type of the innermost error. - `sqlstate` is set when the cause is a Postgres error. - `errno` is the operating system's text, such as `connection refused`, when the cause is a system error. ## Find out why the server did not start A fatal error at startup logs `server exiting` with an `error_code`. The line keeps a message the server wrote itself from your settings, for example `SLASHOBSERVE_SESSION_TTL: must be between 5m and 720h`, and the listen address errors from the operating system. It never echoes a setting that is a URL. A failure to reach Postgres, apply migrations, build a datasource or set up sign-in is logged by code and error type, so the log never shows the connection string, the user or the database name. The line adds only what the server knows from your settings or from the operating system. | `error_code` | What the line adds | | --- | --- | | `database_unavailable` | `db_host` and `db_port` from `SLASHOBSERVE_DATABASE_URL`, `errno` for a network failure such as `connection refused`, and `sqlstate` for a Postgres error. | | `invalid_database_url` | Nothing. The setting could not be parsed. | | `migration_failed` | `migration_version` and `sqlstate`. | | `datasources_failed` | `datasource_uid`, and for a validation failure the server wrote itself, such as a limit or URL scheme problem, a `detail` message. | For anything else, test the connection yourself: ```sh psql "$SLASHOBSERVE_DATABASE_URL" ``` ## Find out why an agent run failed The server logs one line when an agent request ends: - `agent request succeeded` at `INFO`, with `agent_request_id`, `dashboard_id` when the request has a dashboard, `version` when it saved one, and `attempt`. - `agent request failed` at `WARN`, with the same ids and `error_code`, the failure code the request shows, such as `rate_limited`, `run_timeout`, `budget_exhausted` or `lease_expired`. The agent logs `run started` (`run_id`, `attempt`, `kind`, `mode`) and `run finished` at `INFO`. `run finished` carries `model_calls`, `retries`, `compactions`, `renewals` and `model_ms`. It logs `run failed` at `WARN` with the same counters and its `failure_code`. No line holds a tool input or result. A failed call to the model provider logs one `llm call finished` line at `WARN`. A call that succeeded logs nothing. The line carries these fields: - `run_id`, the id of the agent request. - `provider`. - `status`, the provider's last HTTP status, or 0 when the last attempt got no answer. - `failure_code`, one of `call_timeout`, `rate_limited` or `provider_error`. - `idle_timeout`, when the call stalled. - When the provider sent them, `provider_error_type`, `provider_error_code`, `provider_error_param`, `request_id` and `retry_after`. The server logs these values only when they are plain tokens. The line never holds the prompt, the model's reply, a tool input or result, or the provider's error message, unless you turn the message on. ## Provider error messages Set `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS=true` to add the provider's own error message to a failed `llm call finished` line as `provider_error_message`. Use it for debugging only. A provider can echo parts of the prompt in its message, and the server logs one `WARN` at startup while the setting is on. The message has the API key removed, newlines and other control characters replaced by spaces, and is cut to 1024 bytes. It is never added to the error stored on an agent request or returned by the API. ## Reference ### Log levels | Level | Meaning | | --- | --- | | `DEBUG` | Detail for each step, such as the health checks, scrapes of `/metrics` and the agent's `run brief loaded`. | | `INFO` | Normal lifecycle: startup, `observe-agent started`, an agent request that saved, a run that started, finished or was ended by the server. | | `WARN` | Degraded or recoverable: a failed model call, an agent request or run that failed, a datasource that turned unhealthy. | | `ERROR` | A failure you must act on: the database, a migration, a run result the server could not record, or `run loop crashed` in the agent. | ### Request lines A request log line records the method, the path, the status, the response size in `bytes` and the duration. It also carries the `route` template. For `/api/v1`, `/mcp` and the OAuth routes it carries the `request_id` and, once the caller is signed in, the `principal` (`user:<id>` or `service_account:<id>`). The path never includes the query string, and the token of a public link is replaced by `:token`. ### Other lines - A panic is logged by its Go type (`panic_type`), never its value. - A datasource that turns unhealthy logs `datasource unhealthy` once, with its `uid` and `type`. It does not log again until the datasource has recovered. - A refused sign-in also logs the domain of the email address. A failed code exchange logs the provider's `oauth_error` code, such as `invalid_grant`, when it is a plain code. - A line of the `observe-agent` child that is not JSON is logged as `observe-agent output` with the text in `line`. A line longer than 4096 bytes is cut and marked `truncated=true`. # Metrics > The Prometheus metrics the server serves at /metrics, what each series counts and how to scrape it. Source: https://slashobserve.com/docs/operate/metrics/ · Markdown: https://slashobserve.com/docs/operate/metrics/index.md The server serves Prometheus metrics at `/metrics` in the text exposition format. Use them to watch the API, the agent, the query proxy, the database pool, the scheduler and the audit recorder, and to alert on them. The series carry route templates, codes and model names, never dashboard ids, user names, query text or prompt text. ## Scrape it 1. Point a Prometheus scrape job at the server's address with the path `/metrics`: ```yaml scrape_configs: - job_name: slashobserve metrics_path: /metrics static_configs: - targets: ["slashobserve.internal:8080"] ``` 2. Reload Prometheus, and check that the target is up. 3. Chart the series with the [internals dashboard](/docs/operate/observe-slashobserve/), or query them as in [Useful queries](#useful-queries). A series with labels appears after its first observation, so a server that has run no agent request serves no `slashobserve_agent_runs_total` yet. On Kubernetes, the Helm chart adds `prometheus.io` scrape annotations to the pod and can create a Prometheus Operator ServiceMonitor; see [Run on Kubernetes](/docs/operate/kubernetes/#metrics). ## Keep the route private The route needs no sign-in, so keep it off the public internet. Let Prometheus reach the server on an internal network, or block `/metrics` at the reverse proxy in front of the server. Scrapes are logged at `debug` only, like health checks. ## Turn the route off `SLASHOBSERVE_METRICS` controls the route. It is on by default. `false` removes it, so the path answers like any unknown page. ## Read audit counts The `slashobserve_audit_*` series describe only the audit recorder's own health. Counts of audit events by action, person or outcome are not exported here, because `/metrics` is open to anyone and those counts are for Admins only. Queries on the built-in audit datasource (`slashobserve-audit`) are left out of `slashobserve_proxy_query_duration_seconds` and the slot gauges for the same reason, since they would show when Admins read the trail. Read audit counts through that datasource instead; see [Audit queries](/docs/reference/audit-queries/). ## Useful queries The share of API requests that failed with a server error over the last 5 minutes: ```promql sum(rate(slashobserve_http_request_duration_seconds_count{status=~"5.."}[5m])) / sum(rate(slashobserve_http_request_duration_seconds_count[5m])) ``` The number of live servers: ```promql max(slashobserve_fleet_servers) ``` How much of each datasource's slots the whole fleet uses: ```promql sum by (datasource) (slashobserve_datasource_slots_in_use) / sum by (datasource) (slashobserve_datasource_slots_limit) ``` How much of each datasource's slots this server uses: ```promql slashobserve_datasource_slots_in_use / slashobserve_datasource_slots_limit ``` The 95th percentile time an agent request waited for a worker: ```promql histogram_quantile(0.95, sum by (le) (rate(slashobserve_agent_queue_wait_seconds_bucket[15m]))) ``` The 95th percentile time of a model call, by model: ```promql histogram_quantile(0.95, sum by (model, le) (rate(slashobserve_model_call_duration_seconds_bucket[15m]))) ``` Agent runs that failed in the last day, by failure code: ```promql sum by (outcome) (increase(slashobserve_agent_runs_total{outcome!="succeeded"}[1d])) ``` The share of panel data requests the cache answered: ```promql sum(rate(slashobserve_proxy_cache_total{result="hit"}[15m])) / sum(rate(slashobserve_proxy_cache_total[15m])) ``` ## Reference ### Series | Series | Type | Labels | What it counts | | --- | --- | --- | --- | | `slashobserve_http_request_duration_seconds` | histogram | `route`, `method`, `status` | Time to answer an HTTP request. | | `slashobserve_agent_runs_total` | counter | `kind`, `outcome` | Agent runs that ended. | | `slashobserve_agent_queue_wait_seconds` | histogram | `source` | Time an agent request waited before the agent claimed it. | | `slashobserve_model_call_duration_seconds` | histogram | `provider`, `model`, `outcome` | Time of one model call, including its retries. | | `slashobserve_model_tokens_total` | counter | `direction` | Tokens the model provider reported. | | `slashobserve_proxy_query_duration_seconds` | histogram | `datasource_type`, `outcome` | Time of one datasource call from the query proxy. | | `slashobserve_proxy_cache_total` | counter | `result` | Panel data lookups in the query proxy's shared result cache. | | `slashobserve_scheduler_jobs_total` | counter | `job`, `outcome` | Scheduled job runs that ended. | | `slashobserve_scheduler_job_running` | gauge | `job` | Runs of a scheduled job in flight on this server. | | `slashobserve_db_pool_connections` | gauge | `state` | Database pool connections that are `acquired`, `idle` or `constructing`. | | `slashobserve_db_pool_max_connections` | gauge | none | The most connections the database pool opens. | | `slashobserve_db_pool_acquires_total` | counter | none | Connections taken from the database pool. | | `slashobserve_db_pool_empty_acquires_total` | counter | none | Acquires that waited because the pool had no idle connection. | | `slashobserve_db_pool_acquire_wait_seconds_total` | counter | none | Time spent waiting to acquire a pool connection. | | `slashobserve_datasource_slots_in_use` | gauge | `datasource` | Queries running against a datasource on this server. | | `slashobserve_datasource_slots_limit` | gauge | `datasource` | Queries this server allows against a datasource at once. | | `slashobserve_fleet_servers` | gauge | none | Servers that heartbeat into this database in the last 30 seconds, this one included. | | `slashobserve_audit_dropped_total` | counter | `reason` | Audit events not stored, or data keys dropped. | | `slashobserve_audit_write_seconds` | histogram | none | Time of one attempt to write a batch of read and refusal events. | | `slashobserve_audit_buffer_events` | gauge | none | Read and refusal events waiting in this server's buffer at the last flush. | | `slashobserve_audit_partitions_ahead` | gauge | none | Daily audit partitions after today. | | `slashobserve_audit_export_lag_seconds` | gauge | none | Seconds between the newest audit event and the last one the audit export sent. | | `slashobserve_audit_export_rejected_total` | counter | none | Audit events the receiver accepted the request for but refused in its answer. | | `slashobserve_audit_export_dropped_total` | counter | `reason` | Audit events the audit export gave up on. | The Go runtime series (`go_*`) and the process series (`process_*`) come from the Prometheus client library. Details of the series that need more than a cell: - `slashobserve_agent_queue_wait_seconds` does not count a retry after a restart or a lost lease. - `slashobserve_proxy_query_duration_seconds` times panel data, variable values and save checks alike. - `slashobserve_datasource_slots_limit` is this server's share of the datasource's `maxConcurrentQueries`. - `slashobserve_audit_partitions_ahead` drops below 14 when the `audit_partitions` job stops. ### Labels - `route` is the route template, such as `/api/v1/dashboards/:id`, never the path a caller sent, so dashboard ids stay out of the labels. A request that matched no route, a page of the web app included, is `unmatched`. - `method` is the HTTP method, or `other` for a method the server does not serve. - `status` is the HTTP status code the server answered. - `kind` is `create` for a new dashboard, `revise` for a change to an existing one, `suggest` for a single suggested panel, and `investigate` for an investigation. - `source` on `slashobserve_agent_queue_wait_seconds` is the request's source: `comment`, `prompt`, `observe`, `suggest` or `investigate`. - `outcome` on `slashobserve_agent_runs_total` is `succeeded` or the failure code the request shows, such as `rate_limited`, `run_timeout` or `canceled`. - `outcome` on `slashobserve_model_call_duration_seconds` is `ok`, `rate_limited`, `call_timeout`, `provider_error`, `canceled`, or `error` for any other failure. - `direction` is `input`, `output`, `cache_read` or `cache_write`. - `datasource_type` is the datasource type, such as `prometheus` or `clickhouse`. - `outcome` on `slashobserve_proxy_query_duration_seconds` is `ok` or the query error code a panel shows, such as `query_invalid`, `query_timeout`, `limit_exceeded` or `datasource_unavailable`. - `result` is `hit` or `miss`. - `job` on the scheduler series is the scheduled job's name. The scrape adds its own `job` label, so Prometheus stores the scheduler series' value as `exported_job`, unless the scrape job sets `honor_labels: true`. The internals dashboard groups by `exported_job`. ### Audit series `slashobserve_audit_dropped_total` counts events and data keys by `reason`: - `buffer_full`: the buffer was full. - `write_failed`: a batch write failed for a reason a retry cannot fix, or was still failing when the server stopped. - `record_failed`: the direct write of a change's request event failed. - `undeclared_key`: data keys an event did not declare. `slashobserve_audit_write_seconds` includes a timed out attempt. `slashobserve_audit_export_lag_seconds` is `0` when the [audit export](/docs/operate/audit-export/) has caught up. It stays above `0` while the export is stuck, a long transaction hides new events from it, or no server runs the job. Every server that has the export set reads it from the database every 15 seconds, so any of those servers' scrape shows it. A server without the export set exposes the series at `0` and never updates it. `slashobserve_audit_export_rejected_total` counts events the receiver of the [audit export](/docs/operate/audit-export/) accepted the request for but refused in its partial success answer. They are not sent again. `slashobserve_audit_export_dropped_total` counts by `reason`: - `refused`: events the receiver refused on their own with `400`, `413` or `422`. - `retention`: gaps where events were deleted before they were exported. ### How the audit recorder retries a write A batch that times out, loses its connection, waits for a lock or meets a database that is read-only during a failover is kept and written again every second. It is retried for as long as the database stays unavailable, so a slow database moment loses nothing while the buffer has room. A batch that an earlier attempt already stored is not written twice or counted as dropped. A batch the server cancels for taking too long, or that times out three times in a row, is split in half and written as two. While a batch is kept, new events queue up behind it. Once the buffer is full they are dropped as `buffer_full`, and one `audit.gap` event records how many once writing resumes. During that time each new event can wait up to 100 milliseconds for room. A change's own event is written straight to the database rather than in a batch. When that write fails in one of the ways above, it is handed to the same retry, up to the size of the buffer, and a refused row costs only itself. Events still unwritten when the server stops count as `write_failed`. # Observe SlashObserve > The internals dashboard that watches the server itself, what each row answers, and how compose and the Helm chart provision it. Source: https://slashobserve.com/docs/operate/observe-slashobserve/ · Markdown: https://slashobserve.com/docs/operate/observe-slashobserve/index.md The internals dashboard shows the server's own [metrics](/docs/operate/metrics/): its API, the agent and the model provider, the query proxy, the database pool, the scheduler and the fleet. Use it to see whether the server is answering quickly, whether agent runs succeed, and whether several servers share the work. It is an ordinary provisioned dashboard titled SlashObserve internals, in the folder SlashObserve. ## Add the dashboard to your server 1. Make sure a datasource with uid `prom` is a Prometheus that scrapes the server's `/metrics`. [Scrape it](/docs/operate/metrics/#scrape-it) shows the scrape job. 2. Put `internals.json` in a `SlashObserve` directory of the server's [provisioning directory](/docs/operate/provisioning/). Copy it from `deploy/compose/dashboards/SlashObserve/internals.json`. On Kubernetes, the Helm chart does this for you; see [Add it with the Helm chart](#add-it-with-the-helm-chart). 3. Wait for the first scrapes. The dashboard appears in the folder SlashObserve within a minute or two of the first scrape. Until Prometheus has scraped the server a few times, the panels return no data and the dashboard is not saved yet. The provisioner tries again every 30 seconds. Until then `GET /api/v1/provision` lists the file with its error. The dashboard is provisioned like any other file. An edit made in the app is replaced the next time the file changes, and stays in the version history. ## Add it with the Helm chart The Helm chart carries its own copy of the file and mounts it as the folder `SlashObserve` while `provisioning.internals` is `true`, which is the default. See [Run on Kubernetes](/docs/operate/kubernetes/). Add a datasource with uid `prom` under `datasources` that points at a Prometheus scraping the pod. `make lint` fails when the chart's copy differs from the compose copy. ## Look at the dashboard in the replicas stack The replicas stack of the repository's load test mounts `deploy/compose/dashboards/SlashObserve` as its provisioning directory. Its Prometheus scrapes both servers as the `slashobserve` job behind the `prom` datasource. The [demo](/docs/operate/demo/) does not provision the dashboard, because its Prometheus does not scrape the server. ## Reference ### What it needs Every panel queries the datasource with uid `prom`, so that datasource must be a Prometheus that scrapes the server's `/metrics`. The queries have no `job` selector, so a Prometheus that scrapes several SlashObserve servers shows their sum. ### What each row answers The top line holds six stats: - API requests per second. - The share of API requests that failed with a server error. - The 95th percentile request time. - Agent runs in the dashboard's range. - Model tokens in the dashboard's range. - The share of the database pool in use. | Row | What it shows | | --- | --- | | Is the API answering quickly? | Requests per second by status, request time, and the 95th percentile request time by route. | | Is the agent working? | Agent runs and model calls per minute by outcome, the 95th percentile model call time by model, and model tokens per minute by direction. | | Are datasource queries fast? | The 95th percentile datasource query time by datasource type, queries per second by outcome, and result cache lookups by hit or miss. | | Is the database pool keeping up? | Pool connections by state, acquires per second, and the average wait for a connection. | | Is the scheduler running its jobs? | Scheduled job runs in the range by job and outcome, and the jobs running now. | | Are the servers sharing the work? | The number of live servers, datasource slots in use against their limit by datasource, and the 95th percentile time agent requests wait for a worker. | A server with no model configured shows zero agent runs and model calls rather than empty panels. The scheduler panels group by `exported_job`, because Prometheus renames the `job` label of the scheduler series when it clashes with the scrape job; see [Labels](/docs/operate/metrics/#labels). # Outbound access > Control which domains the server may fetch from or call, including the feeds in news panels, the images and GeoJSON files that panels show and the requests that canvas actions send. Source: https://slashobserve.com/docs/operate/outbound-access/ · Markdown: https://slashobserve.com/docs/operate/outbound-access/index.md SlashObserve can show content that dashboards fetch from other sites, such as the feeds in news panels. The server fetches it only from domains on the allowlist. The list starts empty, so a new deployment makes no such request until an Admin allows a domain. These calls are not part of the list: - Datasources defined in the datasources file. - The identity provider. - The model provider. A datasource an Admin adds in the app is held to the list in a narrower way, described in [Add datasources in the app](/docs/connect/datasources-in-the-app/#addresses). ## Allow a domain 1. Sign in to the web app as an Admin and open **Settings**, then **Outbound access**. 2. In the **Allowed domains** card, type the domain and choose **Allow domain**. Use `example.com` for that host only, or `*.example.com` for its subdomains but not `example.com` itself. 3. To take a domain away again, choose the remove button on its entry, then **Remove domain**. The confirmation names the webhooks, connections and datasources that use it. The web app calls `GET /api/v1/outbound-domains`, `POST /api/v1/outbound-domains` with the body `{"domain": "*.example.com"}`, and `DELETE /api/v1/outbound-domains/{domain}`. A service-account key cannot call them, so the CLI and MCP cannot change the list; ask an Admin to add the domain. Write the domain without a scheme, port or path. The server refuses an IP address, and a name without a dot such as `localhost`, because it only calls public domains. It stores a name with non-ASCII letters in its ASCII form. At most 100 domains can be allowed. An Editor or an Admin can see the list, because the canvas actions editor needs it; a Commenter or a Viewer gets `403`. Only an Admin can allow or remove a domain. ## Take the decision away from Admins Set `SLASHOBSERVE_OUTBOUND_DOMAINS` to fix the list in configuration. - `none` allows nothing. - A comma-separated list such as `example.com,*.example.org` allows exactly those domains. The list is then read-only. **Outbound access** shows it, the API answers changes with `409 managed_by_config`, and the server neither reads nor writes the database table. The setting never seeds the Settings list. To switch back, unset it and restart, and the Settings list is what it was before. On Kubernetes, the chart value `outboundDomains` sets it. ## Rules every fetch follows Every fetch follows these rules, whatever the domain: - Only `https` on port 443. - Only public addresses. - A redirect is followed up to 5 times, and each hop must be an allowed domain on `https`. - No cookies, credentials or `Referer` are sent. - Each fetch has a size cap (1 MiB unless the feature asks for more, 8 MiB at most), a 10 second time limit and a content type check. - The server caches results for 15 minutes, and removing a domain stops its cached results from being served. The server checks the address it connects to, so a name that resolves to a private, loopback, link-local or cloud metadata address is refused. The one exception is a [Grafana connection](/docs/use/switch-from-grafana/) an Admin configures. Its address may be `http` on any port and may resolve to a private address, and it still has to be on the allowlist. ## Webhooks A [webhook](/docs/use/webhooks/) an Admin sets up sends workspace activity to an address of their choice. It follows the same rules: `https` on port 443, a public address, and a domain on the allowlist. - A webhook never adds its domain to the allowlist. An Admin who has not allowed it first gets `403 outbound_domain_not_allowed`. - When a domain is removed, the webhooks that post to it fail their attempts with `domain_not_allowed` and retry until it is allowed again. - Webhook requests send a signature header and the event, but no cookies or other credentials. - The server never logs the address, a header, the body or the receiver's answer. ## Domains added for a connection or datasource Saving a Grafana connection, or a datasource added in the app, adds its host to the list with `from_connection: true`. Settings shows it as "Added for a connection or datasource". Deleting the connection or datasource, or moving it to another host, removes that entry again. The entry stays when a webhook, a connection, a datasource or an entry added by hand still uses it. An Admin who allows that same domain by hand keeps it. The entry stops being tied to the connection, and the call answers `200` instead of `201`. ## News feeds News panels read their feed through the server, never from the browser, with `GET /api/v1/news?url=<feed address>`. Only signed-in people can call it, not service-account keys. - The feed must be an RSS or Atom feed on an https address, up to 1 MiB, and its domain must be on the allowlist. - The server caches a feed for 15 minutes and returns at most 50 items as plain text. - A feed whose domain is not allowed shows a message naming the domain. - Item links open in a new tab and are not limited by the allowlist. The allowlist controls what the server fetches, not where a person may click. ## Images and GeoJSON The browser never loads an image or a file from another site. A page's Content-Security-Policy allows only the server's own origin, so panels ask the server instead: - `GET /api/v1/assets/image?url=<image address>` for a remote image, such as one in a text panel's Markdown. - `GET /api/v1/assets/geojson?url=<file address>` for a panel that draws a GeoJSON layer. - The image route also loads each tile of a geomap panel. Only signed-in people can call these routes, not service-account keys, and the address must be an https address on an allowed domain. A site that redirects to a content network needs that network's domain on the allowlist too, because each redirect hop is checked. ### Show a basemap A geomap panel draws map tiles only when every host the tile address can produce is allowed. Otherwise the map shows country outlines, and a note names the host to allow. Allow the host of the basemap's tiles: | Basemap | Domain to allow | | --- | --- | | `carto` | `*.basemaps.cartocdn.com` | | `esri` | `services.arcgisonline.com` | | `osm` | `tile.openstreetmap.org` | | `xyz` | The host in the panel's tile address. | CARTO uses `a.basemaps.cartocdn.com` to `d.basemaps.cartocdn.com`. The OpenStreetMap servers are volunteer-run and limit heavy use, so read their [tile usage policy](https://operations.osmfoundation.org/policies/tiles/) before you allow them. For dashboards many people open, prefer CARTO or your own tile server (an `xyz` basemap). ### Limits and errors for assets - An image can be a PNG, JPEG, GIF, WebP, AVIF or SVG, up to 5 MiB, and its bytes must match the type the site declared. The server sends it with a policy that forbids scripts, so an SVG opened on its own never runs script, and the browser keeps it for 1 hour. - A GeoJSON file can be served as `application/geo+json`, `application/json` or `text/plain`, up to 5 MiB. It must be a JSON object whose `type` is a GeoJSON type. - Both are cached on the server for 1 hour, in a cache separate from the news feeds'. | Answer | Cause | | --- | --- | | `403 outbound_domain_not_allowed` | The domain is not allowed. The panel shows the image's alt text instead. | | `502 asset_unavailable` | The file cannot be fetched, is too large or is not what it claims to be. | | `400 invalid_asset_url` | The address is not `https` with a domain name. | | `400 invalid_request` | The address is over 2000 bytes. | Each refusal is logged at INFO as `asset fetch failed` with the host, the code and the person's id (`actor_id`), never the address's path or query. ## Actions A canvas element or a field can carry actions, which are HTTP requests that a person runs from the panel; see [Maps, canvases and actions](/docs/concepts/observespec/#maps-canvases-and-actions). A field's actions sit on its panel or on one of its overrides, and a table cell, stat tile, gauge or bar offers them. The browser never calls the other site. It asks the server with `POST /api/v1/dashboards/{id}/actions`. The server sends the request under the same rules as every other outbound call: an allowed domain, `https` on port 443 and a public address. Only a person with Edit on the dashboard can run an action, because it changes something outside SlashObserve. Viewers, Commenters and service-account keys are refused. ### What the request carries The request names the action by its place in the dashboard's latest saved version: - The panel, the canvas element and the index. - For a field action, the panel, the override (none for the panel's own actions) and the index. It adds the values of the dashboard's variables, the time range, the clicked value, and the `inputs` that the person typed for the action's own variables. The method, address, headers and body template always come from the saved version. A request made against an older version answers `409 stale_version`. `__user.login`, `__user.email`, `__user.name` and `__user.id` come from the signed-in person. The server escapes a value for the place it lands in: the path, the query, a form body or a JSON string. Typed inputs are escaped the same way and are never logged. ### What the server sends and returns - No credentials are sent, so an action can call only endpoints that need none. - The server does not follow a redirect; it returns a `3xx` as the status. - A request has a 10 second limit and a body of at most 64 KiB. The server reads the response body up to 64 KiB and throws it away. - The answer is `{"status": 204, "ok": true}`, where `ok` is true for a 2xx status. - Each person can have 2 actions running at once. - Actions are never cached or merged, so running one twice sends two requests. | Answer | Cause | | --- | --- | | `409 stale_version` | The dashboard changed; the request used an older version. | | `404 action_not_found` | The action no longer exists in the dashboard. | | `400 invalid_request` | An input names a key the action does not declare, or a variable the dashboard does not declare. | | `400 action_invalid` | A declared key has no input, or the action would change its own host, put a line break in a header or leave a JSON body invalid. | | `429 too_many_actions` | The person already has 2 actions running. | | `403 outbound_domain_not_allowed` | The domain is not allowed; the answer carries the `host`. | | `502 action_failed` | A connection error, a timeout or a private address; the answer carries the `host`. | Every attempt that reaches the network is logged at INFO as `action run`. The line carries these fields: - The person (`actor_id`, `actor_role`). - `dashboard_id`, `version` and `panel`. - `element` or `override`, when the request has one. - `action`, `method` and `host`. - `status`, which is 0 when no answer came. - `outcome`, one of `ok`, `remote_error`, `refused` or `failed`. - `duration_ms`. The line never holds the address, a header, the body, a variable value or an input. ## Reference ### Domain entries - An entry is `example.com`, which matches that host only, or `*.example.com`, which matches its subdomains but not `example.com` itself. - A refused entry answers `422 invalid_domain` with the rule it broke, such as `an IP address is not allowed; use a domain name` or `enter the domain without a port`. - A 101st domain answers `422 too_many_domains`. - Each entry in `GET /api/v1/outbound-domains` carries `used_by`, the webhooks, Grafana connections and datasources whose address it allows. It is empty for an Editor, because those are Admin only, and Settings names them in the confirmation before it removes the entry. - The response also carries `managed_by`, which is `config` when `SLASHOBSERVE_OUTBOUND_DOMAINS` is set. - Dashboard feeds, actions and assets are fetched on demand and are not listed, so removing a domain stops them without a warning from the server. ### Records of changes - The server logs every change at INFO as `allowed an outbound domain` or `removed an outbound domain`, with the person's id (`actor_id`) and the domain. - The table also keeps who added each entry and when, but a removed entry leaves only the log line. # Provisioning > Keep dashboards as ObserveSpec files in a directory, for example a git checkout, and let the server turn each file into a dashboard at startup and whenever the file changes. Source: https://slashobserve.com/docs/operate/provisioning/ · Markdown: https://slashobserve.com/docs/operate/provisioning/index.md Provisioning turns a directory of ObserveSpec JSON files into dashboards. Use it to keep dashboards in a git repository, review changes to them like code, and have the server pick them up without anyone clicking Save. ## Provision a directory 1. Write one [ObserveSpec](/docs/concepts/observespec/) JSON file for each dashboard, and put the files in a directory. A file directly in the directory goes to General, and a file in a subdirectory goes to a folder: ```text /provision overview.json -> General shop/checkout.json -> folder "shop" shop/payments/api.json -> folder "shop" ``` 2. Set `SLASHOBSERVE_PROVISION_DIR` to the directory and start the server. When the setting is unset, provisioning is off. 3. As an Admin, read the status: ```sh curl -fsS -H "Authorization: Bearer $OBSERVE_TOKEN" http://localhost:8080/api/v1/provision ``` Each file that became a dashboard is listed under `dashboards`, and each file that did not is under `errors`; [the API](#api) shows the body. 4. Change a file, or `git pull` into the directory. The server checks the directory every 30 seconds, comparing each file's path, size and modification time, so the dashboard changes within half a minute. To read the directory at once, run `POST /api/v1/provision/run`. The server reads the directory once at startup and then keeps checking it. With several servers, one provisions at a time under a Postgres lock, and the others then find each file already saved. Behind a transaction-mode pooler the lock needs `SLASHOBSERVE_DATABASE_DIRECT_URL`; see [Behind a connection pooler](/docs/operate/production/#behind-a-connection-pooler). ## Choose the folder of a dashboard Each file whose name ends in `.json` is one dashboard. A subdirectory names a folder, which the server creates when no folder has that title. Only the first subdirectory counts: `team/payments/api.json` goes to the `team` folder, because folders are flat. A directory name cannot hold `/`, so a folder title is written with escapes: - `%` is written as `%25`. - `/` is written as `%2F`. - `\` is written as `%5C`. - A leading `.` is written as `%2E`. Nothing else changes, so the directory `Team %2F Payments` is the folder `Team / Payments`. A subdirectory named General or My Dashboards, or one whose name is not a valid folder title, puts its files in General. Files and directories whose names start with `.` are skipped, so `.git` is never read, and files with other extensions are ignored. A file may be a symbolic link, relative as in a Kubernetes ConfigMap mount or absolute, only when it points to a file inside the provisioning directory. A link that leaves the directory is not read and shows as a failed file. A file that is not a regular file is skipped. ## Change a dashboard Edit its file. For every file, the server hashes its content and compares it with the content it last saved for that path: - A new path becomes a new dashboard at version 1. - An unchanged file saves nothing, so a restart or a repeated run adds no version. - A changed file adds exactly one version on top of the dashboard's latest version, with the summary `Provisioned from <path>`. An edit someone made in the app since then is replaced by the file's content, and stays in the version history. Versions are authored by `Provisioning` and their origin is `api`. Dashboards provisioned from files are ordinary dashboards: people can edit, move and comment on them, and the next change to the file adds a version again. A save checks the file the way every save is checked: the Spec must be valid and every panel and variable query must run. Unlike a Grafana import, a provisioned file is never saved with failing queries. A file is known by its path relative to the directory. Renaming or moving a file is therefore a new file: it becomes a new dashboard, and the dashboard of the old path stays. ## Remove a dashboard Delete it in the app. Provisioning never deletes a dashboard. A file removed from the directory keeps its dashboard, and the server logs `a provisioned file is gone; its dashboard stays` once. Deleting a provisioned dashboard while its file is still in the directory brings it back as a new dashboard the next time the file is read. That happens at startup, after a file in the directory changes, or on a manual run. ## Fix a file that fails A file that cannot be read, does not parse or whose queries fail does not stop the others. The server logs `provisioning a file failed` at WARN with the file's `path` and an `error_code`, once until the message changes, and keeps the message for the API: - A file that never became a dashboard is listed under `errors`. - A file whose dashboard exists but whose new content failed keeps its dashboard at the last saved version, and the message is the entry's `last_error`. While a file is failing, the server tries it again every 30 seconds, so a dashboard whose datasource was not up at startup appears once its queries answer. A fixed file clears its error on the next run, and the error of a file removed from the directory is cleared too. [Error codes](#error-codes) lists what each message means. ## Choose between provisioning and apply Provisioning reads a directory on the server's own disk, saves as the `Provisioning` account and needs no key. [`observe dashboards apply`](/docs/use/dashboards-as-code/) sends files from anywhere, such as a CI job, saves as the key's account with the summary `Applied from <path>`, and follows the same directory layout. The two keep separate records, so one dashboard belongs to at most one of them. Apply refuses a dashboard that came from the provisioning directory with 409 `provisioned`, because the next change to the server's file would replace what apply saved. Change that file instead. | | Provisioning | Apply | | --- | --- | --- | | Where the files are | `SLASHOBSERVE_PROVISION_DIR` on the server | Anywhere the CLI runs | | Who saves | The `Provisioning` account | The key or person running it, with their folder access | | When | At startup and within 30 seconds of a change | When the command runs | | A renamed file | Becomes a new dashboard | Adopts the dashboard with the same title in the folder | | A removed file | Its dashboard stays | Its dashboard stays | ## Provision on the demo and on Kubernetes The [demo](/docs/operate/demo/) mounts `deploy/compose/dashboards/Demo` read-only at `/provision/Demo` and sets `SLASHOBSERVE_PROVISION_DIR=/provision`. Put a Spec file there and it appears in the Demo folder within 30 seconds. The directory holds `astronomy-overview.json`, the Astronomy Shop overview. The demo does not load the internals dashboard, because its Prometheus does not scrape the server; [Observe SlashObserve](/docs/operate/observe-slashobserve/) describes `SlashObserve/internals.json`. The Helm chart mounts one ConfigMap per folder into its provisioning directory; see [Run on Kubernetes](/docs/operate/kubernetes/#provision-dashboards). ## Reference ### API Both endpoints are for Admins only. `GET /api/v1/provision` answers the status: ```json { "dir": "/provision", "dashboards": [ { "path": "shop/checkout.json", "dashboard_id": "0a1b2c3d-0000-4000-8000-000000000001", "folder": "shop", "updated_at": "2026-11-06T09:30:00Z", "last_error": null } ], "errors": [ { "path": "broken.json", "message": "the file cannot be read", "seen_at": "2026-11-06T09:30:00Z" } ] } ``` `dir` is null when provisioning is off; the lists stay readable. `POST /api/v1/provision/run` reads the directory now and answers the same body. It answers 409 `provisioning_off` when `SLASHOBSERVE_PROVISION_DIR` is unset, and 500 `provision_dir_unreadable` when the directory cannot be read. ### Error codes | `error_code` | Message in the status | Meaning | | --- | --- | --- | | `file_unreadable` | The file cannot be read. | The file cannot be opened. | | `invalid_spec` | The spec is invalid, followed by each path and problem. | The file does not parse as a valid Spec, or a query fails. | | `version_conflict` | The dashboard got a newer version while the file was saved; the next run saves it again. | Someone saved the dashboard while the file was being saved. | | `forbidden` | The provisioning account cannot save into this folder or dashboard. | The folder or dashboard is out of the account's reach. | | `restricted_content` | This dashboard reads the datasource, named by its uid in quotes, which only Admins can query; save it in a folder only Admins can read. | The file's folder is not one only Admins can read; see [Who can query a datasource](/docs/reference/datasources-file/#who-can-query-a-datasource). | | `internal` | The save failed; the server log has the cause. | Any other failure, a link that leaves the directory included. | A message is cut at 2048 bytes. ### Starter dashboards The starter dashboards in the Audit folder are the exception to the rules above. The server provisions them itself, so they are read-only and a change is refused with 409 `provisioned`. [Audit trail](/docs/operate/audit/) says what they show. - At every start, the server adds one version to each starter whose shipped content differs from what is stored, with the summary `Updated to this release`. It leaves an unchanged one alone, and several servers starting together add the version once. - Each such change is recorded as `provision.apply`, and the threads, pins and view counts of the starter stay. - A starter that someone edited before this behavior existed is kept as a separate dashboard named `<title> (your copy)`, and the starter takes the shipped content. The copy and the new version are saved together, so a failed update leaves no copy and the next start tries again. - A starter that is deleted comes back at the next start, while the Audit folder exists. An Admin who wants a changed one duplicates it, and the copy is ordinary. - A starter does not list a panel that returned no data as unverified, because the audit starters can be empty on a fresh install. Its copy lists it like any dashboard. # Run more than one server > What to set for two or more servers on one Postgres, behind a pooler, what each server counts on its own, and how to check they work as one. Source: https://slashobserve.com/docs/operate/scaling/ · Markdown: https://slashobserve.com/docs/operate/scaling/index.md Run two or more servers on one Postgres when you want the app to stay up through a crash, a node drain or an upgrade. The servers behave as one for scheduled jobs, events, agent runs, webhooks, OAuth tokens and provisioning. Each server heartbeats into the database and counts the live servers. It divides the limits that cap a resource all servers share, and keeps every other limit for itself. ## Add a second server These steps run two servers on Kubernetes against a Postgres behind a pooler. [Run on Kubernetes](/docs/operate/kubernetes/) covers the rest of the chart. 1. Create the Secret `slashobserve-database`. It holds the pooled address under `url` and the direct address under `direct-url`. 2. Set the [Helm values for two or more servers](#helm-values-for-two-or-more-servers). 3. Upgrade the release. A rolling upgrade migrates on the first new pod while the others wait on the lock. 4. Check that both servers report in, as [Check it is working](#check-it-is-working) shows. Without Helm, run each server with the same settings and put a load balancer with no session affinity in front. ## What to set Set these on every server: - The same `SLASHOBSERVE_SECRET_KEY`, OIDC settings and `SLASHOBSERVE_PUBLIC_URL`. - The same datasources file, because each server reads it only at startup. A datasource you add in the app is stored in Postgres, and the other servers pick it up within 10 seconds. - `SLASHOBSERVE_AGENT_WORKERS`, which defaults to 8. The fleet runs the replica count times this many agent requests at once. - `SLASHOBSERVE_DATABASE_DIRECT_URL`, whenever `SLASHOBSERVE_DATABASE_URL` goes through a transaction pooler. Set these once for the fleet: - One Postgres that every server uses, with a [backup](/docs/operate/upgrades-and-backups/). - `limits.maxConcurrentQueries` on each datasource, as the total number of queries the datasource can take from all servers. It defaults to 32, and you set it in the datasources file or on the datasource's form in the app; see [the datasources file](/docs/reference/datasources-file/). A datasource's fleet total goes in the datasources file the chart renders: ```yaml datasources: datasources: - uid: prom type: prometheus name: Prometheus prometheus: url: http://prometheus.monitoring:9090 limits: maxConcurrentQueries: 64 ``` ## Decide whether you need another server A second server is for availability first. Capacity per server depends on your hardware, so [measure it](#measure-your-own-hardware) before you size a fleet by it. The ceiling of the agent is usually the rate limit of your model provider, not the number of servers. Each server with a model provider runs one `observe-agent` child process that works that server's runs, so the fleet runs one per server. Measured on a compose stack with the replay model, an idle child holds about 50 MiB resident (`docker top`). The whole server container, child included, shows about 48 MiB in `docker stats`, and the compose server limit is 512M. ## Connections Each server opens a pool on `SLASHOBSERVE_DATABASE_URL`. The pool holds at most the largest of 16, `2 x workers + 8` and the machine's CPU count. That is 24 at the default 8 workers on a host with 24 or fewer CPUs. A `pool_max_conns` in the URL replaces that size. Each server also keeps 3 connections on the direct URL for `LISTEN` (events, run claims and live agent text). It uses one more while it migrates or runs the provisioning and service-account locks. Plan Postgres' `max_connections` like this: - Without a pooler, about `replicas x (24 + 4)` connections at the defaults, plus your own headroom for backups and people. - With a pooler, `replicas x 4` direct connections, and the size of the pooler's pool is yours to set. `pg_stat_activity` shows what Postgres sees, and `SHOW POOLS` in the pooler's admin console shows the pooled side. ## Run behind a pooler [Behind a connection pooler](/docs/operate/production/#behind-a-connection-pooler) has the rules: point the pooled URL at the pooler and the direct URL straight at Postgres. Without the direct URL, live updates and the migration lock do not work. The locks that make provisioning and the service-account file run on one server at a time do not work either. The two-server check runs PgBouncer 1.26.1 in transaction mode with `max_prepared_statements = 200`. ## Check it is working Query these in Prometheus, or read the first three on the "Are the servers sharing the work?" row of the [internals dashboard](/docs/operate/observe-slashobserve/): - `max(slashobserve_fleet_servers)` and `min(slashobserve_fleet_servers)` both equal the replica count, because every server reports the same count. - `slashobserve_datasource_slots_limit` on each server is the datasource's total divided by the live servers, rounded up. - `sum by (datasource) (slashobserve_datasource_slots_in_use) / sum by (datasource) (slashobserve_datasource_slots_limit)` close to 1, together with `429` answers, means the datasource is the limit. Raise `maxConcurrentQueries` only if the datasource can take more. - `histogram_quantile(0.95, sum by (le) (rate(slashobserve_agent_queue_wait_seconds_bucket[15m])))` rising means agent requests wait for a worker. Add workers or servers if your model provider allows it. To list the servers, run this in Postgres; no HTTP endpoint does: ```sql SELECT id, version, started_at, seen_at FROM server_instances; ``` [Metrics](/docs/operate/metrics/) lists the series. ## Measure your own hardware Run `make loadtest` in a checkout. It starts its own stack and never touches another one. It runs dashboard viewers, activity streams, MCP clients and simultaneous agent builds against one server and against two, then the builds alone with 2 and 16 workers. The agent builds use a replay model, so they measure the queue and the database, not your provider. It takes about 50 minutes and writes `loadtest/reports/<time>-<label>/report.md`. The report has one table per scenario, the peak CPU and memory of every container, and a pass or fail for each gate. ## Reference ### Helm values for two or more servers These values run two servers against a Postgres behind a pooler. ```yaml replicaCount: 2 database: existingSecret: slashobserve-database urlKey: url directUrlKey: direct-url env: - name: SLASHOBSERVE_AGENT_WORKERS value: "8" resources: requests: cpu: "1" ``` ### Per server and fleet-wide limits A limit is divided among the live servers only when it caps a total over every caller of a resource that all servers share and that gives no backpressure of its own. Every other limit protects one server's own capacity or one caller, and stays per server. A caller whose requests spread over N servers can have up to N times a per-server cap in flight. | Limit | Value | Scope | | --- | --- | --- | | Queries running against one datasource | `maxConcurrentQueries`, default 32 | Fleet-wide | | Queries running on one server, all datasources | 32 | Per server | | OAuth registrations, authorizations, token requests and revocations | 30, 120, 1200 and 120 per minute | Fleet-wide | | OAuth token requests of one client | 120 per minute | Per server | | MCP requests in flight | 8 per person or service account, 32 per server | Per server | | Dashboard event streams | 20 per person, 1000 per server | Per server | | Activity streams | 5 per person, 500 per server | Per server | | Live tails | 5 per person, 200 per server | Per server | | Panel data requests in flight | 8 per caller | Per server | | Query drafts in flight | 3 per caller, 10 per server | Per server | | Query drafts started | 60 per caller per clock hour | Fleet-wide | | Grafana imports | 1 per caller, 4 per server | Per server | | Agent requests running at once | `SLASHOBSERVE_AGENT_WORKERS` | Per server | | New dashboard requests queued or running | 20 in all, 3 per person | Fleet-wide | | Investigations queued or running | 10 in all, 3 per person | Fleet-wide | Details of why a limit has its scope: - Datasource queries are fleet-wide because the datasource is shared, so each server gets its share, rounded up. - OAuth limits that count every client are fleet-wide because they cap a total over every client. - Query drafts started are fleet-wide because Postgres counts them, so the model spend stays capped however many servers there are. - New dashboard requests and investigations are fleet-wide because Postgres counts them. - The agent request limit is per server because the fleet runs the replica count times `SLASHOBSERVE_AGENT_WORKERS`. - The other per-server limits protect the server or cap one caller. ### Known limits - A Grafana import on a server that stops is handed to another server, or continues after the restart, within about 10 seconds. One whose server is killed waits for its 60 second lease, and an import whose server dies twice ends failed. - After a crash, the other servers count the dead one for up to 30 seconds, so their shares are briefly smaller. A new server is counted within 10 seconds. - Another server retries a killed server's running agent requests once their 60 second lease expires, up to 2 attempts in all. - Streams on a stopped server end, and the client reconnects. An activity stream resumes from `Last-Event-ID`. - A rolling upgrade migrates on the first new pod while the others wait on the lock; see [Upgrades and backups](/docs/operate/upgrades-and-backups/). # Run on Kubernetes > Install the server with the Helm chart, on an external Postgres, with every secret taken from a Secret you create. Source: https://slashobserve.com/docs/operate/kubernetes/ · Markdown: https://slashobserve.com/docs/operate/kubernetes/index.md Use the Helm chart in `deploy/helm/slashobserve` to run the server on Kubernetes. It runs the server as one Deployment with a Service, and it provisions the [internals dashboard](/docs/operate/observe-slashobserve/) by default. It ships no Postgres and creates no Secret: you bring the database and the credentials, and the chart only references them. ## Install the chart 1. Check the prerequisites: - A Postgres database the cluster can reach, and its connection string. See [Upgrades and backups](/docs/operate/upgrades-and-backups/) for backing it up. - Helm 3 or later and `kubectl` pointed at the cluster. The chart is an `apiVersion: v2` chart, and its checks run on Helm 4. - For browser sign-in, an OIDC client at your identity provider with the redirect URI `<public url>/api/v1/auth/callback`; see [Sign-in with OIDC](/docs/connect/oidc/). - A server that only tools use needs no OIDC client; see [Run with no browser sign-in](#run-with-no-browser-sign-in). The chart refuses an install that has neither sign-in nor a service-accounts Secret. - A Prometheus that scrapes the pod, and a datasource with uid `prom` that reads from it, if you want the internals dashboard to show data. 2. Write each secret value to a file, so it stays out of your shell history, then create the Secrets in the release namespace: ```sh kubectl create namespace slashobserve kubectl -n slashobserve create secret generic slashobserve-database --from-file=url=./database-url kubectl -n slashobserve create secret generic slashobserve-oidc --from-file=client-secret=./oidc-client-secret kubectl -n slashobserve create secret generic slashobserve-secret-key --from-file=secret-key=./secret-key kubectl -n slashobserve create secret generic slashobserve-llm --from-file=api-key=./llm-api-key ``` Delete the files afterwards. [The Secrets](#the-secrets) lists what each one holds. 3. Write a values file, here with browser sign-in: ```yaml publicURL: https://slashobserve.example.com database: existingSecret: slashobserve-database oidc: issuerURL: https://idp.example.com clientID: slashobserve existingSecret: slashobserve-oidc auth: allowedEmailDomains: [example.com] adminEmails: [you@example.com] secretKey: existingSecret: slashobserve-secret-key datasources: datasources: - uid: prom type: prometheus name: Prometheus prometheus: url: http://prometheus.monitoring:9090 ``` 4. Install from a checkout of the release tag you run: ```sh helm install slashobserve deploy/helm/slashobserve --namespace slashobserve -f values.yaml --wait ``` 5. Check readiness. The chart's notes print the command, which port-forwards the Service and requests `/readyz`: ```sh kubectl -n slashobserve port-forward svc/slashobserve 8080:8080 curl http://127.0.0.1:8080/readyz ``` You see `{"status":"ok","checks":{"database":"ok","migrations":"ok"}}` once Postgres answers and every migration has run. `values.schema.json` in the chart describes every value. The install fails before it reaches the cluster when a required value is missing, or when the OIDC values are incomplete. `image`, `publicURL` and `database` are required, `publicURL` must be `http` or `https` with a host and no path, and `database` needs `existingSecret` and `urlKey`. ## Set the image The image defaults to `ghcr.io/slashobserve/slashobserve` at the chart's `appVersion`. Set `image.tag` to run another tag, and `image.digest` to pin the digest too. ## Turn on the agent Set these values to enable the built-in agent: - `llm.provider` - `llm.model`, when the provider needs one - `llm.apiKey.existingSecret` - `llm.effort`, if you want a different effort level See [LLM providers](/docs/connect/llm-providers/). The chart mounts the key as a file for `SLASHOBSERVE_LLM_API_KEY_FILE`. The server starts `observe-agent` from the image whenever `llm.provider` is set. That process makes the model calls from the pod, so the pod needs a network path to the provider. ## Set any other server setting The chart sets the environment variables of the [configuration reference](/docs/reference/configuration/) from its values. Add any other `SLASHOBSERVE_*` setting under `env`, in Kubernetes `EnvVar` form. For example, `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` has no chart value, so set it under `env` with the number quoted, because `value` is a string. It takes a whole number from 6 to 60 and defaults to 12. ```yaml env: - name: SLASHOBSERVE_AGENT_INVESTIGATION_CALLS value: "24" ``` Each `env` name must start with `SLASHOBSERVE_`. ## Record the real client address Set `trustedProxies` to the narrowest addresses or ranges your Ingress controller connects from, not the pod network. The audit trail then records the real client address; see [Put TLS in front](/docs/operate/production/#put-tls-in-front). ```yaml trustedProxies: - 10.0.4.0/28 ``` ## Run with no browser sign-in A server that only tools use can run without an identity provider, as [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in) describes. 1. Leave `oidc.issuerURL`, `oidc.clientID` and `oidc.existingSecret` empty. 2. Create a service-accounts Secret and set `serviceAccounts.existingSecret`; see [Service accounts from a file](#service-accounts-from-a-file). ```yaml publicURL: https://slashobserve.example.com database: existingSecret: slashobserve-database serviceAccounts: existingSecret: slashobserve-service-accounts ``` The chart then sets none of the three OIDC variables and references no client secret. Every request authenticates with a key from the service-accounts file. The render fails in these cases: - Only some of the three OIDC values are set. The message names the missing ones, as the server refuses to start with only some of them. - All three are empty and `serviceAccounts.existingSecret` is empty, because nobody could sign in. - All three are empty and `auth.allowedEmailDomains` or `auth.adminEmails` is set, because only browser sign-in reads them. ## Add datasources `datasources.datasources` holds the entries of the [datasources file](/docs/reference/datasources-file/), which the chart renders into a ConfigMap. `datasources.existingConfigMap` names a ConfigMap of your own instead, with the file under the key `datasources.key` (`datasources.yaml` by default). The file never holds a secret. Reference a password by an `*Env` name and set that variable from a Secret under `env`: ```yaml env: - name: SLASHOBSERVE_CLICKHOUSE_PASSWORD valueFrom: secretKeyRef: name: slashobserve-clickhouse key: password ``` The server reads the datasources file only at startup. A change to the rendered ConfigMap changes a checksum annotation on the pod, so `helm upgrade` restarts it. A change to your own ConfigMap needs `kubectl rollout restart`. The values and the file are optional. An Admin can add datasources in the app instead, which stores them in Postgres. That needs `secretKey.existingSecret` for their credentials; see [Add datasources in the app](/docs/connect/datasources-in-the-app/). ## Service accounts from a file To create [service accounts with keys from files](/docs/operate/service-account-keys/#declare-service-accounts-in-a-file), put the service-accounts file and every key file in one Secret. 1. Write `service-accounts.yaml`, with a `serviceAccounts` list. Each `keyFile` names a path under `/etc/slashobserve/service-accounts`, where the chart mounts the Secret. ```yaml serviceAccounts: - name: deploy-bot role: editor keyFile: /etc/slashobserve/service-accounts/deploy-bot.key ``` 2. Create the Secret: ```sh kubectl -n slashobserve create secret generic slashobserve-service-accounts \ --from-file=service-accounts.yaml=./service-accounts.yaml --from-file=deploy-bot.key=./deploy-bot.key ``` 3. Set `serviceAccounts.existingSecret` to the Secret. Set `serviceAccounts.fileKey` too if the file's key in the Secret is not `service-accounts.yaml`. The chart points `SLASHOBSERVE_SERVICE_ACCOUNTS_FILE` at the file. The block in step 1 is that file's content, not a chart value. ## Provision dashboards The chart mounts an empty provisioning directory and one ConfigMap per folder beneath it, so each ConfigMap is one folder of [provisioned dashboards](/docs/operate/provisioning/). Each key of the ConfigMap is a file name ending in `.json`, and its value is an ObserveSpec document. 1. Create a ConfigMap from a directory of dashboards: ```sh kubectl -n slashobserve create configmap payments-dashboards --from-file=dashboards/payments/ ``` 2. List it in your values: ```yaml provisioning: folders: - directory: Payments configMap: payments-dashboards ``` 3. Run `helm upgrade`. `directory` names the folder, with the same rules as a subdirectory of the provisioning directory. Files directly in the provisioning directory, which would go to General, are not available on Kubernetes; put them in a folder. `provisioning.internals: true`, the default, adds the internals dashboard as the folder `SlashObserve`. Mount each folder as its own plain ConfigMap volume, as the chart does. A projected volume that nests several ConfigMaps creates symlinked directories that the provisioner does not walk into, and a `subPath` mount never sees updates. A changed ConfigMap reaches the pod within about a minute, and the provisioner saves the change within 30 seconds after that. ## Metrics The server serves `/metrics` without sign-in; see [Metrics](/docs/operate/metrics/). The pod carries `prometheus.io/scrape`, `prometheus.io/port` and `prometheus.io/path` annotations for a Prometheus that discovers pods by annotation. Set `metrics.podAnnotations: false` to remove them. With the Prometheus Operator, set `metrics.serviceMonitor.enabled: true`. Add the label your Prometheus selects ServiceMonitors by under `metrics.serviceMonitor.labels`, and change the scrape interval with `metrics.serviceMonitor.interval` (30 seconds by default). The Ingress below does not route `/metrics`. That path goes to a Service with no endpoints, so the controller answers with an error, and Prometheus reaches the pod or Service inside the cluster. The server answers `404` to a percent-encoded spelling of the path such as `/%6Detrics`, so a controller that matches the raw path cannot route around that rule. Set `ingress.exposeMetrics: true` to route `/metrics` through the Ingress as well, and then block it at the controller or load balancer when the Ingress is public. ## Ingress Set `ingress.enabled: true` to create an Ingress for the host of `publicURL`. Set `ingress.tlsSecretName` to add a TLS block. The Ingress adds a second Service, `<release>-no-metrics`, which only holds the `/metrics` path back; it selects no pods. The controller must follow the proxy rules in [Run in production](/docs/operate/production/#put-tls-in-front). That means no response buffering and no short read timeout on the four Server-Sent Events streams listed under [Keep live streams open](/docs/operate/production/#keep-live-streams-open), and request bodies of at least 8 MiB. For ingress-nginx, for example: ```yaml ingress: enabled: true className: nginx tlsSecretName: slashobserve-tls annotations: nginx.ingress.kubernetes.io/proxy-buffering: "off" nginx.ingress.kubernetes.io/proxy-read-timeout: "3600" nginx.ingress.kubernetes.io/proxy-body-size: 8m ``` ## Upgrade and roll back Take a database backup before every upgrade, as [Upgrades and backups](/docs/operate/upgrades-and-backups/) describes, then upgrade: ```sh helm upgrade slashobserve deploy/helm/slashobserve --namespace slashobserve -f values.yaml --wait ``` The new pod runs pending migrations at startup and turns ready once they are done. The chart sets no Deployment strategy, so Kubernetes rolls the pods out by default. For a moment the old pod and the new one run together against the migrated database. When a release's notes in [Upgrades and backups](/docs/operate/upgrades-and-backups/) say to stop the old servers first, do this: 1. Scale the Deployment to 0 with `kubectl`. 2. Run `helm upgrade`. 3. Check that the Deployment has the replica count from your values. To roll back, run `helm rollback slashobserve <revision> --wait`, which returns to an earlier revision's image and values. The server runs migrations forward only, so a rollback across a release that ran a migration also needs the database restored from the backup you took before the upgrade. ## Run more than one replica Replicas share Postgres and behave as one server for jobs, events, agent runs, webhooks, tokens and provisioning. Two servers behind PgBouncer are checked before each release that changes them. See [Run more than one server](/docs/operate/scaling/) for what to set, the limits each server keeps, and how to check the servers share the work. ## Try it on kind Run `make helm-kind` in a checkout to try the chart locally. It creates the local kind cluster `slashobserve-helm`, builds the server image from your checkout and deploys a throwaway Postgres and Prometheus from `deploy/helm/kind`. It then installs the chart with generated Secrets, checks it, and upgrades and rolls it back. `make helm-kind-down` deletes that cluster. ## Reference ### The Secrets The key names are the chart's defaults. `database.urlKey`, `oidc.clientSecretKey`, `secretKey.key` and `llm.apiKey.key` change them. | Secret key | Holds | | --- | --- | | `url` in `slashobserve-database` | The connection string. Required. | | `direct-url` in the same Secret | A connection string that bypasses your pooler. Optional. | | `client-secret` in `slashobserve-oidc` | The client secret from your identity provider. Needed for browser sign-in. | | `secret-key` in `slashobserve-secret-key` | The key that encrypts what the server stores for you. Optional. | | `api-key` in `slashobserve-llm` | The model provider's key. Optional. | Details of each Secret: - `url` looks like `postgres://slashobserve:<password>@<host>:5432/slashobserve?sslmode=require`. - `direct-url` goes in the same Secret with `--from-file=direct-url=./database-direct-url`. Name it with `database.directUrlKey: direct-url`; see [Behind a connection pooler](/docs/operate/production/#behind-a-connection-pooler). - `secret-key` encrypts the credentials of datasources added in the app, Grafana connection tokens and webhook signing secrets. Set it before anyone adds one, generate it with `openssl rand -hex 32`, and keep it with your database backups. - `api-key` is mounted as a file for `SLASHOBSERVE_LLM_API_KEY_FILE`. ### Chart values | Value | Sets | | --- | --- | | `logLevel` | `SLASHOBSERVE_LOG_LEVEL`, one of `debug`, `info`, `warn`, `error`. Default `info`. | | `logFormat` | `SLASHOBSERVE_LOG_FORMAT`, `json` or `text`. Default `json`. | | `outboundDomains` | `SLASHOBSERVE_OUTBOUND_DOMAINS`; see [Outbound access](/docs/operate/outbound-access/). | | `trustedProxies` | `SLASHOBSERVE_TRUSTED_PROXIES`. | | `metrics.enabled` | `SLASHOBSERVE_METRICS`. Default true. | | `auth.allowedEmailDomains` | `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS`. Required with browser sign-in; list the domains or set `["*"]`. | | `auth.adminEmails` | `SLASHOBSERVE_ADMIN_EMAILS`. | | `replicaCount` | The Deployment's replica count. Default 1. | The chart also has `imagePullSecrets`, `service.type` and `service.port` (default `ClusterIP` and 8080), `serviceAccount.create` and `serviceAccount.name`, `podAnnotations`, `resources`, `nodeSelector`, `tolerations` and `affinity`. ### Pod defaults - The pod runs as the image's non-root user 65532 with a read-only root filesystem, every capability dropped and no Kubernetes API token mounted. - The liveness probe requests `/healthz` and the readiness probe `/readyz`. - A startup probe on `/readyz` allows 5 minutes before the liveness probe starts, so a long migration at boot is not mistaken for a hung server. - Set `resources` to fit your load; the demo stack limits the server to 512 MiB of memory. # Service-account keys > Create and revoke the keys that the CLI, MCP clients and scripts use, declare them in a file, and run a server with no browser sign-in. Source: https://slashobserve.com/docs/operate/service-account-keys/ · Markdown: https://slashobserve.com/docs/operate/service-account-keys/index.md The CLI, MCP clients and scripts sign in with a service-account key, not a browser session. A service account is the identity behind one or more keys, and it has a role. Only a signed-in Admin can create service accounts and keys. ## Create a key 1. Sign in to the web app as an Admin and open `<public url>/keys`. The **API keys** link on the Agents page opens the same page, and the old `/settings/keys` address redirects to it. 2. Choose **Create key**. 3. In the panel, name the key and pick the account: - **New service account** is the default, so an existing account is never changed by accident. Name it with lowercase letters, digits and dashes, up to 63 characters, for example `ci-bot`. - Or pick an existing service account. 4. Pick a role, which is the role of the account and so of every key it has. A new account starts as Editor. 5. Pick an expiry: **In 90 days** (the default), **In 30 days**, **In 1 year** or **Never**. 6. Choose **Create key** in the panel and copy the key. The panel shows the key once, with an `export OBSERVE_TOKEN=...` line to paste into your shell. The server stores only a hash of the key, so a lost key cannot be recovered. Create a new one and revoke the old one. Keys start with `sok_`. The page also shows ready-made client setup snippets for your server's address; they refer to `OBSERVE_TOKEN` and never contain the key. To use the key, see [CLI](/docs/use/cli/) and [MCP](/docs/use/mcp/). ## Add or revoke a key Add more keys to an account from the same **Create key** panel by picking the account. To revoke a key, choose **Revoke** in its row on the keys page. The server refuses a revoked or expired key immediately. Choosing another role for an existing account in the **Create key** panel changes the role of every key of that account. The table shows each key's role, which is its account's role. ## Delete a service account The **Service accounts** list under the keys shows every account, including one with no keys left, with its role and number of working keys. Choose **Delete** on an account to remove it and all its keys. Every key stops working at once, and what the account made stays under its name. You cannot delete an account from the service-accounts file here. `DELETE /api/v1/service-accounts/{id}` answers 409 `provisioned` for it; remove it from the file instead. Like creating keys, deleting an account needs an Admin signed in to the web app; a key cannot delete an account. ## Let an account take agent runs An account takes runs only when an Admin turns on **Takes agent runs** in the **Create key** panel, or sets `takes_runs` with `PATCH /api/v1/service-accounts/{id}`. The account then lists as `listening` or `working` while it asks for work. The switch applies to every key of the account, like the role, and the panel saves it when you create the key. A service account that takes runs works under the same guards as the built-in agent, which the server enforces on every call of the run's session. See [MCP](/docs/use/mcp/#the-run-session-enforces-the-guards). ## Declare service accounts in a file A tool that must start with a key and no person in the loop, such as a deploy pipeline or the demo's load generator, gets its key from a file the server reads at boot. 1. Generate a key and keep it out of version control: ```sh printf 'sok_%s\n' "$(openssl rand -base64 32 | tr '+/' '-_' | tr -d '=\n')" > deploy-bot.key ``` 2. Write a YAML file that lists the accounts: ```yaml serviceAccounts: - name: deploy-bot role: editor description: Posts deploy markers from CI keyFile: /run/secrets/deploy-bot.key ``` 3. Point `SLASHOBSERVE_SERVICE_ACCOUNTS_FILE` at the file and start the server. On Kubernetes, see [Service accounts from a file](/docs/operate/kubernetes/#service-accounts-from-a-file). At each start the server creates every listed account, marked as provisioned, or updates its role, description and `takesRuns` to match the file. It keeps the key from `keyFile` as the account's one active key named `From file`, stored only as a SHA-256 hash, and never writes the key to a log or an error. Each entry takes these fields. | Field | Rule | | --- | --- | | `name` | Required. Same rule as in the web app, and each name appears once. | | `role` | Required. `viewer`, `editor` or `admin`. | | `description` | Optional, up to 256 characters. | | `takesRuns` | Optional, false by default. True lets the account claim its assigned runs over MCP with `claim_run`. | | `keyFile` | Required. Names a file that holds one key. Each account needs its own key. | Details of `keyFile`: - The file holds `sok_` followed by 43 base64url characters. - The server ignores whitespace around the key. The server refuses to start when the file is invalid. It also refuses when an account with a listed name already exists but was created in the web app or the API, because it never takes over such an account. ### Change or rotate a provisioned account A provisioned account is managed through the file only. These requests answer 409 `provisioned`: - Changing its role in the web app, or its role or `takes_runs` with `PATCH /api/v1/service-accounts/{id}`. - Creating a key for it, or revoking one of its keys. The web app lists such a key as "from file" and offers no **Revoke** for it. It locks the **Takes agent runs** switch. To rotate the file key, write a new key to its file and restart the server. The server revokes the old file key and the new one replaces it. A key that was revoked before cannot come back; write a fresh one. Removing an account from the file leaves it and its key in place. ## Run with no browser sign-in A server that only tools use, such as one a benchmark harness starts in a container, can run with no identity provider. 1. Leave all three of `SLASHOBSERVE_OIDC_ISSUER_URL`, `SLASHOBSERVE_OIDC_CLIENT_ID` and `SLASHOBSERVE_OIDC_CLIENT_SECRET` unset. 2. Declare the keys in a [service-accounts file](#declare-service-accounts-in-a-file), with an `admin` account when the tool needs Admin calls. 3. Start the server, for example with these settings and keys and datasources in files: ```sh SLASHOBSERVE_DATABASE_URL=postgres://slashobserve:<password>@postgres:5432/slashobserve SLASHOBSERVE_PUBLIC_URL=http://localhost:8080 SLASHOBSERVE_SERVICE_ACCOUNTS_FILE=/etc/slashobserve/service-accounts.yaml SLASHOBSERVE_DATASOURCES_FILE=/etc/slashobserve/datasources.yaml SLASHOBSERVE_LLM_PROVIDER=anthropic SLASHOBSERVE_LLM_MODEL=<model> SLASHOBSERVE_LLM_API_KEY_FILE=/run/secrets/llm.key ``` 4. Wait for `GET /readyz` to answer 200. 5. Start runs with the key, for example `POST /api/v1/observe` with `kind` `investigate`, and read the finding from the run; see [Investigate](/docs/use/investigate/). The server starts without contacting any identity provider and logs that browser sign-in is off. A browser sign-in goes back to the login page with the error `sign_in_off`, and a session cookie from before no longer authenticates. Every request authenticates with a key from the service-accounts file. The server refuses to start with only some of the three OIDC settings, so a normal install that misses one fails instead of losing its sign-in. It also refuses the settings that only browser sign-in reads when the three are unset: - `SLASHOBSERVE_OIDC_INTERNAL_URL` - `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` - `SLASHOBSERVE_ADMIN_EMAILS` - `SLASHOBSERVE_OIDC_GROUP_ROLES` - `SLASHOBSERVE_AUTH_PROVIDER_NAME` To add browser sign-in later, set all three OIDC settings and the allowed domains, then restart. ## Reference ### Key states Each key listed over the API has a `state`; see [States](/docs/reference/states/). | State | Meaning | | --- | --- | | `active` | The key works. | | `expiring` | The key works and expires within 7 days. | | `expired` | The key's expiry has passed, and the server refuses it. | | `revoked` | An Admin revoked the key, and the server refuses it. | ### What a key can do - A key acts with its service account's role. - A service-account key cannot create more keys, whatever its role, and only an Admin sees the API keys page. - Folder access applies to a key as it does to a person, except that a key matches no folder entry. A restricted folder is invisible to it unless its service account is an Admin or created the folder; see [Folders and access](/docs/teams/folders/). - A key has no My Dashboards folder. - The Audit log records creating, changing and deleting an account, and creating and revoking a key, never with the key; see [Activity](/docs/use/activity/#admin-changes). [The security model](/docs/operate/security-model/) describes what any key can do. # The demo > The OpenTelemetry Astronomy Shop running on SlashObserve's stores, with feature-flag faults you switch on to have an incident to investigate. Source: https://slashobserve.com/docs/operate/demo/ · Markdown: https://slashobserve.com/docs/operate/demo/index.md The demo runs the OpenTelemetry project's own Astronomy Shop, about twenty services in many languages that sell telescopes, beside a SlashObserve server that reads the shop's telemetry. Use it to try SlashObserve on real traffic, and to switch on a fault in the shop so there is an incident to investigate. The [quick start](/docs/get-started/quick-start/) takes you from nothing to a signed-in server on it. ## Start the demo You need Docker with Compose 2.24.4 or newer, `git`, `curl`, `jq` and `openssl`, and a clone of the repository, which holds the Compose files. 1. Start the stack from the root of the clone: ```sh make demo ``` This pulls the latest published SlashObserve image and starts the stack as the Compose project `slashobserve-astronomy`. The first start fetches the pinned upstream release of the shop and pulls about 12 GB of images. The stack is healthy about a minute after that, and the command waits until it is. 2. Open http://localhost:58080 and sign in as `admin@example.com` with the password `password`. Sign-in goes through Dex, which is for development only. 3. Open the shop at http://localhost:58081 to see what the telemetry describes. 4. A few minutes after the start, open **Astronomy Shop overview** in the folder Demo. It is not there earlier, because [the dashboard](#the-dashboard) is saved only once every panel returns data. The stores start empty, and the shop's load generator sends traffic all the time. Every chart has live data a minute or two after the start and gains history while the demo runs. Prometheus keeps 3 days, and Loki, Tempo and ClickHouse keep 72 hours. Jaeger holds only the latest 25,000 traces, in memory. Stopping the demo keeps the data of every store except Jaeger, which starts empty, and starting the demo again carries on from it. | Address | What it is | | --- | --- | | http://localhost:58081 | The shop. | | http://localhost:58081/jaeger/ui | Its Jaeger UI. | | http://localhost:58081/feature/ | Its feature flag UI. | | http://localhost:58080 | SlashObserve. | | http://localhost:55556 | Dex, the sign-in provider. | Every port binds to 127.0.0.1. Set `ASTRONOMY_SHOP_HOST_PORT`, `SLASHOBSERVE_HOST_PORT` or `SLASHOBSERVE_DEX_HOST_PORT` to move the shop, SlashObserve or Dex to another port. ### Build the server from your checkout `make demo-build` builds the server image from your working tree instead of pulling it, which is for people changing the code. To run another server image with `make demo`, set `SLASHOBSERVE_IMAGE`. `make demo` then skips the pull and uses the image as it is on your machine, so it can be a local build. ## Check that every datasource answers ```sh make demo-check ``` The check lists the datasources through the API and runs a fresh health check on each. It then reads one row of the shop's data from each, and prints one line per read: ```text datasources: ch es jaeger loki os prom tempo ok prom healthy, shop span metrics: 1 rows ``` It reads these rows: - A span-metrics series from Prometheus. - Frontend log lines from ClickHouse and Loki. - Frontend traces from ClickHouse, Tempo and Jaeger. It waits up to three minutes for each read, prints `FAIL` with the reason for one that does not answer, and exits 1 if any fails. `scripts/astronomy.sh check --search` also reads the logs from `es` and `os`; see [Add Elasticsearch and OpenSearch](#add-elasticsearch-and-opensearch). ## Switch on a fault A fault is a feature flag in the shop. This switches on `paymentFailure` at 50%, so about half of the charges fail, and then switches it off: ```sh make demo-fault FLAG=paymentFailure VARIANT=50% make demo-fault FLAG=paymentFailure VARIANT=off ``` With `paymentFailure` at `50%`, the `payment` service returns errors for about half of the charges. Error spans appear on `payment` and on `checkout` above it, and fall back to none a minute after you switch the flag off. Then start an investigation from the web app, or ask the agent what is failing; [Turn on the agent](#turn-on-the-agent) says how. To see every flag with its current and possible variants, run the target with no flag: ```sh make demo-fault ``` Each line holds a flag, its current variant and its possible variants: ```text paymentFailure off 10%,100%,25%,50%,75%,90%,off ``` To set every flag back to the variant of the upstream release, run `make demo-fault-reset`. [Faults](#faults) says what each flag does. ### Which flag UI to use The change reaches the services within a few seconds, because flagd watches the file the targets edit. The flag UI at `/feature/` reads the file only when it starts and writes its own copy back whole on every save. It does not show a change the targets made, and a save in the UI overwrites that change. Use one of the two. Or restart the UI after a target with `docker restart slashobserve-astronomy-flagd-ui-1`. ## Turn on the agent The stack has no model provider, so the agent is off. Without one, prompts answer `503 agent_unavailable`. Export the provider settings before `make demo`, or put them in `deploy/astronomy/.env`, which Git ignores, and run the target again: ```sh SLASHOBSERVE_LLM_PROVIDER=anthropic SLASHOBSERVE_LLM_MODEL=<model> SLASHOBSERVE_LLM_API_KEY=<key> ``` The stack also passes `SLASHOBSERVE_LLM_BASE_URL` and `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` to the server, and no other LLM setting. Then start an investigation from the web app, or with the `astronomy` key over the API, the CLI or MCP. `scripts/astronomy.sh key` prints the path of the key. ## Add Elasticsearch and OpenSearch ```sh make demo-search ``` This builds the server from your checkout, as `make demo-build` does. It adds Elasticsearch 8 on the `es` datasource and OpenSearch 2 on the `os` datasource, which the shop's collector feeds its logs. Elasticsearch gets ECS field names (`message`, `log.level`, `service.name`, `trace.id`, `span.id`) in the `logs-demo-shop` data stream. OpenSearch gets the Simple Schema for Observability fields (`body`, `severity.text`, `resource.service.name`, `traceId`, `spanId`) in `ss4o_logs-demo-shop`. Both run with their security features off, which is for this local demo only. A real cluster needs the API key or credentials described on its [datasource page](/docs/connect/elasticsearch/). Without `make demo-search`, the `es` and `os` datasources do not answer. Running `make demo-build` or `make demo` again removes the two stores. ## Stop the demo or start over `make demo-down` stops the stack and keeps its data. `make demo-reset` also drops the volumes and the flag state, so the next start begins empty. ## Reference ### What it needs On a host with 8 CPUs and 22 GB of memory, the 31 containers use 3.2 to 4.3 GiB of memory once the shop has run for a few minutes. They use up to four cores in the first minutes and one or two afterwards. The images take about 12 GB of disk, and the stores' volumes about 0.3 GB after the first half hour. `make demo-search` adds Elasticsearch and OpenSearch, which take about 2 GiB more memory and 3.5 GB more disk. ### What is running The shop is the upstream release in `deploy/astronomy/upstream.env`, fetched by commit into `deploy/astronomy/.upstream/`, with its full profile of Kafka, accounting and fraud detection. Nothing in it is forked. The stack adds a Compose file and an OpenTelemetry Collector config on top of the upstream files. The collector sends metrics to Prometheus, logs to Loki and ClickHouse, and traces to Tempo, ClickHouse and Jaeger. One SlashObserve server reads all five stores. Upstream's own Grafana, OpenSearch, OpAMP server and Prometheus are not started. Two settings differ from upstream: - Jaeger is 2.23.0 and not upstream's 2.19.0, because the [Jaeger datasource](/docs/connect/jaeger/) needs 2.21 or newer. - The `checkout` and `product-catalog` services get 64 MB of memory instead of 20 MB. At 20 MB their working set pages in and out of the file cache all the time, and on a busy host their health checks fail. The server reads `deploy/astronomy/datasources.yaml`, which declares `prom`, `ch`, `loki`, `tempo` and `jaeger`, plus `es` and `os`, which answer only after `make demo-search`. It also reads `deploy/astronomy/service-accounts.yaml`, which declares the `astronomy` service account. Its key is generated into `deploy/astronomy/.state/keys/astronomy.key` on the first start and never leaves your machine. ### The dashboard The server provisions one dashboard, **Astronomy Shop overview**, into the folder Demo, from `deploy/compose/dashboards/Demo/astronomy-overview.json`. It reads the shop's span metrics and the Postgres metrics from Prometheus, and its logs and traces from ClickHouse. It holds one panel of every type SlashObserve draws. A provisioned file is saved only when every panel returns data. So the dashboard appears a few minutes after the start, once the shop has sent its first spans, and not before. [Provisioning](/docs/operate/provisioning/) has the rules. ### Faults These are the flags of the upstream release the stack pins, from its `demo.flagd.json`. Every flag starts `off`. | Flag | What it does | Variants | | --- | --- | --- | | `adFailure` | Fails the ad service. | `off`, `on` | | `adHighCpu` | Loads the ad service's CPU. | `off`, `on` | | `adManualGc` | Triggers full manual garbage collections in the ad service. | `off`, `on` | | `cartFailure` | Fails the cart service that share of the time. | `off`, `10%`, `25%`, `50%`, `75%`, `90%`, `100%` | | `emailMemoryLeak` | Leaks memory in the email service, faster at a higher multiple. | `off`, `1x`, `10x`, `100x`, `1000x`, `10000x` | | `emitRawPii` | Emits raw PII attributes from checkout and payment; it is not a failure. | `off`, `on` | | `failedReadinessProbe` | Fails the readiness probe of the cart service. | `off`, `on` | | `imageSlowLoad` | Slows image loading in the frontend. | `off`, `5sec`, `10sec` | | `intlShippingSlowdown` | Delays international shipping responses. | `off`, `5sec`, `10sec` | | `kafkaQueueProblems` | Overloads the Kafka queue and delays the consumer, so lag spikes. | `off`, `on` | | `loadGeneratorFloodHomepage` | Floods the frontend with requests. | `off`, `on` | | `paymentFailure` | Fails payment charges that share of the time. | `off`, `10%`, `25%`, `50%`, `75%`, `90%`, `100%` | | `paymentUnreachable` | Makes the payment service unavailable. | `off`, `on` | | `productCatalogFailure` | Fails the product catalog service on one product. | `off`, `on` | | `productCatalogLockContention` | Causes lock contention on the product catalog database. | `off`, `on` | | `recommendationCacheFailure` | Fails the recommendation service's cache. | `off`, `on` | | `aiRunawayAgent` | Keeps the shop's AI agent looping on tool calls. | `off`, `on` | | `aiSlowResponse` | Slows the shop's AI agent's model responses. | `off`, `5sec`, `10sec` | The stack does not start the shop's AI agent service, so the last two flags change nothing. `make demo-fault` sets a flag to `on` when you give no variant, and refuses a flag that has no `on` variant, such as `paymentFailure`, with the variants it has. It refuses an unknown flag or variant the same way. # Configuration > Every `SLASHOBSERVE_*` environment variable with its default, range and effect, and the settings a server needs to start. Source: https://slashobserve.com/docs/reference/configuration/ · Markdown: https://slashobserve.com/docs/reference/configuration/index.md You configure the server with environment variables named `SLASHOBSERVE_*`. Two are required to start, and everything else has a default. The server reads the variables once at startup, so restart it after a change. It trims whitespace around each value, and an empty value counts as unset. A value that does not parse, or falls outside its range, stops the server at startup, and the error names the variable. ## Start a server with the minimum 1. Set the two required variables: ```sh export SLASHOBSERVE_DATABASE_URL='postgres://slashobserve:slashobserve@postgres:5432/slashobserve?sslmode=disable' export SLASHOBSERVE_PUBLIC_URL='http://localhost:8080' ``` 2. Decide how people sign in. For browser sign-in, also set `SLASHOBSERVE_OIDC_ISSUER_URL`, `SLASHOBSERVE_OIDC_CLIENT_ID`, `SLASHOBSERVE_OIDC_CLIENT_SECRET` and `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS`; see [Sign-in](#sign-in). Without browser sign-in, only service-account keys authenticate; see [Run with no browser sign-in](/docs/operate/service-account-keys/#run-with-no-browser-sign-in). 3. Optionally set an LLM provider so the built-in agent runs; see [LLM](#llm). The image sets `SLASHOBSERVE_HTTP_ADDR=:8080`. [Run your own deployment](/docs/get-started/install/) shows a full start. ## Server and logging | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_HTTP_ADDR` | `:8080` | Listen address as `host:port`. | | `SLASHOBSERVE_DATABASE_URL` | none | Required. Postgres connection string. | | `SLASHOBSERVE_DATABASE_DIRECT_URL` | unset | Connection string straight to Postgres, for use behind a pooler. | | `SLASHOBSERVE_LOG_LEVEL` | `info` | `debug`, `info`, `warn` or `error`. | | `SLASHOBSERVE_LOG_FORMAT` | `json` | `json` or `text`. Logs go to standard error. | | `SLASHOBSERVE_TRUSTED_PROXIES` | unset | Addresses and ranges of the proxies in front of the server. | | `SLASHOBSERVE_METRICS` | `true` | `true` serves `/metrics` without sign-in; `false` removes the route. | `SLASHOBSERVE_LOG_LEVEL` and `SLASHOBSERVE_LOG_FORMAT` ignore case, but `SLASHOBSERVE_METRICS` and the other true-or-false settings accept only lowercase `true` or `false`. Requests to `/healthz`, `/readyz` and `/metrics` are logged at `debug` only. See [Metrics](/docs/operate/metrics/). ### Details of `SLASHOBSERVE_HTTP_ADDR` The port must be 1 to 65535. While a model provider is set, the host must be empty, an unspecified address such as `0.0.0.0`, `localhost` or a loopback address. The built-in agent reaches the server on loopback, and the server refuses to start otherwise. ### Details of `SLASHOBSERVE_DATABASE_URL` The value is a URL or key/value connection string that pgx parses. The pool opens up to the largest of three numbers: 16, 8 plus 2 per agent worker, and the CPU count. Add `pool_max_conns=N` to the string to set the size yourself. ### Details of `SLASHOBSERVE_DATABASE_DIRECT_URL` Set it when `SLASHOBSERVE_DATABASE_URL` goes through a transaction-mode pooler. Live updates (`LISTEN`) and migrations with their lock use this URL, and everything else uses the pooled one. Both must reach the same database, or the server refuses to start. Unset, everything uses `SLASHOBSERVE_DATABASE_URL`. ### Details of `SLASHOBSERVE_TRUSTED_PROXIES` The value is a comma-separated list of addresses and CIDR ranges, such as `10.0.0.0/8, 2001:db8::/32`. List the reverse proxies or load balancers in front of the server. The server records the client address as `client_ip` on audit events; see [Put TLS in front](/docs/operate/production/#put-tls-in-front). - Unset, the client address is the address the connection came from, and forwarding headers are ignored. - Set, the server reads `X-Forwarded-For` only when the connection comes from a listed address. The client address is then the rightmost address in the header that is not itself listed. - An entry that is not an address or a range stops the server at startup, naming the entry. So does a range with no network bits, such as `0.0.0.0/0`. - List the narrowest range of the proxy. A client inside a listed range can set its own address. - A proxy that writes `ip:port` into `X-Forwarded-For` always records its own address. ## Sign-in | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_PUBLIC_URL` | none | Required. The `http` or `https` origin people use. | | `SLASHOBSERVE_OIDC_ISSUER_URL` | none | The identity provider's issuer URL. | | `SLASHOBSERVE_OIDC_CLIENT_ID` | none | The client ID registered with the provider. | | `SLASHOBSERVE_OIDC_CLIENT_SECRET` | none | The client secret. Never logged. | | `SLASHOBSERVE_OIDC_INTERNAL_URL` | unset | Origin the server calls instead of the issuer's host. | | `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` | none | Comma-separated domains, or `*` for every account. | | `SLASHOBSERVE_AUTH_PROVIDER_NAME` | unset | Provider display name, up to 64 characters. | | `SLASHOBSERVE_ADMIN_EMAILS` | unset | Comma-separated Admin email addresses, at most 100. | | `SLASHOBSERVE_OIDC_GROUP_ROLES` | unset | Comma-separated `group=role` entries, at most 100. | | `SLASHOBSERVE_SESSION_TTL` | `168h` | A session lasts this long from sign-in, a Go duration from `5m` to `720h`. | Browser sign-in is all or nothing. Set the issuer URL, client ID and client secret together, or set none of them. With none, only service-account keys authenticate, and setting any of `SLASHOBSERVE_OIDC_INTERNAL_URL`, `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS`, `SLASHOBSERVE_ADMIN_EMAILS`, `SLASHOBSERVE_OIDC_GROUP_ROLES` or `SLASHOBSERVE_AUTH_PROVIDER_NAME` stops the server at startup, because only browser sign-in reads them. With all three, `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` is also required. ### Details of `SLASHOBSERVE_PUBLIC_URL` The value is an `http` or `https` origin with no path, query or user info. See [Put TLS in front](/docs/operate/production/#put-tls-in-front). It is also the OAuth issuer for MCP clients and the base of the MCP resource URL. Changing it disconnects every connected agent, and clients outside this machine need an `https` value. ### Details of `SLASHOBSERVE_OIDC_ISSUER_URL` The value is an absolute `http` or `https` URL. The server uses it exactly as written, because it compares it exactly with the identity provider's issuer. ### Details of `SLASHOBSERVE_OIDC_INTERNAL_URL` The value is an origin with no path. The server uses its scheme and host instead of the issuer's when it calls the identity provider, for example when the provider has a different name inside a container network. ### Details of `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` The value is a list of valid domain names, or a single `*`, which cannot be combined with domains. Duplicates are ignored. See [Sign-in with OIDC](/docs/connect/oidc/). ### Details of `SLASHOBSERVE_AUTH_PROVIDER_NAME` Signed-in clients show the name next to the sign-in rules. ### Details of `SLASHOBSERVE_ADMIN_EMAILS` A person is an Admin when they sign in with a listed address that the provider reports as verified. The comparison ignores case, each entry must be an email address, and duplicates are ignored. Unset, the earliest person to sign in is the Admin. See [Roles](/docs/teams/roles/). ### Details of `SLASHOBSERVE_OIDC_GROUP_ROLES` Each entry maps an identity-provider group to a role, as `group=role`. The role is `admin`, `editor`, `commenter` or `viewer`. The group name is 1 to 256 bytes without control characters, and the server splits the entry at its last `=`. See [Roles](/docs/teams/roles/). ## Datasources | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_DATASOURCES_FILE` | unset | Path to the [datasources file](/docs/reference/datasources-file/). | Unset means no datasources from a file. An Admin can still [add them in the app](/docs/connect/datasources-in-the-app/). ## Service accounts | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_SERVICE_ACCOUNTS_FILE` | unset | Path to a YAML file of service accounts. | Unset or empty means no accounts from a file. The server creates or updates each account in the file at every start, with its key read from the account's `keyFile`. An account from the file answers 409 `provisioned` to role changes, key creation and key revocation in the web app and the API. To rotate its key, write a new one to the file and restart. See [Service-account keys](/docs/operate/service-account-keys/#declare-service-accounts-in-a-file). ## Activity | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_ACTIVITY_RETENTION` | `4320h` | How long to keep events, a Go duration from `24h` to `87600h`. | `4320h` is 180 days. The hourly `activity_prune` job deletes [activity](/docs/use/activity/) events older than this. ## Audit | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_AUDIT_RETENTION` | `8760h` | How long to keep audit events, a Go duration from `24h` to `87600h`. | | `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` | unset | OTLP/HTTP receiver that gets every audit event. Unset turns export off. | | `SLASHOBSERVE_AUDIT_OTLP_HEADERS_FILE` | unset | File of request headers sent with every export. Needs the endpoint. | ### Details of `SLASHOBSERVE_AUDIT_RETENTION` `8760h` is one year. The server stores audit events in one Postgres partition per UTC day. Events copied from the activity log at upgrade sit in one partition per UTC month, or per UTC year when older than two years. The daily `audit_partitions` job drops each partition whose end is older than the retention, and records an `audit.prune` event. ### Details of `SLASHOBSERVE_AUDIT_OTLP_ENDPOINT` The value is an absolute `http` or `https` URL with no query, fragment or user info. The server posts every audit event as an OTLP log record to this URL followed by `/v1/logs`. See [Audit export](/docs/operate/audit-export/). ### Details of `SLASHOBSERVE_AUDIT_OTLP_HEADERS_FILE` Each line is `Name: value`, and blank lines are skipped. A header name may appear once, a value must not be empty or hold a control character, and the file needs at least one header. Setting the file without the endpoint stops the server at startup. ## Dashboard provisioning | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_PROVISION_DIR` | unset | Directory of ObserveSpec JSON files to load as dashboards. | The server loads the files at startup and again whenever one changes, checking every 30 seconds. Unset turns provisioning off. See [Provisioning](/docs/operate/provisioning/). ## Outbound access | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_OUTBOUND_DOMAINS` | unset | Locks the allowed domains: `none` or a comma-separated list. | Unset, Admins manage the allowed domains in Settings. `none` (any case) or a list locks the setting, and a list holds at most 100 domains, duplicates ignored. See [Outbound access](/docs/operate/outbound-access/). ## Stored secrets | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_SECRET_KEY` | unset | Key that encrypts credentials the server stores. | Generate one with `openssl rand -hex 32`. The key is at least 32 random bytes written as hex or base64. A value that is valid hex is read as hex. The server checks it at startup and never logs it. ### Details of `SLASHOBSERVE_SECRET_KEY` The key encrypts three kinds of stored secret: - the credentials of [datasources added in the app](/docs/connect/datasources-in-the-app/); - the tokens of the [Grafana connection](/docs/use/switch-from-grafana/); - the signing secrets of [webhooks](/docs/use/webhooks/). Saving one of these without the key answers `409 secret_key_missing`. Changing the key makes the stored secrets unreadable until each one is entered again. A datasource shows as Unavailable. Every webhook is disabled with the reason `secret_unreadable` until you rotate its secret and enable it. ## LLM All LLM settings are optional. Unset `SLASHOBSERVE_LLM_PROVIDER` turns the built-in agent off. See [LLM providers](/docs/connect/llm-providers/) for how the settings combine. | Variable | Default | What it does | | --- | --- | --- | | `SLASHOBSERVE_LLM_PROVIDER` | unset | `anthropic`, `openai` or `replay`, in any case. | | `SLASHOBSERVE_LLM_MODEL` | `claude-sonnet-5-5` for `anthropic` | Model name. Required for `openai`. | | `SLASHOBSERVE_LLM_API_KEY` | unset | Provider credential. | | `SLASHOBSERVE_LLM_API_KEY_FILE` | unset | File that holds the credential. | | `SLASHOBSERVE_LLM_BASE_URL` | the provider's endpoint | Endpoint URL, with a path if needed. | | `SLASHOBSERVE_LLM_EFFORT` | unset | Reasoning effort, checked against the provider's list. | | `SLASHOBSERVE_LLM_MAX_TOKENS` | `16000` | Output token cap of a model call, `1024` to `64000`. | | `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` | `10m` | Limit for one model call, `10s` to `60m`, or `0` for none. | | `SLASHOBSERVE_LLM_IDLE_TIMEOUT` | `180s` | Silence limit while a call streams, `10s` to `60m`, or `0` for none. | | `SLASHOBSERVE_AGENT_RUN_TIMEOUT` | `0` | Cap on one agent run. `0` is no limit. | | `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` | `0` | Cost cap of a run in US dollars. `0` is no limit. | | `SLASHOBSERVE_AGENT_WORKERS` | `8` | Agent requests this server runs at once, `1` to `64`. | | `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` | `12` | Model calls an investigation makes, `6` to `60`. | | `SLASHOBSERVE_AGENT_SESSION_RENEW_KIB` | `256` | Session size that triggers shortening, `32` to `4096` KiB. | | `SLASHOBSERVE_LLM_PRICES_FILE` | the built-in table | YAML file of model prices. | | `SLASHOBSERVE_LLM_REPLAY_DIR` | unset | Folder of recorded model scripts. Required for `replay`. | | `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` | `false` | `true` logs the provider's own error message. | ### Details of the provider, model and credential - `anthropic` needs a credential in `SLASHOBSERVE_LLM_API_KEY` or `SLASHOBSERVE_LLM_API_KEY_FILE`. Its model defaults to `claude-sonnet-5-5`. - `openai` needs `SLASHOBSERVE_LLM_MODEL`, and its credential is optional. - `replay` needs `SLASHOBSERVE_LLM_REPLAY_DIR` and ignores the model. It exists for end-to-end tests, not for real use. - Set at most one of `SLASHOBSERVE_LLM_API_KEY` and `SLASHOBSERVE_LLM_API_KEY_FILE`. The file's contents are trimmed of whitespace, and an empty or unreadable file stops the server at startup. - The server never logs the credential or echoes it in an error. ### Details of `SLASHOBSERVE_LLM_BASE_URL` The value is an absolute `http` or `https` URL. It may have a path, but no query, fragment or user info. For `anthropic`, give the root without `/v1`, which the agent adds. For `openai`, the URL is used as written. ### Details of `SLASHOBSERVE_LLM_EFFORT` - For `anthropic`: `low`, `medium`, `high`, `xhigh` or `max`. Unset means `medium`. - For `openai`: `none`, `minimal`, `low`, `medium`, `high` or `xhigh`. Unset sends nothing to the provider. - `replay` ignores the value. - The first call of a new build runs one step higher: `low` becomes `medium`, `medium` becomes `high`, and anything else stays. Every later call runs at the value. ### Details of `SLASHOBSERVE_LLM_MAX_TOKENS` The first call of a new build uses the value as it is. Later calls cap their output at half of it, but at least `8192` and never above it. A call cut off at that lower cap is sent once more at the full value. ### Details of the timeouts - `SLASHOBSERVE_LLM_REQUEST_TIMEOUT` applies to each model call, including its retries of up to 4 attempts with backoff. A call that hits the limit fails with `call_timeout`. - `SLASHOBSERVE_LLM_IDLE_TIMEOUT` applies because model calls stream. An attempt that receives no bytes from the provider for this long, from its start or since the last byte, is retried with backoff within the request timeout. - With both timeouts and `SLASHOBSERVE_AGENT_RUN_TIMEOUT` at `0`, a model call that stalls runs until someone cancels the run, so keep at least one bound. - `SLASHOBSERVE_AGENT_RUN_TIMEOUT` set to `0` means a run ends at the agent's own limits, a cancel or a shutdown. Set a Go duration of at least `1m` to cap each run of an agent request. A run that hits the cap fails with `run_timeout`. ### Details of `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` The value is a number of US dollars above 0, at most 10000. Once an attempt's estimated cost reaches it, the agent starts no further model call, and the request fails with `budget_exhausted` with the build kept. See [Run cost](/docs/connect/llm-providers/#run-cost). The call that crosses the limit still finishes, so a run can pass the limit by one call. The server does not start when the value is set and the configured model has no price for every token class. ### Details of `SLASHOBSERVE_AGENT_WORKERS` The value is how many agent requests this server runs at once. Each server of a fleet runs its own workers, so a fleet runs replicas times this many. One request per dashboard still runs at a time, and the model provider's rate limits stay the real ceiling. The metric `slashobserve_agent_queue_wait_seconds` shows whether more workers would help. ### Details of `SLASHOBSERVE_AGENT_INVESTIGATION_CALLS` The value is how many model calls an investigation makes before only `save_finding` can run. The call before the limit gets a note to save the finding next, and reads in the same call as the finding still run. It covers every agent that runs an investigation, the built-in one and connected ones. Suggest runs keep 12 and dashboard runs keep 6. Raise it for questions that need many reads. A longer investigation costs more model calls, so `SLASHOBSERVE_AGENT_RUN_MAX_COST_USD` is the cap on spend. ### Details of `SLASHOBSERVE_AGENT_SESSION_RENEW_KIB` After a save to a build, the agent checks the size of its session's tool calls, results and text. Past this size it shortens its conversation to its last few turns, the build and the names it discovered, so a long build stays inside the model's context window. Lower the value for a model with a small context window. ### Details of `SLASHOBSERVE_LLM_PRICES_FILE` The file holds model prices in US dollars per million tokens and replaces the built-in table. A request's estimated cost (`usage.cost_usd`) then covers other models. The server refuses to start when the file is unreadable or invalid. See [Run cost](/docs/connect/llm-providers/#run-cost). ### Details of `SLASHOBSERVE_LLM_LOG_PROVIDER_ERRORS` The value is `true` or `false`. `true` adds the provider's error message to the `llm call finished` line of a failed call, as `provider_error_message`. The server removes the API key, replaces control characters and keeps at most 1024 bytes. A provider can echo parts of the prompt back in that message. Use it for debugging, and not on a server whose logs many people read. See [Logging](/docs/operate/logging/). ## Testing only `SLASHOBSERVE_API_CONTRACT_CHECK` (`true` or `false`, default `false`) makes the server validate every `/api/v1` request and response against the OpenAPI document. It is for the end-to-end test stack only, so never set it in production. It also turns a request with a query parameter the document does not list into a 500, as [API behavior](/docs/reference/api-behavior/#query-parameters) describes. # Datasources file > The YAML file that lists the Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch servers, and its rules for secrets and limits. Source: https://slashobserve.com/docs/reference/datasources-file/ · Markdown: https://slashobserve.com/docs/reference/datasources-file/index.md The datasources file lists the Prometheus, ClickHouse, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch servers SlashObserve queries. Use it when you want datasources kept in version control and the same on every server. An Admin can also add datasources in the app; see [Add datasources in the app](/docs/connect/datasources-in-the-app/). The file never holds a secret. Passwords and tokens are referenced by environment variable name or by file path instead, so the file can live in version control. ## Write a datasources file 1. Write a single YAML document with a top-level `datasources` list. Each entry has a `uid`, a `type` and a block named after the type: ```yaml datasources: - uid: prom type: prometheus name: Prometheus prometheus: url: http://prometheus:9090 scrapeInterval: 15s limits: timeout: 30s maxSeries: 1000 - uid: ch type: clickhouse name: ClickHouse clickhouse: addr: clickhouse:9000 database: otel username: slashobserve_ro passwordEnv: SLASHOBSERVE_CLICKHOUSE_PASSWORD - uid: loki type: loki name: Loki loki: url: http://loki:3100 tenantId: shop - uid: tempo type: tempo name: Tempo tempo: url: http://tempo:3200 - uid: jaeger type: jaeger name: Jaeger jaeger: url: http://jaeger:16686 - uid: es type: elasticsearch name: Elasticsearch elasticsearch: url: http://elasticsearch:9200 index: logs-* ``` `deploy/astronomy/datasources.yaml` is the exemplar the [demo](/docs/operate/demo/) uses. 2. Set `SLASHOBSERVE_DATASOURCES_FILE` to the file's path on every server, and restart the servers. With it unset, the server has no file datasources. 3. Open the Datasources page. Each entry shows as "From file", read-only. The server reads the file once at startup, so a change needs a restart. It stops at startup when the YAML does not parse, when `datasources` is missing, when the file holds a second YAML document, or when any entry breaks a rule on this page. Unknown fields are rejected, and a duplicate `uid` is refused. An empty list logs the warning `datasources file lists no datasources`. ## Keep a password out of the file Name the environment variable that holds the secret, or a file that holds it. This ClickHouse entry reads its password from the environment of the server: ```yaml clickhouse: addr: clickhouse:9000 username: slashobserve_ro passwordEnv: SLASHOBSERVE_CLICKHOUSE_PASSWORD ``` Use `passwordFile: /run/secrets/clickhouse` to read a file instead. [Rules for secrets](#rules-for-secrets) lists what each form accepts. ## Set a query limit Add a `limits` block to cap what one query may take, or how many may run at once: ```yaml limits: timeout: 20s maxSeries: 500 maxConcurrentQueries: 64 ``` An omitted value or `0` keeps the default. [Limits](#limits) says what each one bounds. ## Who can query a datasource Every entry is open to every signed-in person from Viewer up and to every service-account key. They reach it through the explore query and the panel editor, under the entry's limits. Set `audience: admins` on an entry to restrict it. An `admins` entry is read only by Admins and Admin keys: - Every other role, key and public link gets the same answer as for a datasource that does not exist. - The agent and MCP clients of other roles do not see it. - A dashboard version that queries it serves its panel data and variable values only to Admins. There is no per-team or per-folder datasource access. A restricted folder hides its dashboards, not the datasources they read. A dashboard, proposal, observation or saved search that reads an `admins` entry lives only in a [folder only Admins can read](/docs/teams/folders/), as for a [datasource added in the app](/docs/connect/datasources-in-the-app/#who-can-query-it). The server reads the file only when it starts, and it refuses to start while content in any other folder reads an entry the file marks `admins`. To make an entry `admins`: 1. While the entry is still `everyone`, make or pick a folder only Admins can read. Move every dashboard, observation and saved search that reads the datasource into it. Content in someone's My Dashboards can be moved only by its owner. 2. Set `audience: admins` on the entry in the file on every server. 3. Restart the servers. Each one checks at start, so a server that refuses names what is still outside. Move it and restart that server again. The startup error `datasource_audience_refused` names the datasource and how many items read it. It lists up to 20 of the items outside people's My Dashboards with their kind, id, title and folder, and counts the rest. It says the two ways out: move them into a folder only Admins can read while the entry is still `everyone`, or keep `audience: everyone` in the file. Items in someone's My Dashboards are only counted, never named, because nobody but their owner may see them. ## Map Grafana datasources for imports Add `grafanaUids` to an entry to say which Grafana datasources it stands for when you import Grafana dashboards. The Grafana importer matches a dashboard's datasources in this order: 1. The mapping given with the import. 2. A Grafana datasource uid that equals one of your datasource uids, so a dashboard exported from a Grafana that already uses your uids needs no `grafanaUids`. 3. `grafanaUids`. 4. Being the only datasource of that type. It never guesses between two datasources of the same type. ## Reference ### Fields common to every entry | Field | Notes | | --- | --- | | `uid` | Required, unique. Dashboards refer to a datasource by it. | | `type` | Required: `prometheus`, `clickhouse`, `loki`, `tempo`, `jaeger`, `elasticsearch` or `opensearch`. | | `name` | Optional display name. It defaults to the `uid`. | | `limits` | Optional: `timeout`, `maxSeries`, `maxPoints`, `maxRows` and `maxConcurrentQueries`. | | `audience` | Optional: `everyone` (the default) or `admins`. | | `grafanaUids` | Optional: Grafana datasource uids or names this datasource stands for. | The block named after the type holds the connection. Give only the block that matches (`prometheus:`, `clickhouse:`, `loki:`, `tempo:`, `jaeger:`, `elasticsearch:` or `opensearch:`). The fields of each block are described under [Prometheus](/docs/connect/prometheus/), [ClickHouse](/docs/connect/clickhouse/), [Loki](/docs/connect/loki/), [Tempo](/docs/connect/tempo/), [Jaeger](/docs/connect/jaeger/), [Elasticsearch](/docs/connect/elasticsearch/) and [OpenSearch](/docs/connect/opensearch/). Details of the common fields: - `uid` has up to 40 letters, digits, `_` or `-`, and starts with a letter or digit. - `uid` and `name` must not carry a YAML tag such as `!!str`; quote the value instead. Quote a value that looks like a number, such as `"0123"`, because an unquoted number is refused. - `limits` values are whole numbers and not negative, except `timeout`, which is a Go duration such as `30s`. - `grafanaUids` holds up to 20 entries, each 1 to 100 bytes after trimming, and each listed by one datasource only. Matching is exact and case-sensitive. Entries are trimmed, and control and invisible characters are refused. An entry may not be another datasource's `uid`. A value that looks like a number, such as `"0123"` or `"1.50"`, must be quoted. The `grafanaUids` and `audience` values must not carry a YAML tag either. ### Rules for secrets - An environment variable name must start with `SLASHOBSERVE_`, must be set and non-empty, and must not be one of the server's own settings (such as `SLASHOBSERVE_DATABASE_URL`). - A file's content is used with trailing newlines removed, and an empty file is an error. - Set only one of the env and file forms for the same secret. - A header name may appear in only one of `headers`, `headersFromEnv` and `headersFromFile`. Prometheus, Loki, Tempo, Jaeger, Elasticsearch and OpenSearch reject an `Authorization` header there. Use `basicAuth`, a bearer token or, on Elasticsearch and OpenSearch, an API key instead. ### Limits Limits bound every query the server runs for that datasource. The defaults are a 30 second timeout, 1000 series, 1,000,000 points and 10,000 rows. A value you set replaces the default, up or down. A ClickHouse settings profile can still cap it further. `maxConcurrentQueries` caps the queries running against that datasource at once across every server that shares the database. It is 32 by default and at most 1024. Each server allows its share, the total divided by the live servers and rounded up, and at most 32 datasource calls at once across all datasources. A panel waits for a slot until its deadline. The logs page, traces, label lists and the agent's tools wait up to 5 seconds and then answer 429 `too_many_requests`. The agent's and MCP's ad-hoc queries, the draft preview in the panel editor on dashboards and observations, the logs page, the trace view and `POST /api/v1/datasources/{uid}/query` use tighter limits still. Those are 15 seconds, 200 series, 100,000 points and 1,000 rows, or the datasource's limits when those are lower. How a result counts against the limits: - For ClickHouse table results (the `table` and `logs` formats, and instant queries) each row counts as one point, so the row limit bounds them. - A Loki log query reads at most the row limit or 5,000 lines, and each line counts as one point. - A Tempo or Jaeger query returns at most the row limit of spans or traces. Separate from these limits, the server refuses a Prometheus, Loki, Tempo, Jaeger, Elasticsearch or OpenSearch response over 64 MiB and a ClickHouse result over 32 MiB. # HTTP API > Base URL, authentication, errors and every endpoint of the SlashObserve HTTP API. Source: https://slashobserve.com/docs/reference/api/ · Markdown: https://slashobserve.com/docs/reference/api/index.md Every path is relative to `/api/v1` on your SlashObserve server, and every request and response body is JSON unless an endpoint says otherwise. ## Authentication | Scheme | How | Description | | --- | --- | --- | | `sessionCookie` | `cookie so_session` | Opaque session token set by the OIDC callback. The cookie is named `__Host-so_session` when the public URL is https. | | `bearerKey` | `Authorization: Bearer` | Service-account key issued by the keys endpoint, prefixed `sok_`. | Every endpoint accepts either scheme unless its section says it needs no authentication. ## Errors Errors return an [`Error`](/docs/reference/api/schemas/#error) body; validation errors return [`ValidationError`](/docs/reference/api/schemas/#validationerror). | Status | Meaning | | --- | --- | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | | `409` | The action is not allowed in the observation's state (`invalid_transition`), the target folder is My Dashboards (`personal_folder`), or an investigation is still running on the observation (`run_in_progress`, on delete). | | `409` | The block's version is not the one named (`version_conflict`, with the current block), or the action is not allowed in the block's state (`invalid_transition`). | | `400` | The request is malformed or fails validation. | | `304` | The `If-None-Match` header names the current `ETag`, so the body is not sent again. | | `401` | Authentication is missing or invalid. | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | | `403` | The caller may not merge: `forbidden_role` for a role or folder level that is too low, or `propose_mode` for a connected agent in propose mode that tried to merge. | | | The dashboard has newer versions that changed the same panels, variables or settings (`version_conflict`, with `conflicts`), the proposal has a newer revision than the one named (`proposal_changed`), or the proposal is no longer open (`invalid_transition`). | | `409` | The proposal is no longer open (`invalid_transition`, with its `state` and `allowed_actions`), or the dashboard changed under a discard (`proposal_changed`). | | `422` | The request is well formed but refused: `invalid_target`, `invalid_body` (empty, too long or with refused characters), `too_many_mentions`, `invalid_panel_id`, `invalid_version` (`version` is out of range or below the version the thread is on), `unknown_panel` (the panel is not in that version's Spec), `unknown_version` (the version does not exist on the dashboard), `invalid_block` (`block_id` is not a block of this observation, or the target is not an observation), `invalid_reply_to` (`reply_to_id` is not a message of this thread), `invalid_mention` (a `grant` mention names a connected agent that is not the caller's own or is revoked or expired, or a `service_account` mention names an account that does not take runs, or does not exist) or `too_many_agents` (a message mentions more than one agent). | | `409` | The request conflicts with existing state. | | `500` | The server failed to handle the request. | | `413` | The request body exceeds the size limit. | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | | | The parent version is no longer the latest; `latest_version` names the current one. | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | | `422` | The query or its variables cannot run, or its result exceeds a limit. | | `502` | The datasource is unavailable. | | `504` | The datasource did not answer within the query timeout. | ## Endpoints ### Sign-in and session | Endpoint | Summary | | --- | --- | | [`GET /auth/login`](/docs/reference/api/auth/) | Start the OIDC sign-in and redirect to the identity provider. | | [`GET /auth/callback`](/docs/reference/api/auth/) | Complete the OIDC sign-in and redirect to the local return path. | | [`POST /auth/logout`](/docs/reference/api/auth/) | End the current session and clear its cookie. | | [`GET /auth/session`](/docs/reference/api/auth/) | Report whether the request carries a valid session. | | [`GET /me`](/docs/reference/api/auth/) | Return the authenticated caller. | | [`GET /instance`](/docs/reference/api/auth/) | Return the server's public and MCP URLs and its sign-in settings; never a secret. | ### Service accounts | Endpoint | Summary | | --- | --- | | [`GET /service-accounts`](/docs/reference/api/service-accounts/) | List service accounts. | | [`POST /service-accounts`](/docs/reference/api/service-accounts/) | Create a service account. | | [`PATCH /service-accounts/{id}`](/docs/reference/api/service-accounts/) | Change a service account's role or whether it takes runs. | | [`DELETE /service-accounts/{id}`](/docs/reference/api/service-accounts/) | Delete a service account and all its keys. | | [`GET /service-accounts/{id}/keys`](/docs/reference/api/service-accounts/) | List the keys of a service account without their secrets. | | [`POST /service-accounts/{id}/keys`](/docs/reference/api/service-accounts/) | Issue a key for a service account. | | [`DELETE /service-accounts/{id}/keys/{keyId}`](/docs/reference/api/service-accounts/) | Revoke a key of a service account. | ### People | Endpoint | Summary | | --- | --- | | [`GET /users`](/docs/reference/api/users/) | List everyone who has signed in, newest first. | | [`PATCH /users/{id}`](/docs/reference/api/users/) | Set or clear the role an Admin chose for a person. | | [`DELETE /users/{id}`](/docs/reference/api/users/) | Remove a deactivated person and their My Dashboards. | | [`DELETE /users/{id}/sessions`](/docs/reference/api/users/) | Delete every session of a person and disconnect their MCP clients. | | [`POST /users/{id}/deactivate`](/docs/reference/api/users/) | Stop a person from signing in or acting, and keep what they made. | | [`POST /users/{id}/reactivate`](/docs/reference/api/users/) | Let a deactivated person sign in again. | ### Invites | Endpoint | Summary | | --- | --- | | [`GET /invites`](/docs/reference/api/invites/) | List the pending invites, newest first. | | [`POST /invites`](/docs/reference/api/invites/) | Invite an email with the role it gets at its first sign-in. | | [`DELETE /invites/{id}`](/docs/reference/api/invites/) | Withdraw a pending invite. | ### Teams | Endpoint | Summary | | --- | --- | | [`GET /teams`](/docs/reference/api/teams/) | List the teams with their members. | | [`POST /teams`](/docs/reference/api/teams/) | Create a team that folders can be shared with by its name. | | [`DELETE /teams/{id}`](/docs/reference/api/teams/) | Delete a team. | | [`PUT /teams/{id}/members/{user_id}`](/docs/reference/api/teams/) | Add a person to a team. | | [`DELETE /teams/{id}/members/{user_id}`](/docs/reference/api/teams/) | Remove a person from a team. | ### Outbound domains | Endpoint | Summary | | --- | --- | | [`GET /outbound-domains`](/docs/reference/api/outbound-domains/) | List the domains the server may fetch content from. | | [`POST /outbound-domains`](/docs/reference/api/outbound-domains/) | Allow a domain. | | [`DELETE /outbound-domains/{domain}`](/docs/reference/api/outbound-domains/) | Stop allowing a domain. | ### Saved prompts | Endpoint | Summary | | --- | --- | | [`GET /prompts`](/docs/reference/api/prompts/) | List the saved prompts the caller may run. | | [`POST /prompts`](/docs/reference/api/prompts/) | Save a prompt. | | [`PATCH /prompts/{id}`](/docs/reference/api/prompts/) | Change a saved prompt. | | [`DELETE /prompts/{id}`](/docs/reference/api/prompts/) | Delete a saved prompt. | ### Activity | Endpoint | Summary | | --- | --- | | [`GET /activity`](/docs/reference/api/activity/) | List workspace activity, newest first. | | [`GET /activity/stream`](/docs/reference/api/activity/) | Follow workspace activity as Server-Sent Events. | ### Audit | Endpoint | Summary | | --- | --- | | [`GET /audit/events`](/docs/reference/api/audit/) | Search the audit trail, newest first. | | [`GET /audit/events/{id}`](/docs/reference/api/audit/) | Read one audit event with the other events of its request and its agent run. | | [`GET /audit/facets`](/docs/reference/api/audit/) | Count the top values of one field among the matching audit events. | | [`GET /audit/histogram`](/docs/reference/api/audit/) | Count the matching audit events over time. | | [`GET /audit/aggregate`](/docs/reference/api/audit/) | Run the aggs of a Query DSL body over the matching audit events. | | [`GET /audit/fields`](/docs/reference/api/audit/) | List the fields an audit query can use. | | [`GET /audit/stream`](/docs/reference/api/audit/) | Follow new audit events that match a query as Server-Sent Events. | | [`GET /audit/export`](/docs/reference/api/audit/) | Download the matching audit events as NDJSON or CSV. | ### Search | Endpoint | Summary | | --- | --- | | [`GET /search`](/docs/reference/api/search/) | Search dashboards, observations, annotations, comments and saved searches by words. | ### Annotations | Endpoint | Summary | | --- | --- | | [`GET /annotations`](/docs/reference/api/annotations/) | List annotations, newest first. | | [`POST /annotations`](/docs/reference/api/annotations/) | Add an annotation. | | [`PATCH /annotations/{id}`](/docs/reference/api/annotations/) | Change the text or tags of an annotation. | | [`DELETE /annotations/{id}`](/docs/reference/api/annotations/) | Delete an annotation. | ### Datasources | Endpoint | Summary | | --- | --- | | [`GET /datasources`](/docs/reference/api/datasources/) | Report the health and dashboard usage of every configured datasource, never its connection details. | | [`POST /datasources`](/docs/reference/api/datasources/) | Add a datasource in the app. | | [`POST /datasources/test`](/docs/reference/api/datasources/) | Check a datasource definition against the real datasource without saving it. | | [`PATCH /datasources/{uid}`](/docs/reference/api/datasources/) | Change a datasource added in the app. | | [`DELETE /datasources/{uid}`](/docs/reference/api/datasources/) | Remove a datasource added in the app. | | [`GET /datasources/{uid}/config`](/docs/reference/api/datasources/) | Read the definition of a datasource added in the app. | | [`POST /datasources/{uid}/recheck`](/docs/reference/api/datasources/) | Run a fresh health check on one datasource now. | ### Folders | Endpoint | Summary | | --- | --- | | [`GET /folders`](/docs/reference/api/folders/) | List the folders the caller can see. | | [`POST /folders`](/docs/reference/api/folders/) | Create a folder. | | [`GET /folders/{id}`](/docs/reference/api/folders/) | Get a folder. | | [`PATCH /folders/{id}`](/docs/reference/api/folders/) | Rename a folder. | | [`DELETE /folders/{id}`](/docs/reference/api/folders/) | Delete an empty folder. | | [`GET /folders/{id}/permissions`](/docs/reference/api/folders/) | List who a folder is restricted to. | | [`PUT /folders/{id}/permissions`](/docs/reference/api/folders/) | Replace the people and groups a folder is restricted to. | ### Dashboards | Endpoint | Summary | | --- | --- | | [`GET /dashboards`](/docs/reference/api/dashboards/) | List the dashboards the caller can see, most recently updated first, grouped by folder or most viewed first. | | [`POST /dashboards`](/docs/reference/api/dashboards/) | Create a dashboard from a Spec, validating it and running every panel query. | | [`GET /dashboards/tags`](/docs/reference/api/dashboards/) | List every dashboard tag with its dashboard count, by tag name. | | [`GET /dashboards/{id}`](/docs/reference/api/dashboards/) | Get a dashboard with its latest version. | | [`PATCH /dashboards/{id}`](/docs/reference/api/dashboards/) | Move a dashboard to another folder. | | [`DELETE /dashboards/{id}`](/docs/reference/api/dashboards/) | Delete a dashboard with every version, comment, agent request and import record. | | [`GET /dashboards/{id}/versions`](/docs/reference/api/dashboards/) | List the versions of a dashboard without their Specs, newest first. | | [`POST /dashboards/{id}/versions`](/docs/reference/api/dashboards/) | Save a new version on top of the version the caller last saw, validating the Spec and running every panel query. | | [`GET /dashboards/{id}/versions/{version}`](/docs/reference/api/dashboards/) | Get one version of a dashboard with its Spec. | | [`POST /dashboards/{id}/versions/{version}/restore`](/docs/reference/api/dashboards/) | Save a copy of an earlier version as a new version. | | [`POST /dashboards/{id}/panels`](/docs/reference/api/dashboards/) | Save a new version that adds, replaces, removes or moves panels, running only the queries of what changed. | | [`POST /dashboards/{id}/duplicate`](/docs/reference/api/dashboards/) | Save the latest version as version 1 of a new dashboard. | | [`GET /dashboards/{id}/diff`](/docs/reference/api/dashboards/) | List the structural changes between two versions of a dashboard. | | [`GET /dashboards/{id}/views`](/docs/reference/api/dashboards/) | Count how many people opened the dashboard in the last 30 days. | | [`POST /dashboards/{id}/views`](/docs/reference/api/dashboards/) | Record that the caller opened the dashboard. | | [`GET /dashboards/{id}/viewers`](/docs/reference/api/dashboards/) | List the other people who have the dashboard open now. | | [`POST /dashboards/{id}/viewers`](/docs/reference/api/dashboards/) | Report that the caller has the dashboard open, and list who else does. | ### Proposals | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/proposals`](/docs/reference/api/proposals/) | List the proposals on a dashboard, newest first. | | [`GET /proposals/{id}`](/docs/reference/api/proposals/) | Get one proposal with its head revision's document, what it changes and what stops a merge. | | [`POST /proposals/{id}/merge`](/docs/reference/api/proposals/) | Save a proposal's head revision as the next version of its dashboard and close it as merged. | | [`POST /proposals/{id}/discard`](/docs/reference/api/proposals/) | Close a proposal without saving it. | ### Grafana imports | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/import`](/docs/reference/api/imports/) | Get how a dashboard was imported from Grafana. | | [`POST /imports/preview`](/docs/reference/api/imports/) | Convert a Grafana dashboard without saving it or running any query. | | [`GET /imports`](/docs/reference/api/imports/) | List imports, newest first. | | [`POST /imports`](/docs/reference/api/imports/) | Import a Grafana dashboard as version 1 of a new dashboard. | ### Actions | Endpoint | Summary | | --- | --- | | [`POST /dashboards/{id}/actions`](/docs/reference/api/actions/) | Run an action that is saved in the dashboard's latest version. | ### Live events | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/events`](/docs/reference/api/events/) | Stream live events for one dashboard as Server-Sent Events. | ### Comments | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/comments`](/docs/reference/api/comments/) | List the comments of a dashboard across all versions, oldest first. | | [`POST /dashboards/{id}/comments`](/docs/reference/api/comments/) | Comment on a panel or the whole dashboard, or reply to a thread. | | [`PATCH /dashboards/{id}/comments/{comment_id}`](/docs/reference/api/comments/) | Resolve or reopen a comment. | ### Threads | Endpoint | Summary | | --- | --- | | [`GET /threads`](/docs/reference/api/threads/) | List the comment threads on a dashboard, an annotation, an observation or a proposal. | | [`POST /threads`](/docs/reference/api/threads/) | Start a thread on a dashboard, an annotation, an observation or a proposal. | | [`GET /threads/mentionable`](/docs/reference/api/threads/) | List the people who can be mentioned on a target. | | [`POST /threads/{thread_id}/messages`](/docs/reference/api/threads/) | Add a message to a thread. | | [`POST /threads/{thread_id}/resolve`](/docs/reference/api/threads/) | Resolve a thread. | | [`POST /threads/{thread_id}/reopen`](/docs/reference/api/threads/) | Reopen a resolved thread. | | [`POST /threads/{thread_id}/read`](/docs/reference/api/threads/) | Mark a thread read for the caller. | | [`DELETE /threads/{thread_id}/share`](/docs/reference/api/threads/) | Withdraw a shared answer back to only you. | | [`POST /threads/{thread_id}/apply`](/docs/reference/api/threads/) | Ask the agent to make the change an answer in this thread suggests. | | [`PATCH /messages/{message_id}`](/docs/reference/api/threads/) | Edit the body of your own message. | | [`DELETE /messages/{message_id}`](/docs/reference/api/threads/) | Delete a message from a thread. | ### Panel and variable data | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/versions/{version}/panels/{panel_id}/data`](/docs/reference/api/queryproxy/) | Run the saved queries of one panel in one dashboard version and return their frames. | | [`GET /dashboards/{id}/versions/{version}/variables/{name}/values`](/docs/reference/api/queryproxy/) | List the values of one variable in one dashboard version. | | [`POST /datasources/{uid}/lint`](/docs/reference/api/queryproxy/) | Parse a query for a datasource and return diagnostics, without executing it or returning data. | ### Draft panel preview | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/preview`](/docs/reference/api/preview/) | Run an unsaved data panel placed into a saved dashboard version and return its frames. | ### Explore | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/query`](/docs/reference/api/explore/) | Run one query against a datasource and return its frames. | | [`POST /datasources/{uid}/log-volume`](/docs/reference/api/explore/) | Count the log lines a logs query matches over a range, by level. | ### Log facets | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/log-facets`](/docs/reference/api/log-facets/) | Count the top values of each label, field or column a logs query matches over a range. | ### Trace logs | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/trace-logs`](/docs/reference/api/trace-logs/) | Read the log lines that carry a trace id, or one span id, from a logs datasource. | ### Traces | Endpoint | Summary | | --- | --- | | [`GET /datasources/{uid}/traces/{trace_id}`](/docs/reference/api/traces/) | Read one trace whole from a Tempo, Jaeger or ClickHouse datasource. | | [`POST /datasources/{uid}/trace-stats`](/docs/reference/api/traces/) | Count spans and errors per bucket and give the duration distribution of the spans a filter matches. | ### Trace compare | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/trace-compare`](/docs/reference/api/trace-compare/) | Rank the attribute values that set a set of traces apart from a baseline. | ### Log context | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/log-context`](/docs/reference/api/log-context/) | Read the log lines just before and just after one line. | ### Log patterns | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/log-patterns`](/docs/reference/api/log-patterns/) | Group the lines a logs query matches over a range into patterns with counts. | ### Tail | Endpoint | Summary | | --- | --- | | [`GET /datasources/{uid}/tail`](/docs/reference/api/tail/) | Stream new log lines of a logs query as Server-Sent Events. | ### Draft query | Endpoint | Summary | | --- | --- | | [`POST /datasources/{uid}/draft-query`](/docs/reference/api/draft-query/) | Turn a question into a checked log query, PromQL query, TraceQL query or trace filters for one datasource. | ### Metric and label names | Endpoint | Summary | | --- | --- | | [`GET /datasources/{uid}/metrics`](/docs/reference/api/names/) | List the metric names of a datasource, up to a limit. | | [`GET /datasources/{uid}/labels`](/docs/reference/api/names/) | List the label names of a datasource, or its OpenTelemetry attribute keys on ClickHouse, up to a limit. | | [`GET /datasources/{uid}/labels/{name}/values`](/docs/reference/api/names/) | List the values of one label of a datasource, up to a limit. | | [`GET /datasources/{uid}/services`](/docs/reference/api/names/) | List the services a log or trace datasource has seen over a recent window. | ### Datasource discovery | Endpoint | Summary | | --- | --- | | [`GET /datasources/{uid}/schema`](/docs/reference/api/datasource-discovery/) | Read the tables, or the columns of one table, of a ClickHouse, Elasticsearch or OpenSearch datasource, or the services and span names of Tempo. | | [`GET /datasources/{uid}/sample`](/docs/reference/api/datasource-discovery/) | Read a few rows of a ClickHouse table, or a few log lines or documents of a Loki, Elasticsearch or OpenSearch datasource. | ### Revision requests | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/revisions`](/docs/reference/api/revisions/) | List the agent requests of a dashboard, newest first, including the new-dashboard request that created it. | | [`POST /dashboards/{id}/revisions`](/docs/reference/api/revisions/) | Ask the agent to revise a dashboard with a follow-up prompt. | | [`GET /dashboards/{id}/revisions/{revision_id}`](/docs/reference/api/revisions/) | Read one revision request. | ### Panel suggestions | Endpoint | Summary | | --- | --- | | [`POST /dashboards/{id}/suggestions`](/docs/reference/api/suggestions/) | Ask the agent to propose a change to one panel without saving anything. | | [`GET /dashboards/{id}/suggestions/{suggestion_id}`](/docs/reference/api/suggestions/) | Read one panel suggestion. | ### Agent requests | Endpoint | Summary | | --- | --- | | [`GET /agent`](/docs/reference/api/observe/) | Tell whether an agent is configured and which provider and model it uses. | | [`GET /observe`](/docs/reference/api/observe/) | List agent requests, newest first: the caller's own, or everyone's for an Admin. | | [`POST /observe`](/docs/reference/api/observe/) | Ask the agent a question, have it build a new dashboard, revise an existing one, or investigate. | | [`GET /observe/{id}`](/docs/reference/api/observe/) | Read one agent request with its progress steps and usage. | | [`PATCH /observe/{id}`](/docs/reference/api/observe/) | Rename or pin one of your agent requests. | | [`DELETE /observe/{id}`](/docs/reference/api/observe/) | Archive one of your agent requests so it leaves your list. | | [`GET /observe/{id}/build`](/docs/reference/api/observe/) | Read the dashboard an agent request has built so far, with its ObserveSpec. | | [`POST /observe/{id}/cancel`](/docs/reference/api/observe/) | Cancel a queued or running agent request. | | [`POST /observe/{id}/continue`](/docs/reference/api/observe/) | Continue a stopped agent request in a new request that takes over its build. | | [`POST /observe/{id}/retry`](/docs/reference/api/observe/) | Start a finished agent request again as a new request. | | [`POST /observe/{id}/build/save`](/docs/reference/api/observe/) | Save the build of a failed agent request as one version. | | [`POST /observe/{id}/observation`](/docs/reference/api/observe/) | Save the answer of an agent request as an observation. | | [`POST /observe/{id}/share`](/docs/reference/api/observe/) | Share the answer of a private question in a comment thread. | | [`GET /observe/{id}/build/panels/{panel_id}/data`](/docs/reference/api/observe/) | Run the queries of one panel of an agent request's build and return their frames. | | [`GET /observe/{id}/build/variables/{name}/values`](/docs/reference/api/observe/) | List the values of one variable of an agent request's build. | ### Chats | Endpoint | Summary | | --- | --- | | [`GET /chats`](/docs/reference/api/chats/) | List your chats, pinned ones first and then the one most recently asked in, or everyone's for an Admin. | | [`GET /chats/{id}`](/docs/reference/api/chats/) | Read one of your chats, or as an Admin anyone's, with every turn, oldest first. | | [`DELETE /chats/{id}`](/docs/reference/api/chats/) | Archive one of your chats and every turn in it, so they leave your lists. | ### Findings | Endpoint | Summary | | --- | --- | | [`GET /findings`](/docs/reference/api/findings/) | List the findings the caller can read, newest first. | | [`GET /findings/{id}`](/docs/reference/api/findings/) | Read one finding. | | [`POST /findings/{id}/pin`](/docs/reference/api/findings/) | Pin a finding to its dashboard as an annotation. | | [`POST /findings/{id}/dashboard`](/docs/reference/api/findings/) | Save a finding's evidence panels as a new dashboard. | | [`GET /findings/{id}/panels/{panel_id}/data`](/docs/reference/api/findings/) | Run the queries of one evidence panel of a finding and return their frames. | ### Observations | Endpoint | Summary | | --- | --- | | [`GET /observations`](/docs/reference/api/observations/) | List the observations in the folders the caller can see, most recently changed first. | | [`POST /observations`](/docs/reference/api/observations/) | Start an observation, a page of blocks in a folder. | | [`GET /observations/{id}`](/docs/reference/api/observations/) | Read one observation with its blocks. | | [`PATCH /observations/{id}`](/docs/reference/api/observations/) | Change an observation's title or time range. | | [`DELETE /observations/{id}`](/docs/reference/api/observations/) | Delete an observation with its blocks, snapshots, RCA revisions, public links and discussion. | | [`POST /observations/{id}/move`](/docs/reference/api/observations/) | Move an observation to another folder. | | [`POST /observations/{id}/resolve`](/docs/reference/api/observations/) | Close an open observation with a one-line summary. | | [`POST /observations/{id}/reopen`](/docs/reference/api/observations/) | Reopen a resolved observation. | | [`POST /observations/{id}/blocks`](/docs/reference/api/observations/) | Add a block to an observation. | | [`POST /observations/{id}/blocks/preview`](/docs/reference/api/observations/) | Run an unsaved panel for a panel block of an observation and return its frames. | | [`PUT /observations/{id}/layout`](/docs/reference/api/observations/) | Arrange the blocks of an observation. | | [`PATCH /blocks/{id}`](/docs/reference/api/observations/) | Change a block's body, width, height or position, or let a panel follow the page's range. | | [`DELETE /blocks/{id}`](/docs/reference/api/observations/) | Remove a live block. | | [`POST /observations/{id}/pin`](/docs/reference/api/observations/) | Pin an observation to a dashboard as an annotation. | | [`POST /observations/{id}/dashboard`](/docs/reference/api/observations/) | Make a dashboard from the live panel blocks of an observation. | | [`POST /blocks/{id}/dashboard`](/docs/reference/api/observations/) | Make a dashboard from one panel block. | | [`POST /blocks/{id}/keep`](/docs/reference/api/observations/) | Keep a requested block, which makes it live. | | [`POST /blocks/{id}/discard`](/docs/reference/api/observations/) | Discard a requested block. | | [`GET /blocks/{id}/data`](/docs/reference/api/observations/) | Run the query of a panel block and return its frames. | | [`GET /snapshots/{id}`](/docs/reference/api/observations/) | Read the frozen data of a snapshot block. | ### Rcas | Endpoint | Summary | | --- | --- | | [`GET /observations/{id}/rcas`](/docs/reference/api/rcas/) | List the published revisions of an observation's RCA, newest first. | | [`POST /observations/{id}/rcas`](/docs/reference/api/rcas/) | Publish an observation as the next revision of its RCA. | | [`GET /observations/{id}/rcas/{revision}`](/docs/reference/api/rcas/) | Read one published revision of an observation's RCA. | | [`DELETE /observations/{id}/rcas/{revision}`](/docs/reference/api/rcas/) | Withdraw one published revision of an observation's RCA. | | [`GET /observations/{id}/rcas/{revision}/public-links`](/docs/reference/api/rcas/) | List the public links of one revision of an RCA. | | [`POST /observations/{id}/rcas/{revision}/public-links`](/docs/reference/api/rcas/) | Create a public link that shows one revision of an RCA without sign-in. | | [`DELETE /observations/{id}/public-links/{link_id}`](/docs/reference/api/rcas/) | Revoke a public link of an RCA. | | [`GET /public/{token}/rca`](/docs/reference/api/rcas/) | Read the RCA revision a public link shows. | | [`GET /public/{token}/rca/snapshots/{snapshot_id}`](/docs/reference/api/rcas/) | Read the frozen data of a snapshot of the RCA a public link shows. | ### Saved searches | Endpoint | Summary | | --- | --- | | [`GET /saved-searches`](/docs/reference/api/saved-searches/) | List the saved logs, trace and metrics searches the caller can view, most recently changed first. | | [`POST /saved-searches`](/docs/reference/api/saved-searches/) | Save a logs, trace or metrics search in a folder. | | [`PATCH /saved-searches/{id}`](/docs/reference/api/saved-searches/) | Rename a saved search, move it to another folder or change what it searches. | | [`DELETE /saved-searches/{id}`](/docs/reference/api/saved-searches/) | Delete a saved search. | ### News feeds | Endpoint | Summary | | --- | --- | | [`GET /news`](/docs/reference/api/news/) | Fetch an RSS or Atom feed through the server and return its items as plain text. | ### Assets | Endpoint | Summary | | --- | --- | | [`GET /assets/image`](/docs/reference/api/assets/) | Fetch a remote image through the server and return it. | | [`GET /assets/geojson`](/docs/reference/api/assets/) | Fetch a remote GeoJSON file through the server and return it as JSON. | ### Provision | Endpoint | Summary | | --- | --- | | [`GET /provision`](/docs/reference/api/provision/) | Show what the provisioning directory became. | | [`POST /provision/run`](/docs/reference/api/provision/) | Provision the directory now. | | [`POST /provision/apply`](/docs/reference/api/provision/) | Save one dashboard file from a dashboards-as-code directory. | | [`GET /provision/applied`](/docs/reference/api/provision/) | List the file paths bound to the dashboards of a folder. | ### Grafana | Endpoint | Summary | | --- | --- | | [`GET /grafana`](/docs/reference/api/grafana/) | List the stored Grafana connections. | | [`POST /grafana`](/docs/reference/api/grafana/) | Store a Grafana URL and service-account token. | | [`GET /grafana/{id}`](/docs/reference/api/grafana/) | Read one Grafana connection. | | [`PATCH /grafana/{id}`](/docs/reference/api/grafana/) | Change a connection's name, URL or token. | | [`DELETE /grafana/{id}`](/docs/reference/api/grafana/) | Delete a connection and its stored token. | | [`POST /grafana/{id}/test`](/docs/reference/api/grafana/) | Check that Grafana answers with the stored token. | | [`GET /grafana/{id}/folders`](/docs/reference/api/grafana/) | List the Grafana folders and how many dashboards each holds. | | [`GET /grafana/{id}/datasources`](/docs/reference/api/grafana/) | List the Grafana datasources and the datasource each one matches here. | | [`POST /grafana/{id}/imports`](/docs/reference/api/grafana/) | Import every dashboard of the chosen folders. | | [`GET /grafana/{id}/imports/{sync_id}`](/docs/reference/api/grafana/) | Read the progress of an import. | | [`POST /grafana/{id}/imports/{sync_id}/cancel`](/docs/reference/api/grafana/) | Stop a running import. | | [`GET /grafana/resolve/{uid}`](/docs/reference/api/grafana/) | Find the dashboard imported from a Grafana uid. | | [`POST /grafana/link`](/docs/reference/api/grafana/) | Fetch a Grafana dashboard from its link through a stored connection. | ### Webhooks | Endpoint | Summary | | --- | --- | | [`GET /webhooks`](/docs/reference/api/webhooks/) | List the webhooks. | | [`POST /webhooks`](/docs/reference/api/webhooks/) | Send workspace activity to an https address. | | [`PATCH /webhooks/{id}`](/docs/reference/api/webhooks/) | Change a webhook's name, address, format, event types or state. | | [`DELETE /webhooks/{id}`](/docs/reference/api/webhooks/) | Delete a webhook and its delivery attempts. | | [`POST /webhooks/{id}/secret`](/docs/reference/api/webhooks/) | Replace a webhook's signing secret. | | [`POST /webhooks/{id}/test`](/docs/reference/api/webhooks/) | Send one test event to a webhook. | | [`POST /webhooks/{id}/skip`](/docs/reference/api/webhooks/) | Pass over the oldest event a failing webhook is stuck on. | | [`GET /webhooks/{id}/deliveries`](/docs/reference/api/webhooks/) | List a webhook's recent delivery attempts, newest first. | ### Repairs | Endpoint | Summary | | --- | --- | | [`GET /repairs`](/docs/reference/api/repairs/) | List dashboards whose latest version still has failing or placeholder panels. | | [`POST /repairs`](/docs/reference/api/repairs/) | Queue the agent to repair the failing panels of dashboards. | ### Stars | Endpoint | Summary | | --- | --- | | [`PUT /dashboards/{id}/star`](/docs/reference/api/stars/) | Star a dashboard for the signed-in person. | | [`DELETE /dashboards/{id}/star`](/docs/reference/api/stars/) | Remove the signed-in person's star from a dashboard. | | [`GET /stars`](/docs/reference/api/stars/) | List the signed-in person's starred dashboards, newest star first. | ### Home dashboard | Endpoint | Summary | | --- | --- | | [`GET /me/home-dashboard`](/docs/reference/api/home-dashboard/) | Get the dashboard that opens for the signed-in person after sign-in. | | [`PUT /me/home-dashboard`](/docs/reference/api/home-dashboard/) | Choose the dashboard that opens after sign-in. | | [`DELETE /me/home-dashboard`](/docs/reference/api/home-dashboard/) | Clear the home dashboard so Home opens after sign-in. | ### Public | Endpoint | Summary | | --- | --- | | [`GET /dashboards/{id}/public-links`](/docs/reference/api/public/) | List the public links of a dashboard. | | [`POST /dashboards/{id}/public-links`](/docs/reference/api/public/) | Create a public link that opens the dashboard read-only without sign-in. | | [`DELETE /dashboards/{id}/public-links/{link_id}`](/docs/reference/api/public/) | Revoke a public link. | | [`GET /public/{token}`](/docs/reference/api/public/) | Read the dashboard a public link shows. | | [`GET /public/{token}/panels/{panel_id}/data`](/docs/reference/api/public/) | Run the saved queries of one panel of a public link's dashboard. | | [`GET /public/{token}/variables/{name}/values`](/docs/reference/api/public/) | List the values of one variable of a public link's dashboard. | ### Health | Endpoint | Summary | | --- | --- | | [`GET /health`](/docs/reference/api/health/) | List dashboards with health problems, or the health of given dashboards. | | [`POST /health/repairs`](/docs/reference/api/health/) | Queue the agent to repair the failing panels and variables the health check found. | | [`POST /health/run`](/docs/reference/api/health/) | Start a health run now. | ### Oauth | Endpoint | Summary | | --- | --- | | [`GET /oauth/requests/{id}`](/docs/reference/api/oauth/) | Read a pending request from an MCP client to act as the signed-in person. | | [`POST /oauth/requests/{id}/approve`](/docs/reference/api/oauth/) | Approve an MCP client so it acts as the signed-in person. | | [`POST /oauth/requests/{id}/deny`](/docs/reference/api/oauth/) | Deny an MCP client's request to act as the signed-in person. | ### Grants | Endpoint | Summary | | --- | --- | | [`GET /me/grants`](/docs/reference/api/grants/) | List the MCP clients the signed-in person has connected. | | [`PATCH /me/grants/{id}`](/docs/reference/api/grants/) | Set how one of the signed-in person's MCP clients makes changes. | | [`DELETE /me/grants/{id}`](/docs/reference/api/grants/) | Disconnect one of the signed-in person's MCP clients. | | [`GET /grants`](/docs/reference/api/grants/) | List every person's connected MCP clients. | | [`DELETE /grants/{id}`](/docs/reference/api/grants/) | Disconnect any person's MCP client. | ### Agents | Endpoint | Summary | | --- | --- | | [`GET /agents`](/docs/reference/api/agents/) | List who can do work for the signed-in person. | | [`GET /agents/runs`](/docs/reference/api/agents/) | List the recent runs of one agent. | | [`GET /agents/working`](/docs/reference/api/agents/) | List the active runs working on the caller's things. | ### Inbox | Endpoint | Summary | | --- | --- | | [`GET /inbox`](/docs/reference/api/inbox/) | List what asks something of the signed-in person, newest first. | | [`POST /inbox/read`](/docs/reference/api/inbox/) | Mark the inbox read up to one event. | | [`PUT /inbox/items/{seq}`](/docs/reference/api/inbox/) | Mark one inbox item read, unread or done. | ### Access requests | Endpoint | Summary | | --- | --- | | [`GET /access-requests`](/docs/reference/api/access-requests/) | List the open Comment access requests on folders the caller manages. | | [`POST /access-requests`](/docs/reference/api/access-requests/) | Ask for Comment access to a dashboard or observation the caller can view. | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Sign-in and session > The sign-in and session endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/auth/ · Markdown: https://slashobserve.com/docs/reference/api/auth/index.md ## GET /auth/login Start the OIDC sign-in and redirect to the identity provider. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `return_to` | query | `string` | Local path to return to after sign-in; anything else is replaced by `/`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `302` | Redirect to the identity provider, or to `/login?error=<code>` when sign-in cannot start, with `unavailable` when discovery fails and `sign_in_off` when the server has no identity provider configured. | | ## GET /auth/callback Complete the OIDC sign-in and redirect to the local return path. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `code` | query | `string` | | | `state` | query | `string` | | | `error` | query | `string` | | | `error_description` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `302` | Redirect to the return path with a session cookie, or to `/login?error=<code>` on refusal, with `sign_in_off` when the server has no identity provider configured. | | ## POST /auth/logout End the current session and clear its cookie. No authentication. ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The session cookie is cleared; nothing is returned. | | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /auth/session Report whether the request carries a valid session. No authentication. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The session state. | [`SessionState`](/docs/reference/api/schemas/#sessionstate) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /me Return the authenticated caller. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The caller. | [`Principal`](/docs/reference/api/schemas/#principal) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /instance Return the server's public and MCP URLs and its sign-in settings; never a secret. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The URLs clients use to reach this server and who may sign in. | [`Instance`](/docs/reference/api/schemas/#instance) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Service accounts > The service accounts endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/service-accounts/ · Markdown: https://slashobserve.com/docs/reference/api/service-accounts/index.md ## GET /service-accounts List service accounts. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Every service account. | [`ServiceAccountList`](/docs/reference/api/schemas/#serviceaccountlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /service-accounts Create a service account. ### Request body `application/json`, required. A [`CreateServiceAccountRequest`](/docs/reference/api/schemas/#createserviceaccountrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The created service account. | [`ServiceAccount`](/docs/reference/api/schemas/#serviceaccount) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /service-accounts/{id} Change a service account's role or whether it takes runs. Service accounts cannot call this endpoint. Send `role`, `takes_runs` or both. An account from the service-accounts file answers 409 `provisioned` for either field, because both come from the file. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateServiceAccountRequest`](/docs/reference/api/schemas/#updateserviceaccountrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The service account with its new role and `takes_runs`. | [`ServiceAccount`](/docs/reference/api/schemas/#serviceaccount) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The account comes from the service-accounts file (`provisioned`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /service-accounts/{id} Delete a service account and all its keys. Service accounts cannot call this endpoint. Every key of the account stops working at once, and mentions of the account in comments stop pointing at it. What the account made stays, under the name it was saved with. An account from the service-accounts file answers 409 `provisioned`; remove it from the file instead. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The service account and its keys are deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The account comes from the service-accounts file (`provisioned`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /service-accounts/{id}/keys List the keys of a service account without their secrets. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Every key of the service account. | [`ServiceAccountKeyList`](/docs/reference/api/schemas/#serviceaccountkeylist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /service-accounts/{id}/keys Issue a key for a service account. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`CreateServiceAccountKeyRequest`](/docs/reference/api/schemas/#createserviceaccountkeyrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The key metadata and the token, which is shown only once. | [`IssuedServiceAccountKey`](/docs/reference/api/schemas/#issuedserviceaccountkey) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The account comes from the service-accounts file (`provisioned`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /service-accounts/{id}/keys/{keyId} Revoke a key of a service account. A key of an account from the service-accounts file answers 409 `provisioned`; rotate the file key by writing a new key to its file and restarting the server. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `keyId` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The key is revoked. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The account comes from the service-accounts file (`provisioned`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # People > The people endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/users/ · Markdown: https://slashobserve.com/docs/reference/api/users/index.md ## GET /users List everyone who has signed in, newest first. People are ordered by when they first signed in, newest first, so paging stays stable while people are active; last_seen_at does not affect the order. Only Admins can call this endpoint, and an Admin service-account key can too. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 500. Default `100`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of people. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /users/{id} Set or clear the role an Admin chose for a person. A role value sets the chosen role and null clears it, after which the role is computed again from the server settings, the identity provider's groups and the default. A role decided by SLASHOBSERVE_ADMIN_EMAILS, by being the first person, or by an identity-provider group is locked and answers 409 with code role_locked. Lowering the last Admin answers 409 with code last_admin. Service accounts cannot call this endpoint. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdatePersonRequest`](/docs/reference/api/schemas/#updatepersonrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The person with the resulting role. | [`Person`](/docs/reference/api/schemas/#person) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /users/{id} Remove a deactivated person and their My Dashboards. Admin only, from a person's session; service-account keys cannot. Only a deactivated person can be removed; an active one answers 409 with code not_deactivated. Deleted with them: their My Dashboards folder and the dashboards, observations, findings and saved searches in it (counted in personal_items), their saved prompts, stars, views, inbox state and folder grants. Kept under their stored name: dashboards, versions, observations, comments, proposals and activity in shared folders, and the service accounts and keys they created. A new sign-in with the same identity-provider account afterwards makes a new person. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The person is removed. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /users/{id}/sessions Delete every session of a person and disconnect their MCP clients. Admin only. Deletes every session of the person and disconnects every MCP client they connected; the person can sign in and connect again at once. Signing yourself out also expires your session cookie. Service accounts cannot. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | Every session of the person is deleted and their MCP clients are disconnected. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /users/{id}/deactivate Stop a person from signing in or acting, and keep what they made. Admin only, from a person's session; service-account keys cannot. Deletes every session of the person and disconnects every MCP client they connected in the same transaction, and refuses their next sign-in. Their dashboards, observations, comments and folder grants stay; queued agent runs they requested fail when claimed, and webhooks they own stop. Service-account keys they created keep working, because a key acts as its service account. Deactivating a deactivated person answers 200 and changes nothing. Deactivating yourself answers 409 with code cannot_deactivate_self, and the last active Admin answers 409 with code last_admin. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The person, deactivated. | [`Person`](/docs/reference/api/schemas/#person) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /users/{id}/reactivate Let a deactivated person sign in again. Admin only, from a person's session; service-account keys cannot. The person can sign in again at once with the role the rules give them; the MCP clients they had connected stay disconnected. Reactivating an active person answers 200 and changes nothing. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The person, active. | [`Person`](/docs/reference/api/schemas/#person) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Invites > The invites endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/invites/ · Markdown: https://slashobserve.com/docs/reference/api/invites/index.md ## GET /invites List the pending invites, newest first. Only Admins can call this endpoint, and an Admin service-account key can too. An invite stays pending until someone signs in with its email verified by the identity provider. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 500. Default `100`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of pending invites. | [`InviteList`](/docs/reference/api/schemas/#invitelist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /invites Invite an email with the role it gets at its first sign-in. Only Admins can call this endpoint, and an Admin service-account key can too. No email is sent: share the returned sign_in_url with the person. The role applies at the first sign-in of that email, only when the identity provider says the email is verified, and it then shows as set by the Admin who invited. An invite lets no one in that the sign-in rules would refuse; admin emails and identity-provider group roles still win over it. Inviting an email that already has a pending invite changes its role and answers 200. ### Request body `application/json`, required. A [`CreateInviteRequest`](/docs/reference/api/schemas/#createinviterequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The pending invite for this email, with the new role. | [`Invite`](/docs/reference/api/schemas/#invite) | | `201` | The invite is created. | [`Invite`](/docs/reference/api/schemas/#invite) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | Someone with this email has already signed in (`already_member`); change their role instead. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The email's domain is not in `SLASHOBSERVE_AUTH_ALLOWED_EMAIL_DOMAINS` (`email_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /invites/{id} Withdraw a pending invite. Only Admins can call this endpoint, and an Admin service-account key can too. The email can still sign in when the sign-in rules allow it, with the role those rules give. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The invite is withdrawn. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Teams > The teams endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/teams/ · Markdown: https://slashobserve.com/docs/reference/api/teams/index.md ## GET /teams List the teams with their members. Only Admins can call this endpoint, and an Admin service-account key can too. Teams are sorted by name; at most 200 exist. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Every team. | [`TeamList`](/docs/reference/api/schemas/#teamlist) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /teams Create a team that folders can be shared with by its name. Only Admins can call this endpoint, and an Admin service-account key can too. A team's name works as a group name in a folder's access list: each member matches a group entry with exactly that name, as if their identity provider sent it. A team never changes a role; roles still come from identity-provider groups only. Names are unique without regard to case, and a name equal to an identity-provider group makes the team's members match that group's entries too. ### Request body `application/json`, required. A [`CreateTeamRequest`](/docs/reference/api/schemas/#createteamrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The team is created with no members. | [`Team`](/docs/reference/api/schemas/#team) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | A team with this name exists (`team_exists`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | 200 teams already exist (`too_many_teams`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /teams/{id} Delete a team. Only Admins can call this endpoint, and an Admin service-account key can too. Its members lose what the team's name gave them at their next request; folder entries naming it stay and match no one unless a team or an identity-provider group of that name exists. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The team is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PUT /teams/{id}/members/{user_id} Add a person to a team. Only Admins can call this endpoint, and an Admin service-account key can too. Adding a member twice changes nothing. The person's access follows at their next request. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `user_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The team with its members. | [`Team`](/docs/reference/api/schemas/#team) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /teams/{id}/members/{user_id} Remove a person from a team. Only Admins can call this endpoint, and an Admin service-account key can too. Removing someone who is not a member changes nothing. The person loses what the team gave them at their next request. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `user_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The team with its members. | [`Team`](/docs/reference/api/schemas/#team) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Outbound domains > The outbound domains endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/outbound-domains/ · Markdown: https://slashobserve.com/docs/reference/api/outbound-domains/index.md ## GET /outbound-domains List the domains the server may fetch content from. The list is empty until a person allows a domain. When `SLASHOBSERVE_OUTBOUND_DOMAINS` is set, `managed_by` is `config`, the entries come from the setting and carry no `added_at` or `added_by`. Entries are sorted by `domain` in byte order. `used_by` names the webhooks and Grafana connections that depend on an entry, for Admins only and empty for Editors; dashboard feeds, actions and assets are fetched on demand and not listed. Editors and Admins may read the list; Viewers and Commenters get `403` with the code `forbidden_role`. Service accounts cannot call this endpoint. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The allowed domains. | [`OutboundDomainList`](/docs/reference/api/schemas/#outbounddomainlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /outbound-domains Allow a domain. Only an Admin may allow a domain; service accounts cannot. Write `example.com` for that host only, or `*.example.com` for its subdomains only (not `example.com` itself). The entry is stored in its lower case ASCII form. At most 100 domains can be allowed. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `domain` (required) | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | A Grafana connection had already added the domain, so it is now kept as an entry of its own and no longer leaves with the connection. | [`OutboundDomain`](/docs/reference/api/schemas/#outbounddomain) | | `201` | The domain is allowed. | [`OutboundDomain`](/docs/reference/api/schemas/#outbounddomain) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The list is set by `SLASHOBSERVE_OUTBOUND_DOMAINS` (`managed_by_config`), or the domain was already allowed by hand (`domain_exists`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The domain is not a valid host name or pattern (`invalid_domain`), or 100 domains are already allowed (`too_many_domains`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /outbound-domains/{domain} Stop allowing a domain. The path value is normalized like a new entry, so `Example.COM` removes `example.com`, and `*.example.com` removes the subdomain entry. Service accounts cannot. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `domain` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The domain is no longer allowed. | | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The value is not a valid host name or pattern (`invalid_domain`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Saved prompts > The saved prompts endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/prompts/ · Markdown: https://slashobserve.com/docs/reference/api/prompts/index.md ## GET /prompts List the saved prompts the caller may run. Lists the prompts the caller may run: the caller's own prompts first, then prompts other people shared, each group by name ignoring case, at most 500. A service-account key sees shared prompts only. With `name`, returns at most one prompt matched ignoring case and with runs of spaces read as one: the caller's own prompt of that name, else the shared prompt of that name; an empty list when there is none. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `name` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The prompts the caller may run. | [`SavedPromptList`](/docs/reference/api/schemas/#savedpromptlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /prompts Save a prompt. Saves a prompt owned by the caller. Service accounts cannot (403 `forbidden`), and neither can Commenters and Viewers (403 `forbidden_role`). At most 100 prompts per person. A prompt saved shared is recorded in the audit trail as `saved_prompt.create`; a personal prompt is not. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `body` (required) | `string` | | | `shared` | `boolean` | Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The prompt is saved. | [`SavedPrompt`](/docs/reference/api/schemas/#savedprompt) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The caller already has a prompt with that name, or `shared` is true and another shared prompt has it (`name_taken`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The name is not valid (`invalid_name`), the body is not valid (`invalid_body`), or the caller already has 100 prompts (`too_many_prompts`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /prompts/{id} Change a saved prompt. Changes the name, body or sharing of a prompt the caller can edit: the owner, or an Admin when the prompt is shared. Only the fields sent change. A change to a shared prompt is recorded in the audit trail as `saved_prompt.update`, and making a prompt shared or personal as `saved_prompt.share` or `saved_prompt.unshare`; a prompt that is personal before and after is not recorded. Commenters and Viewers cannot change prompts, not even their own (403 `forbidden_role`). ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `name` | `string` | | | `body` | `string` | | | `shared` | `boolean` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The prompt as changed. | [`SavedPrompt`](/docs/reference/api/schemas/#savedprompt) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), has a role below Editor (`forbidden_role`), or can see the prompt but cannot edit it (`not_owner`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The caller cannot see the prompt (`not_found`); another person's private prompt looks missing. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The new name is taken by another prompt of the owner, or by another shared prompt when the prompt is shared (`name_taken`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The name is not valid (`invalid_name`) or the body is not valid (`invalid_body`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /prompts/{id} Delete a saved prompt. Deletes a prompt the caller can edit: the owner, or an Admin when the prompt is shared. A service account gets 403 `forbidden`, a Commenter or Viewer 403 `forbidden_role`, a prompt the caller can see but not edit 403 `not_owner`, and a prompt the caller cannot see 404 `not_found`. Deleting a shared prompt is recorded in the audit trail as `saved_prompt.delete`; deleting a personal one is not. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The prompt is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), has a role below Editor (`forbidden_role`), or can see the prompt but cannot edit it (`not_owner`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Activity > The activity endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/activity/ · Markdown: https://slashobserve.com/docs/reference/api/activity/index.md ## GET /activity List workspace activity, newest first. Lists the activity log: one event for every dashboard create, save, restore, move and delete, every annotation, finding and saved search created, changed or moved, every dashboard proposal opened, updated, merged or discarded, every comment thread opened, answered, edited, resolved or reopened and every mention in one, and every agent run that is queued, started or settled. Events are ordered by their position in the log, newest first, and `seq` is the id of an event. A caller sees an event only when it belongs to a folder the caller can view, when it belongs to no folder and the caller acted, or when it belongs to no folder and the caller is an Admin. A global annotation belongs to General, so everyone who can read global annotations sees its events. An event moves with its dashboard: after a dashboard is moved, its earlier events show only to the viewers of the new folder. Events of a deleted dashboard stay in the folder the dashboard was in. `data` holds ids, numbers, enums, titles and the version summary, never prompt, comment, annotation or finding text, query text or Spec JSON; read the object through its own endpoint for more. The fields of `data` by type: `dashboard.created`, `dashboard.version_created` and `dashboard.restored` carry `version`, `title`, `summary`, `parent_version` (not on a create) and `restored_from` (only on a restore); `dashboard.moved` carries `title`, `from_folder_id` and `to_folder_id`; `dashboard.deleted` carries `title`; `annotation.created` carries `title` (the first 80 characters of the text on one line, empty when the text has no characters to show), `tags`, `panel_id` and `time_to` when set, and `time_from`; `annotation.updated` carries `tags`; `annotation.deleted` carries the same fields as `annotation.created`, never more of the text than the `title`; `public_link.created` and `public_link.revoked` carry `object` (`kind`, `dashboard` or `observation`, and `id`), `title`, `prefix` and `expires_at` when set, never the token; `access_request.opened` carries `object` (`kind`, `dashboard` or `observation`, and `id`) and `title`, never the note, and its actor is the requester; `access_request.granted` carries `object`, `title` and `requested_by` (`kind`, `id` and `name`), and its actor is whoever changed the access that let the requester comment; `finding.created` carries `title` and `agent_request_id` when the agent saved it; `finding.pinned` carries `annotation_id`; `finding.moved` carries `title`, `from_folder_id` (null when it was in no folder) and `to_folder_id`; `saved_search.created`, `saved_search.updated` and `saved_search.deleted` carry `title` and `kind`, `saved_search.updated` also `changed`, the parts that changed out of `title`, `query`, `filters` and `range` (absent on an event from before it was recorded, which was always a rename), and `saved_search.moved` also `from_folder_id` and `to_folder_id`; `observation.created`, `observation.resolved`, `observation.reopened` and `observation.deleted` carry `title`; `observation.updated` carries `title` and, when the title changed, `from_title`, the title before; `observation.moved` carries `title`, `from_folder_id` and `to_folder_id`; `observation.published` and `observation.rca_withdrawn` carry `title` and `revision`; `observation.block_added`, `observation.block_updated`, `observation.block_kept`, `observation.block_discarded` and `observation.block_removed` carry `title`, `block_id` and `block_kind`, and `observation.block_added` also carries the block's `state` (`live` or `requested`); `proposal.opened` and `proposal.updated` carry `title`, `revision` and `base_version`; `proposal.merged` carries `title`, `revision` and `version` (null when the change was already in the dashboard and no version was saved); `proposal.discarded` carries `title` and `revision`; `run.queued` carries `intent` and `continues_id` when the run continues another; `run.started` carries `intent` and `attempt`; `run.succeeded` carries `intent` and `result_version` when a version was saved, and, for a health repair that saved a version, also `dashboard_title` and `panels_repaired`, the number of panels the repair prompt named whose queries the saved version changed and no longer lists as unverified; `run.failed` carries `intent` and `failure_code`; `run.canceled` carries `intent`; `run.canceling` carries `intent`; `run.released` carries `intent` and `attempt`; `run.kept` carries `intent` and `result_version`; `run.succeeded`, `run.failed` and `run.canceled` also carry `cost_usd`, the run's estimated cost in USD, when it is known. `thread.opened` carries `object` (`kind` and `id` of the dashboard, finding, annotation, observation or proposal it is on), `title` (the dashboard or observation title at that time, empty when there is none) and, on a dashboard, `version` and `panel_id` when set; `thread.replied`, `thread.edited` and `thread.deleted` carry `object` and `message_id`, and `thread.deleted` names the thread's first message when the whole thread was deleted; `thread.resolved` carries `object` and `resolved_by_version` when set; `thread.reopened` carries `object`; `thread.mentioned` carries `object`, `message_id` and `mentioned` (`kind`, `id` and `name`). Administrative events have no folder and only an Admin reader sees them, in the list, the stream and webhooks, whatever their actor's role is now. `user.role_changed` carries `name`, `from_role`, `to_role`, `manual`, false when an override was cleared, and `source` (`admin_emails`, `first_user`, `group` or `default`) when the sign-in policy changed the role and no Admin did; `user.signed_out_everywhere` and `user.deactivated` carry `name`, `sessions` and `grants`; `user.reactivated` and `user.removed` carry `name`; `user.invited` carries `email` and `role`, `user.invite_updated` carries `email` and `role` as `{from, to}`, and `user.invite_withdrawn` carries `email`, and the target id of these three is the invite; `service_account.created` carries `name`, `role` and `takes_runs`; `service_account.updated` carries `name` and `role` or `takes_runs` as `{from, to}`; `service_account.deleted` carries `name`; `service_account.key_created` and `service_account.key_revoked` carry `name`, `key_id`, `key_name` and, on create, `expires_at`, never the key; `webhook.created`, `webhook.updated`, `webhook.secret_rotated` and `webhook.deleted` carry `name` and `host`, `webhook.created` also `event_types`, and `webhook.updated` carries `changes`, an object with `{from, to}` for each of `name`, `enabled`, `event_types` and `host` that changed, and `url_changed` when the address changed at all, never the address path or the secret; `mcp_client.connected` carries `client`, `person_id`, `person_name` and `mode`; `mcp_client.disconnected` also carries `reason`, one of `person`, `admin`, `client`, `code_reuse` or `refresh_reuse`; `outbound_domain.added` and `outbound_domain.removed` carry `domain`, and their target id is a UUID derived from the domain; `grafana_connection.created`, `grafana_connection.updated` and `grafana_connection.deleted` carry `name` and `host`, `grafana_connection.updated` carries `changes`, an object with `{from, to}` for each of `name` and `host` that changed, and `token_changed` when the token did, never the token. `datasource.created`, `datasource.updated`, `datasource.audience_changed` and `datasource.deleted` carry `uid`, `type`, `name` and `host` (the address's host and port, never its path), `datasource.updated` carries `changes`, an object with `{from, to}` for each of `name` and `host` that changed, and `address_changed`, `settings_changed` and `credentials_changed` when they did, never a credential, and `datasource.audience_changed` carries the audience before and after as `from` and `to` (`everyone` or `admins`); a change of the audience and of anything else records both events. Suggestions and build progress are not recorded. The server deletes events older than `SLASHOBSERVE_ACTIVITY_RETENTION`, 180 days by default, so the list never reaches further back than that. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `dashboard_id` | query | `string` (uuid) | Only events of this dashboard. | | `folder_id` | query | `string` (uuid) | Only events whose folder is this one. | | `observation_id` | query | `string` (uuid) | Only events of this observation, its blocks, its RCA revisions and its discussion thread; the visibility rule still applies. | | `type` | query | array of [`ActivityType`](/docs/reference/api/schemas/#activitytype) | Only events of these types; repeat the parameter for several. At most 79 items. | | `since` | query | `string` (date-time) | RFC 3339 time; only events created at or after it. | | `until` | query | `string` (date-time) | RFC 3339 time; only events created at or before it. | | `actor_id` | query | `string` (uuid) | Only events made by this person or service account. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of events. | [`ActivityList`](/docs/reference/api/schemas/#activitylist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /activity/stream Follow workspace activity as Server-Sent Events. The stream starts with `retry: 3000` and an `event: ready` whose data is `{}`. Each event after that is a frame of `id: <seq>`, `event: activity` and the event JSON of `listActivity` as data, oldest first, filtered to what the caller may see and by the same `dashboard_id`, `folder_id`, `observation_id`, `type` and `since` parameters as the list. Without `Last-Event-ID` the stream sends only events appended after it opened, and `Last-Event-ID: 0` starts at the beginning of the log. A reconnecting client sends the `id` of the last frame it handled as `Last-Event-ID`, and the stream continues with the next event in log order, so nothing is skipped or repeated. `event: reset` with data `{}` follows `ready` when that id is unknown, for example because the event was pruned: events may have been missed, and the stream continues from the newest event; a value that is not a non-negative integer is 400. An event appears once its transaction and every older transaction have committed, so a burst of changes is delivered in log order, and an event can arrive up to about a second after its change. A `: ping` comment arrives every 15 seconds; at each ping the server re-reads the caller's credentials, role and folder access, so a role change or a revoked key takes effect at the next ping, which ends the stream when the credential is gone. The server ends the stream after 30 minutes and clients reconnect. A caller may hold 5 streams and the process 500. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `dashboard_id` | query | `string` (uuid) | | | `folder_id` | query | `string` (uuid) | | | `observation_id` | query | `string` (uuid) | | | `type` | query | array of [`ActivityType`](/docs/reference/api/schemas/#activitytype) | At most 79 items. | | `since` | query | `string` (date-time) | | | `Last-Event-ID` | header | `string` | The `seq` of the last event the client handled, or `0` to start at the beginning of the log. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | An open `text/event-stream`. | `text/event-stream` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already holds the maximum number of open streams (`too_many_streams`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | The process holds the maximum number of open streams (`too_many_streams`) or is shutting down (`shutting_down`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Audit > The audit endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/audit/ · Markdown: https://slashobserve.com/docs/reference/api/audit/index.md ## GET /audit/events Search the audit trail, newest first. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. Returns the audit events in the window that match `q`, newest first by `occurred_at` and then `id`, 100 a page unless `limit` or a Query DSL `size` says otherwise. Page with `next_cursor`: the pages of one search never repeat or skip an event, and events recorded after the first page do not move later pages. A search is itself recorded as `audit.search` with the query as sent (cut at 4 KiB), its form, the window and the row count, once per caller and query text in 10 minutes, so paging through or refreshing one search adds no events; a refused query is recorded as a failed `audit.search` every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in one of three forms: KQL by default (`action:dashboard.* and outcome:denied`), Lucene after a `lucene:` prefix, or a Query DSL body that starts with `{` and may carry `query`, `size` and `aggs`. Empty matches every event in the window. `GET /audit/fields` lists the fields; the audit query reference in the guide has examples. | | `since` | query | `string` | Start of the window, inclusive, as an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`; 24 hours before `until` when left out. | | `until` | query | `string` | End of the window, exclusive, in the same forms; now when left out. The window is at most 366 days. | | `cursor` | query | `string` | The `next_cursor` of the previous page. It pins the window of the first page, so `since` and `until` are ignored with it, and it is refused with another `q`. | | `limit` | query | `integer` | Events per page, 1 to 1000; 100 by default, or the `size` of a Query DSL body. Between 1 and 1000. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of events. | [`AuditEventList`](/docs/reference/api/schemas/#auditeventlist) | | `400` | `since` or `until` is not a time, the window is empty or longer than 366 days, `limit` is out of range, or the cursor is unreadable or belongs to another query (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` with the parser's message and, for a parse error, `start` and `end`, the byte offsets in `q` to underline; `query_timeout` when the read runs longer than 30 seconds. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/events/{id} Read one audit event with the other events of its request and its agent run. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. `same_request` holds up to 50 events with the same `request_id` within an hour of the event, and `same_run` up to 50 events with the same `run_id` within a day of it, newest first; each list includes the event itself. This read is itself recorded as `audit.search` with `view` `event` and the query `id:<id>`, once per caller and event in 10 minutes; an id that names no event is recorded as a failed `audit.search` every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The event. | [`AuditEventDetail`](/docs/reference/api/schemas/#auditeventdetail) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | No audit event has this id (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The read ran longer than 30 seconds (`query_timeout`). | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/facets Count the top values of one field among the matching audit events. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. Returns the most frequent values of `field` among the events in the window that match `q`, most frequent first, ties by value; events where the field is empty are not counted. This read is itself recorded as `audit.search` with `view` `facets`, the `field`, the query as sent (cut at 4 KiB), its form, the window and the row count, once per caller and query text in 10 minutes; a refused query is recorded every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in one of three forms: KQL by default (`action:dashboard.* and outcome:denied`), Lucene after a `lucene:` prefix, or a Query DSL body that starts with `{` and may carry `query`, `size` and `aggs`. Empty matches every event in the window. `GET /audit/fields` lists the fields; the audit query reference in the guide has examples. | | `since` | query | `string` | Start of the window, inclusive, as an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`; 24 hours before `until` when left out. | | `until` | query | `string` | End of the window, exclusive, in the same forms; now when left out. The window is at most 366 days. | | `field` (required) | query | `string` | The field to count, such as `actor_name` or `action`; `GET /audit/fields` lists them. | | `limit` | query | `integer` | Values to return, 1 to 100; 10 by default. Between 1 and 100. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The counted values. | [`AuditFacets`](/docs/reference/api/schemas/#auditfacets) | | `400` | `field` is missing, the window is not valid or `limit` is out of range (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` with the parser's message and, for a parse error, `start` and `end`, the byte offsets in `q` to underline, or an unknown or uncountable `field`; `query_timeout` when the read runs longer than 30 seconds. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/histogram Count the matching audit events over time. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. Splits the window into buckets of one step, the smallest of 1s, 5s, 10s, 30s, 1m, 5m, 10m, 30m, 1h, 3h, 6h, 12h and 1d that gives at most `buckets` buckets, and counts the matching events in each; empty buckets are included, oldest first. This read is itself recorded as `audit.search` with `view` `histogram`, the query as sent (cut at 4 KiB), its form, the window and the row count, once per caller and query text in 10 minutes; a refused query is recorded every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in one of three forms: KQL by default (`action:dashboard.* and outcome:denied`), Lucene after a `lucene:` prefix, or a Query DSL body that starts with `{` and may carry `query`, `size` and `aggs`. Empty matches every event in the window. `GET /audit/fields` lists the fields; the audit query reference in the guide has examples. | | `since` | query | `string` | Start of the window, inclusive, as an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`; 24 hours before `until` when left out. | | `until` | query | `string` | End of the window, exclusive, in the same forms; now when left out. The window is at most 366 days. | | `buckets` | query | `integer` | The most buckets wanted, 1 to 200. Between 1 and 200. Default `60`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The counts. | [`AuditHistogram`](/docs/reference/api/schemas/#audithistogram) | | `400` | The window is not valid or `buckets` is out of range (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` with the parser's message and, for a parse error, `start` and `end`, the byte offsets in `q` to underline; `query_timeout` when the read runs longer than 30 seconds. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/aggregate Run the aggs of a Query DSL body over the matching audit events. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. `q` must be a Query DSL body with `aggs`: `date_histogram`, `terms`, `cardinality`, `value_count`, `count`, `min`, `max`, `avg`, `sum` and `percentiles`, up to three levels, one bucket aggregation per level. Each row holds one key per level, in `levels` order (a time for `date_histogram`, a value for `terms`), the `doc_count` of the bucket and one value per entry of `metrics`. An aggregation that would produce more than 100,000 rows is refused with its reason. This read is itself recorded as `audit.search` with `view` `aggregate`, the query as sent (cut at 4 KiB), its form, the window and the row count, once per caller and query text in 10 minutes; a refused query is recorded every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in one of three forms: KQL by default (`action:dashboard.* and outcome:denied`), Lucene after a `lucene:` prefix, or a Query DSL body that starts with `{` and may carry `query`, `size` and `aggs`. Empty matches every event in the window. `GET /audit/fields` lists the fields; the audit query reference in the guide has examples. | | `since` | query | `string` | Start of the window, inclusive, as an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`; 24 hours before `until` when left out. | | `until` | query | `string` | End of the window, exclusive, in the same forms; now when left out. The window is at most 366 days. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The aggregation rows. | [`AuditAggregation`](/docs/reference/api/schemas/#auditaggregation) | | `400` | The window is not valid (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` with the parser's message and, for a parse error, `start` and `end`, the byte offsets in `q` to underline, or the body has no `aggs` or asks for more rows than the limit, with the reason; `query_timeout` when the read runs longer than 30 seconds. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/fields List the fields an audit query can use. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. Each field has its name, its aliases, its type, what it holds and, for an enum, its values, for autocomplete and for agents writing a query. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The fields. | [`AuditFieldList`](/docs/reference/api/schemas/#auditfieldlist) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/stream Follow new audit events that match a query as Server-Sent Events. Only Admins can call this endpoint, and an Admin service-account key can too. The stream starts with `retry: 3000` and an `event: ready` whose data is `{}` and whose `id` is the position the stream starts from, so a client cut off before the first event resumes from it. Each event after that is a frame of `id: <position>`, `event: audit` and the event JSON of `listAuditEvents` as data, in the order the events were committed, for every new event that matches `q`. Without `Last-Event-ID` the stream sends only events committed after it opened, and never one that occurred more than 10 minutes before it opened. A frame's `id` is `<xid>-<seq>-<microseconds>`, its position in the trail and the event's time; a reconnecting client sends the `id` of the last frame it handled and the stream continues with every matching event committed after it whose time is at most 10 minutes before that event's, however long the client was away. A `Last-Event-ID` whose event is more than 24 hours old answers 400; read the gap with `listAuditEvents` and open a new stream. An event can arrive a few seconds after it was recorded, because the trail is written in batches and read every 2 seconds. A `: ping` comment arrives every 5 seconds; at each ping the server re-reads the caller's credentials and role, and a caller who is no longer an Admin, or whose credential is gone, gets an `event: forbidden` with the `forbidden_role` body and the stream ends. The stream also ends when the server shuts down, and after 30 minutes; clients reconnect. Opening the stream is recorded once as `audit.search` with the query as sent, its form and the start of what it can send; the events it delivers are not recorded one by one. A caller may hold 5 audit streams and the process 20, and one more answers 429. Each read of the trail runs under a 5 second statement timeout, one at a time; a stream whose read times out twice in a row sends an `event: error` with an `AuditQueryError` body of code `query_too_expensive` and ends. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in the same three forms as `listAuditEvents`; empty follows every event. A Query DSL `size` and `aggs` are ignored. | | `Last-Event-ID` | header | `string` | The `id` of the last frame the client handled. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | An open `text/event-stream`. | `text/event-stream` | | `400` | `Last-Event-ID` is not the id of a frame of this stream, or its event is more than 24 hours old (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot be read (`query_invalid`), with the parser's message and the byte offsets `start` and `end` in `q`. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `429` | The caller already holds 5 open audit streams, or the process 20 (`too_many_streams`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | The server is shutting down (`shutting_down`). | [`Error`](/docs/reference/api/schemas/#error) | ## GET /audit/export Download the matching audit events as NDJSON or CSV. Only Admins can call this endpoint, and an Admin service-account key can too; an agent run reaches it only when its requester is an Admin. Streams the events in the window that match `q`, newest first, one JSON object per line in the shape of `listAuditEvents`, or CSV with a header row and `data` as JSON text. An export stops at 1,000,000 rows, the value of the `X-Export-Row-Limit` header; narrow the window to read more. A complete export ends with the trailer `X-Export-Truncated`, `true` when more matching events existed past the limit and `false` otherwise. When a read fails after the first rows were sent, the server cuts the connection off instead of ending the response, so a client sees an unexpected end of the body and knows the export is incomplete. Before each page of 1,000 rows after the first, the server re-reads the caller's credentials and role; a caller who is no longer an Admin is cut off the same way, and the export is recorded as denied with `forbidden_role`. Recorded as `audit.export` with the query as sent (cut at 4 KiB), its form, the window, the format and the row count. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` | query | `string` | The filter, in one of three forms: KQL by default (`action:dashboard.* and outcome:denied`), Lucene after a `lucene:` prefix, or a Query DSL body that starts with `{` and may carry `query`, `size` and `aggs`. Empty matches every event in the window. `GET /audit/fields` lists the fields; the audit query reference in the guide has examples. | | `since` | query | `string` | Start of the window, inclusive, as an RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`; 24 hours before `until` when left out. | | `until` | query | `string` | End of the window, exclusive, in the same forms; now when left out. The window is at most 366 days. | | `format` | query | `"ndjson"`, `"csv"` | Default `"ndjson"`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The events. | `application/x-ndjson`, `text/csv` | | `400` | `format` is not ndjson or csv, or the window is not valid (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not an Admin, or is a key below the Admin role (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` with the parser's message and, for a parse error, `start` and `end`, the byte offsets in `q` to underline; `query_timeout` when the read runs longer than 30 seconds. | [`AuditQueryError`](/docs/reference/api/schemas/#auditqueryerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Search > The search endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/search/ · Markdown: https://slashobserve.com/docs/reference/api/search/index.md ## GET /search Search dashboards, observations, annotations, comments and saved searches by words. Finds objects whose text contains every word of `q`, each exactly or by its English stem, ranked by relevance with newer objects first among near-equals. A caller finds only what it can open: a dashboard and its annotations and comments through the dashboard's folder, an observation, its comments and a saved search through the folder each is in, and a global annotation and its comments through General. Only the latest version of a dashboard is searched. `"quoted words"` match as a phrase, `or` between words matches either, `-word` excludes a word, and the last word also matches as a prefix unless the query ends in a space. Results stop after 200 per query; refine the words to see more. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `q` (required) | query | `string` | One to 200 characters with at least one letter or digit outside a `-` term and no control characters. | | `kind` | query | array of `"dashboard"`, `"annotation"`, `"observation"`, `"comment"`, `"saved_search"` | Only results of these kinds; repeat the parameter for several. A kind named twice returns each result once. At most 5 items. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | | `limit` | query | `integer` | Between 1 and 50. Default `20`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of results, best first. | [`SearchResultList`](/docs/reference/api/schemas/#searchresultlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Annotations > The annotations endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/annotations/ · Markdown: https://slashobserve.com/docs/reference/api/annotations/index.md ## GET /annotations List annotations, newest first. Lists annotations ordered by `time_from` then `id`, newest first. With `dashboard_id`, returns that dashboard's annotations and the global ones; without it, only the global ones. The caller must be able to see the dashboard: a dashboard that is missing or in a folder the caller cannot see is 404 `not_found`. An annotation is in the window when it starts at or before `to` and ends, or starts when it has no end, at or after `from`. `created_by_name` is read when the list is answered, so it follows a rename and is null once the person or service account is gone. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `dashboard_id` | query | `string` (uuid) | | | `from` | query | `string` (date-time) | RFC 3339 start of the window. | | `to` | query | `string` (date-time) | RFC 3339 end of the window, not before `from`. | | `tags` | query | `string` | Comma-separated tags; an annotation matches when it has any of them. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | | `limit` | query | `integer` | Between 1 and 500. Default `100`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of annotations. | [`AnnotationList`](/docs/reference/api/schemas/#annotationlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard is missing or the caller cannot see it (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /annotations Add an annotation. Adds an annotation to one dashboard, or a global one shown on every dashboard when `dashboard_id` is absent or null. A dashboard annotation needs Edit on the dashboard's folder, and a global one needs the Editor role or higher; otherwise 403 `forbidden_role`. A dashboard that is missing or in a folder the caller cannot see is 404 `not_found`. `panel_id` must be a panel of the dashboard's latest version, otherwise 422 `unknown_panel`. `time_from` defaults to the server's current time when it is absent; a given time must be an RFC 3339 time from 1970-01-01 to 2099-12-31, never replaced by the current time. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `dashboard_id` | `string` (uuid) or `null` | | | `panel_id` | `string` | A panel of the dashboard; needs `dashboard_id`. | | `time_from` | `string` (date-time) | | | `time_to` | `string` (date-time) or `null` | The end of a range annotation, not before `time_from`. | | `text` (required) | `string` | 1 to 2000 visible characters once trimmed, without control or bidirectional override characters. | | `tags` | array of `string` | At most 10 items. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The annotation is added. | [`Annotation`](/docs/reference/api/schemas/#annotation) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard is missing or the caller cannot see it (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The text is empty, longer than 2000 characters or holds control characters (`invalid_text`), a tag is not valid or there are more than 10 (`invalid_tags`), a time is not RFC 3339, is before 1970, is after 2099 or `time_to` is before `time_from` (`invalid_time`), `panel_id` is too long or has no `dashboard_id` (`invalid_panel_id`), or `panel_id` is not a panel of the dashboard's latest version (`unknown_panel`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /annotations/{id} Change the text or tags of an annotation. Changes the `text`, the `tags` or both of an annotation the caller created, or of any annotation for an Admin; anyone else gets 403 `not_creator`. A field that is absent stays as it was, and a given `tags` list replaces the old tags, so an empty list removes them. The time, the dashboard, the panel and the author never change. A body that gives neither field is 422 `invalid_request`, and a change that leaves both values as they were answers 200 and records nothing. An annotation that is missing, or on a dashboard the caller cannot see, is 404 `not_found`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `text` | `string` | 1 to 2000 characters once trimmed, without control or bidirectional override characters. | | `tags` | array of `string` | At most 10 items. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The annotation as it is now. | [`Annotation`](/docs/reference/api/schemas/#annotation) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller did not create the annotation and is not an Admin (`not_creator`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | Neither `text` nor `tags` is given (`invalid_request`), the text is empty, longer than 2000 characters or holds control characters (`invalid_text`), or a tag is not valid or there are more than 10 (`invalid_tags`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /annotations/{id} Delete an annotation. Deletes an annotation the caller created, or any annotation for an Admin; anyone else gets 403 `not_creator`. An annotation that is missing, or on a dashboard the caller cannot see, is 404 `not_found`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The annotation is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller did not create the annotation and is not an Admin (`not_creator`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Datasources > The datasources endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/datasources/ · Markdown: https://slashobserve.com/docs/reference/api/datasources/index.md ## GET /datasources Report the health and dashboard usage of every configured datasource, never its connection details. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One status per configured datasource. | [`DatasourceList`](/docs/reference/api/schemas/#datasourcelist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /datasources Add a datasource in the app. Only Admins can call this endpoint. The server saves the definition, encrypts every credential with a key derived from `SLASHOBSERVE_SECRET_KEY`, and starts using the datasource at once; other servers pick it up within 15 seconds. The uid must not belong to any datasource, from the file or the app, so a retried request answers 409 `uid_taken` and never adds a second one. The address host must pass the outbound allowlist like a Grafana connection's: a domain name is added to an unlocked list, and refused when the list is set by configuration and does not hold it. An IP address or a name without a dot cannot be listed, so it is refused when the list is set by configuration. Link-local, unspecified and multicast addresses are always refused. At most 100 datasources can be added in the app. ### Request body `application/json`, required. A [`DatasourceDraft`](/docs/reference/api/schemas/#datasourcedraft) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The datasource is saved and in use; credentials are not returned. | [`DatasourceConfig`](/docs/reference/api/schemas/#datasourceconfig) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the address is not allowed by the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The uid is taken (`uid_taken`), or `SLASHOBSERVE_SECRET_KEY` is not set and the request carries credentials (`secret_key_missing`). Or the audience is `admins` while dashboards, proposals, observations or saved searches that read the datasource sit in folders other people can read (`restricted_content`): `items` lists up to 20 of them so an Admin can move them first, `unlisted` counts the rest, and `hidden` counts those in people's My Dashboards, which an Admin cannot open and only their owners can move or remove. | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The definition is not valid (`invalid_datasource`, with the fields to fix), 100 datasources already exist (`too_many_datasources`), or the outbound allowlist is full (`too_many_domains`). | [`InvalidDatasourceError`](/docs/reference/api/schemas/#invaliddatasourceerror) or [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /datasources/test Check a datasource definition against the real datasource without saving it. Only Admins can call this endpoint. The body is a draft like the one for adding a datasource. With `base=<uid>`, the draft starts from that saved app datasource, credentials included, and the body changes only what it names, so a form can test an edit without asking for the credentials again. The address passes the same outbound allowlist check as saving, but a test never changes the allowlist: a domain that is not listed is tested only while the list is unlocked, and saving adds it. A failed check answers 200 with `healthy: false`, a fixed `message` and, when known, a `detail`; the answer never carries the address or a credential. Every test is recorded as `datasource.test` with the host and the outcome, since it sends stored credentials to that host. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `base` | query | `string` | The uid of a saved app datasource to start from. | ### Request body `application/json`, required. A [`DatasourceDraft`](/docs/reference/api/schemas/#datasourcedraft) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The result of the health check. | [`DatasourceTestResult`](/docs/reference/api/schemas/#datasourcetestresult) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the address is not allowed by the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `base` names a datasource from the file or the built-in audit datasource (`datasource_read_only`), or `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The definition is not valid (`invalid_datasource`, with the fields to fix). | [`InvalidDatasourceError`](/docs/reference/api/schemas/#invaliddatasourceerror) or [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /datasources/{uid} Change a datasource added in the app. Only Admins can call this endpoint. The body names only the fields to change; a field left out keeps its value, and a credential left out keeps what is stored. `uid` and `type` cannot change. `secrets` replaces the credentials it names and `clear_secrets` removes them. A new address passes the outbound allowlist check like adding one. The change applies at once on this server and within 15 seconds on the others. A datasource from the datasources file, and the built-in audit datasource, answer 409 `datasource_read_only`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. A [`DatasourceDraft`](/docs/reference/api/schemas/#datasourcedraft) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The changed datasource; credentials are not returned. | [`DatasourceConfig`](/docs/reference/api/schemas/#datasourceconfig) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the new address is not allowed by the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The datasource is from the file or built in (`datasource_read_only`), or `SLASHOBSERVE_SECRET_KEY` is not set and the request changes credentials (`secret_key_missing`). Or the audience is `admins` while dashboards, proposals, observations or saved searches that read the datasource sit in folders other people can read (`restricted_content`): `items` lists up to 20 of them so an Admin can move them first, `unlisted` counts the rest, and `hidden` counts those in people's My Dashboards, which an Admin cannot open and only their owners can move or remove. | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The definition is not valid (`invalid_datasource`, with the fields to fix). | [`InvalidDatasourceError`](/docs/reference/api/schemas/#invaliddatasourceerror) or [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /datasources/{uid} Remove a datasource added in the app. Only Admins can call this endpoint. A datasource that the latest version of a dashboard or a saved search uses is refused with 409 `datasource_in_use`, listing what uses it; change those to another datasource first. The list holds only what the caller can see, and `hidden` counts the rest. A datasource from the datasources file, and the built-in audit datasource, answer 409 `datasource_read_only`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The datasource is removed. | | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The datasource is from the file or built in (`datasource_read_only`), or something uses it (`datasource_in_use`). | [`DatasourceInUseError`](/docs/reference/api/schemas/#datasourceinuseerror) or [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /datasources/{uid}/config Read the definition of a datasource added in the app. Only Admins can call this endpoint. The answer carries the address and login so a form can edit them, and `secrets_set` naming which credentials are stored; a credential's value is never returned. `GET /datasources` never carries an address. A datasource from the datasources file, and the built-in audit datasource, answer 409 `datasource_read_only`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The definition without credentials. | [`DatasourceConfig`](/docs/reference/api/schemas/#datasourceconfig) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The datasource is from the file or built in (`datasource_read_only`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /datasources/{uid}/recheck Run a fresh health check on one datasource now. Skips the 10 second cache of `GET /datasources` and returns the new status. Calls within 2 seconds of the last check return that check, so a loop cannot hammer the datasource. An unhealthy status carries `message` and, when known, `detail`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The datasource's status after the check. | [`DatasourceStatus`](/docs/reference/api/schemas/#datasourcestatus) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Folders > The folders endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/folders/ · Markdown: https://slashobserve.com/docs/reference/api/folders/index.md ## GET /folders List the folders the caller can see. A folder with listed people or groups is visible only to them, to its creator and to Admins; every other folder is visible to everyone. Folders are sorted by title without regard to case, with General last. Each folder carries the caller's own `permissions` on it, and `audit` is true on the Audit folder. The response is `private, no-cache` with a weak `ETag` and `Vary: Authorization, Cookie`, so a client that sends `If-None-Match` gets 304 while nothing changed. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The visible folders. | `object` | | `304` | The `If-None-Match` header names the current `ETag`, so the body is not sent again. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /folders Create a folder. Needs the Editor role. The title is trimmed (spaces and zero-width characters at the ends), 1 to 100 characters on one line with no control, bidirectional override or zero-width characters and at least one visible character, and unique without regard to case; the 400 `invalid_request` carries a `reason` from `docs/reference/text-rules.md`. The caller becomes the folder's creator and manages it, whatever its permissions list. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | Trimmed before it is stored; 1 to 100 characters with no control characters. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The folder was created. | [`Folder`](/docs/reference/api/schemas/#folder) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | A folder with that title already exists (`folder_exists`), ignoring case, or the title is `My Dashboards`, which every person's personal folder uses. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /folders/{id} Get a folder. A folder the caller cannot see answers 404, as if it did not exist. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The folder. | [`Folder`](/docs/reference/api/schemas/#folder) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /folders/{id} Rename a folder. Needs the Manage permission on the folder. The General folder cannot be renamed. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | Trimmed before it is stored; 1 to 100 characters with no control characters. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The renamed folder. | [`Folder`](/docs/reference/api/schemas/#folder) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | Another folder has that title (`folder_exists`), or the folder is General (`general_folder`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /folders/{id} Delete an empty folder. Needs the Manage permission on the folder. The General folder cannot be deleted, and a folder that holds dashboards must be emptied first. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The folder and its permissions are deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The folder still holds dashboards, findings or saved searches (`folder_not_empty`), or it is General (`general_folder`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /folders/{id}/permissions List who a folder is restricted to. An empty list means the folder is open to everyone by instance role. Users come first by name, then groups by name. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The folder's permission entries. | [`FolderPermissions`](/docs/reference/api/schemas/#folderpermissions) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PUT /folders/{id}/permissions Replace the people and groups a folder is restricted to. Needs the Manage permission on the folder. The entries replace every existing row in one transaction. An empty `entries` list makes the folder open to everyone by instance role again. Each entry names exactly one of `user_id`, `email` (matched without regard to case against people who have signed in) and `group` (an OIDC group name, matched exactly), at most 50 entries and no repeated person or group. A person whose entries match the folder gets the higher of their instance role's level and the highest of those entries on the folder and its dashboards: an entry can lift a Viewer or Commenter (Edit lets them change and create dashboards there, Admin lets them manage the folder) and never lowers anyone. The General folder is never restricted. `admins_only: true` with an empty `entries` list makes the folder one only Admins can read, its creator included; only an Admin can set it, never on a personal folder, and any other change clears it. A folder that holds content reading an Admins-only datasource cannot be opened or given entries (409 `restricted_content`, with that content in `items`). Nor can a folder that holds a dashboard or observation with an answer that read Admin-only data (409 `restricted_answer`, naming that content). ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `admins_only` | `boolean` | True to make the folder one only Admins can read; `entries` must then be empty. | | `entries` (required) | array of `object` | At most 50 items. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The folder's permission entries after the change. | [`FolderPermissions`](/docs/reference/api/schemas/#folderpermissions) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The folder is General (`general_folder`), or the folder holds content that reads an Admins-only datasource and the change would let others read it (`restricted_content`, with `items` listing up to 20 of it and `unlisted` counting the rest), or the folder holds a dashboard or an observation with an answer that read Admin-only data and the change would let others read it (`restricted_answer`, naming that content), or `admins_only` would close a folder holding a dashboard or an observation with an unexpired public link (`admins_only_folder`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | No signed-in person matches an entry (`unknown_user`), an email belongs to more than one person, or `admins_only` came with entries (`invalid_request`). `email` is set when the entry was an email. | `object` | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Dashboards > The dashboards endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/dashboards/ · Markdown: https://slashobserve.com/docs/reference/api/dashboards/index.md ## GET /dashboards List the dashboards the caller can see, most recently updated first, grouped by folder or most viewed first. Filters combine with AND; `total_count` counts all matches regardless of the cursor. Dashboards in folders the caller cannot see are never listed or counted. A `cursor` only works with the `order` it came from; a cursor from the other order is a 400. `next_cursor` is also set on an `offset` page and continues after its last row. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | | `offset` | query | `integer` | Skip this many dashboards, for numbered pages; counted in the same order and over the same visible, filtered dashboards as `total_count`. Cannot be combined with `cursor` (400). Between 0 and 100000. Default `0`. | | `made_by` | query | `string` | Who made the dashboard: `me` (the caller), `user:<uuid>`, `service_account:<uuid>`, `agent` (saved by the agent), `mcp` (any MCP client) or `mcp:<client>` (one MCP client by name). | | `datasource` | query | `string` | A datasource uid; only dashboards whose latest version uses it. | | `q` | query | `string` | Case-insensitive text found in the title or the description; leading and trailing whitespace is ignored and a value of only whitespace is rejected. | | `folder` | query | `string` (uuid) | Only dashboards in this folder; a folder that does not exist or that the caller cannot see gives an empty page, not an error. | | `order` | query | `"updated"`, `"folder"`, `"views"`, `"name"` | `updated` (default) sorts by most recent update. `folder` sorts General last and the other folders by lower-case title, then folder id, and by most recent update inside a folder. `views` sorts by `view_count`, most viewed first, then by most recent update. `name` sorts by lower-case title, then by id. Default `"updated"`. | | `tag` | query | array of `string` | Only dashboards with every given tag. At most 10 items. | | `problem` | query | `"any"`, `"no_data"`, `"query_failed"`, `"variable_failed"`, `"duplicate_title"`, `"unopened"` | Only dashboards with this health problem at their last check (`no_data`, `query_failed`, `variable_failed`) or now (`duplicate_title`, `unopened`); `any` means any of them, and also a dashboard waiting for a recheck of an earlier problem, or with a health repair on record. The same rules as `GET /health`. | | `exclude_audit` | query | `boolean` | `true` leaves out the dashboards in the built-in Audit folder, from the page, the `total_count` and the paging alike; the other folders are listed as before. It only narrows what the caller can already see, and does not widen it. Default `false`. Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of dashboards. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards Create a dashboard from a Spec, validating it and running every panel query. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `spec` (required) | `object` | The ObserveSpec document. | | `summary` | `string` | A blank or missing summary uses the default `Create dashboard`. | | `folder_id` | `string` (uuid) | The folder to create the dashboard in. Missing means the caller's default folder: a person's My Dashboards, a service-account key's General. 404 when the folder does not exist or the caller cannot see it, 403 when they cannot create there. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The dashboard and its first version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/tags List every dashboard tag with its dashboard count, by tag name. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `exclude_audit` | query | `boolean` | `true` leaves out the dashboards in the built-in Audit folder, so their tags and the counts come from the other folders only. Default `false`. Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Every tag in use, at most 500, ordered by name. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id} Get a dashboard with its latest version. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard and its latest version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /dashboards/{id} Move a dashboard to another folder. Needs Edit on the dashboard and on the target folder. A personal folder (My Dashboards) takes no moves; moving into one answers 409 `personal_folder`. Moving a dashboard out of My Dashboards into a shared folder is how it is published. A move creates no version, does not change `updated_at` and sends no event. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `folder_id` (required) | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard in its new folder with its latest version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the content holds an answer that read Admin-only data and the folder is not one only Admins can read (`restricted_answer`). Or the dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to change a copy. Or the dashboard has an unexpired public link and the folder is one only Admins can read (`admins_only_folder`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /dashboards/{id} Delete a dashboard with every version, comment, agent request and import record. Needs Edit on the dashboard. The delete cannot be undone. Open event streams receive `dashboard.deleted` and then end. While the `/observe` chat that created the dashboard is still queued or running, the delete is refused. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The dashboard and everything that belongs to it are deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The agent is still creating this dashboard (`dashboard_being_created`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/versions List the versions of a dashboard without their Specs, newest first. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of version metadata. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/versions Save a new version on top of the version the caller last saw, validating the Spec and running every panel query. A request whose parent version is no longer the latest answers 409, unless it repeats the latest version exactly (same parent, author and Spec), in which case it answers 200 with `Idempotent-Replay: true`. A failing panel or variable does not fail the save when the parent version lists it in `unverified` and its queries (every field, with the datasource each query uses) and every variable they reach are unchanged; the new version lists it again with the new issues. Any other failing query is a 422 `invalid_spec` that lists only the blocking issues. With `merge: auto`, a stale save that changed other panels, variables or settings than the newer versions is merged and saved on top of the latest, and the reply has `merged_from`; an overlap answers 409 with `conflicts`. With `propose_if_needed`, a caller who can comment but not edit, or whose connection is in propose mode, gets a proposal and a 202 instead of a 403. Without it, such a caller is refused with 403. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `spec` (required) | `object` | The ObserveSpec document. | | `summary` (required) | `string` | | | `parent_version` (required) | `integer` | Between 1 and 2147483647. | | `merge` | `"auto"` | Merge a stale save onto the latest version on the server instead of answering 409 when nothing overlaps. | | `propose_if_needed` | `boolean` | Save the change as a proposal when the caller can comment but not edit, or their connection is in propose mode, instead of answering 403. Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request repeats the latest version, so that version is returned. | [`DashboardVersionSaved`](/docs/reference/api/schemas/#dashboardversionsaved) | | `201` | The new version. | [`DashboardVersionSaved`](/docs/reference/api/schemas/#dashboardversionsaved) | | `202` | The change became a proposal, or a revision of the caller's open one; no version was saved. | [`ProposalCreated`](/docs/reference/api/schemas/#proposalcreated) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The parent version is no longer the latest; `latest_version` names the current one. Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to change a copy. | [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/versions/{version} Get one version of a dashboard with its Spec. The response is `private, no-cache` with a weak `ETag` and `Vary: Authorization, Cookie`, so a client that sends `If-None-Match` gets 304 while nothing changed. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `version` (required) | path | `integer` | Between 1 and 2147483647. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard summary and the requested version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `304` | The `If-None-Match` header names the current `ETag`, so the body is not sent again. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/versions/{version}/restore Save a copy of an earlier version as a new version. The stored Spec is parsed again and its datasource references are checked, but its queries are not run, so restoring a known-good state does not fail because an upstream is briefly down. The new version copies the restored version's `unverified` list. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `version` (required) | path | `integer` | Between 1 and 2147483647. | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `parent_version` (required) | `integer` | Between 1 and 2147483647. | | `summary` | `string` | A blank or missing summary uses the default `Restore version {version}`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The new version, with `restored_from` naming the restored one. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The parent version is no longer the latest; `latest_version` names the current one. Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to change a copy. | [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/panels Save a new version that adds, replaces, removes or moves panels, running only the queries of what changed. The patch is applied to `parent_version` with the same merge as the `update_panels` tool, then saved like `createDashboardVersion` with `merge: auto`. Only the changed panels and variables run their queries, or every query when `dashboard.time` changes. A retried request with the same parent and body answers 200 with `Idempotent-Replay: true`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `upsert` | array of `object` | Complete panels matched by id; an existing id replaces that panel and keeps its position without `gridPos`, a new id adds one. At most 50 items. | | `delete` | array of `string` | Ids of panels to remove; a row only with all of its children. At most 50 items. | | `layout` | array of `object` | Moves of existing panels. At most 200 items. | | `variables` | array of `object` | The complete variable list; replaces the existing one. | | `dashboard` | `object` | Dashboard-level values to replace; a key left out is kept. | | `summary` (required) | `string` | | | `parent_version` (required) | `integer` | Between 1 and 2147483647. | | `propose_if_needed` | `boolean` | Save the change as a proposal when the caller can comment but not edit, or their connection is in propose mode, instead of answering 403. Default `false`. | | `accept_empty` | `boolean` | Save a panel whose valid queries return no data for the dashboard's time range, which is refused as `query_empty` otherwise; the version lists the panel as unverified. A query that fails is still refused. Only a signed-in person may set it; a service-account key gets 403 `user_session_required`. Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request repeats the latest version, so that version is returned. | [`DashboardVersionSaved`](/docs/reference/api/schemas/#dashboardversionsaved) | | `201` | The new version. | [`DashboardVersionSaved`](/docs/reference/api/schemas/#dashboardversionsaved) | | `202` | The change became a proposal, or a revision of the caller's open one; no version was saved. | [`ProposalCreated`](/docs/reference/api/schemas/#proposalcreated) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The parent version is no longer the latest; `latest_version` names the current one. Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to change a copy. | [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/duplicate Save the latest version as version 1 of a new dashboard. Needs View on the dashboard and Create in the target folder. The copy keeps every Spec field except `title`, and the source version's `unverified` list. Its datasource references are checked but its queries are not run, as for a restore, so duplicating does not fail because an upstream is briefly down. Versions, comments, agent requests and the import record stay with the original. A copy of a dashboard that holds an answer that read Admin-only data goes only into a folder only Admins can read, and then holds that answer itself. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | The copy's title; it must pass the same rules as a Spec title. | | `folder_id` | `string` (uuid) | The folder to create the dashboard in. Missing means the source dashboard's folder when the caller can create there, else the caller's default folder: a person's My Dashboards, a service-account key's General. 404 when the folder does not exist or the caller cannot see it, 403 when they cannot create there. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The new dashboard and its first version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard holds an answer that read Admin-only data and the folder is not one only Admins can read (`restricted_answer`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/diff List the structural changes between two versions of a dashboard. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `from` | query | `integer` | Defaults to `to` minus one. `0` diffs against an empty document, which yields a single `add` change at the root path `""` whose `to` is the whole Spec. Between 0 and 2147483647. | | `to` | query | `integer` | Defaults to the latest version. Between 1 and 2147483647. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The changes from `from` to `to`. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/views Count how many people opened the dashboard in the last 30 days. Needs View on the dashboard. The count is person-days: a person who opens the dashboard on three different UTC days counts three, however often they open it on one day. The window is the last 30 UTC days including today, and the same count is `view_count` on each item of `GET /dashboards`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The count and the window it covers. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/views Record that the caller opened the dashboard. Needs View on the dashboard. The web app calls it once each time it loads a dashboard page. It keeps the caller's latest open, at most once every 10 minutes, and the dashboard health list reads it to find dashboards nobody opens. It also records that the caller opened the dashboard on this UTC day, once however often they open it, which `view_count` counts. A service-account key gets 204 and nothing is written, because only people count as opens. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The open is recorded, or there was nothing to record. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/viewers List the other people who have the dashboard open now. Needs View on the dashboard. A person is listed while their open dashboard page has reported in during the last 45 seconds, by name and user id, ordered by name; the caller is left out. Everyone who can view a dashboard can see who else is looking at it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The people looking at the dashboard now. | [`DashboardViewers`](/docs/reference/api/schemas/#dashboardviewers) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/viewers Report that the caller has the dashboard open, and list who else does. Needs View on the dashboard. The web app calls it when a dashboard page opens and every 20 seconds while the page is visible; each call keeps the caller listed for 45 seconds and answers with the same list as `GET /api/v1/dashboards/{id}/viewers`. A service-account key gets the list and nothing is recorded, because only people count as viewers. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The other people looking at the dashboard now. | [`DashboardViewers`](/docs/reference/api/schemas/#dashboardviewers) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Proposals > The proposals endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/proposals/ · Markdown: https://slashobserve.com/docs/reference/api/proposals/index.md ## GET /dashboards/{id}/proposals List the proposals on a dashboard, newest first. Needs View on the dashboard. A proposal is a change to a dashboard saved by someone who may comment but not edit, or by a connection in propose mode, for a person who can edit to merge or discard. The list holds the open proposals unless `state` says otherwise. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `state` | query | `"open"`, `"merged"`, `"discarded"`, `"all"` | Default `"open"`. | | `run_id` | query | `string` (uuid) | Only the proposal that the agent request with this id opened, which is how a run finds its proposal however many others the dashboard has; a value that is not a UUID is 400. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of proposals without their documents. | [`ProposalList`](/docs/reference/api/schemas/#proposallist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /proposals/{id} Get one proposal with its head revision's document, what it changes and what stops a merge. Needs View on the dashboard; a proposal on a dashboard the caller cannot see answers 404. `changes` compares the head revision with `base_version`. `conflicts` lists, while the proposal is open and behind, the units that the proposal and the newer versions both changed. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The proposal. | [`Proposal`](/docs/reference/api/schemas/#proposal) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /proposals/{id}/merge Save a proposal's head revision as the next version of its dashboard and close it as merged. Needs Edit on the dashboard and a connection that is not in propose mode. The save runs the same checks as any other save, on top of the dashboard's latest version: a document that does not parse or whose queries fail answers 422. When the dashboard has changed the same panels, variables or settings since the proposal's base, the answer is 409 `version_conflict` with `conflicts`, and the same request with a `choices` entry for each of them succeeds. A merge whose result equals the latest version saves nothing and closes the proposal with `merged_version` null. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`MergeProposalRequest`](/docs/reference/api/schemas/#mergeproposalrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The merged proposal. | [`ProposalSummary`](/docs/reference/api/schemas/#proposalsummary) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller may not merge: `forbidden_role` for a role or folder level that is too low, or `propose_mode` for a connected agent in propose mode that tried to merge. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard has newer versions that changed the same panels, variables or settings (`version_conflict`, with `conflicts`), the proposal has a newer revision than the one named (`proposal_changed`), or the proposal is no longer open (`invalid_transition`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard is a starter the server keeps current with each release (`provisioned`), which a proposal cannot change. | [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`ProposalChanged`](/docs/reference/api/schemas/#proposalchanged) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /proposals/{id}/discard Close a proposal without saving it. The author of the proposal, or anyone who may merge it, may discard it. The body is empty or an object with an optional `reason`, trimmed and at most 500 characters (400 `invalid_request` beyond that), which the proposal then shows as `close_reason`; the activity event does not carry it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`. | Field | Type | Description | | --- | --- | --- | | `reason` | `string` | Why the proposal is discarded. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The discarded proposal. | [`ProposalSummary`](/docs/reference/api/schemas/#proposalsummary) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The proposal is no longer open (`invalid_transition`, with its `state` and `allowed_actions`), or the dashboard changed under a discard (`proposal_changed`). | [`ProposalChanged`](/docs/reference/api/schemas/#proposalchanged) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Grafana imports > The grafana imports endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/imports/ · Markdown: https://slashobserve.com/docs/reference/api/imports/index.md ## GET /dashboards/{id}/import Get how a dashboard was imported from Grafana. Answers 404 `not_found` when there is no such dashboard and 404 `not_imported` when the dashboard was not made by an import. A dashboard in a folder the caller cannot see answers 404 `not_found` too. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The import record, with the report as verified when the dashboard was saved. | [`ImportRecord`](/docs/reference/api/schemas/#importrecord) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /imports/preview Convert a Grafana dashboard without saving it or running any query. Accepts the classic dashboard model, the export wrapper (with `__inputs`) and the API response `{"dashboard": ..., "meta": ...}` as the text in `json`. `ready` is false while a source datasource has no match; `spec` is then null. `existing` names the dashboard that already holds the file's Grafana uid when the caller can see it, so a client can offer to update it instead of making a duplicate. `report.verified` is always false because no query runs. A body above 8 MiB answers 413 `too_large`. A caller has at most 2 previews in flight and the instance at most 4; more answers 429 `too_many_imports`. A 422 carries the importer's code: `invalid_json`, `not_a_dashboard`, `unsupported_format`, `too_many_panels` or `invalid_mapping`. Answers 403 `forbidden_role` when the caller cannot create dashboards in any folder. ### Request body `application/json`, required. A [`ImportRequest`](/docs/reference/api/schemas/#importrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The converted dashboard, its datasource matches and the import report. | [`ImportPreview`](/docs/reference/api/schemas/#importpreview) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The JSON is not a Grafana dashboard the importer accepts (`invalid_json`, `not_a_dashboard`, `unsupported_format`, `too_many_panels`) or the mapping is wrong (`invalid_mapping`). | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has 2 previews in flight, or the instance has 4 (`too_many_imports`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /imports List imports, newest first. Only imports of dashboards in folders the caller can see. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | | `made_by` | query | `string` | Only imports made by the caller; the only value is `me`. | | `dashboard_id` | query | `string` | Only the import of this dashboard; zero or one item. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of imports. | [`ImportList`](/docs/reference/api/schemas/#importlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /imports Import a Grafana dashboard as version 1 of a new dashboard. Takes the same body as the preview and saves the converted Spec even when some queries fail. Panels whose queries fail are marked `unverified` in the stored report with the reason; later saves of the dashboard run every query as usual. The original JSON is stored for a later re-import and is never returned. A caller has at most 1 import in flight and the instance at most 4; more answers 429 `too_many_imports`. A retried agent request that already made its dashboard without an import answers 200 with that dashboard and no `import`. The folder is `folder` from the body, else the Grafana export's `meta.folderTitle`, else the caller's default folder (a person's My Dashboards, a key's General); General and My Dashboards both mean the default. A folder that does not exist is created when the caller is an Editor or above and the caller becomes its creator. Otherwise, or when the folder exists but the caller cannot see it or create in it, the dashboard goes to the default folder and `folder_note` says so. Answers 403 `forbidden_role` when the caller cannot create dashboards in any folder, and 404 `not_found` when a folder disappears while the dashboard is saved. The record's `grafana_uid` is the dashboard's Grafana uid when no earlier import holds it, so `GET /grafana/resolve/{uid}` finds this dashboard. With `update_dashboard`, the converted Spec is saved as the next version of that earlier import's dashboard instead, and the answer is 200 with the same body as a new import; it needs Edit on the dashboard and a file with the Grafana uid the dashboard was imported from (409 `grafana_uid_mismatch` otherwise; a dashboard imported from a file without a uid takes any file) (404 `not_found` when the caller cannot see it, 403 when they cannot edit it, 404 `not_imported` when no import made it). With `refuse_existing`, a file whose Grafana uid an earlier import holds, in a dashboard the caller can see, answers 409 `already_imported` instead of making a second dashboard, so a client that retries or reruns an import cannot duplicate it; the MCP tool and the CLI send it unless told to import as new. ### Request body `application/json`, required. A [`ImportRequest`](/docs/reference/api/schemas/#importrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard the request already created, when no import made it, or the updated dashboard with its import record when `update_dashboard` was given. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) or [`ImportedDashboard`](/docs/reference/api/schemas/#importeddashboard) | | `201` | The new dashboard, its first version and the import record. | [`ImportedDashboard`](/docs/reference/api/schemas/#importeddashboard) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The caller can see a dashboard that already holds this Grafana uid and the body set `refuse_existing` (`already_imported`); `existing` names it and says whether the caller can update it. Or `update_dashboard` names a dashboard that was imported from another Grafana dashboard than the file (`grafana_uid_mismatch`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or `update_dashboard` names a starter the server keeps current with each release (`provisioned`). | [`AlreadyImported`](/docs/reference/api/schemas/#alreadyimported) or [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The importer's codes as for the preview (`invalid_json`, `not_a_dashboard`, `unsupported_format`, `too_many_panels`, `invalid_mapping`), `datasources_unresolved` while a source datasource has no match (`datasources` lists every one, `candidates` the choices), or `invalid_spec` when the converted Spec cannot be saved (for example a NUL character; `issues` lists the problems). | [`Error`](/docs/reference/api/schemas/#error) or [`DatasourcesUnresolved`](/docs/reference/api/schemas/#datasourcesunresolved) or [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `429` | The caller already has an import in flight, or the instance has 4 (`too_many_imports`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Actions > The actions endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/actions/ · Markdown: https://slashobserve.com/docs/reference/api/actions/index.md ## POST /dashboards/{id}/actions Run an action that is saved in the dashboard's latest version. The server builds the request from the saved action, so the caller chooses only the variable values, the time range and the clicked value, never the method, address, headers or body template. `version` must be the dashboard's latest version, or the call answers 409 `stale_version`. `panel`, `element` and `action` (the index in the element's `actions`) locate a canvas action; without `element`, `panel`, `override` and `action` locate a field action: the panel's own `actions`, or those of the override at index `override`. An action that is missing answers 404 `action_not_found`. `inputs` gives a value for each of the action's own `variables` by key, and may name no other key; an action variable that has no input answers 400 `action_invalid`. `variables` may name only variables the version declares, each with at most 100 values of at most 1000 bytes, and every variable the action references needs a value. `__user.login`, `__user.email`, `__user.name` and `__user.id` come from the signed-in person and cannot be supplied. The request is sent only to an https address on the outbound allowlist, to a public address, and a redirect is returned as its own status without being followed. The remote body is read up to 64 KiB and discarded, never returned or logged. The caller needs Edit on the dashboard, and service accounts cannot call this endpoint. A person has at most 2 actions in flight. Every attempt that reaches the network is logged at INFO as `action run` with the person, dashboard, version, panel, element or override when the request has one, action index, method, host, status, outcome and duration, and never with the address, headers, body, variable values or inputs. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | Between 1 and 2147483647. | | `panel` (required) | `string` | | | `element` | `string` | The canvas element whose action runs. | | `override` | `integer` | With no element, the override whose actions hold the action; absent means the panel's own field actions. | | `action` (required) | `integer` | | | `variables` | `object` or `null` | | | `from` (required) | `string` (date-time) | | | `to` (required) | `string` (date-time) | | | `value` | `object` or `null` | | | `fields` | `object` or `null` | | | `inputs` | `object` or `null` | Values for the action's variables, by key. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The remote server answered; `ok` is true for a 2xx status. | [`ActionResult`](/docs/reference/api/schemas/#actionresult) | | `400` | The body is malformed, a field is out of range, or `variables` names an undeclared variable, `inputs` names a key the action does not declare, or `element` and `override` are both set (`invalid_request`); or the action cannot be built from the supplied values, for example a header value with a line break, a JSON body that is no longer valid, an address that changed host or a body above 64 KiB (`action_invalid`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), has no Edit access to the dashboard (`forbidden_role`), or the action's domain is not on the outbound allowlist (`outbound_domain_not_allowed`, with `host`). | [`ActionError`](/docs/reference/api/schemas/#actionerror) | | `404` | The dashboard does not exist (`not_found`), or the version has no such panel, element, override or action (`action_not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard has a newer version than `version` (`stale_version`); reload it before running the action. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has 2 actions in flight (`too_many_actions`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The request did not complete, because of a connection error, a timeout or a private or reserved address (`action_failed`, with `host`). | [`ActionError`](/docs/reference/api/schemas/#actionerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Live events > The live events endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/events/ · Markdown: https://slashobserve.com/docs/reference/api/events/index.md ## GET /dashboards/{id}/events Stream live events for one dashboard as Server-Sent Events. The stream starts with `retry: 3000` and an `event: ready` whose data is `{"dashboard_id","latest_version"}`. After that each frame is `event: <type>` with the event JSON as data: `version.created` carries `type`, `dashboard_id`, `version`, `parent_version`, `restored_from` (only when the version is a restore), `summary`, `author` and `created_at`. `comment.created` and `comment.updated` carry `type`, `dashboard_id`, `comment_id`, `status` and `author`, plus `panel_id` for a comment on a panel and `parent_id` for a reply, never the comment text. `comment.updated` names the thread's first comment when a thread is resolved or reopened, and the edited message, with `parent_id` when it is a reply, when a message is edited. `revision.updated` is sent on every status change of a revision and carries `type`, `dashboard_id`, `revision_id`, `status`, `version` (the saved version, once the status is `succeeded`) `comment_id` (for a revision requested by a comment) and `build_saves` (the number of saves in the revision's build, only while the status is `running` and the revision is building a new version of an existing dashboard); the saved version's `version.created` arrives before the `revision.updated` whose status is `succeeded`, and clients must not depend on the order between the two. `proposal.updated` is sent when a proposal on the dashboard is opened, gets a revision, is merged or is discarded, and carries `type`, `dashboard_id`, `proposal_id`, `status` (`open`, `merged` or `discarded`) and `author`, never the proposal's text. `dashboard.deleted` is sent once when the dashboard is deleted and carries `type`, `dashboard_id` and `author` (who deleted it), never the title; the stream ends at its next ping. `dashboard.moved` is sent when the dashboard moves to another folder and carries `type`, `dashboard_id` and `author` (who moved it), never a folder; access is checked again before it is sent, and a caller who lost access with the move, or whose access cannot be checked then, gets no event and sees the stream end. `role.changed` is sent when the caller's own role changes while the stream is open, checked every 5 seconds, and carries `dashboard_id` and the new `role`; the caller's other requests are judged by the new role at once. `event: resync` with data `{"dashboard_id"}` means events may have been missed. A `: ping` comment arrives every 15 seconds, and the server ends the stream after 30 minutes. Clients refetch stale data on every `ready` and `resync`; events are never replayed, so `Last-Event-ID` is ignored. A caller may hold 20 streams and the process 1000. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | An open `text/event-stream`. | `text/event-stream` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already holds the maximum number of open streams (`too_many_streams`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | The process holds the maximum number of open streams (`too_many_streams`) or is shutting down (`shutting_down`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Comments > The comments endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/comments/ · Markdown: https://slashobserve.com/docs/reference/api/comments/index.md ## GET /dashboards/{id}/comments List the comments of a dashboard across all versions, oldest first. Each thread's first comment carries `allowed_actions`, what the caller may do with the thread now, and a reply carries none. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `status` | query | `"open"`, `"resolved"`, `"all"` | Default `"all"`. | | `panel_id` | query | `string` | | | `limit` | query | `integer` | Between 1 and 500. Default `100`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of comments. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/comments Comment on a panel or the whole dashboard, or reply to a thread. A comment starts a thread or replies to one. A thread's first comment is anchored to a version and to a panel id, or to the whole dashboard when `panel_id` is absent or null, and never moves; `panel_present` on responses says whether the latest version still has that panel and is always true for a whole-dashboard comment. A reply names its thread's comment in `parent_id` and omits `version` and `panel_id`; it takes both from its thread. Replies are one level deep: replying to a reply attaches the new reply to that reply's thread. A thread's status lives on its first comment and a reply's `status` mirrors it. The body is trimmed first, and the limit of 1 to 4000 characters applies to the trimmed text. Each comment's `actor` is who wrote it, with the `label` to show, such as `Ada (via Claude Code)`; `resolved_actor` is who resolved the thread, `Observe Agent for Ada` when an agent run did. `mentions` lists the people and `@observe` the body mentions, `edited_at` is set once the body was edited, and `can_edit` says whether the caller may edit it. Control characters other than newline, carriage return and tab, and the bidirectional override and isolate characters (U+202A to U+202E and U+2066 to U+2069), are refused, and so is text with no visible character, such as only zero-width characters (400 or 422 with a `reason`, see `docs/reference/text-rules.md`). A `comment.created` event with `type`, `dashboard_id`, `comment_id`, `status` and `author`, plus `panel_id` for a comment on a panel and `parent_id` for a reply, goes to the dashboard's event stream. A comment queues a revision only when `request_revision` is true and an LLM provider is configured; a reply never requests a revision. The comment and the revision are created in one transaction, and the comment's `revision` holds the queued revision. When the revision succeeds, the server resolves the thread with `resolved_by_version` set to the saved version, unless it is already resolved. With no LLM provider configured, no revision is queued and `revision` stays null. At most 5 revisions may be queued or running per dashboard; beyond that the comment is not created. A starter takes comments but no revision, so `request_revision` on one answers 409 `provisioned` and creates nothing. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `request_revision` | `boolean` | Whether to queue an agent revision for the comment, when an agent is configured. A reply cannot request one. Default `false`. | | `version` | `integer` or `null` | Required unless `parent_id` is set. Between 1 and 2147483647. | | `panel_id` | `string` or `null` | The panel to comment on; absent or null means the whole dashboard. Not allowed with `parent_id`. | | `parent_id` | `string` (uuid) or `null` | The comment to reply to. Not allowed with `version` or `panel_id`. | | `body` (required) | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The new comment, open, with the queued revision in `revision` when one was requested. | [`CommentEnvelope`](/docs/reference/api/schemas/#commentenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard or the comment named by `parent_id` does not exist, or the dashboard has no such `version` (`version_not_found`, with `latest_version`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `request_revision` is true and the dashboard is a starter the server keeps current with each release (`provisioned`); the comment is not created. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The panel id does not exist in that version's Spec (`unknown_panel`), or a mention is refused: `invalid_mention` (a person who does not exist or cannot see the dashboard, an agent that is not the caller's own, or a service account that takes no runs), `too_many_mentions` or `too_many_agents`. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The dashboard already has 5 revisions queued or running (`too_many_revisions`); the comment is not created. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /dashboards/{id}/comments/{comment_id} Resolve or reopen a comment. Setting the status a comment already has answers 200 with the comment unchanged and sends no event. A real change sends `comment.updated` with `type`, `dashboard_id`, `comment_id`, `status` and `author` (plus `panel_id` for a comment on a panel), where `author` is the caller who changed the status or, when an agent request resolves the thread, its requester. Changing a reply changes its thread and returns the thread's first comment. A caller with only Comment resolves only a thread they started, and anyone else answers 403 `not_starter`; a caller who can edit resolves any thread, and reopening is open to every commenter. `resolved_by_version` names the version that fixed the thread; it must be at least the version the thread is on (400) and at most the dashboard's latest version (422), it is stored only when the call changes the status to resolved, and reopening clears it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `comment_id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `status` (required) | `"open"`, `"resolved"` | | | `resolved_by_version` | `integer` | Between 1 and 2147483647. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The comment with its current status. | [`CommentEnvelope`](/docs/reference/api/schemas/#commentenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | `resolved_by_version` is not a version of this dashboard (`unknown_version`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Threads > The threads endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/threads/ · Markdown: https://slashobserve.com/docs/reference/api/threads/index.md ## GET /threads List the comment threads on a dashboard, an annotation, an observation or a proposal. Pages through the messages of the target's threads, oldest first, and returns each message with the thread it belongs to. `limit` counts messages, so a thread can continue on the next page; `threads` holds only the threads that appear on this page. `can_comment` says whether the caller may start threads and write messages on the target. Reading needs View on the target: a dashboard follows its folder, an annotation on a dashboard follows that dashboard, a global annotation follows the General folder, an observation follows the folder it is in, and a proposal follows its dashboard. A target the caller cannot see answers 404, never 403. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `target` (required) | query | `string` | The object to read, as `<kind>:<id>` with kind `dashboard`, `annotation`, `observation` or `proposal`. | | `status` | query | `"open"`, `"resolved"`, `"all"` | Default `"all"`. | | `panel_id` | query | `string` | Only threads on this panel; dashboards only. | | `limit` | query | `integer` | Between 1 and 500. Default `100`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of messages with their threads. | [`ThreadPage`](/docs/reference/api/schemas/#threadpage) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | `target` is not `<kind>:<id>` (`invalid_target`), `status` is not open, resolved or all (`invalid_status`), or `panel_id` is not a panel id (`invalid_panel_id`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads Start a thread on a dashboard, an annotation, an observation or a proposal. The first message of a thread has the id of the thread, so either id names it. A dashboard thread is anchored to a version, the latest when `version` is absent, and to a panel of that version, or to the whole dashboard when `panel_id` is absent; the anchor never moves. `version` and `panel_id` are refused on an annotation or an observation. `block_id` anchors the first message to one block of an observation; absent or null means the whole observation. It is refused on a dashboard, an annotation or a proposal, and must name a block of this observation, with 422 `invalid_block` otherwise. Deleting the block keeps the message, now about the whole observation. `anchor` points the thread at one spot of a dashboard panel or, with `block_id`, of an observation block, and is refused on an annotation or a proposal (422 `invalid_target`) or when its kind lacks a field it needs (422 `invalid_anchor`). `block_id` with an anchor sets the thread's block; without an anchor it keeps its message meaning, the block the first message is about. `block_id` with an anchor of a kind that cannot sit on a block, `variable`, answers 422 `invalid_anchor` naming both fields. An observation has one page thread, its discussion, and any number of anchored threads; starting a second page thread adds the message to the first. The body is trimmed first, and the limit of 1 to 4000 characters applies to the trimmed text. Control characters other than newline, carriage return and tab, and the bidirectional override and isolate characters (U+202A to U+202E and U+2066 to U+2069), are refused, and so is text with no visible character, such as only zero-width characters (400 or 422 with a `reason`, see `docs/reference/text-rules.md`). Mention a person with `@[Name](user:<id>)`, the built-in agent with `@observe`, one of your own connected agents with `@[Name](grant:<grant id>)` and a service account that takes runs with `@[Name](service_account:<id>)`, at most 20 mentions in a message, a repeated mention counting each time (422 `too_many_mentions`). A grant that is not yours, revoked or expired, a service account that takes no runs, and a person who does not exist or cannot see the target all answer 422 `invalid_mention`; a service-account key may mention `@observe` and service accounts, never a grant. A mention is recorded, shows in the activity log, and a mentioned person gets it in their Inbox. `to` decides who the message is for. Absent, a message that mentions one agent asks it, a message that mentions a person asks no agent, and any other message asks the thread's agent unless it is off. `agent` asks the agent it mentions, else the thread's agent, else `@observe`; `everyone` asks no agent and turns the thread's agent off. The agent a message asks becomes the thread's agent, so later plain replies ask it too. More than one agent in a message answers 422 `too_many_agents` and writes nothing, whatever `to` says. The agent asked gets one run in the same transaction as the message, with the message's text as the prompt (the agent's token removed) and the earlier messages of the thread, the last 20 and at most 8000 characters, as its context. A dashboard thread starts a `comment` run on the thread's version and panel, which a Commenter may start and which ends in a proposal when the person cannot edit; an observation thread starts a read-only `investigate` run about the observation, which needs Comment on it, has no per-person cap and answers in the thread without writing on the page. An annotation or a proposal thread starts no run. A run that cannot start never fails the message: the message is stored and `message.run_refusal` says why, as `mention_target_unsupported`, `agent_unavailable` (`@observe` without a model provider, or a thread agent that was disconnected, which is then cleared), `agent_not_yours` (the thread's agent is someone else's connected agent), `forbidden_role` or `too_many_runs`. A started run is in `message.run`, and `to` in the answer says how the message was delivered. `client_id` is a UUID the caller makes for the message; sending it again answers 200 with the message already posted, `replayed: true` and no new run, and reusing it on another target answers 422 `client_id_reused`. The thread is recorded as a `thread.opened` activity event, and a dashboard thread also sends `comment.created` to the dashboard's event stream; a change of the thread's agent is audited as `thread.agent_set`. A comment sent to a dashboard with `request_revision` has its own path. Writing needs Comment on the target; a caller who can see it but not comment gets 403. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `target` (required) | `string` | The object to comment on, as `<kind>:<id>` with kind `dashboard`, `annotation`, `observation` or `proposal`. | | `version` | `integer` or `null` | The dashboard version to anchor to; the latest when absent. Dashboards only. Between 1 and 2147483647. | | `panel_id` | `string` or `null` | The panel to comment on; absent or null means the whole object. Dashboards only. | | `block_id` | `string` (uuid) or `null` | Observations only. With `anchor` it sets the thread's block, the block the anchor sits on; without `anchor` it keeps its message meaning, the block this first message is about. Absent or null means the whole observation. With an `anchor` of kind `variable`, which cannot sit on a block, it answers 422 `invalid_anchor`. | | `anchor` | [`Anchor`](/docs/reference/api/schemas/#anchor) or `null` | The spot the thread points at; absent or null for the whole dashboard, panel or observation. Dashboards and observations only. | | `body` (required) | `string` | | | `to` | `"agent"`, `"everyone"` | Who the message is for; absent decides from the mentions and the thread's agent. | | `client_id` | `string` (uuid) or `null` | A UUID the caller makes for this message, so a resend returns the message already posted. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The message `client_id` names was already posted; it is returned as it was, with `replayed` true. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `201` | The thread and its first message, or the observation's page thread and the new message, with `message.run` or `message.run_refusal` when the message asked an agent. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused: `invalid_target`, `invalid_body` (empty, too long or with refused characters), `too_many_mentions`, `invalid_panel_id`, `invalid_version` (`version` is out of range or below the version the thread is on), `unknown_panel` (the panel is not in that version's Spec), `unknown_version` (the version does not exist on the dashboard), `invalid_block` (`block_id` is not a block of this observation, or the target is not an observation), `invalid_reply_to` (`reply_to_id` is not a message of this thread), `invalid_mention` (a `grant` mention names a connected agent that is not the caller's own or is revoked or expired, or a `service_account` mention names an account that does not take runs, or does not exist) or `too_many_agents` (a message mentions more than one agent). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /threads/mentionable List the people who can be mentioned on a target. Returns the people, other than the caller, who can see the target and whose name or email contains `q`, ordered by name, at most `limit` of them, with `more` true when others match too. Seeing follows the target's folder, so a person without access to it is never listed, and mentioning one answers 422 `invalid_mention`. A person you mention appears in their Inbox as a `mention`. The caller must be able to comment on the target: a viewer gets 403 `forbidden_role`, and a target the caller cannot see answers 404, never 403. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `target` (required) | query | `string` | The object the comment is on, as `<kind>:<id>` with kind `dashboard`, `annotation`, `observation` or `proposal`. | | `q` | query | `string` | Text to look for in the name or the email, ignoring case. Empty lists the first people by name. | | `limit` | query | `integer` | Between 1 and 20. Default `20`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The people, possibly none. | [`MentionablePeople`](/docs/reference/api/schemas/#mentionablepeople) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | `target` is not `<kind>:<id>` (`invalid_target`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads/{thread_id}/messages Add a message to a thread. The path takes the thread's id or the id of any of its messages. A reply never reopens a resolved thread. The body rules, the mention syntax, `to`, `client_id` and the 4000 character limit are those of starting a thread; a run started from a reply is given the thread's earlier messages as context. The reply is recorded as a `thread.replied` activity event, and on a dashboard thread it sends `comment.created` to the dashboard's event stream. `block_id` anchors the reply to one block of the thread's observation, as when starting a thread, and is refused on any other target with 422 `invalid_block`. `reply_to_id` names a message of this thread that the reply answers, and the message then carries it as `reply_to`; any other id answers 422 `invalid_reply_to`. Editing a message changes neither. Writing needs Comment on the thread's target. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `body` (required) | `string` | | | `block_id` | `string` (uuid) or `null` | The block of the observation the reply is about; absent or null means the whole observation. Observations only. | | `reply_to_id` | `string` (uuid) or `null` | A message of this thread the reply answers. | | `to` | `"agent"`, `"everyone"` | Who the message is for; absent decides from the mentions and the thread's agent. | | `client_id` | `string` (uuid) or `null` | A UUID the caller makes for this message, so a resend returns the message already posted. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The message `client_id` names was already posted; it is returned as it was, with `replayed` true. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `201` | The thread and the new message, with `message.run` or `message.run_refusal` when the message asked an agent. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused: `invalid_target`, `invalid_body` (empty, too long or with refused characters), `too_many_mentions`, `invalid_panel_id`, `invalid_version` (`version` is out of range or below the version the thread is on), `unknown_panel` (the panel is not in that version's Spec), `unknown_version` (the version does not exist on the dashboard), `invalid_block` (`block_id` is not a block of this observation, or the target is not an observation), `invalid_reply_to` (`reply_to_id` is not a message of this thread), `invalid_mention` (a `grant` mention names a connected agent that is not the caller's own or is revoked or expired, or a `service_account` mention names an account that does not take runs, or does not exist) or `too_many_agents` (a message mentions more than one agent). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads/{thread_id}/resolve Resolve a thread. The path takes the thread's id or the id of any of its messages. The body is optional. `version` names the dashboard version that fixed the thread; it must be at least the version the thread is on (422 `invalid_version`) and at most the dashboard's latest version (422 `unknown_version`), and it is refused on a finding or an annotation. Resolving a thread that is already resolved answers 200 with the thread unchanged and records nothing. A real change is recorded as a `thread.resolved` activity event, and on a dashboard thread it sends `comment.updated` to the dashboard's event stream. Needs Comment on the thread's target, and a caller with only Comment resolves only a thread they started: for anyone else it answers 403 `not_starter`, and a caller who can edit resolves any thread. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Request body `application/json`. | Field | Type | Description | | --- | --- | --- | | `version` | `integer` | Between 1 and 2147483647. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The thread with its current status. | [`ThreadEnvelope`](/docs/reference/api/schemas/#threadenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused: `invalid_target`, `invalid_body` (empty, too long or with refused characters), `too_many_mentions`, `invalid_panel_id`, `invalid_version` (`version` is out of range or below the version the thread is on), `unknown_panel` (the panel is not in that version's Spec), `unknown_version` (the version does not exist on the dashboard), `invalid_block` (`block_id` is not a block of this observation, or the target is not an observation), `invalid_reply_to` (`reply_to_id` is not a message of this thread), `invalid_mention` (a `grant` mention names a connected agent that is not the caller's own or is revoked or expired, or a `service_account` mention names an account that does not take runs, or does not exist) or `too_many_agents` (a message mentions more than one agent). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads/{thread_id}/reopen Reopen a resolved thread. The path takes the thread's id or the id of any of its messages, and the request has no body. Reopening clears who resolved the thread and the version that fixed it. Reopening a thread that is already open answers 200 with the thread unchanged and records nothing. A real change is recorded as a `thread.reopened` activity event, and on a dashboard thread it sends `comment.updated` to the dashboard's event stream. Needs Comment on the thread's target. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The thread with its current status. | [`ThreadEnvelope`](/docs/reference/api/schemas/#threadenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads/{thread_id}/read Mark a thread read for the caller. Clears the thread's `unread` for the caller until someone else writes in it again. The web app calls it when a person opens a thread, and a reply by the caller marks the thread read too. Needs View on the thread's target. Only signed-in people may call it: a service-account key gets 403 `forbidden`, and the CLI and MCP have no equivalent because read state belongs to the person. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The thread is read. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /threads/{thread_id}/share Withdraw a shared answer back to only you. Undoes `POST /observe/{id}/share` for the caller's own private questions shared in this thread and makes each of those runs a private question again, read only by its requester and Admins. When a share opened the thread, the whole thread is deleted; otherwise only the shared questions and the answers posted under them are, and the thread keeps its other messages. It is allowed only to the person who asked, while every message in the thread is theirs or their run's reply; once someone else wrote in it, the answer stays shared (`others_wrote`). On an observation the run's answer leaves the observation, so it is no longer read or listed through it, but the answer's text that the share wrote onto the page stays there as page content; the observation's editors remove those blocks like any other block. The run can be shared again afterwards, which opens a new thread. Each withdrawn run is recorded as `run.withdraw`, and each deletion, of the thread or of a message, as a `thread.deleted` activity event. Needs View on the thread's target; someone who cannot view it, or who has no answer shared in it, gets 404. It is a delete, so no MCP tool reaches it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The shares are deleted and their answers are private again. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | Someone other than the asker wrote in the thread, so the answer stays shared (`others_wrote`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /threads/{thread_id}/apply Ask the agent to make the change an answer in this thread suggests. An answer to a question about a dashboard may carry `suggested_change`, one sentence on a change that would help; the question's run never changes the dashboard itself. This posts the message "Revise the dashboard: <suggested change>" in the thread as the caller and starts a run that revises the dashboard, with the suggested change as its prompt and the thread's earlier messages as context, so the thread shows who asked for the change. The run is the caller's and goes to the agent that wrote the answer; it saves a new version when the caller can edit the dashboard, and opens a proposal for someone who can edit to merge when the caller can only comment. `finding_id` must be the answer of a run asked in this thread, on a dashboard; any other id answers 404, and an answer with no suggested change answers 422 `no_suggested_change`. A second call for the same answer while its run is queued or running, or after it succeeded, posts nothing and returns the first message and run with `replayed` true; after that run failed or was canceled, a call starts a new one. The run counts against the dashboard's limit of 5 waiting or running revisions (429 `too_many_revisions`), needs the model provider for the built-in agent (503 `agent_unavailable`), and refuses with 409 `assignee_unavailable` when the connected agent that answered is not the caller's live agent or the service account no longer takes runs. It is recorded as `finding.apply` and the message as a `thread.replied` activity event. Needs Comment on the dashboard. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `thread_id` (required) | path | `string` (uuid) | The thread's id, or the id of any of its messages. | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `finding_id` (required) | `string` (uuid) | The answer whose suggested change to apply, the `id` of the run's finding. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The answer's change is already being applied or was applied; the first message and its run are returned with `replayed` true. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `201` | The thread, the new message and its run in `message.run`. | [`ThreadSent`](/docs/reference/api/schemas/#threadsent) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The connected agent or service account that answered cannot take the run (`assignee_unavailable`), the change is being applied by a run that could not be read back (`already_applied`), or the dashboard is a starter the server keeps current with each release (`provisioned`). Or the run that wrote the answer read data only Admins can query, such as the audit trail, and the dashboard is not in a folder only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The thread is not on a dashboard (`invalid_thread`), or the answer suggests no change (`no_suggested_change`). | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The dashboard already has its limit of waiting or running revisions (`too_many_revisions`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | The built-in agent answered and the server has no model provider (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /messages/{message_id} Edit the body of your own message. Only the message's author may edit it, and only while the author can still comment on the thread's target; another caller who can see the thread gets 403 `not_author`. A reply written by an agent run is never editable, not even by the person who requested the run, and answers 403 `not_author` too. The body rules, the mention syntax and the 4000 character limit are those of starting a thread, and the mentions are recorded again from the new body; an edit never starts a run. Sending the body the message already has answers 200 and changes nothing. A real edit sets `edited_at`, is recorded as a `thread.edited` activity event, and on a dashboard thread sends `comment.updated` naming the edited message to the dashboard's event stream. An edit never records a mention event. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `message_id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `body` (required) | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The thread and the message with its current body. | [`ThreadMessageEnvelope`](/docs/reference/api/schemas/#threadmessageenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not the author (`not_author`), or can no longer comment on the target (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused: `invalid_target`, `invalid_body` (empty, too long or with refused characters), `too_many_mentions`, `invalid_panel_id`, `invalid_version` (`version` is out of range or below the version the thread is on), `unknown_panel` (the panel is not in that version's Spec), `unknown_version` (the version does not exist on the dashboard), `invalid_block` (`block_id` is not a block of this observation, or the target is not an observation), `invalid_reply_to` (`reply_to_id` is not a message of this thread), `invalid_mention` (a `grant` mention names a connected agent that is not the caller's own or is revoked or expired, or a `service_account` mention names an account that does not take runs, or does not exist) or `too_many_agents` (a message mentions more than one agent). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /messages/{message_id} Delete a message from a thread. The message's author may delete it while they can still comment on the thread's target, and anyone who manages the target's folder may delete any message, including a reply an agent run wrote. A reply an agent run wrote is never deletable by the person who requested the run unless they manage the folder. Deleting the first message of a thread deletes the whole thread with its replies and mentions, so its author may do that only while nobody else has written in the thread. Everyone else who can see the thread gets 403 `not_author`. The deletion is recorded as a `thread.deleted` activity event naming the message, and on a dashboard thread it sends `comment.updated` naming the thread to the dashboard's event stream. A reply that quoted the message keeps its text and shows no quote. An agent run that was started from the message still finishes, and its reply is dropped when the thread is gone. No MCP tool deletes anything, so an agent cannot call this. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `message_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The message, or the whole thread when it was the first message, is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller may not delete this message (`not_author`), or can no longer comment on the target (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Panel and variable data > The panel and variable data endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/queryproxy/ · Markdown: https://slashobserve.com/docs/reference/api/queryproxy/index.md ## GET /dashboards/{id}/versions/{version}/panels/{panel_id}/data Run the saved queries of one panel in one dashboard version and return their frames. The queries are fixed by the saved version, so the request names a panel and never carries query text; the parameters `query`, `expr`, `sql` and `q` are refused with 403 `query_not_in_spec` even when their value is malformed, and any other unknown parameter or a malformed query string with 400. Each variable selection is a repeated `var-<name>` parameter, for example `var-pod=a&var-pod=b`, and the single value `$__all` selects All; OpenAPI 3.0 cannot describe a parameter family, so these are not listed below. A variable that is not given gets its default, and a request for an undeclared variable is a 400. An interval variable accepts `$__auto` when its `auto` is set, a constant accepts only its value, and a textbox accepts one value, an empty one included. An adhoc variable takes repeated `var-<name>=key|op|value` filters (at most 20) with `=`, `!=`, `=~` or `!~`, split at the first two `|`. A group by variable takes repeated `var-<name>=<label>` values (at most 20 label names), `var-<name>=` means none, and without the parameter it uses its saved `default`; its labels join every Prometheus aggregation of a query on its datasource that does not name the variable, and a value that is not a label name is a 400. `from` and `to` accept a Spec time expression such as `now-6h`, an RFC 3339 time or epoch milliseconds, default to the version's `time`, and may span at most 400 days. A range panel aligns `from` and `to` down to a multiple of the step, and an instant panel aligns `to` down to 5 seconds; the aligned range comes back in `meta`. Every query runs as a range query unless it sets `instant` or the panel is a table or logs panel. A panel's `timeFrom` replaces the range with the last N units up to now, and `timeShift` moves the range back; `meta.from` and `meta.to` report the range that ran. Every visible query of the panel runs in this one request (at most 4 at a time), and each frame carries the `ref` of the query that produced it; a hidden query does not run. The panel's `maxDataPoints` caps `max_data_points`, and a query's or the panel's `interval` is the minimum step of a range query; without one, a Prometheus datasource's `scrapeInterval` is, because a shorter step only repeats samples. `$__interval` and `$__rate_interval` follow the step each query ran with, which `meta.queries[].step_ms` reports. A failing query fails the whole request, and the error names it in `ref`. Successful results are cached in the server for 10 seconds, and each caller may have at most 8 query requests in flight. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `version` (required) | path | `integer` | Between 1 and 2147483647. | | `panel_id` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | The browser's IANA time zone, such as `Asia/Kolkata`. Relative times resolve in it when the dashboard's `timezone` is `browser`, and it is ignored otherwise. An unknown zone is a 400 `invalid_request`. | | `max_data_points` | query | `integer` | Between 10 and 11000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the saved queries returned, an empty list when the result is empty or every query is hidden. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation, for example an undeclared variable or an invalid variable selection. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text; the code is `query_not_in_spec`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard or version does not exist (`not_found`), or the version has no such panel (`panel_not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | A query or a variable cannot run: `query_invalid`, `query_forbidden`, `limit_exceeded` (also for a response over 32 MiB), `unknown_datasource`, `variable_empty` or `expression_error` (an expression query failed or one of its inputs did). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout, or the panel's queries did not all finish within 55 seconds; `ref` names the lowest-index query that failed. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## GET /dashboards/{id}/versions/{version}/variables/{name}/values List the values of one variable in one dashboard version. A custom variable returns its options without an upstream call. A constant returns its value, an interval variable its options with `$__auto` first when `auto` is set, and a datasource variable the uids of the configured datasources of its type; a textbox variable lists nothing, and an adhoc or group by variable has no list, so asking for it is a 400. A query variable runs its saved query with the selections of the variables declared before it, given as repeated `var-<name>` parameters (not listed below, see the panel data operation); an earlier variable without a selection gets its default, and a selection for the listed variable or a later one is a 400. `from` and `to` behave as for panel data, and the range is aligned like the default range of a range panel. The same query-text refusal and in-flight limit apply. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `version` (required) | path | `integer` | Between 1 and 2147483647. | | `name` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | The browser's IANA time zone, such as `Asia/Kolkata`. Relative times resolve in it when the dashboard's `timezone` is `browser`, and it is ignored otherwise. An unknown zone is a 400 `invalid_request`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to 1000 values; `truncated` is true when there were more. | [`VariableValues`](/docs/reference/api/schemas/#variablevalues) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text; the code is `query_not_in_spec`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /datasources/{uid}/lint Parse a query for a datasource and return diagnostics, without executing it or returning data. Prometheus queries are parsed and checked for metric names that do not exist; ClickHouse queries are checked with `EXPLAIN SYNTAX`. The call times out after 5 seconds, counts against the same in-flight limit as panel data, and takes one of the server's shared upstream slots, waiting at most 5 seconds for one before answering 429. When the datasource cannot be reached the call answers 502 or 504 instead of a diagnostic. A query over 64 KiB is refused with 400 `query_too_long`, and a body over 512 KiB with 413 `too_large`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The diagnostics, empty when the query is clean. | [`LintResult`](/docs/reference/api/schemas/#lintresult) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Draft panel preview > The draft panel preview endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/preview/ · Markdown: https://slashobserve.com/docs/reference/api/preview/index.md ## POST /datasources/{uid}/preview Run an unsaved data panel placed into a saved dashboard version and return its frames. The draft replaces the panel `panel_id` of the given version, or is added to it as a new top-level panel when the version has none with that id, the result is validated as a whole like a save (the draft must keep the id `panel_id`, and its datasource and every query's must be or resolve to the datasource in the path), and the draft's queries run with the agent tools' limits (15 seconds, 200 series, 100,000 points, 1,000 rows). Only signed-in users with Comment on the dashboard may call it, so a Commenter can see a draft while suggesting an edit: a service-account key gets 403 `user_session_required` and uses `query_range` instead, and a Viewer gets 403 `forbidden_role`. Nothing is cached, and the call counts against the caller's 8 in-flight query requests. Every call is recorded in the audit trail as `query.run` with the query text (cut at 4 KiB), the range and the row count, once per caller, datasource, query text and period in 10 minutes when it succeeds; a failed or refused call is recorded every time. `from`, `to`, `tz`, `max_data_points` and `variables` behave as the parameters of panel data: `from` and `to` default to the version's `time`, `max_data_points` defaults to 1000 and is capped by the draft's `maxDataPoints`, and each variable lists its selected values, with `$__all` selecting All; a variable that is not given gets its default. Every query runs as a range query unless it sets `instant` or the panel is a table or logs panel. A panel's `timeFrom` replaces the range with the last N units up to now, and `timeShift` moves the range back; `meta.from` and `meta.to` report the range that ran. The response has the shape of panel data, with `meta.cached` always false. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `version` (required) | `integer` | Between 1 and 2147483647. | | `panel_id` (required) | `string` | | | `panel` (required) | `object` | The draft panel, in the Spec's panel shape. | | `from` | `string` | | | `to` | `string` | | | `tz` | `string` | The browser's IANA time zone, used as for panel data when the dashboard's `timezone` is `browser`. | | `max_data_points` | `integer` | Between 10 and 11000. Default `1000`. | | `variables` | `object` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the draft's queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation, the draft is not a data panel, or its id does not match the request, or its datasource or any query's datasource is not the one in the path. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in user (`user_session_required`), or cannot change the dashboard (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource, dashboard or version does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The draft fails Spec validation (`invalid_spec` with `issues`), or one of its queries or variables cannot run: `query_invalid`, `query_forbidden`, `limit_exceeded` (also for a response over 32 MiB), `unknown_datasource`, `variable_failed`, `variable_empty` or `expression_error` (an expression query failed or one of its inputs did), with the failing query's `ref` when one query failed. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) or [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the draft's 15 second query timeout, or the request did not finish within 20 seconds; `ref` names the failing query when one query timed out. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Explore > The explore endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/explore/ · Markdown: https://slashobserve.com/docs/reference/api/explore/index.md ## POST /datasources/{uid}/query Run one query against a datasource and return its frames. The query runs as given against the datasource in the path, with the time and user macros expanded for the range and no variables. `kind` `instant` returns rows (log lines, table rows, spans) over exactly the given range, and `range` returns series over the range aligned to its step. The query runs with the agent tools' limits (15 seconds, 200 series for metric queries, 100,000 points, 1,000 rows; log lines count against the row limit only), and `limit` lowers the row limit. Nothing is cached, and the call counts against the caller's 8 in-flight query requests. Every call is recorded in the audit trail as `query.run` with the query text (cut at 4 KiB), the range and the row count, once per caller, datasource, query text and period in 10 minutes when it succeeds; a failed or refused call is recorded every time. Viewers and above may call it, service-account keys included. `from` and `to` take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times, fractional seconds included. The response has the shape of panel data, with `meta.cached` always false. `meta.truncated` says the query stopped at the row limit, `meta.partial` that the datasource did not cover the whole range, and `meta.oldest` and `meta.newest` are the time edges of the rows returned. To load older rows, repeat the request with `to` set to `meta.oldest`; to load newer rows, with `from` set to `meta.newest`. On Loki `end` is exclusive and `start` inclusive, so the oldest line is not repeated and the newest one is; on ClickHouse `$__timeFilter` includes both ends. Clients de-duplicate by time plus body. `page_size` turns paging on for an instant query on a logs or trace datasource, and the response then carries `meta.page`: ClickHouse pages by offset with an exact `total`, so any `page` can be asked for directly; Loki and Tempo page by a time cursor, so a page past the first needs the `next` cursor of the page before it, and `total` is the rows walked so far (`gte`) until the last page makes it exact. `prev` is the cursor that produced the page. `sort` orders the whole result of a ClickHouse query before it is paged, not just the page; send it with every page of a walk. The SQL views of the ClickHouse logs and trace searches both run here, with the same checks for either table: one read-only `SELECT`, the time range read through a macro such as `$__timeFilter(Timestamp)` when the query selects no `Timestamp`, and the limits above. Without `page_size` a ClickHouse query must read the time range through a macro even when it selects `Timestamp`, because only a paged query is cut to the range by the server; a macro inside a comment does not count. With a cursor the time range is pinned from it and `from` and `to` are ignored; without one, send absolute times for a stable total. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | | | `kind` (required) | `"range"`, `"instant"` | | | `from` (required) | `string` | | | `to` (required) | `string` | | | `timezone` | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | | `max_data_points` | `integer` | Range queries only: the most points per series, 200 by default as for the `query_range` MCP tool. The step never falls below a Prometheus datasource's `scrapeInterval`. Between 10 and 11000. Default `200`. | | `limit` | `integer` | The most rows the query may return; lowers the 1,000 row limit. Cannot be sent with `page_size`. Between 1 and 1000. | | `page_size` | `integer` | Rows per page; turns paging on. Instant queries on logs and trace datasources only, and not with `limit`. Between 50 and 500. | | `page` | `integer` | The page to read. Needs `page_size`. On ClickHouse any page can be asked for; on Loki and Tempo a page above 1 needs `cursor`, and the page is then the cursor's. Default `1`. | | `cursor` | `string` | The `next` or `prev` value of an earlier page of the same query. Needs `page_size`. A cursor from another datasource, query or range is refused, and so is one whose `sort` differs from the one sent with it. | | `sort` | `string` | A result column to sort the whole result by before it is paged, with a leading minus for descending, such as `-Duration`. Needs `page_size`, applies to ClickHouse only and answers 422 `query_invalid` when the column is not in the result. Without it rows come newest first. | | `as_written` | `boolean` | ClickHouse only: returns the rows as the query wrote them, with its own `ORDER BY`, `LIMIT` and columns and no `TimeNs` field, even when it selects `Timestamp`; a `LIMIT` above `page_size` is paged and never raised, and the query must read the time range through a macro such as `$__timeFilter(Timestamp)`. Without it a query that selects `Timestamp` comes back as log lines, newest first. Needs `page_size`. Default `false`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the query returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query cannot run: `query_invalid`, `query_forbidden`, `limit_exceeded` (also for a response over 32 MiB) or `unknown_macro`; on Tempo also `time_range_in_future` for a range that starts after now and `time_range_too_long` for a range over Tempo's search limit, 7 days by default, with the limit in the text; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## POST /datasources/{uid}/log-volume Count the log lines a logs query matches over a range, by level. The counts cover every line the query matches over the whole range, not only the lines the logs page shows. The server picks a whole-second step of at least one second so the range fits in at most `buckets` buckets, aligns the range to it, adds one more bucket when the end of the range falls inside a step so the newest lines are counted, and returns every bucket, oldest first. Loki, ClickHouse, Elasticsearch and OpenSearch datasources answer it. Each line is filed as `error`, `warning`, `info` or `other` by its level word: err, eror, error, emerg, fatal, alert, crit, critical and panic are errors; warn and warning are warnings; info, information, informational and notice are info; anything else, or no level, is other. For Loki the query must be a log query that starts with a stream selector; the server counts it with `count_over_time` by the first of the `level`, `lvl`, `severity_text`, `severity` and `detected_level` labels, so a pipeline that extracts `level` with `| json` or `| logfmt` is honored. Loki counts a range longer than a day one day at a time, newest first, and counts a bucket wider than 30 minutes as the sum of equal windows of at most 30 minutes, because Loki reads a much wider window far more slowly; when the next day would not finish within the query time limit, the server stops, returns the days it counted with `partial` true and `counted_from` set to where the count starts, and leaves the older buckets at zero. For ClickHouse the query must be one SELECT; the server drops its top-level `ORDER BY` and `LIMIT` and groups the rows it matches by the result columns `Timestamp` and `SeverityText`, the columns the logs page selects. The query runs with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. `from` and `to` take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | The query the logs page runs. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `buckets` | `integer` | The most buckets wanted. Between 1 and 200. Default `60`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The line counts by level per bucket. | [`LogVolume`](/docs/reference/api/schemas/#logvolume) | | `400` | The request is malformed or fails validation, `buckets` is out of range, or the datasource is not Loki or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query cannot run: `query_invalid` for a Loki metric query, a ClickHouse query with a top-level UNION, INTERSECT, EXCEPT or LIMIT BY, or an upstream rejection such as an unknown column; `query_forbidden`, `limit_exceeded` or `unknown_macro` as for the explore query; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Log facets > The log facets endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/log-facets/ · Markdown: https://slashobserve.com/docs/reference/api/log-facets/index.md ## POST /datasources/{uid}/log-facets Count the top values of each label, field or column a logs query matches over a range. Each field answers with its most frequent values and their counts, exact where the datasource can count and from a sample of the newest lines where it cannot; every field says which with `exact`. On Loki the index labels of the matched streams (`kind` `label`) are counted exactly from the index volume API, whose counts are bytes, so those fields carry `unit` `bytes`; parsed fields (`kind` `field`) and structured-metadata fields (`kind` `metadata`, a Loki field with no parser) are counted from the newest `sample` lines of the full query, and the response says so with `sampled` and `lines_sampled`. An index label whose count does not finish within the time limit is counted from the same sample instead, with `exact` false and no `unit`, so it too counts the newest `lines_sampled` lines; the response still answers in time. The Loki query must be a log query that starts with a stream selector; the selector before the first `|` picks the streams. On ClickHouse every field (`kind` `column`) is counted exactly with one `GROUP BY` per field over the query with its top-level `ORDER BY` and `LIMIT` dropped; the query must be one SELECT without UNION, INTERSECT, EXCEPT or LIMIT BY. Without `fields`, Loki counts every index label of the matched streams plus every detected field, and ClickHouse every result column except `Timestamp`, `Body`, `TraceId` and `SpanId`, plus the top 20 keys of `LogAttributes` as `LogAttributes.<key>` when it is a result column. Fields come exact first, then by cardinality ascending, then by name; values by count descending, then by value. The query runs with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. `from` and `to` take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | The logs query the page runs. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `timezone` | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | | `fields` | array of `string` | Count only these fields; on ClickHouse a name that is neither a result column nor `LogAttributes.<key>` answers `query_invalid`. At most 50 items. | | `limit` | `integer` | Values per field. Between 1 and 50. Default `10`. | | `sample` | `integer` | The newest lines to sample for fields the datasource cannot count exactly. Between 100 and 5000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The top values of each field. | [`LogFacets`](/docs/reference/api/schemas/#logfacets) | | `400` | The request is malformed or fails validation, `fields`, `limit` or `sample` is out of range, or the datasource is not Loki or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query cannot run: `query_invalid` for a Loki metric query, a ClickHouse query with a top-level UNION, INTERSECT, EXCEPT or LIMIT BY, a requested field that is not a column of the query, or an upstream rejection; `query_forbidden`, `limit_exceeded` or `unknown_macro` as for the explore query; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Trace logs > The trace logs endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/trace-logs/ · Markdown: https://slashobserve.com/docs/reference/api/trace-logs/index.md ## POST /datasources/{uid}/trace-logs Read the log lines that carry a trace id, or one span id, from a logs datasource. The trace view's path from a span to its logs; the datasource in the path must be Loki, ClickHouse, Elasticsearch or OpenSearch. The server builds the query itself from the ids, so no query text crosses this call. On Loki it narrows the stream selector to `service` through the first of the `service_name`, `service`, `app` and `job` labels present in the window, or reads every stream when `service` is not given; it filters `trace_id` (and `span_id`) as structured metadata or parsed labels first and, when that answers no line, runs the same selector with a line filter on the id, so lines that only carry the id in their body still match. On ClickHouse it reads the logs page's columns from `otel_logs` where `TraceId` (and `SpanId`) match within the window, newest first. On Elasticsearch and OpenSearch it matches the datasource's trace id field (and span id field, and service field when `service` is given) with exact terms within the window, newest first. `from` and `to` are the trace's window, with the grammar of the explore query; the web passes the trace's start minus a minute to its end plus a minute. The query runs with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests and takes one of the server's shared upstream slots, waiting at most 5 seconds for one before it answers 429 `too_many_requests` with `Retry-After`. Viewers and above may call it, service-account keys included. The response has the shape of panel data with one query `A` of kind `instant`, `meta.truncated` when the line limit was hit and `meta.oldest` and `meta.newest` as the time edges of the lines returned; an empty result is a 200 with no frames, never a 404. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `trace_id` (required) | `string` | | | `span_id` | `string` | Narrow the lines to one span. | | `service` | `string` | The span's `service.name`, used to narrow the Loki stream selector; ClickHouse ignores it. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `timezone` | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | | `limit` | `integer` | The most lines to return. Between 1 and 1000. Default `500`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The lines of the trace, or no frames when it logged nothing in the window. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation, or the datasource is not Loki, ClickHouse, Elasticsearch or OpenSearch (`invalid_request`); the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The datasource refused the query (`query_invalid`) or the result passed a limit (`limit_exceeded`); the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Traces > The traces endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/traces/ · Markdown: https://slashobserve.com/docs/reference/api/traces/index.md ## GET /datasources/{uid}/traces/{trace_id} Read one trace whole from a Tempo, Jaeger or ClickHouse datasource. Answers every span of the trace as one frame with ref `A` and the columns `TraceId`, `SpanId`, `ParentSpanId`, `SpanName`, `ServiceName`, `StartTime`, `Duration`, `StatusCode`, `StatusMessage`, `SpanAttributes`, `ResourceAttributes`, `SpanKind`, `SpanEvents` and `SpanLinks`, sorted by `StartTime` then `SpanId`. `SpanKind` is one of `Server`, `Client`, `Producer`, `Consumer`, `Internal` or `Unspecified`, `SpanEvents` is a JSON array string of `{"time_ms", "name", "attributes"}` objects, and `SpanLinks` a JSON array string of `{"trace_id", "span_id", "attributes"}` objects with lowercase hex ids; both are `[]` when the span has none. A trace over 20,000 spans is cut to its earliest 20,000: `meta.rows` is the number of spans returned, `meta.rows_total` the number in the trace and `meta.truncated` says the two differ. `meta.bytes` is the size of Tempo's payload in bytes and `meta.elapsed_ms` the time the upstream read took; ClickHouse reports no `bytes`. `meta.kind` is `instant` and `meta.cached` is always false. `from` and `to` bound the search and default to the last 24 hours; they take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. The call runs with the agent tools' 15 second timeout, is never cached, and counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `trace_id` (required) | path | `string` | The trace id as 16 or 32 hex characters, in either case. | | `from` | query | `string` | | | `to` | query | `string` | | | `timezone` | query | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The spans of the trace. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The trace id is not 16 or 32 hex characters, `from` or `to` is not a valid time, or the datasource is not Tempo, Jaeger or ClickHouse (`invalid_request`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist, or no span of the trace lies in the range (`not_found`); widen `from` and `to`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | The response is over 32 MiB (`limit_exceeded`); the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## POST /datasources/{uid}/trace-stats Count spans and errors per bucket and give the duration distribution of the spans a filter matches. On Tempo `query` is a TraceQL spanset filter such as `{ resource.service.name = "checkout" }`, and `{}` matches every span; on ClickHouse it is a SQL boolean expression over `otel_traces` such as `ServiceName = 'checkout'`, and an empty string matches every span. The server picks a whole-second step of at least one second so the range fits in at most `buckets` buckets, aligns the range to it, and returns every bucket, oldest first, zero-filled. Each bucket carries its span and error counts and the p50, p95 and p99 span durations in milliseconds, null when the bucket has no spans. `histogram` is the duration distribution of every matched span over the whole range in powers-of-two buckets, ascending by `le_ms`, empty when nothing matched. `partial` is true when Tempo did not search every block, so the counts are a lower bound. The query runs with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. `from` and `to` take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | A TraceQL spanset filter on Tempo, or a SQL boolean expression over `otel_traces` on ClickHouse. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `buckets` | `integer` | The most buckets wanted. Between 1 and 200. Default `60`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The span counts, error counts, quantiles and duration histogram. | [`TraceStats`](/docs/reference/api/schemas/#tracestats) | | `400` | The request is malformed or fails validation, `buckets` is out of range, or the datasource is not Tempo or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The filter cannot run: `query_invalid` for a Tempo query that is not a `{ ... }` spanset filter or that Tempo rejects, or a ClickHouse expression the server rejects; `query_forbidden` or `limit_exceeded` as for the explore query; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Trace compare > The trace compare endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/trace-compare/ · Markdown: https://slashobserve.com/docs/reference/api/trace-compare/index.md ## POST /datasources/{uid}/trace-compare Rank the attribute values that set a set of traces apart from a baseline. Reads every span of the `selected` traces and of the `baseline` traces from a Tempo or ClickHouse datasource and counts, once per trace, each attribute value any of its spans carries: `name` (the span name), `kind` (`Server`, `Client`, `Producer`, `Consumer`, `Internal` or `Unspecified`), `status` (`Ok`, `Error` or `Unset`), `resource.<key>` and `span.<key>`. Only scalar values count, as their text; arrays and maps are skipped, and a value is cut to 256 bytes. Each trace contributes its earliest 2,000 spans. `differences` lists the pairs whose share of selected traces and share of baseline traces differ by at least 0.1, ranked by that gap, then attribute, then value, the first `limit` of them; `truncated` says more passed the threshold. A pair carried by every trace of both sets never appears. `selected.read` and `baseline.read` count the traces whose spans were read; a trace not found in the range, or not reached before the deadline, is left out and is not an error, and `partial` is true when any read count is below its requested count. `attributes` is the number of distinct attribute names seen across both sets. Trace ids are 16 or 32 hex characters in either case, lowercased and de-duplicated by the server; an id in both lists is refused. `from` and `to` are the range the traces were found in and take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. The call runs with the agent tools' 15 second timeout, is never cached, and counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `selected` (required) | array of `string` | The trace ids to explain. At most 50 items. | | `baseline` (required) | array of `string` | The trace ids to compare against, such as the other traces the search returned. At most 150 items. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `timezone` | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | | `limit` | `integer` | The most differences wanted. Between 1 and 100. Default `20`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The ranked differences and how many traces of each set were read. | [`TraceCompare`](/docs/reference/api/schemas/#tracecompare) | | `400` | The request is malformed or fails validation: a list is empty or over its cap, an id is not 16 or 32 hex characters, an id is in both lists, `limit` is out of range, `from` or `to` is not a valid time, or the datasource is not Tempo or ClickHouse (`invalid_request`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout before any trace was read, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Log context > The log context endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/log-context/ · Markdown: https://slashobserve.com/docs/reference/api/log-context/index.md ## POST /datasources/{uid}/log-context Read the log lines just before and just after one line. `anchor` is the `TimeNs` string of the line, as the explore query and the tail return it, so the context is exact to the nanosecond and needs one request. `before.frames` hold the newest `before` lines older than the anchor, newest first, read from `window_ms` before the anchor up to it; `after.frames` hold the oldest `after` lines newer than the anchor, oldest first, read from one nanosecond after the anchor to `window_ms` after it. The anchored line is on neither side. Each side's `truncated` is true when more lines exist in its window; a side with a count of 0 is not read and answers no frames. The two reads run at the same time with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests. For Loki the query must be a log query that starts with a stream selector; for ClickHouse one SELECT that selects `Timestamp`, whose top-level `ORDER BY` and `LIMIT` the server replaces. Viewers and above may call it, service-account keys included. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | The query the logs page runs; the server does not rewrite it beyond the time bounds and order. | | `anchor` (required) | `string` | The line's `TimeNs`, a nanosecond epoch time as a decimal string. | | `before` | `integer` | The most lines wanted before the anchor. Between 0 and 500. Default `50`. | | `after` | `integer` | The most lines wanted after the anchor. Between 0 and 500. Default `50`. | | `window_ms` | `integer` | How far before and after the anchor to look, in milliseconds. Between 1000 and 86400000. Default `3600000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The lines on each side of the anchor. | [`LogContext`](/docs/reference/api/schemas/#logcontext) | | `400` | The request is malformed or fails validation, `anchor` is not a nanosecond epoch time, a count or `window_ms` is out of range, or the datasource is not Loki or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query cannot run: `query_invalid` for a Loki metric query, a ClickHouse query without `Timestamp` or with a top-level set operator, or an upstream rejection such as an unknown column; `query_forbidden`, `limit_exceeded` or `unknown_macro` as for the explore query; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Log patterns > The log patterns endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/log-patterns/ · Markdown: https://slashobserve.com/docs/reference/api/log-patterns/index.md ## POST /datasources/{uid}/log-patterns Group the lines a logs query matches over a range into patterns with counts. A pattern is a line template with the variable tokens replaced by `<*>`, with the number of lines it covers, ordered by count descending then by pattern. On Loki with the pattern ingester enabled and a query that is a bare stream selector, the patterns come from Loki's pattern index over the whole range (`source` `loki`): `count` sums Loki's samples over the range, `first` and `last` are the first and last sample buckets, `sample` is empty and `lines_sampled` is 0. Otherwise, on a Loki without the pattern ingester, a Loki query with filters or stages, or ClickHouse, the server reads the newest `sample` lines of the query and clusters them itself (`source` `server`): `count` is the lines of the sample in that pattern, `sample` the newest of them, `first` and `last` the times of its oldest and newest sampled lines, and `lines_sampled` the lines read. Either way every pattern carries a `trend` of 30 equal buckets over the range, and a `level`. `lines_matched` is the sum of every pattern's count, before the `limit` cut, and `truncated` says more patterns exist than `limit`, or that the server clustering read only its first 5,000 lines or folded lines into the nearest of its 500 clusters. The Loki query must be a log query that starts with a stream selector; the ClickHouse query one SELECT that selects `Timestamp` and `Body`, whose top-level `ORDER BY` and `LIMIT` the server replaces. The query runs with the agent tools' limits, nothing is cached, and the call counts against the caller's 8 in-flight query requests. Viewers and above may call it, service-account keys included. `from` and `to` take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | The logs query the page runs. | | `from` (required) | `string` | | | `to` (required) | `string` | | | `timezone` | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | | `limit` | `integer` | The most patterns to return. Between 1 and 100. Default `20`. | | `sample` | `integer` | The newest lines to read when the server computes the patterns itself. Between 100 and 5000. Default `2000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The top patterns of the query over the range. | [`LogPatterns`](/docs/reference/api/schemas/#logpatterns) | | `400` | The request is malformed or fails validation, `limit` or `sample` is out of range, or the datasource is not Loki or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query cannot run: `query_invalid` for a Loki metric query, a ClickHouse query that does not select `Timestamp` or `Body`, or an upstream rejection; `query_forbidden`, `limit_exceeded` or `unknown_macro` as for the explore query; the body carries no `ref`. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a datasource call that failed without a classified cause. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | The datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | The datasource did not answer within the 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Tail > The tail endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/tail/ · Markdown: https://slashobserve.com/docs/reference/api/tail/index.md ## GET /datasources/{uid}/tail Stream new log lines of a logs query as Server-Sent Events. The server polls the datasource every second for lines newer than the last line it sent and streams them as they arrive, so the browser holds no credential and runs no query of its own. The stream starts with `retry: 3000` and an `event: ready` whose data is `{"datasource_uid","from"}`. Each poll that found lines sends an `event: lines` whose data is `{"frames","newest","truncated"}`: `frames` holds the lines in the `Frame` shape of a panel data response, every frame with `ref` `A`, oldest first, with a `TimeNs` string field beside `Time`; `newest` is the RFC 3339 time of the newest line; `truncated` is true when the poll hit `limit`, and the next poll then runs at once instead of a second later. `partial` and `warning` are present only when the datasource said the poll did not cover everything, such as a failed shard; the lines found are still sent. The next poll starts one nanosecond after `newest`, so a line is sent once, except that a partial poll leaves the start where it was for up to three polls, so the lines it missed are fetched and the ones already sent are not sent again. A datasource failure sends an `event: error` whose data is `{"error","code"}` with the code the explore query would answer, and the stream ends; a datasource that is unavailable or slow is retried and reported only after five failed polls in a row. The first poll runs before any stream byte, so a query that cannot run answers JSON with the explore query's status instead of a stream. For Loki the query must be a log query that starts with a stream selector; for ClickHouse one SELECT that selects `Timestamp`, whose top-level `ORDER BY` and `LIMIT` the server replaces. A `: ping` comment arrives every 15 seconds and re-checks the caller's credential, and the server ends the stream after 30 minutes. Polls run with the agent tools' limits and share the server's upstream call slots, but a tail holds no in-flight query slot. A caller may hold 5 tails and the process 200. Each tail is recorded once, when it ends, as `query.run` with `stream` true, the query text, the start of the stream and the rows of its first poll; tails are never folded. Viewers and above may call it, service-account keys included. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `query` (required) | query | `string` | The query the logs page runs. | | `from` | query | `string` | Where the first poll starts: a relative expression such as `now-30s`, epoch milliseconds or an RFC 3339 time, in the past. Defaults to 10 seconds ago. | | `limit` | query | `integer` | The most lines one poll returns. Between 1 and 1000. Default `500`. | | `timezone` | query | `string` | The IANA zone a relative `from` resolves in; defaults to UTC. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | An open `text/event-stream`. | `text/event-stream` | | `400` | A parameter is missing, repeated, unknown or out of range, `from` is not a time or lies in the future, or the datasource is not Loki or ClickHouse (`invalid_request`), or the query is longer than 64 KiB (`query_too_long`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The first poll cannot run: `query_invalid` for a Loki metric query, a ClickHouse query without `Timestamp` or with a top-level set operator, or an upstream rejection; `query_forbidden`, `limit_exceeded` or `unknown_macro` as for the explore query. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already holds 5 tails (`too_many_streams`), or the server's shared upstream call slots stayed busy for the first poll (`too_many_requests`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request, including a first poll that failed without a classified cause. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable for the first poll. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | The process holds 200 tails (`too_many_streams`). | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer the first poll within the 15 second query timeout. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Draft query > The draft query endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/draft-query/ · Markdown: https://slashobserve.com/docs/reference/api/draft-query/index.md ## POST /datasources/{uid}/draft-query Turn a question into a checked log query, PromQL query, TraceQL query or trace filters for one datasource. The server reads the datasource's metric names, labels, attributes or columns first, then asks the model once with the question and those facts, capped at 12 KiB. The answer is checked with the lint and one sample run over the last 15 minutes of the range under the agent tools' limits; the full query is never run. Only when that check fails does the server make a second model call in the same session to correct it, so a draft spends at most two model calls, and a second failure answers `cannot_translate`. The whole draft has a 60 second deadline. Each caller may have 3 drafts in flight and each server process 10, and each caller may start 60 drafts per clock hour across all servers; the count is kept in the database. Loki answers LogQL, Prometheus answers PromQL, ClickHouse logs answer ClickHouse SQL, ClickHouse traces answer trace filters, and Tempo answers trace filters or, when the question needs more, TraceQL. `signal` defaults to `logs` on Loki, `metrics` on Prometheus and `traces` on Tempo, and ClickHouse requires it. `from` and `to` default to `now-1h` and `now` and take relative expressions such as `now-1h`, epoch milliseconds or RFC 3339 times. Viewers and above may call it, service-account keys included. Without a configured model it answers 503 `agent_unavailable`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Request body `application/json`, required. A [`DraftQueryRequest`](/docs/reference/api/schemas/#draftqueryrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The checked draft; `trace_filters` is null unless `language` is `filters`, and `query` is empty when it is. | [`DraftQuery`](/docs/reference/api/schemas/#draftquery) | | `400` | The body is malformed or fails validation, the signal does not fit the datasource type, or the datasource type has no drafts (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The datasource does not exist (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The question could not be turned into a query (`cannot_translate`); `reason` says why in one sentence. | [`CannotTranslate`](/docs/reference/api/schemas/#cannottranslate) | | `429` | The caller has 3 drafts in flight or has used the 60 drafts of this clock hour (`too_many_requests`, and the message says which and how long to wait), or the server process has 10 in flight (`agent_busy`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The model provider failed (`provider_error`), or every read of the datasource failed, with the datasource's own code such as `datasource_unavailable`. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No model is configured on this server (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The draft did not finish within its 60 second deadline (`draft_timeout`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Metric and label names > The metric and label names endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/names/ · Markdown: https://slashobserve.com/docs/reference/api/names/index.md ## GET /datasources/{uid}/metrics List the metric names of a datasource, up to a limit. The browser's only path to metric names; it never calls a datasource directly. It runs the same code, validation and limits as the agent's `list_metrics` tool: a Prometheus datasource lists its metrics with their type and help, and a ClickHouse datasource lists the OpenTelemetry metric names of its `otel_metrics_*` tables with the OTel kind as `type` and the table. The call takes one of the server's shared upstream slots, waiting at most 5 seconds for one before it answers 429 `too_many_requests` with `Retry-After`, counts against the per-caller in-flight limit, times out after 15 seconds and is never cached. Any query parameter not listed below, or one given twice, is a 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `search` | query | `string` | Case-insensitive substring filter. | | `limit` | query | `integer` | Maximum names to return. Between 1 and 500. Default `100`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to `limit` metrics; `truncated` is true when there were more. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /datasources/{uid}/labels List the label names of a datasource, or its OpenTelemetry attribute keys on ClickHouse, up to a limit. The browser's only path to label names; it never calls a datasource directly. It runs the same code, validation and limits as the agent's `list_labels` tool. ClickHouse labels need `table` or `metric`: with only `metric` the server uses the first `otel_metrics_*` table that holds it, and answers 404 `not_found` when none does. A ClickHouse request with neither is a 400. The call takes one of the server's shared upstream slots, waiting at most 5 seconds for one before it answers 429 `too_many_requests` with `Retry-After`, counts against the per-caller in-flight limit, times out after 15 seconds and is never cached. Any query parameter not listed below, or one given twice, is a 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `metric` | query | `string` | Only names seen on this metric. On ClickHouse it also finds the metric's table when `table` is not given. | | `table` | query | `string` | ClickHouse table such as `otel_logs`; Prometheus ignores it. | | `search` | query | `string` | Case-insensitive substring filter. | | `limit` | query | `integer` | Maximum names to return. Between 1 and 500. Default `100`. | | `from` | query | `string` | Start of the window the names must have been seen in, as a relative expression such as `now-6h`, epoch milliseconds or an RFC 3339 time. `from` and `to` are given together or not at all; one without the other is a 400. Without them Loki and Tempo answer their own default window, and Prometheus and ClickHouse ignore them. | | `to` | query | `string` | End of the window, with the same grammar as `from`. | | `timezone` | query | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to `limit` label names; `truncated` is true when there were more. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /datasources/{uid}/labels/{name}/values List the values of one label of a datasource, up to a limit. The browser's only path to label values; it never calls a datasource directly. It runs the same code, validation and limits as the agent's `list_label_values` tool. ClickHouse labels need `table` or `metric`, as for the label names operation, and a malformed label name is a 422 `query_invalid`. The call takes one of the server's shared upstream slots, waiting at most 5 seconds for one before it answers 429 `too_many_requests` with `Retry-After`, counts against the per-caller in-flight limit, times out after 15 seconds and is never cached. Any query parameter not listed below, or one given twice, is a 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `name` (required) | path | `string` | | | `metric` | query | `string` | Only names seen on this metric. On ClickHouse it also finds the metric's table when `table` is not given. | | `table` | query | `string` | ClickHouse table such as `otel_logs`; Prometheus ignores it. | | `search` | query | `string` | Case-insensitive substring filter. | | `limit` | query | `integer` | Maximum names to return. Between 1 and 500. Default `100`. | | `from` | query | `string` | Start of the window the names must have been seen in, as a relative expression such as `now-6h`, epoch milliseconds or an RFC 3339 time. `from` and `to` are given together or not at all; one without the other is a 400. Without them Loki and Tempo answer their own default window, and Prometheus and ClickHouse ignore them. | | `to` | query | `string` | End of the window, with the same grammar as `from`. | | `timezone` | query | `string` | The browser's IANA time zone, used to resolve relative times such as `now/d`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to `limit` values of the label; `truncated` is true when there were more. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /datasources/{uid}/services List the services a log or trace datasource has seen over a recent window. The browser's, the CLI's and the agent's path to the services a source holds, so a person can tell which of several log or trace sources has `checkout` without opening each one. Each adapter reads the field it already treats as the service with one cheap request over the window, which ends now: Loki the first of the labels `service_name`, `service`, `app` and `job` that has values, Tempo the tag `resource.service.name`, Jaeger its list of every retained service, ClickHouse the `ServiceName` column of `otel_logs` or `otel_traces`, and Elasticsearch and OpenSearch the service field of the mapping. `field` names that label, attribute, column or field, so a client can filter a query on it; it is empty on Elasticsearch and OpenSearch when the mapping has no service field. `signal` is `logs` or `traces`; without it the answer is `logs`, and `traces` on Tempo, and a datasource that does not hold the signal answers 422 `query_invalid`. ClickHouse holds both, so a client that wants both asks twice. `window` is a duration such as `15m` or `1h`, from 1 minute to 6 hours, default 1 hour; a service quiet for longer is not listed, except on Jaeger, which lists every service it retains whatever the window. At most 200 services come back, sorted by name, with `truncated` true when there were more. An answer is cached for about a minute per datasource, signal and window, and calls for the same key in flight share one upstream request. The call takes one of the server's shared upstream slots, waiting at most 5 seconds for one before it answers 429 `too_many_requests` with `Retry-After`, and counts against the per-caller in-flight limit. A source that does not answer within 5 seconds answers 504 `query_timeout`, so a client can show that the services are unavailable while the other sources answer. Any query parameter not listed below, or one given twice, is a 400. Viewers and above may call it, service-account keys included, and it reads only datasources that are configured on the server. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `signal` | query | `"logs"`, `"traces"` | Which signal to read. | | `window` | query | `string` | How far back the window reaches from now, as a duration such as `15m` or `1h`. Default `"1h"`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The services the datasource has seen in the window. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Datasource discovery > The datasource discovery endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/datasource-discovery/ · Markdown: https://slashobserve.com/docs/reference/api/datasource-discovery/index.md ## GET /datasources/{uid}/schema Read the tables, or the columns of one table, of a ClickHouse, Elasticsearch or OpenSearch datasource, or the services and span names of Tempo. It runs the same code, validation and limits as the agent's `get_schema` tool. Without `table` it lists the tables; with `table` it lists that table's columns with their types, and `offset` pages on from a `next_offset`. A Tempo datasource has no tables: it answers the services, span names and attribute names it holds, and a request with `table` or `offset` is a 400. Prometheus and Loki datasources answer 400 `invalid_request`; their label names are read with the labels route. An unknown datasource is a 404 `not_found`. Any query parameter not listed below, or one given twice, is a 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `table` | query | `string` | The table whose columns to list. | | `offset` | query | `integer` | How many items to skip, from a previous answer's `next_offset`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of tables, or of columns, or the Tempo services and span names. | [`DatasourceTables`](/docs/reference/api/schemas/#datasourcetables) or [`DatasourceColumns`](/docs/reference/api/schemas/#datasourcecolumns) or [`DatasourceSpanSchema`](/docs/reference/api/schemas/#datasourcespanschema) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /datasources/{uid}/sample Read a few rows of a ClickHouse table, or a few log lines or documents of a Loki, Elasticsearch or OpenSearch datasource. It runs the same code, validation and limits as the agent's `sample_rows` tool. `table` is required on ClickHouse; on Loki it is an optional stream selector, and Elasticsearch and OpenSearch read their index pattern without it. Cell values are cut to 300 bytes, and `truncated` is true when columns, cells or rows were dropped to fit. Any query parameter not listed below, or one given twice, is a 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | | `table` | query | `string` | | | `limit` | query | `integer` | Maximum rows to return. Between 1 and 20. Default `5`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to `limit` rows with their column names. | [`DatasourceSample`](/docs/reference/api/schemas/#datasourcesample) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The query or its variables cannot run, or its result exceeds a limit. | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The datasource is unavailable. | [`Error`](/docs/reference/api/schemas/#error) | | `504` | The datasource did not answer within the query timeout. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Revision requests > The revision requests endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/revisions/ · Markdown: https://slashobserve.com/docs/reference/api/revisions/index.md ## GET /dashboards/{id}/revisions List the agent requests of a dashboard, newest first, including the new-dashboard request that created it. A list is recorded in the audit trail as one `run.list` with the dashboard as its target and `scope` `dashboard`, once per caller and dashboard in 10 minutes. A run that read data only Admins can query (`restricted`) is left out for anyone who is neither its requester nor an Admin. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of revisions. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/revisions Ask the agent to revise a dashboard with a follow-up prompt. The request is queued and answers 202 at once; the agent saves the result as a new version of the dashboard. A prompt that only asks a question may instead end with a finding, and then the revision succeeds with `result_version` null. Watch the dashboard's event stream for `revision.updated` and `version.created` (the version arrives first, then `revision.updated` with status `succeeded`; do not depend on their order), or poll the revision. The agent revises the latest version of the dashboard; `base_version` is the version the caller was looking at and only gives the agent context. The prompt is trimmed first, and the limit of 1 to 4000 characters applies to the trimmed text. Control characters other than newline, carriage return and tab, and the bidirectional override and isolate characters (U+202A to U+202E and U+2066 to U+2069), are refused, and so is text with no visible character, such as only zero-width characters (400 or 422 with a `reason`, see `docs/reference/text-rules.md`). At most 5 revisions may be queued or running per dashboard. Without a configured LLM provider the endpoint answers 503 `agent_unavailable`. With `panel_id` the agent focuses on that panel. With `comment_id` the request is about a comment thread; on success the thread is resolved with the saved version. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `prompt` (required) | `string` | | | `base_version` (required) | `integer` | A version that exists on the dashboard. Between 1 and 2147483647. | | `panel_id` | `string` or `null` | The panel the prompt is about; it must exist in the latest version. Omit it or send null for the whole dashboard. | | `comment_id` | `string` (uuid) or `null` | A comment or reply whose thread the agent should address; the request takes the thread's panel, so do not send panel_id with it. When the request succeeds, the server resolves the thread with resolved_by_version set to the saved version, unless it is already resolved. | ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The queued revision. | [`RevisionEnvelope`](/docs/reference/api/schemas/#revisionenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard or the version does not exist, or `comment_id` names no comment on this dashboard. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to get a dashboard an agent can change. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The panel does not exist in the latest version (`unknown_panel`). | [`Error`](/docs/reference/api/schemas/#error) | | `429` | The dashboard already has 5 revisions queued or running (`too_many_revisions`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/revisions/{revision_id} Read one revision request. A read is recorded in the audit trail as `run.view` with the requester's id as `owner_id`, once per reader and request in 10 minutes. A run that read data only Admins can query (`restricted`) answers 404 to anyone who is neither its requester nor an Admin. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `revision_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The revision with its current status. | [`RevisionEnvelope`](/docs/reference/api/schemas/#revisionenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Panel suggestions > The panel suggestions endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/suggestions/ · Markdown: https://slashobserve.com/docs/reference/api/suggestions/index.md ## POST /dashboards/{id}/suggestions Ask the agent to propose a change to one panel without saving anything. The request is queued and answers 202 at once; the agent proposes one panel and saves nothing, so the dashboard and its versions never change. A suggestion is private to the caller: only the caller can read it, it never appears in revisions, the observe list or the activity timeline, it sends no events, and it is exempt from the one-running-per-dashboard rule, so it neither waits behind nor blocks a revision of the dashboard, but it shares the worker pool and can wait for a free worker. Poll `GET /dashboards/{id}/suggestions/{suggestion_id}` every second until the status is `succeeded` or `failed`. `version` is the version the proposal is judged inside, and `panel_id` must be a data, text or dashboard list panel of that version. The prompt is trimmed first, and the limit of 1 to 4000 characters applies to the trimmed text; control characters other than newline, carriage return and tab, and the bidirectional override and isolate characters, are refused, and so is text with no visible character such as only zero-width characters (`docs/reference/text-rules.md`). `panel` is the editor's current draft of the panel, optional; it is placed into the version at the panel's position and validated there with the Spec rules before anything is queued, must keep the id `panel_id` and stay a data, text or dashboard list panel, must not contain the NUL character and may be at most 63 KiB as compact JSON once placed (a request body over 96 KiB is refused). The proposed panel is validated inside the base version with the user's draft, and its queries run with the save rules before the suggestion succeeds. A caller may have 2 suggestions queued or running and the instance 10. Without a configured LLM provider the endpoint answers 503 `agent_unavailable`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | A version that exists on the dashboard. Between 1 and 2147483647. | | `panel_id` (required) | `string` | | | `prompt` (required) | `string` | | | `panel` | `object` or `null` | The editor's current draft of the panel. Omit it or send null to start from the stored panel. | ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The queued suggestion. | [`SuggestionEnvelope`](/docs/reference/api/schemas/#suggestionenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard or the version does not exist. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard is a starter the server keeps current with each release (`provisioned`); duplicate it to get a dashboard an agent can change. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The panel is not a data, text or dashboard list panel of that version (`unknown_panel`), or the draft fails inside the version (`invalid_spec`, with `issues`). | [`Error`](/docs/reference/api/schemas/#error) or [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `429` | The caller already has 2 suggestions queued or running (`too_many_suggestions`), or 10 are queued or running across the instance (`agent_busy`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## GET /dashboards/{id}/suggestions/{suggestion_id} Read one panel suggestion. Only the caller who requested the suggestion can read it; any other caller, a suggestion of another dashboard and an unknown id all answer 404. `panel` is set only when the status is `succeeded` and `error` only when it is `failed`. Poll every second until the status is `succeeded` or `failed`; suggestions send no events. A read is recorded in the audit trail as `run.view`, once per reader and suggestion in 10 minutes. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `suggestion_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The suggestion with its current status and progress steps. | [`SuggestionEnvelope`](/docs/reference/api/schemas/#suggestionenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Agent requests > The agent requests endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/observe/ · Markdown: https://slashobserve.com/docs/reference/api/observe/index.md ## GET /agent Tell whether an agent is configured and which provider and model it uses. Clients check this before offering the chat composer. Without a configured LLM provider `available` is false and `provider` and `model` are null. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The agent configuration. | [`AgentInfo`](/docs/reference/api/schemas/#agentinfo) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observe List agent requests, newest first: the caller's own, or everyone's for an Admin. With `scope=mine`, the default, only requests the caller made are listed; a user sees their own and a service account its own. `scope=all` lists every principal's requests and needs the Admin role; anyone else gets 403. `q` matches the title and the prompt case-insensitively, `pinned` keeps only pinned or only unpinned requests, `dashboard_id` keeps the requests about one dashboard, `observation_id` keeps the requests asked about one observation and the ones that wrote into it, and `chat_id` keeps the turns of one chat, the first request included. `anchored=true` keeps only the requests that point at a spot, as the `anchor` of each shows, and only works with `scope=mine`: with `scope=all` it answers 400 `invalid_request`, so no one lists other people's anchored questions. `anchor` and `block_id` are filled only for the person who asked the question and are null for everyone else, an Admin included. `state` keeps the requests in any of the given states and may repeat. Archived requests are left out; with `scope=mine` pinned requests come first, most recently pinned first, and with `scope=all` the order is newest first only. `dashboard_title` is null when the caller cannot see the dashboard, and an Admin's `allowed_actions` is empty on a request it sees only as an Admin. A new-dashboard request that failed has no dashboard and lives only in this list. Progress steps are not included; read `GET /observe/{id}` for them. Every list is recorded in the audit trail as one `run.list` with `scope` (`mine` or `all`) in its data, never one event per request, once per caller and scope in 10 minutes. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `scope` | query | `"mine"`, `"all"` | Default `"mine"`. | | `state` | query | array of `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | | | `q` | query | `string` | | | `pinned` | query | `boolean` | | | `dashboard_id` | query | `string` (uuid) | | | `observation_id` | query | `string` (uuid) | | | `anchored` | query | `boolean` | | | `chat_id` | query | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 100. Default `20`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of the caller's requests. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe Ask the agent a question, have it build a new dashboard, revise an existing one, or investigate. The request is queued and answers 202 at once; poll `GET /observe/{id}` until the status is `succeeded` or `failed`. `kind` says what the request may do: `ask`, the default, reads and answers; `revise` changes the dashboard named by `dashboard_id`; `investigate` reads data into an observation. An `ask` without `dashboard_id` and `observation_id` builds a new dashboard (`intent` is `ask` until it saves one, then `apply`); the finished request carries the new `dashboard_id` and `url`. When the prompt only asks a question, such as which logs exist, the agent may answer with a finding instead: the request succeeds with `finding` set and `dashboard_id`, `result_version` and `observation_id` null, and `kind` stays `build`. That answer makes no observation: it stays on the request, read by the requester and Admins, until the requester saves it with `POST /observe/{id}/observation`. With `kind` `revise` and `dashboard_id` the agent revises that dashboard (`intent` is `apply`), exactly like `POST /dashboards/{id}/revisions`; `base_version` defaults to the dashboard's latest version. With `kind` `revise`, `applies_finding_id` in place of `prompt` applies an answer's suggested change: the finding must be the answer of a request you can read about `dashboard_id` (404 `not_found` otherwise, 400 `invalid_request` when it is about another dashboard, was answered in another chat than `chat_id` or suggests no change), and its `suggested_change` becomes the prompt, so sending both answers 400 `invalid_request`. While a request applying that finding is queued or running, or after it succeeded, another one answers 200 with `replayed` true and that request when it is yours, and 409 `already_applied` when it is someone else's. A revision whose prompt only asks a question may also end with a finding: the request succeeds with `finding` set, keeps its `dashboard_id`, and `result_version` stays null; it too makes no observation until its requester saves it. Every request you start here is a turn of a chat, which you and Admins can read and nobody else sees. With `chat_id` the request is the next turn of that chat of yours (404 `not_found` when it is someone else's, archived or unknown, and 403 `chat_read_only` for an Admin who can read it, because only its owner asks in it), and the chat must be about the same dashboard or observation as the request, or about none on both sides (400 `invalid_request`). Without `chat_id` a new chat starts under the request's own id, except a `revise`, which joins your most recent live chat on that dashboard when there is one; `new_chat` true always starts a new chat and excludes `chat_id` (400 `invalid_request`). The agent is given the earlier questions and answers of the chat (the last six turns, at most 8000 characters), read when the turn starts running, and the turns of one chat run one at a time in the order they were sent; a queued turn with a stop requested does not hold the next one back. `client_id` is a UUID the client picks once per message so a resend starts nothing new: a second request of yours with the same `client_id` answers 200 with `replayed` true and the request the first one started, and one with another prompt or another `chat_id` answers 422 `client_id_reused`. `anchor` points the turn at one spot on the dashboard or observation it is about, and needs `dashboard_id` or `observation_id`; `block_id` names a block of `observation_id` the turn is about, needs `observation_id`, and must be a block of that observation (404 `not_found`); with `anchor` it is the block the anchor sits on, under an anchor of a kind that can sit on a block, which `variable` cannot (400 `invalid_request`), and without it the turn is about the whole block. When a build in a chat about nothing saves a new dashboard, the chat becomes about that dashboard. With `kind` `investigate` the agent reads data and ends by saving a finding (`kind` is `investigate` on the request), optionally about `dashboard_id`, one of its panels (`panel_id`) and a window (`from` and `to`); starting one needs the Editor role or above and view access on the dashboard (403 `forbidden_role`). A caller may have at most 3 investigations queued or running (429 `too_many_requests`), and the instance at most 10 (429 `agent_busy`). Every investigation gets an observation when it is queued, the one named by `observation_id` or a new one, and the request carries its id as `observation_id`, which is null for a reader who cannot open that observation; a new observation goes in the dashboard's folder when you can edit it, else in your own folder, and without any folder to write in the run has no observation and `observation_id` is null. An investigation with no observation to write into, because no folder could take a new one or the named one is full, says so in its first step, and its answer stays on the request. A named `observation_id` must be visible to you (404 `not_found`) and allow at least commenting on it (403 `forbidden_role`). An `ask` with `dashboard_id` or `observation_id`, one of them, is a private ask about it: the agent reads data and answers with a finding, but writes nothing shared, so no observation is opened or written, no version is saved and the investigation caps do not apply. A private ask needs Comment on what it is about (403 `forbidden_role`), and its request and answer are read only by you and, read only, by Admins, until you share the answer into a comment thread, whose readers then read both, read only. `kind` must be `ask`, `revise` or `investigate`, `revise` needs `dashboard_id` and takes no `panel_id`, `from`, `to` or `observation_id`, `base_version` needs `revise`, `from` and `to` on an `ask` need `dashboard_id` or `observation_id`, `panel_id` needs `dashboard_id`, and `from` and `to` go together, must be relative times or epoch milliseconds, `from` must be before `to`, and the range may be at most 400 days; each broken rule answers 400 `invalid_request`. `time_zone` names the IANA time zone the person reads times in, such as `Asia/Kolkata`: the agent writes every time in its answer in that zone with the zone's label, a retry or continue keeps it, and without it, or with `UTC`, times are written in UTC; an unknown zone answers 400 `invalid_request`. `as_of` sets the run's now, as epoch milliseconds or an RFC 3339 time, for replaying an incident that is over: every relative time the run resolves, such as `now-1h` in `from`, `to` or a query the agent runs, resolves to it, the agent is told that time, and the request and its finding carry it as `as_of`; it needs the Admin role (403 `forbidden_role`), a relative time, a time in the future, a `to` later than it, or a `kind` that builds or revises a dashboard answers 400 `invalid_request`, it is for `investigate` and for an `ask` with `dashboard_id` or `observation_id`, and a retry or continue keeps it, for an Admin only (403 `forbidden_role`), while a later turn of a chat passes `as_of` again. The prompt is trimmed first, and the limit of 1 to 4000 characters applies to the trimmed text. Control characters other than newline, carriage return and tab, and the bidirectional override and isolate characters (U+202A to U+202E and U+2066 to U+2069), are refused, and so is text with no visible character, such as only zero-width characters (400 or 422 with a `reason`, see `docs/reference/text-rules.md`). A caller may have at most 3 new-dashboard requests queued or running (429 `too_many_requests`), the instance at most 20 (429 `agent_busy`), and a dashboard at most 5 revisions (429 `too_many_revisions`). Without a configured LLM provider the endpoint answers 503 `agent_unavailable` for a request the built-in agent took. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `prompt` | `string` | What to ask or change; required unless `applies_finding_id` is set. | | `dashboard_id` | `string` (uuid) | The dashboard to revise with `kind` `revise`, or to ask or investigate about. | | `applies_finding_id` | `string` (uuid) | With `kind` `revise`, the answer whose `suggested_change` is the prompt; excludes `prompt`. | | `base_version` | `integer` | A version that exists on the dashboard; only allowed with `kind` `revise`. Between 1 and 2147483647. | | `kind` | `"ask"`, `"revise"`, `"investigate"` | Default `"ask"`. | | `panel_id` | `string` | The panel an investigation is about; needs `dashboard_id`. | | `from` | `string` | The start of the window an investigation looks at, a relative time like `now-1h` or epoch milliseconds. | | `to` | `string` | The end of the window an investigation looks at, a relative time like `now` or epoch milliseconds. | | `chat_id` | `string` (uuid) | The chat of yours this request is the next turn of; without it a new chat starts, or a `revise` joins your latest chat on that dashboard. | | `new_chat` | `boolean` | Start a new chat even when a `revise` would join your latest chat on that dashboard; not with `chat_id`. | | `observation_id` | `string` (uuid) | The observation a private ask is about, or the one an investigation writes into; without it an investigation makes a new observation in the dashboard's folder, or in your own folder when you cannot edit that one. | | `time_zone` | `string` | The IANA time zone the person reads times in, such as `Asia/Kolkata`; the answer gives times in it, labelled. Without it times are UTC. | | `as_of` | `string` | The run's now, as epoch milliseconds or an RFC 3339 time in the past; relative times in the run resolve to it. Admin only; for an investigation or an ask about a dashboard or observation, not a build or a revise. | | `client_id` | `string` (uuid) | A UUID the client picks once per message; resending it returns the request it started instead of queueing another. | | `anchor` | [`Anchor`](/docs/reference/api/schemas/#anchor) | | | `block_id` | `string` (uuid) | The block of `observation_id` the turn is about; with `anchor`, the block the anchor sits on, without it the whole block. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The `client_id` was already sent with this prompt, or a request of yours already applies `applies_finding_id`; that request, with `replayed` true. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `202` | The queued agent request. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | Someone else's request already applies `applies_finding_id` (`already_applied`). Or the request that wrote that answer read data only Admins can query, such as the audit trail, and `dashboard_id` is not in a folder only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The prompt breaks a text rule (with a `reason`), or the `client_id` was already sent with another prompt or chat (`client_id_reused`). | [`Error`](/docs/reference/api/schemas/#error) | | `429` | Too many agent requests are queued or running (`too_many_requests` for the caller, `agent_busy` for the instance, `too_many_revisions` for the dashboard). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observe/{id} Read one agent request with its progress steps and usage. Works for any agent request, including comment and prompt revisions. A request with no shared product, neither a dashboard nor an observation, is readable only by the principal that made it and by Admins; anyone else gets 404. So is a request that read data only Admins can query (`restricted`), wherever it writes. A request on a dashboard, an investigation included, is readable by anyone who can see that dashboard, and a request on an observation with no dashboard, a thread ask included, by anyone who can read that observation. A private ask is readable only by its requester and Admins, and while its answer is shared into a comment thread also by everyone who can read that thread. An Admin also reads a request on a dashboard it cannot see. `read_only` is true when the caller reads the request only as an Admin or as a reader of the thread its answer is shared in: `allowed_actions` is then empty and every write route answers as it does today. Clients poll it once a second until the status is `succeeded` or `failed`. Every read of a request, its requester's included, is recorded as `run.view` with the owner's id as `owner_id`, once per reader and request in 10 minutes across this route, its build, `get_run`, a dashboard revision, a suggestion and an unsaved answer under `GET /findings/{id}`; a refused read is recorded every time. After a shutdown release the re-claimed run reuses its attempt number and keeps the steps already recorded, so a client detects a restarted run by each step's `at`, not by `attempt` alone. `build` reports the progress of the dashboard the agent is assembling for the request, without its Spec, to everyone who can see the request; it is null when there is no build. A `failed` request keeps its build for 7 days after it finished; `build_saved_at` is set once the requester saved it as a version. `state` and `result_kind` say where the request is and what it left behind, and `allowed_actions` lists what the caller may do with it now; the tables are in `docs/reference/states.md`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The agent request with its current status. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /observe/{id} Rename or pin one of your agent requests. Only the principal that made the request may change it (403 `forbidden`); a request hidden from the caller answers 404. A `title` string is trimmed and must be 1 to 120 characters on one line; `null` clears it back to the default taken from the prompt. `pinned` true pins the request to the top of `GET /observe`, false unpins it. Renaming the first request of a chat with no dashboard also renames the one observation made from that chat when the caller may edit it, and `observation_rename` says which happened. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `title` | `string` or `null` | | | `pinned` | `boolean` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The agent request as changed. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /observe/{id} Archive one of your agent requests so it leaves your list. Only the principal that made the request may archive it (403 `forbidden`); a request hidden from the caller answers 404. The request stays readable through `GET /observe/{id}`, and archiving it again changes nothing. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The request is archived; nothing is returned. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observe/{id}/build Read the dashboard an agent request has built so far, with its ObserveSpec. Only the principal that made the request and Admins can read its build, and for a revision only while the reader can still view the dashboard; everyone else gets 404, as does a request without a build. Saving a build stays with the requester. A new-dashboard request builds a dashboard that is not in any folder or list until it finishes. Clients read `build` of `GET /observe/{id}` once a second and fetch this operation when its `saves` changes. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The build. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/cancel Cancel a queued or running agent request. Only the principal that made the request may call it; no editor and no administrator may cancel another principal's request. Someone else gets 403 `forbidden` on a revision they can see, and 404 on a new-dashboard request or a suggestion request. A queued request becomes `canceled` at once: `status` `failed` with the failure code `canceled`. A running request with a live worker is `canceling` (`status` stays `running`) until its worker sees the cancel flag, within about 5 seconds plus the time the in-flight model or tool call takes to return; it then ends `canceled`. A running request whose worker is gone, because its lease expired, ends `canceled` at once, and no worker picks a canceling request up again. The build is kept, so the requester can still save it or continue it. A run that saved its version before the cancel took effect ends `succeeded`, because a saved version always wins. Canceling a request that is already canceled answers 200 with the request; any other finished request answers 409 `request_finished`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request, with `cancel_requested_at` set. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request already finished and was not canceled (`request_finished`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/continue Continue a stopped agent request in a new request that takes over its build. The new request copies the stopped request's intent, dashboard, comment, panel, prompt and base version, records `continues_id`, and takes the build, so the agent continues from the panels already built with its own model-call budget. The stopped request gains `continued_by` and can no longer be saved or continued. A request is continuable when it is `failed`, its build was not saved, it still has its build, and nothing continues it yet; otherwise the call answers 409 `not_continuable`. Continue and `POST /observe/{id}/build/save` on the same request are exclusive: Continue after a save answers 409 `not_continuable`, and a save after Continue answers 404 `not_found` because the build moved to the new request. Only the principal that made the request may call it, with the same access as starting a run; someone else gets 403 `forbidden` on a revision they can see and 404 on a new-dashboard request. The new request keeps the stopped request's `as_of`, and a caller who is not an Admin gets 403 `forbidden_role` for a request that has one. A revision whose dashboard has a newer version than the build's base answers 409 `version_conflict` with `latest_version`. The new request counts against the same caps as `POST /observe`, and is assigned to the same agent as the stopped one. The optional `note` is stored on the new request as `continue_note` and given to the agent in every seed of that run, including its restarts. Without a configured LLM provider the endpoint answers 503 `agent_unavailable`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`. A [`ContinueObserveRequest`](/docs/reference/api/schemas/#continueobserverequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The queued request that continues the stopped one. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `400` | The note breaks the prompt rule (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request cannot be continued: `not_continuable`, `assignee_unavailable` when the agent it was assigned to is a revoked, expired or foreign grant or a service account that no longer takes runs, or `version_conflict` with `latest_version` when a revision's dashboard has a newer version than the build's base. | [`Error`](/docs/reference/api/schemas/#error) or [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) | | `429` | Too many agent requests are queued or running (`too_many_requests` for the caller, `agent_busy` for the instance, `too_many_revisions` for the dashboard). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/retry Start a finished agent request again as a new request. Anyone who can see the request and may start that kind of request can call it, not only the requester; being someone else is never a reason to refuse, except that a caller who reads the request `redacted` may not start its words again. The new request is the caller's: its `requested_by` is the caller, not the original requester, and it counts against the caller's caps like `POST /observe`. The original request is left as it was. An observe request starts a new build with the same prompt, an investigation starts again on the same dashboard, panel and window, and a prompt revision starts a revision of the same dashboard on its latest version. A comment or suggestion request cannot be retried, and neither can a request that something continues. An ask from an observation thread whose answer was saved as an observation starts again in that thread for a caller who can comment on the thread's observation; anyone else gets a private ask of their own about the saved observation, with no thread and nothing posted in it. A failed or stopped request can be retried once by its requester: the new request is its `retried_by`, and a second call, including one racing the first or a continue, is refused instead of queuing a duplicate. Anyone else's retry is a request of their own and leaves the original retryable. A request that is not finished, one of those, or one the caller reads `redacted`, answers 409 `invalid_transition` with its `state` and the `allowed_actions` the caller has. A request hidden from the caller, including any request without a dashboard that is not the caller's, answers 404 `not_found`. A caller who can see the request but lacks the role or folder level to start that kind of request answers 403 `forbidden_role`, the same answer as `POST /observe`. The new request is assigned to the same agent as the original; when that is a revoked, expired or foreign grant, or a service account that no longer takes runs, the call answers 409 `assignee_unavailable` and queues nothing. The new request keeps the original's `as_of`, and a caller who is not an Admin gets 403 `forbidden_role` for a request that has one, because only an Admin may set `as_of`. Retrying a request that succeeded queues a new request on every call. Without a configured LLM provider the endpoint answers 503 `agent_unavailable` for a request the built-in agent took. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The queued request. | [`AgentRequestEnvelope`](/docs/reference/api/schemas/#agentrequestenvelope) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request cannot be retried now (`invalid_transition`), or the agent it was assigned to cannot take it again (`assignee_unavailable`). | [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) or [`Error`](/docs/reference/api/schemas/#error) | | `422` | The panel an investigation was about no longer exists (`unknown_panel`). | [`Error`](/docs/reference/api/schemas/#error) | | `429` | Too many agent requests are queued or running (`too_many_requests` for the caller, `agent_busy` for the instance, `too_many_revisions` for the dashboard). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/build/save Save the build of a failed agent request as one version. Only the principal that made the request may call it; a revision also needs edit access on its dashboard; anyone else gets 404. A new-dashboard request becomes version 1 of a new dashboard in the requester's default folder (a person's My Dashboards, a key's General); a revision becomes the next version of its dashboard and fails with 409 `version_conflict` when someone saved a version after the build started, leaving the build in place. No query runs: every build save was checked when the agent made it, and panels that were unverified then stay unverified. The request stays `failed` with its `failure_code`; it gains `result_version`, `dashboard_id` and `build_saved_at`, and the build is deleted. A repeat call answers 200 with `replayed` true and the version already saved. A `queued` or `running` request answers 409 `build_running`, a build without panels 409 `build_empty`, and a request that is no longer failed with an unsaved build 409 `build_not_savable`. A request without a build, an expired build, or a request of someone else answers 404. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request had already saved a version; nothing changed. | [`AgentBuildSaved`](/docs/reference/api/schemas/#agentbuildsaved) | | `201` | The build became a version. | [`AgentBuildSaved`](/docs/reference/api/schemas/#agentbuildsaved) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The build cannot be saved now: `build_running`, `build_empty` or `build_not_savable`, or `version_conflict` with `latest_version` when a revision's dashboard has a newer version than the build's base. Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the request read data only Admins can query, such as the audit trail, and the build's folder is not one only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) or [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/observation Save the answer of an agent request as an observation. A plain question asked in chat or in a comment is answered on the request alone, in `finding` with `observation_id` null, and makes no observation; an investigation already has its own. This files that answer as an observation with its text and evidence: in the folder of the dashboard the question was about, else in the requester's default folder (a person's My Dashboards, a key's General). An answer whose request read data only Admins can query, such as the audit trail, is filed in the folder of the dashboard or observation it was about when only Admins can read that folder, else in the built-in Audit folder instead. Only the principal that made the request may call it; anyone else, an Admin included, gets 404 or 403 and nothing changes. The request gains `observation_id` and `url`, and `finding.observation_id` is set. A repeat call answers 200 with `replayed` true and the same observation. A request without an answer answers 409 `no_answer`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The answer was already an observation; nothing changed. | [`AnswerSaved`](/docs/reference/api/schemas/#answersaved) | | `201` | The answer became an observation. | [`AnswerSaved`](/docs/reference/api/schemas/#answersaved) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request has no answer to save (`no_answer`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the request read data only Admins can query, such as the audit trail, and neither the folder of what it was about nor the built-in Audit folder is one only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observe/{id}/share Share the answer of a private question in a comment thread. A private question (`kind` `ask` with a `chat_id`, about a dashboard or an observation) is read only by its requester and Admins and writes nothing shared. This shows its answer to everyone who can read what it was about: it opens a comment thread there at the question's panel, block or anchor, with the prompt as the caller's message and the agent's answer as the reply, and on an observation it also writes the answer onto the page. With `thread_id` the two are added to that thread instead, which must be on the same dashboard or observation. Both are written in one transaction and the run is shared once; a repeat call answers 200 with `replayed` true and the first thread. Only the requester may call it, with Comment there; anyone else, an Admin included, gets 404. The request itself and the rest of its chat stay readable only by the requester and Admins, and the answer is then read through the thread. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`. | Field | Type | Description | | --- | --- | --- | | `thread_id` | `string` (uuid) | A thread on the same dashboard or observation to add the question and answer to; omit to open a new one. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The run was already shared; nothing changed. | [`AnswerShared`](/docs/reference/api/schemas/#answershared) | | `201` | The question and its answer were posted. | [`AnswerShared`](/docs/reference/api/schemas/#answershared) | | `400` | The body is not valid, or `thread_id` is not a thread you can comment in on the dashboard or observation the question was about (`invalid_thread`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request is not a private question (`not_shareable`) or has not finished with an answer (`no_answer`). Or the answer's evidence reads a datasource only Admins can query and the dashboard or observation is not in a folder only Admins can read (`restricted_content`, naming the `datasource`). Or the request read data only Admins can query, such as the audit trail, and the dashboard or observation is not in a folder only Admins can read (`restricted_answer`, saying why); keep such an answer in the chat, or share it where only Admins read. | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observe/{id}/build/panels/{panel_id}/data Run the queries of one panel of an agent request's build and return their frames. The queries come from the stored build, so the request names a panel and never carries query text, as for saved versions. This is the second exception to the rule that the proxy runs only saved panel queries: the build is not a version yet. Only signed-in users who made the request, and signed-in Admins, may call it, and a service-account key gets 403 `user_session_required`; anyone else gets 404. The queries run with the agent tools' limits (15 seconds, 200 series, 100,000 points, 1,000 rows), nothing is cached, and the call counts against the caller's 8 in-flight query requests. `from`, `to`, `tz`, `max_data_points` and the `var-<name>` selections behave as for panel data of a saved version, and `from` and `to` default to the build's `time`. The response has the shape of panel data, with `meta.cached` always false. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `panel_id` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | | | `max_data_points` | query | `integer` | Between 10 and 11000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the build's queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text (`query_not_in_spec`), or the caller is not a signed-in user (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | There is no such build for the caller (`not_found`), or the build has no such panel (`panel_not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | A query or a variable cannot run, with the codes of panel data. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## GET /observe/{id}/build/variables/{name}/values List the values of one variable of an agent request's build. Behaves as the values of a saved version's variable, over the stored build, with the same access rule as the build's panel data: signed-in users who made the request and signed-in Admins only, 403 `user_session_required` for a key, 404 for anyone else. Nothing is cached, and the call counts against the caller's 8 in-flight query requests. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `name` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to 1000 values; `truncated` is true when there were more. | [`VariableValues`](/docs/reference/api/schemas/#variablevalues) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text (`query_not_in_spec`), or the caller is not a signed-in user (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | There is no such build for the caller (`not_found`), or it has no such variable. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The variable's query cannot run, with the codes of variable values of a saved version. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Chats > The chats endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/chats/ · Markdown: https://slashobserve.com/docs/reference/api/chats/index.md ## GET /chats List your chats, pinned ones first and then the one most recently asked in, or everyone's for an Admin. A chat is the run of requests one person sent about one thing, started by `POST /observe`; its owner and Admins read it, and nobody else sees it. With `scope=mine`, the default, only the caller's chats are listed; `scope=all` lists every person's chats and needs the Admin role, anyone else gets 403. `owner` names who started each chat, and `read_only` is true on a chat the caller reads only as an Admin. Your own chats come pinned first, each group ordered by its last turn, newest first, and `next_cursor` keeps that order across pages; everyone's chats are ordered by their last turn only. Every list is recorded in the audit trail as one `chat.list` with `scope` (`mine` or `all`) in its data, never one event per chat, once per caller and scope in 10 minutes. `dashboard_id` and `observation_id` keep the chats about that dashboard or observation, `pinned` keeps only pinned or only unpinned chats, and `q` matches the title and every prompt case-insensitively. Archived chats are left out. `title` is the one you gave the first request, else the first line of its prompt cut at a word to 60 characters. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `scope` | query | `"mine"`, `"all"` | Default `"mine"`. | | `q` | query | `string` | | | `pinned` | query | `boolean` | | | `dashboard_id` | query | `string` (uuid) | | | `observation_id` | query | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 50. Default `20`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of your chats. | [`ChatList`](/docs/reference/api/schemas/#chatlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /chats/{id} Read one of your chats, or as an Admin anyone's, with every turn, oldest first. Each turn is the agent request it started, as `GET /observe/{id}` returns it without progress steps. An Admin reads another person's chat in full and read only: `read_only` is true and no turn has `allowed_actions`. A chat of someone else's for anyone but an Admin, an archived chat or an unknown id answers 404. Every read of a chat, its owner's included, is recorded in the audit trail as one `chat.view` with the chat as its target and the owner's id as `owner_id`, never one event per turn, once per reader and chat in 10 minutes; a refused read is recorded every time. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The chat and its turns. | [`ChatDetail`](/docs/reference/api/schemas/#chatdetail) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /chats/{id} Archive one of your chats and every turn in it, so they leave your lists. Only the chat's owner may archive it; an Admin who can read the chat gets 403 `chat_read_only`, anyone else gets 404, and nothing changes. The web app calls this action Delete; the rows are kept and marked archived, so `observe chats archive` and the audit trail's `chat.archive` event both name this archive. Its turns stay readable through `GET /observe/{id}`, and dashboards, versions and observations they made are kept. A new request with this `chat_id` answers 404 afterwards. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The chat is archived; nothing is returned. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Findings > The findings endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/findings/ · Markdown: https://slashobserve.com/docs/reference/api/findings/index.md ## GET /findings List the findings the caller can read, newest first. Without a filter the caller's own findings are listed whose observation sits in a folder the caller can view. With `dashboard_id` only that dashboard's findings are listed, and a dashboard the caller cannot view gives 404. With `folder_id` only the findings without a dashboard whose observation sits in that folder are listed, and a folder the caller cannot view gives 404; findings on the folder's dashboards are not included, so list them with `dashboard_id`. `dashboard_id` and `folder_id` do not go together. Deprecated: findings are observations now; use /observations. Removed in the release after this one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `dashboard_id` | query | `string` (uuid) | | | `folder_id` | query | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 100. Default `20`. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of findings. | [`FindingList`](/docs/reference/api/schemas/#findinglist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /findings/{id} Read one finding. A finding follows the folder of its observation: anyone who can view that folder may read it, on a dashboard or not. `folder` is that folder and `permissions` what the caller may do with the finding. A finding the caller cannot read gives 404, never 403. The answer to a plain question has no observation until its requester saves it: only the requester and an Admin read it, on a dashboard only while they can view that dashboard, `folder` is null and `permissions` allow viewing only. A read of such an answer is recorded in the audit trail as `run.view` of its request, once per reader and request in 10 minutes. A refused read is recorded every time, as a denied `run.view` with the finding as its target. The `Link` header names the observation as the `successor-version`, and is absent while there is none. Deprecated: findings are observations now; use /observations. Removed in the release after this one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The finding. | [`FindingEnvelope`](/docs/reference/api/schemas/#findingenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /findings/{id}/pin Pin a finding to its dashboard as an annotation. The annotation's text is the finding's first line and a link to it, tagged `finding`, at the end of the finding's window; pinning needs Edit on the dashboard. Pinning a finding that is already pinned answers 200 with the same annotation. Deprecated: findings are observations now; use /observations. Removed in the release after this one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The finding was already pinned; this is its annotation. | [`Annotation`](/docs/reference/api/schemas/#annotation) | | `201` | The annotation made for the finding. | [`Annotation`](/docs/reference/api/schemas/#annotation) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The finding has no dashboard to pin to (`finding_has_no_dashboard`), or is the answer to a plain question that is not an observation yet (`finding_not_saved`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the finding is `restricted` and its dashboard is not in a folder only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /findings/{id}/dashboard Save a finding's evidence panels as a new dashboard. Anyone who can read the finding may call it; the dashboard lands in the caller's My Dashboards and every evidence query is run again before it is saved. The caller's own chat that the answer came from becomes a chat about the new dashboard, when it is about no dashboard or observation yet; it stays private to the caller, and a failure to attach it does not fail the call. A finding without evidence gives 409 `finding_has_no_evidence`. Deprecated: findings are observations now; use /observations. Removed in the release after this one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The new dashboard and its first version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The finding has no evidence panels (`finding_has_no_evidence`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the finding is `restricted` and your default folder is not one only Admins can read (`restricted_answer`, saying why). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /findings/{id}/panels/{panel_id}/data Run the queries of one evidence panel of a finding and return their frames. Runs one evidence panel of a finding. Only browser sessions may call it; a key gets 403 `user_session_required`. Evidence queries are stored with the finding and were checked when it was saved. Anyone who can read the finding may call it, `from` and `to` default to the finding's window, nothing is cached, and the response has the shape of panel data. Deprecated: findings are observations now; use /observations. Removed in the release after this one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `panel_id` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | | | `max_data_points` | query | `integer` | Between 10 and 11000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the evidence panel's queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text (`query_not_in_spec`), or the caller is not a signed-in user (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | There is no such finding for the caller (`not_found`), or the finding has no such evidence panel (`panel_not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | A query or a variable cannot run, with the codes of panel data. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Observations > The observations endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/observations/ · Markdown: https://slashobserve.com/docs/reference/api/observations/index.md ## GET /observations List the observations in the folders the caller can see, most recently changed first. Lists the observations of every folder the caller can view, or of one folder with `folder_id`; a folder the caller cannot view gives 404. The items carry no blocks; read one observation for them. `q` keeps the observations whose title contains it, ignoring case, and `created_by=me` keeps those the caller started. `sort` orders by `updated` (the default, newest first), `created` (newest first) or `title` (A to Z), and `order` reverses or sets the direction. Page with `cursor` (the default order only) or with `offset`, which also returns `total`, the number of observations that match the filters, so a client can show page numbers. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `folder_id` | query | `string` (uuid) | | | `state` | query | [`ObservationState`](/docs/reference/api/schemas/#observationstate) | | | `q` | query | `string` | Title text to look for, at most 200 characters; `%` and `_` match themselves. | | `created_by` | query | `"me"` | | | `sort` | query | `"updated"`, `"created"`, `"title"` | Default `"updated"`. | | `order` | query | `"asc"`, `"desc"` | `desc` by default, and `asc` when `sort` is `title`. | | `limit` | query | `integer` | Between 1 and 100. Default `20`. | | `cursor` | query | `string` | The `next_cursor` of the previous page. It works only with the default order and not with `offset`. | | `offset` | query | `integer` | How many matching observations to skip; the response then carries `total`. Between 0 and 100000. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of observations. | [`ObservationList`](/docs/reference/api/schemas/#observationlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations Start an observation, a page of blocks in a folder. Needs Edit on the folder; without `folder_id` it is filed in the caller's My Dashboards, then General. `first_block` writes a text or panel block in the same transaction. The observation is `open`, has no discussion thread until someone opens one, and is found by search by its title, summary and text blocks. ### Request body `application/json`, required. A [`CreateObservationRequest`](/docs/reference/api/schemas/#createobservationrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The observation. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The folder does not exist or the caller cannot see it. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observations/{id} Read one observation with its blocks. Anyone who can view the observation's folder reads the live blocks. A requested block is returned only to its author and to people who can edit the folder, and `position` stays dense in what the caller sees. `allowed_actions` on the observation and on each block say what the caller may do now. An observation the caller cannot see gives 404, never 403. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The observation, its folder and the caller's permissions. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /observations/{id} Change an observation's title or time range. Needs Edit on the folder. Allowed whether the observation is open or resolved. A new title also renames the chat with no dashboard that this observation is the one observation made from, when the caller started that chat, and `chat_rename` says which happened. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateObservationRequest`](/docs/reference/api/schemas/#updateobservationrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The observation. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /observations/{id} Delete an observation with its blocks, snapshots, RCA revisions, public links and discussion. Needs Manage on the folder, or Edit on it for the person who started the observation; `allowed_actions` lists `delete` when the caller may. The delete cannot be undone, and an RCA's public links stop working with it. The activity log keeps the observation's events, ending with `observation.deleted`. It is refused with 409 `run_in_progress` while an investigation on the observation is queued or running, because the run would file a new observation when it finished. No MCP tool deletes anything, so an agent cannot call this. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The observation and everything that belongs to it are deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The action is not allowed in the observation's state (`invalid_transition`), the target folder is My Dashboards (`personal_folder`), or an investigation is still running on the observation (`run_in_progress`, on delete). | [`Error`](/docs/reference/api/schemas/#error) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/move Move an observation to another folder. Needs Edit on both folders, and a personal folder takes no moves (409 `personal_folder`). Its discussion, its blocks and its past activity move with it; moving to the folder it is in changes nothing. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`MoveObservationRequest`](/docs/reference/api/schemas/#moveobservationrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The observation in its new folder. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The observation or the target folder does not exist for the caller. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The action is not allowed in the observation's state (`invalid_transition`), the target folder is My Dashboards (`personal_folder`), or an investigation is still running on the observation (`run_in_progress`, on delete). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the content holds an answer that read Admin-only data and the folder is not one only Admins can read (`restricted_answer`). Or an RCA of the observation has an unexpired public link and the folder is one only Admins can read (`admins_only_folder`). | [`Error`](/docs/reference/api/schemas/#error) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/resolve Close an open observation with a one-line summary. Needs Edit on the folder. A resolved observation answers 409 `invalid_transition`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`ResolveObservationRequest`](/docs/reference/api/schemas/#resolveobservationrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The resolved observation. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The action is not allowed in the observation's state (`invalid_transition`), the target folder is My Dashboards (`personal_folder`), or an investigation is still running on the observation (`run_in_progress`, on delete). | [`Error`](/docs/reference/api/schemas/#error) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/reopen Reopen a resolved observation. Needs Edit on the folder. The summary is kept. An open observation answers 409 `invalid_transition`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The reopened observation. | [`ObservationEnvelope`](/docs/reference/api/schemas/#observationenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The action is not allowed in the observation's state (`invalid_transition`), the target folder is My Dashboards (`personal_folder`), or an investigation is still running on the observation (`run_in_progress`, on delete). | [`Error`](/docs/reference/api/schemas/#error) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/blocks Add a block to an observation. With Edit on the folder the block is `live`; with only Comment it is `requested`, and an editor keeps or discards it; with only View the answer is 403. A `snapshot` block names a panel block of the same observation in `from_block_id` and freezes its data now, under the draft query limits and the caller's own view, so `user_scoped` says when the data is one person's. Freezing runs queries, so it can answer 429, 502 and 504 with the codes of panel data. An observation holds at most 100 blocks and 24 panel and snapshot blocks together. A panel block added with a service-account key, as the CLI and scripts do, must run and return data in its range, the check the `add_block` tool runs; a panel that fails it answers 422 `invalid_spec` with `issues` and adds nothing. A person's session is not held to it, because the web app shows an empty result before the person saves. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`AddObservationBlockRequest`](/docs/reference/api/schemas/#addobservationblockrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The block. | [`BlockEnvelope`](/docs/reference/api/schemas/#blockenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The refusals of `ObservationInvalid`, or a query of a snapshot's panel cannot run, with the codes of panel data (`query_invalid`, `query_forbidden`, `limit_exceeded`, `unknown_datasource`, `variable_empty`, `expression_error`). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) or [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | A datasource is unavailable (`datasource_unavailable`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout (`query_timeout`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## POST /observations/{id}/blocks/preview Run an unsaved panel for a panel block of an observation and return its frames. The draft is the panel an edit of the block `block_id` would store, or a new panel block when `block_id` is absent, and it is checked like a panel block write. An edit keeps the block's variables and range; a new panel block has none of its own and uses the observation's range. Only signed-in users who may add a block, with Edit or Comment on the observation's folder, may call it: a service-account key gets 403 `user_session_required` and uses `query_range` instead, and a Viewer gets 403 `forbidden_role`. The draft's queries run with the agent tools' limits (15 seconds, 200 series, 100,000 points, 1,000 rows), and a datasource only Admins may query answers only in an Admins-only folder, as the block's own data does. Nothing is cached, and the call counts against the caller's 8 in-flight query requests. `from`, `to`, `tz`, `max_data_points` and `variables` behave as the parameters of panel data, and the response has the shape of panel data, with `meta.cached` always false. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `block_id` | `string` (uuid) | The panel block being edited; absent for a new panel block. | | `panel` (required) | `object` | The draft panel, in the Spec's panel shape. | | `from` | `string` | | | `to` | `string` | | | `tz` | `string` | | | `max_data_points` | `integer` | Between 10 and 11000. Default `1000`. | | `variables` | `object` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the draft's queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in user (`user_session_required`), or may not add a block to the observation (`forbidden_role`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | There is no such observation, or no such panel block in it, for the caller (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The draft is not a valid panel block (`invalid_panel`, `invalid_block` or `variable_missing`, with `issues`), or a query or a variable cannot run, with the codes of panel data. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) or [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the draft's 15 second query timeout, or the request did not finish within 20 seconds. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## PUT /observations/{id}/layout Arrange the blocks of an observation. Sets the order of the page and, for each block that names one, its `width` and `height`; a field a block leaves out keeps its value, and a `height` of `null` returns it to the default. A number for a `height` on a text block is refused with 422 `invalid_block`, because only panel and snapshot blocks take a height. Needs Edit on the folder; a caller who can only comment answers 403. It never reads or changes a block's `version` or `updated_at`, so an arrangement cannot make someone's edit of a block's text stale, and the last arrangement to arrive wins. An id that names no block of this observation, or one the caller cannot see, refuses the whole request with 422 `invalid_block` and the id, and nothing changes; a block the list leaves out stays right after the block it followed, so a block someone added meanwhile keeps its place. The answer is the page as stored, and an arrangement that changes nothing records nothing. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`ObservationLayoutRequest`](/docs/reference/api/schemas/#observationlayoutrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The blocks the caller sees, in order. | [`ObservationLayout`](/docs/reference/api/schemas/#observationlayout) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /blocks/{id} Change a block's body, width, height or position, or let a panel follow the page's range. Needs Edit on the folder and the block's current `version`; another version answers 409 `version_conflict` with the current block. Every change here raises the version, a width, height or position change included, so a person editing the block's text meets `version_conflict` when someone resizes it; arrange a page with `PUT /observations/{id}/layout` instead, which leaves versions alone. A `height` of `null` returns the block to its default height, and a number for a text block is refused with `invalid_block`, because only panel and snapshot blocks take a height. Only the body of a text or panel block can change (`body_not_editable`). `follow_page: true` clears a panel block's own `from` and `to`, so it shows the observation's range again; it goes without a `body` and only on a panel block (`invalid_block`). A new panel body sent with a service-account key gets the check that panel blocks get when they are added, and a failure answers 422 `invalid_spec` with `issues`. A `position` moves the block and shifts the blocks between, which keep their versions. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateObservationBlockRequest`](/docs/reference/api/schemas/#updateobservationblockrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The updated block. | [`BlockEnvelope`](/docs/reference/api/schemas/#blockenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The block's version is not the one named (`version_conflict`, with the current block), or the action is not allowed in the block's state (`invalid_transition`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`BlockConflict`](/docs/reference/api/schemas/#blockconflict) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /blocks/{id} Remove a live block. Needs Edit on the folder and the block's current `version`, as a query parameter. A requested block is kept or discarded instead (409 `invalid_transition`). The blocks after it close the gap. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `version` (required) | query | `integer` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The block is removed. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The block's version is not the one named (`version_conflict`, with the current block), or the action is not allowed in the block's state (`invalid_transition`). | [`BlockConflict`](/docs/reference/api/schemas/#blockconflict) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/pin Pin an observation to a dashboard as an annotation. Anyone who can read the observation may call it, and the caller needs Edit on the dashboard. The annotation's text is the observation's title and a link to it, tagged `finding`, at the end of the observation's range, or now when it has none. Without `dashboard_id` it pins to the dashboard the observation's run was about (`dashboard_id` on the observation); an observation with none answers 409 `observation_has_no_dashboard`. Pinning an observation to a dashboard it is already pinned to answers 200 with the same annotation. An observation that holds an answer that read Admin-only data is pinned only onto a dashboard in a folder only Admins can read, and the annotation then holds that answer. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`PinObservationRequest`](/docs/reference/api/schemas/#pinobservationrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The observation was already pinned to that dashboard; this is its annotation. | [`ObservationPin`](/docs/reference/api/schemas/#observationpin) | | `201` | The annotation made for the observation. | [`ObservationPin`](/docs/reference/api/schemas/#observationpin) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The observation names no dashboard to pin to and none was given (`observation_has_no_dashboard`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the observation holds an answer that read Admin-only data and the dashboard is not in a folder only Admins can read (`restricted_answer`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/dashboard Make a dashboard from the live panel blocks of an observation. Anyone who can read the observation may call it; the dashboard lands in the caller's My Dashboards and every query is run again before it is saved. The dashboard holds the live panel blocks in order, with the variables each block carries, over the observation's range or, when it has none, the range of the first panel. Making a dashboard again from the same observation answers 200 with the one the caller made first, unless the body sets `new`. The caller's own chat that wrote the observation becomes a chat about the new dashboard, when it is about no dashboard or observation yet; it stays private to the caller, and a failure to attach it does not fail the call. An observation without a live panel block answers 409 `observation_has_no_panels`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`MakeDashboardRequest`](/docs/reference/api/schemas/#makedashboardrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard the caller already made from this observation, with its latest version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `201` | The new dashboard and its first version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The observation has no live panel block (`observation_has_no_panels`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the observation holds an answer that read Admin-only data, which a dashboard in My Dashboards would carry out of folders only Admins can read (`restricted_answer`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /blocks/{id}/dashboard Make a dashboard from one panel block. Works as making a dashboard from the observation, with only this block; a block that is not a live panel block the caller can see answers 404. The same caller making a dashboard again from the same block gets the first one back, unless the body sets `new`. The chat attached is the chat of the run that wrote the block, or of the run that wrote the observation when the block has none, on the same terms. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`MakeDashboardRequest`](/docs/reference/api/schemas/#makedashboardrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard the caller already made from this block, with its latest version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `201` | The new dashboard and its first version. | [`DashboardWithVersion`](/docs/reference/api/schemas/#dashboardwithversion) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the observation holds an answer that read Admin-only data, which a dashboard in My Dashboards would carry out of folders only Admins can read (`restricted_answer`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /blocks/{id}/keep Keep a requested block, which makes it live. Needs Edit on the folder and the block's current `version`. A live block answers 409 `invalid_transition`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`KeepObservationBlockRequest`](/docs/reference/api/schemas/#keepobservationblockrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The live block. | [`BlockEnvelope`](/docs/reference/api/schemas/#blockenvelope) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The block's version is not the one named (`version_conflict`, with the current block), or the action is not allowed in the block's state (`invalid_transition`). | [`BlockConflict`](/docs/reference/api/schemas/#blockconflict) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /blocks/{id}/discard Discard a requested block. Needs Edit on the folder, or being the person or key that asked for the block. A live block answers 409 `invalid_transition`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The block is gone. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The block's version is not the one named (`version_conflict`, with the current block), or the action is not allowed in the block's state (`invalid_transition`). | [`BlockConflict`](/docs/reference/api/schemas/#blockconflict) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /blocks/{id}/data Run the query of a panel block and return its frames. Runs a panel block's stored queries under the draft query limits, never cached. Only browser sessions may call it; a key gets 403 `user_session_required`. Anyone who can view the observation's folder may call it, and `from` and `to` default to the block's range, then the observation's, then the last hour. The response has the shape of panel data. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | | | `max_data_points` | query | `integer` | Between 10 and 11000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the panel block's queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed or fails validation. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The request carried query text (`query_not_in_spec`), or the caller is not a signed-in user (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | There is no such panel block for the caller (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | A query or a variable cannot run, with the codes of panel data. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## GET /snapshots/{id} Read the frozen data of a snapshot block. Anyone who can view the observation's folder may read it. `data` is exactly what the panel data route returned when the snapshot was taken, and `query` the frozen panel's queries, which stay inside the workspace. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The snapshot. | [`Snapshot`](/docs/reference/api/schemas/#snapshot) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Rcas > The rcas endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/rcas/ · Markdown: https://slashobserve.com/docs/reference/api/rcas/index.md ## GET /observations/{id}/rcas List the published revisions of an observation's RCA, newest first. Anyone who can view the observation's folder may list them. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The revisions without their blocks. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/rcas Publish an observation as the next revision of its RCA. Needs Edit on the folder, and the folder cannot be a personal one. The RCA is a frozen copy of the page: the title, summary, state and range, the live text blocks as Markdown and the snapshot blocks with their frozen panel and data, in page order; live panel blocks are frozen to snapshots in the same step and requested blocks are left out. A published revision never changes, and an observation keeps a limited number of revisions (409 `rca_limit`). A page with no live panel block that equals its latest revision (title, summary, state, range and blocks) answers 409 `rca_unchanged`, so a retry never makes a copy; a page with a live panel always publishes, because its data may have moved. A panel that cannot be frozen answers 422 `panel_failed` with `issues` that name the block, and frozen data over 2 MiB answers 422 `snapshot_too_large`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The new revision. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The observation already has the most revisions it may keep (`rca_limit`), its folder is My Dashboards (`personal_folder`), it changed while it was being published (`observation_changed`), or nothing changed since the latest revision (`rca_unchanged`). Or a panel froze data from a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `422` | The request is well formed but refused, with `issues` (empty unless a Spec panel is at fault, with its paths under `/panel`): `invalid_title`, `invalid_summary`, `invalid_range` (both or neither, from before to, at most 400 days), `invalid_block` (a body that is not the block kind's shape, a text body of 0 or over 8000 characters, a `from_block_id` that is not a panel block of the observation, a width that is not `third`, `half`, `two_thirds` or `full`, a height outside 120 to 960, or a layout that names a block twice), `invalid_panel` (the panel fails the Spec or is not a data panel; a text panel says to use a text block), `variable_missing` (the panel's queries or datasource use a variable that `variables` or `variable_values` does not define, and the message names it), `kind_not_addable` (a run block), `body_not_editable` (a snapshot or run block's body), `too_many_blocks` (100), `too_many_panels` (24 panel and snapshot blocks together) or `snapshot_too_large` (the frozen data is over 2 MiB). | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observations/{id}/rcas/{revision} Read one published revision of an observation's RCA. Anyone who can view the observation's folder may read it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `revision` (required) | path | `integer` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The revision. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /observations/{id}/rcas/{revision} Withdraw one published revision of an observation's RCA. Needs Edit on the folder, and the same states as publishing. A revision with a live public link is refused with 409 `rca_shared`, because a public link is a person's decision: a person revokes the links first, with Manage on the folder, and then withdraws it. Withdrawing deletes the revision and cannot be undone; the activity log keeps `observation.rca_withdrawn` with the title and the revision. No MCP tool deletes anything, so an agent cannot call this. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `revision` (required) | path | `integer` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The revision is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The revision still has public links (`rca_shared`), or the observation's state does not allow it (`invalid_transition`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /observations/{id}/rcas/{revision}/public-links List the public links of one revision of an RCA. Lists the links newest first, without their tokens. Only someone who manages the observation's folder may list them. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `revision` (required) | path | `integer` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The links. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /observations/{id}/rcas/{revision}/public-links Create a public link that shows one revision of an RCA without sign-in. Needs Manage on the observation's folder, because the link widens access beyond the folder's permission list, and an observation in My Dashboards has none (403). The link shows the frozen revision with its snapshots, never a live panel or a query. The response carries the token and the link's URL once. An observation keeps at most 20 links across all its revisions (409 `too_many_links`). A revision with a snapshot of data that depends on who is viewing cannot be shared (422 `user_scoped`). ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `revision` (required) | path | `integer` | | ### Request body `application/json`, required. A [`CreateRCAPublicLinkRequest`](/docs/reference/api/schemas/#creatercapubliclinkrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The link is created. | [`CreatedRCAPublicLink`](/docs/reference/api/schemas/#createdrcapubliclink) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The observation already has the most links it may keep (`too_many_links`), or it is in a folder only Admins can read (`admins_only_folder`), which takes no public links; the `datasource` field names an Admins-only datasource it reads, which keeps it in that folder. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | `expires_at` is not in the future (`invalid_expiry`), or a snapshot of the revision shows data that depends on who is viewing (`user_scoped`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /observations/{id}/public-links/{link_id} Revoke a public link of an RCA. Deletes the link, so its URL stops working at once. Needs Manage on the observation's folder, like creating it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `link_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The link is revoked. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /public/{token}/rca Read the RCA revision a public link shows. Needs no session or key: the token in the path is the only credential. Returns the frozen revision with the name of whoever published it; no observation id, actor id, query or datasource uid is part of it. A token that is malformed, unknown, revoked or expired answers 404 `not_found`. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `token` (required) | path | `string` | The public link's token, the only credential of this request. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The RCA to render. | [`PublicRCA`](/docs/reference/api/schemas/#publicrca) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /public/{token}/rca/snapshots/{snapshot_id} Read the frozen data of a snapshot of the RCA a public link shows. Needs no session or key: the token in the path is the only credential. Answers only for a snapshot that is part of the link's revision, with the data as it was frozen and no query. Anything else, including a token that is malformed, unknown, revoked or expired, answers 404 `not_found`. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `token` (required) | path | `string` | The public link's token, the only credential of this request. | | `snapshot_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frozen frames. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Saved searches > The saved searches endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/saved-searches/ · Markdown: https://slashobserve.com/docs/reference/api/saved-searches/index.md ## GET /saved-searches List the saved logs, trace and metrics searches the caller can view, most recently changed first. Lists every saved search in the folders the caller can view, newest `updated_at` first. `kind` keeps only one kind of search, and `folder_id` keeps one folder; a folder the caller cannot view gives 404. Each item carries the `folder` it is saved in, what the caller may do with it in `permissions`, and the `url` of the logs, traces or metrics page that reopens it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `kind` | query | `"logs"`, `"traces"`, `"metrics"` | | | `folder_id` | query | `string` (uuid) | | | `limit` | query | `integer` | Between 1 and 100. Default `20`. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of saved searches. | [`SavedSearchList`](/docs/reference/api/schemas/#savedsearchlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /saved-searches Save a logs, trace or metrics search in a folder. Saves what the logs page, the trace view or the metrics page shows: the datasource, the query as it runs with its filter pills folded in, the visible columns of a logs search, the filters of a trace search or the mode of a metrics search, and the range as written. It is saved in `folder_id`, which needs Create there, else in the caller's My Dashboards, else in General. Everyone who can view that folder can read it. The datasource must exist (422 `unknown_datasource`) and fit the kind (422 `unsupported_datasource`): logs take Loki, ClickHouse, Elasticsearch and OpenSearch, traces take Tempo, Jaeger and ClickHouse, metrics take Prometheus. A logs or metrics search needs a `query`; a traces search may have one, TraceQL on Tempo, `key=value` pairs on Jaeger and SQL on ClickHouse. A body that breaks a rule of its fields answers 422 `invalid_saved_search` with the rule in `error`. A service-account key gets the checks of the `save_search` tool: a query with a lint error answers 422 `query_invalid` and nothing is saved, and a search the key already saved with the same title, datasource, query, filters, range and folder answers 200 with `replayed` true and that search, so a retry makes no second copy. The kind and the datasource never change afterwards: save a new search instead. The query, filters and range can be changed with a PATCH. ### Request body `application/json`, required. A [`CreateSavedSearchRequest`](/docs/reference/api/schemas/#createsavedsearchrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The search this key had already saved, with `replayed` true. | [`SavedSearchReplayed`](/docs/reference/api/schemas/#savedsearchreplayed) | | `201` | The saved search. | [`SavedSearch`](/docs/reference/api/schemas/#savedsearch) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | A field breaks a rule (`invalid_saved_search`), the datasource does not exist (`unknown_datasource`), does not fit the kind (`unsupported_datasource`) or a key's query fails the lint check (`query_invalid`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /saved-searches/{id} Rename a saved search, move it to another folder or change what it searches. Needs Edit on the saved search; a move also needs Edit on the target folder, and a move into a personal folder answers 409 `personal_folder`, because it would make the search private: save it there instead. `query`, `filters`, `from` and `to` replace what the search runs; the kind and the datasource never change, and the result is checked the way a save is, so a rule a save would break answers 422 `invalid_saved_search`. A rename or a change of what it searches appends one `saved_search.updated` that lists what changed, a move appends `saved_search.moved` and takes the earlier events of the search to the new folder, and a change to what the search already has appends nothing. A body with none of `title`, `folder_id`, `query`, `filters`, `from` and `to` answers 400. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateSavedSearchRequest`](/docs/reference/api/schemas/#updatesavedsearchrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The saved search as it is now. | [`SavedSearch`](/docs/reference/api/schemas/#savedsearch) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The target is a personal folder (`personal_folder`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). | [`Error`](/docs/reference/api/schemas/#error) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The title is empty, too long or has control characters (`invalid_saved_search`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /saved-searches/{id} Delete a saved search. Needs Edit on the saved search. The deletion is recorded as `saved_search.deleted`, which stays in the folder the search was in. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The saved search is gone. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # News feeds > The news feeds endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/news/ · Markdown: https://slashobserve.com/docs/reference/api/news/index.md ## GET /news Fetch an RSS or Atom feed through the server and return its items as plain text. The feed's domain must be on the outbound allowlist, and the address must be https. The feed is read up to 1 MiB and cached for 15 minutes. Titles and summaries are plain text, and a link is returned only when it is an absolute http or https URL. Service accounts cannot call this endpoint. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `url` (required) | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The feed's items, newest first as the feed lists them. | [`NewsFeed`](/docs/reference/api/schemas/#newsfeed) | | `400` | The url is missing or longer than 2000 bytes (`invalid_request`), or is not an https address with a domain name (`invalid_feed_url`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), or the feed's domain is not on the outbound allowlist (`outbound_domain_not_allowed`, with the domain in the message). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The feed could not be fetched (`feed_unavailable`) or was not a valid RSS or Atom feed (`feed_invalid`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Assets > The assets endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/assets/ · Markdown: https://slashobserve.com/docs/reference/api/assets/index.md ## GET /assets/image Fetch a remote image through the server and return it. The image's domain must be on the outbound allowlist, and the address must be https. The image is read up to 5 MiB, must be a PNG, JPEG, GIF, WebP, AVIF or SVG whose bytes match its declared type, and is cached for 1 hour. The response forbids scripts, so an SVG opened directly never runs script. Service accounts cannot call this endpoint. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `url` (required) | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The image, with the content type the server verified. | `image/png`, `image/jpeg`, `image/gif`, `image/webp`, `image/avif`, `image/svg+xml` | | `400` | The url is missing or longer than 2000 bytes (`invalid_request`), or is not an https address with a domain name (`invalid_asset_url`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), or the image's domain is not on the outbound allowlist (`outbound_domain_not_allowed`, with the domain in the message). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The image could not be fetched, points to a private address, is larger than 5 MiB, has an unsupported content type or does not match its declared type (`asset_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## GET /assets/geojson Fetch a remote GeoJSON file through the server and return it as JSON. The file's domain must be on the outbound allowlist, and the address must be https. The file is read up to 5 MiB, may be served as `application/geo+json`, `application/json` or `text/plain`, must be a JSON object whose `type` is a GeoJSON type, and is cached for 1 hour. Service accounts cannot call this endpoint. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `url` (required) | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The GeoJSON object, re-encoded with its numbers unchanged. | `object` | | `400` | The url is missing or longer than 2000 bytes (`invalid_request`), or is not an https address with a domain name (`invalid_asset_url`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is a service account (`forbidden`), or the file's domain is not on the outbound allowlist (`outbound_domain_not_allowed`, with the domain in the message). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | The file could not be fetched, points to a private address, is larger than 5 MiB, has an unsupported content type or is not a GeoJSON object (`asset_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Provision > The provision endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/provision/ · Markdown: https://slashobserve.com/docs/reference/api/provision/index.md ## GET /provision Show what the provisioning directory became. Lists every file that became a dashboard and every file that never did, each sorted by `path` in byte order. Paths are relative to `SLASHOBSERVE_PROVISION_DIR`, with `/` between directories. The lists are kept when provisioning is turned off, so they can still be read; `dir` is then null. Only Admins may call this endpoint. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The provisioning status. | [`ProvisionStatus`](/docs/reference/api/schemas/#provisionstatus) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /provision/run Provision the directory now. Reads every file of the directory once, as the server does at startup and when a file changes, and answers the status afterwards. An unchanged file saves nothing, and a changed file adds one version. Only Admins may call this endpoint. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The provisioning status after the run. | [`ProvisionStatus`](/docs/reference/api/schemas/#provisionstatus) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | Provisioning is off because `SLASHOBSERVE_PROVISION_DIR` is not set (`provisioning_off`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The directory cannot be read (`provision_dir_unreadable`), or the server failed (`internal`). | [`Error`](/docs/reference/api/schemas/#error) | ## POST /provision/apply Save one dashboard file from a dashboards-as-code directory. Editors and Admins can call this endpoint; `observe dashboards apply` calls it once per file. `path` is the file's path relative to the applied directory, with `/` between directories: a file name, or a folder directory and a file name. The directory names the folder, with `%` written as `%25` and `/` as `%2F`, and a file at the root goes to General. A path that was applied before saves into the same dashboard. Otherwise the one dashboard in that folder whose title matches the Spec's title, compared case-insensitively, is adopted, and the path is bound to it; when no dashboard matches a new one is created, with the folder when it does not exist yet. A version is saved as the caller, with the summary `Applied from <path>`, only when the file changed since it was last applied and differs from the latest version. Apply never deletes a dashboard. It answers 409 `ambiguous` when more than one dashboard in the folder has the title, 409 `provisioned` when the dashboard comes from the server's provisioning directory, 409 `folder_exists` when the file's folder exists but the caller cannot see it (the same answer as creating a folder with that name), 409 `version_conflict` when another save landed during the apply, and 409 `restricted_content` when the dashboard reads a datasource only Admins can query and its folder is not one only Admins can read. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `path` (required) | `string` | | | `spec` (required) | `object` | The ObserveSpec document of the file. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | What the file became. | [`ApplyResult`](/docs/reference/api/schemas/#applyresult) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The request conflicts with existing state. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /provision/applied List the file paths bound to the dashboards of a folder. Anyone with a role can call this endpoint for a folder they can see; `observe dashboards export` reads it to keep the file names a folder was applied from. Each entry is a path that `POST /provision/apply` bound to a dashboard now in the folder, sorted by `path` in byte order. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `folder_id` (required) | query | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The bound paths. | [`AppliedList`](/docs/reference/api/schemas/#appliedlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Grafana > The grafana endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/grafana/ · Markdown: https://slashobserve.com/docs/reference/api/grafana/index.md ## GET /grafana List the stored Grafana connections. Only Admins can call this endpoint. Connections are sorted by creation time; a response never carries the token. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The connections. | [`GrafanaConnectionList`](/docs/reference/api/schemas/#grafanaconnectionlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /grafana Store a Grafana URL and service-account token. Only Admins can call this endpoint. The URL may be http or https on any port, and its host may resolve to a private or loopback address, because Grafana usually runs inside the network. The host must be a domain name, and it is added to the outbound allowlist when it is not allowed yet. The token is encrypted with a key derived from `SLASHOBSERVE_SECRET_KEY` and is never returned. ### Request body `application/json`, required. A [`CreateGrafanaConnectionRequest`](/docs/reference/api/schemas/#creategrafanaconnectionrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The connection is stored. | [`GrafanaConnection`](/docs/reference/api/schemas/#grafanaconnection) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or `SLASHOBSERVE_OUTBOUND_DOMAINS` is set and does not allow the host (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The host is not allowed and 100 outbound domains are already allowed (`too_many_domains`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grafana/{id} Read one Grafana connection. Only Admins can call this endpoint. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The connection. | [`GrafanaConnection`](/docs/reference/api/schemas/#grafanaconnection) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /grafana/{id} Change a connection's name, URL or token. Only Admins can call this endpoint. A new URL needs the token again, so a stored token never reaches another host. Changing the URL or the token clears the last test. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateGrafanaConnectionRequest`](/docs/reference/api/schemas/#updategrafanaconnectionrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The changed connection. | [`GrafanaConnection`](/docs/reference/api/schemas/#grafanaconnection) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or `SLASHOBSERVE_OUTBOUND_DOMAINS` is set and does not allow the new host (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set and a new token was sent (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The new host is not allowed and 100 outbound domains are already allowed (`too_many_domains`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /grafana/{id} Delete a connection and its stored token. Only Admins can call this endpoint. Imported dashboards stay. The host's outbound allowlist entry, when the connection added it, is removed unless a webhook, a datasource or another connection still uses the host. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The connection is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /grafana/{id}/test Check that Grafana answers with the stored token. Only Admins can call this endpoint. The server reads `/api/health`, `/api/folders` and the first page of `/api/search`, and stores the outcome in `last_test`. A Grafana that cannot be reached or refuses the token still answers 200, with `last_test.ok` false and a fixed message. Every test is recorded as `grafana_connection.test` with the host and the outcome. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The connection with its new `last_test`. | [`GrafanaConnection`](/docs/reference/api/schemas/#grafanaconnection) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored token cannot be read with it (`token_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grafana/{id}/folders List the Grafana folders and how many dashboards each holds. Only Admins can call this endpoint. Nested folders are titled `Parent / Child`, and dashboards outside any folder are counted under the uid `general`. Counts cover the folder itself, not its subfolders. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The folders, sorted by title. | array of [`GrafanaFolder`](/docs/reference/api/schemas/#grafanafolder) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the host is no longer on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored token cannot be read with it (`token_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | Grafana could not be reached, refused the token or gave an answer the server cannot read (`grafana_unavailable`); the message is fixed by the kind of failure. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grafana/{id}/datasources List the Grafana datasources and the datasource each one matches here. Only Admins can call this endpoint. `matched_uid` applies the importer's automatic match rules; null means the datasource needs a mapping or has no supported type. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The datasources, sorted by name. | array of [`GrafanaDatasource`](/docs/reference/api/schemas/#grafanadatasource) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the host is no longer on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored token cannot be read with it (`token_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | Grafana could not be reached, refused the token or gave an answer the server cannot read (`grafana_unavailable`); the message is fixed by the kind of failure. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /grafana/{id}/imports Import every dashboard of the chosen folders. Only Admins can call this endpoint. The import runs in the background; read its progress from the `Location` header. Each dashboard becomes one import record holding its Grafana uid, in a folder named after its Grafana folder (`Parent / Child` for nested ones), or General for dashboards outside any folder. A dashboard imported before is saved as a new version only when its Grafana `version` is newer, otherwise it is skipped. One dashboard failing never stops the run. A connection runs one import at a time. A server that stops hands the running import to another server, or picks it up again after its restart, skipping the dashboards it already handled. An import whose server crashes twice ends `failed`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`StartGrafanaImportRequest`](/docs/reference/api/schemas/#startgrafanaimportrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The import started. | [`GrafanaImport`](/docs/reference/api/schemas/#grafanaimport) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | An import from this connection is already running (`import_running`), `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored token cannot be read with it (`token_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grafana/{id}/imports/{sync_id} Read the progress of an import. Only Admins can call this endpoint. Any server answers it, during the import and after it. Each connection keeps its last 20 imports; the connection's `last_sync` is the newest finished one. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `sync_id` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The import and every dashboard handled so far. | [`GrafanaImport`](/docs/reference/api/schemas/#grafanaimport) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /grafana/{id}/imports/{sync_id}/cancel Stop a running import. Only Admins can call this endpoint. The import ends `canceled` at once; the dashboards it already imported stay, and one being saved at that moment may still be saved. Starting the import again skips what it already imported. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `sync_id` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The canceled import and every dashboard handled before it stopped. | [`GrafanaImport`](/docs/reference/api/schemas/#grafanaimport) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The import is not running (`invalid_transition`). | [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grafana/resolve/{uid} Find the dashboard imported from a Grafana uid. Any signed-in caller can resolve a uid, so links to the old Grafana dashboard keep working. A uid whose dashboard sits in a folder the caller cannot see answers 404, like a uid nobody imported. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `uid` (required) | path | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The imported dashboard. | [`GrafanaResolved`](/docs/reference/api/schemas/#grafanaresolved) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /grafana/link Fetch a Grafana dashboard from its link through a stored connection. Only Admins can call this endpoint, because the stored connection's token is an Admin's credential. The link must be a dashboard link (`/d/<uid>` or `/d-solo/<uid>`) on the address of a stored connection, under that address's path; the server only fetches from hosts an Admin already stored. `json` is the dashboard as Grafana returns it, in a string that `POST /imports` takes as its `json`. Redirects are not followed. Every fetch is recorded as `grafana_connection.fetch_dashboard`, naming the connection and its host and never the link. ### Request body `application/json`, required. A [`FetchGrafanaLinkRequest`](/docs/reference/api/schemas/#fetchgrafanalinkrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard. | [`GrafanaLinkedDashboard`](/docs/reference/api/schemas/#grafanalinkeddashboard) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or `SLASHOBSERVE_OUTBOUND_DOMAINS` is set and does not allow the host (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | No stored connection matches the link (`no_connection`), or Grafana has no dashboard with that uid that the connection's token can read (`dashboard_not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or cannot read the stored token (`token_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The link is not a Grafana dashboard link (`not_a_dashboard_link`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | Grafana could not be reached, refused the token or gave an answer the server cannot read (`grafana_unavailable`); the message is fixed by the kind of failure. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Webhooks > The webhooks endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/webhooks/ · Markdown: https://slashobserve.com/docs/reference/api/webhooks/index.md ## GET /webhooks List the webhooks. Only Admins can call this endpoint, and an Admin service-account key can too. Webhooks are sorted by creation time; a response never carries a signing secret. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The webhooks. | [`WebhookList`](/docs/reference/api/schemas/#webhooklist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /webhooks Send workspace activity to an https address. Only Admins can call this endpoint. The server then POSTs every activity event of the chosen types that the caller can read to the address, signed and retried in order; see the webhooks page of the guide for the payload and the signature. Only events that happen after the webhook is created are sent. The caller becomes the webhook's owner, and the webhook delivers only what its owner can read at the time of sending. The address must be https on port 443 with a domain name on the outbound allowlist; a webhook never adds its domain to the allowlist. The signing secret is returned once, here, and is stored encrypted with a key derived from `SLASHOBSERVE_SECRET_KEY`. At most 20 webhooks can exist. ### Request body `application/json`, required. A [`CreateWebhookRequest`](/docs/reference/api/schemas/#createwebhookrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The webhook is created. | [`WebhookWithSecret`](/docs/reference/api/schemas/#webhookwithsecret) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the address's host is not on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | 20 webhooks already exist (`too_many_webhooks`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /webhooks/{id} Change a webhook's name, address, format, event types or state. Only Admins can call this endpoint. The owner stays as it is. `owner: "me"` makes the caller the owner on purpose, so the webhook then delivers only what the caller can read, including the caller's personal folder. A webhook disabled with reason `owner` moves to the caller when `enabled: true` turns it on. A new address is checked against the outbound allowlist and resets the failure count. `enabled: true` clears the disable reason and the failure count and resumes delivery from the webhook's position in the log, still limited to events of the last 24 hours; `enabled: false` disables it with reason `manual`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateWebhookRequest`](/docs/reference/api/schemas/#updatewebhookrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The changed webhook. | [`Webhook`](/docs/reference/api/schemas/#webhook) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The role is too low (`forbidden_role`), or the new address's host is not on the outbound allowlist (`outbound_domain_not_allowed`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /webhooks/{id} Delete a webhook and its delivery attempts. Only Admins can call this endpoint. A delivery in flight may still reach the receiver once. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The webhook is deleted. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /webhooks/{id}/secret Replace a webhook's signing secret. Only Admins can call this endpoint. The old secret stops working at once and the new one is returned once. The owner stays as it is. A webhook disabled with reason `secret_unreadable` still needs `enabled: true` through `updateWebhook` afterwards. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The webhook and its new secret. | [`WebhookWithSecret`](/docs/reference/api/schemas/#webhookwithsecret) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /webhooks/{id}/test Send one test event to a webhook. Only Admins can call this endpoint. The server sends a signed `webhook.test` event with no `event` and waits for the answer, up to 10 seconds. It works on a disabled webhook, records the attempt in the delivery history and changes nothing else. A receiver that cannot be reached or answers with an error still gives 200, with `outcome` `failed` and its `error_code`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The recorded attempt. | [`WebhookTestResult`](/docs/reference/api/schemas/#webhooktestresult) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | `SLASHOBSERVE_SECRET_KEY` is not set (`secret_key_missing`), or the stored secret cannot be read with it (`secret_unreadable`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /webhooks/{id}/skip Pass over the oldest event a failing webhook is stuck on. Only Admins can call this endpoint. A webhook delivers in order, so one event the receiver keeps refusing holds back every event behind it. This moves the webhook's position past the oldest event it still has to send, records that event as a `skipped` attempt with the error `skipped_by_admin`, clears the failure count and makes the webhook send the next event at once. The skipped event is never sent to this receiver. It answers 409 `nothing_to_skip` when the webhook is not retrying or has no event left to send, and 409 `webhook_busy` while a server is delivering for it; try again after a few seconds. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The webhook after the skip and the attempt that records it. | [`WebhookSkipResult`](/docs/reference/api/schemas/#webhookskipresult) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The webhook has no failing event to skip (`nothing_to_skip`), or is delivering right now (`webhook_busy`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /webhooks/{id}/deliveries List a webhook's recent delivery attempts, newest first. Only Admins can call this endpoint. Attempts are kept for 7 days. A row records the outcome, the receiver's status code, an error code and the duration, never a response body, a header or the address. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `cursor` | query | `string` | The `next_cursor` of the previous page. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of attempts. | [`WebhookDeliveryList`](/docs/reference/api/schemas/#webhookdeliverylist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Repairs > The repairs endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/repairs/ · Markdown: https://slashobserve.com/docs/reference/api/repairs/index.md ## GET /repairs List dashboards whose latest version still has failing or placeholder panels. Editors and Admins can call this endpoint. It lists every dashboard, in folders the caller can see, whose latest version has unverified panels or variables or placeholder panels, most recently updated first. A dashboard leaves the list once nothing in it fails and it holds no placeholder. `repair` is the latest repair the agent was asked for on the dashboard, by anyone, or null. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `folder_id` | query | `string` (uuid) | Only dashboards in this folder; a folder the caller cannot see answers 404 `not_found`. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of dashboards to repair. | [`RepairList`](/docs/reference/api/schemas/#repairlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /repairs Queue the agent to repair the failing panels of dashboards. Editors and Admins can call this endpoint. Send `dashboard_ids` to repair those dashboards, or `all` to repair every dashboard the list shows, in `folder_id` when it is set. Each dashboard gets one ordinary revision with source `prompt` and the fixed prompt "Repair every panel and variable listed as unverified so its query runs and returns data; keep every other panel unchanged and never delete an unverified panel." The agent never edits a placeholder panel, so a dashboard whose only problems are placeholders is skipped. A dashboard is skipped with a reason: `active` when a revision is already queued or running on it, `nothing_to_repair` when it has no unverified panel or variable, `not_found` when it does not exist or is in a folder the caller cannot see, `forbidden_role` when the caller cannot edit it, `provisioned` when it is a starter dashboard the server keeps current with each release, and `queue_full` when the caller already has 20 repairs queued or running. Without a configured LLM provider the endpoint answers 503 `agent_unavailable`. ### Request body `application/json`, required. A [`RequestRepairsRequest`](/docs/reference/api/schemas/#requestrepairsrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The repairs that were queued and the dashboards that were skipped. | [`RepairsQueued`](/docs/reference/api/schemas/#repairsqueued) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Stars > The stars endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/stars/ · Markdown: https://slashobserve.com/docs/reference/api/stars/index.md ## PUT /dashboards/{id}/star Star a dashboard for the signed-in person. Stars belong to one person and follow them across browsers. Starring a dashboard that is already starred changes nothing. Only signed-in people may star: a service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The dashboard is starred. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /dashboards/{id}/star Remove the signed-in person's star from a dashboard. Removing a star that does not exist changes nothing. A service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The dashboard is not starred. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /stars List the signed-in person's starred dashboards, newest star first. Lists at most 200 stars, and only dashboards in folders the caller can see. A service-account key gets 403 `user_session_required`. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The starred dashboards. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Home dashboard > The home dashboard endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/home-dashboard/ · Markdown: https://slashobserve.com/docs/reference/api/home-dashboard/index.md ## GET /me/home-dashboard Get the dashboard that opens for the signed-in person after sign-in. `status` says whether it is set and still usable. `gone` and `unreadable` keep the choice so the web app can tell the person, and the person clears it or picks another. Only signed-in people have one: a service-account key gets 403 `user_session_required`. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The home dashboard choice. | [`HomeDashboard`](/docs/reference/api/schemas/#homedashboard) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PUT /me/home-dashboard Choose the dashboard that opens after sign-in. It replaces the earlier choice, and choosing the same dashboard again changes nothing. The caller must be able to view the dashboard, otherwise 404 `not_found`. A service-account key gets 403 `user_session_required`. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The choice after the write. | [`HomeDashboard`](/docs/reference/api/schemas/#homedashboard) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /me/home-dashboard Clear the home dashboard so Home opens after sign-in. Clearing when none is set changes nothing. A service-account key gets 403 `user_session_required`. ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | No home dashboard is set. | | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Public > The public endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/public/ · Markdown: https://slashobserve.com/docs/reference/api/public/index.md ## GET /dashboards/{id}/public-links List the public links of a dashboard. Lists at most 100 links, newest first. Only someone who manages the dashboard's folder may list them; anyone else with access gets 403 `forbidden_role`, and a dashboard in My Dashboards answers 409 `personal_folder`, because it cannot have links. `expired` is true once `expires_at` has passed, and `usable` is false when the link is expired or the dashboard's latest version reads the viewer's identity (`${__user.*}`). ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The links, without their tokens. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard is in My Dashboards (`personal_folder`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /dashboards/{id}/public-links Create a public link that opens the dashboard read-only without sign-in. Needs Manage on the dashboard's folder, because the link widens access beyond the folder's permission list; service-account keys with that level may call it too. The link always shows the dashboard's latest version. The response carries the token and the link's URL once; the server keeps only the token's SHA-256 and a 12 character prefix, so a lost token cannot be shown again. `frozen` variables always use `selections`; `free` variables let the viewer choose values of query, custom, interval and datasource variables among the options the server computes, starting from `selections`. A `free` link's `selections` are checked against the options the server computes for each variable when the link is created, so a value that is not an option is refused with 422 `selection_not_allowed` instead of producing a link whose panels all fail; a `frozen` link keeps whatever it is given. A dashboard has at most 20 unexpired links; an expired link no longer counts. An optional `label` of up to 80 characters says what the link is for; a longer one or one with a control character is refused with 400 `invalid_request`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`CreatePublicLinkRequest`](/docs/reference/api/schemas/#createpubliclinkrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The link is created. | [`CreatedPublicLink`](/docs/reference/api/schemas/#createdpubliclink) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard is in My Dashboards (`personal_folder`; move it to a shared folder first) or in a folder only Admins can read (`admins_only_folder`; move it to a folder that is not Only Admins, unless it reads an Admins-only datasource, which the `datasource` field names and which keeps it where it is). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `422` | The latest version reads the viewer's identity (`user_scoped`), `expires_at` is not in the future (`invalid_expiry`), `selections` names a variable the latest version does not declare (`unknown_variable`), a `free` link's `selections` holds a value that is not one of its variable's options (`selection_not_allowed`), or the dashboard already has 20 unexpired links (`too_many_links`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `502` | A `free` link's selections could not be checked because a variable's options could not be read from its datasource (`variable_options_unavailable`); try again or create a `frozen` link. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /dashboards/{id}/public-links/{link_id} Revoke a public link. Deletes the link, so its URL stops working at once. Needs Manage on the dashboard's folder, like creating it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | | `link_id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The link is revoked. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The dashboard or the link does not exist (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The dashboard is in My Dashboards (`personal_folder`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /public/{token} Read the dashboard a public link shows. Needs no session or key: the token in the path is the only credential. Returns the latest version's Spec without query text, tags and links: every panel query's `query` and every variable's `query` are left out, and so are the dashboard's `tags` and `links`. `datasources` lists the uid and type of each datasource the Spec can reach, so the page needs no other call. A token that is malformed, unknown, revoked or expired, or whose dashboard's latest version reads the viewer's identity, answers 404 `not_found`. Opening the link records its last view, at most once a minute. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `token` (required) | path | `string` | The public link's token, the only credential of this request. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The dashboard to render. | [`PublicDashboard`](/docs/reference/api/schemas/#publicdashboard) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /public/{token}/panels/{panel_id}/data Run the saved queries of one panel of a public link's dashboard. Needs no session or key: the token in the path is the only credential. Behaves like the panel data of a dashboard version, for the link's latest version, with the same parameters, query-text refusal, limits and cache. A `frozen` link ignores every `var-<name>` parameter and uses its stored selections. A `free` link accepts a value for a query, custom, interval or datasource variable only when it is one of the options the server lists for it under the choices of the variables before it, `$__all` when the variable includes All, and answers 400 `selection_not_allowed` otherwise; textbox, adhoc, group by and constant variables always use the stored selections or the dashboard's defaults. Each link may have at most 8 requests in flight. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `token` (required) | path | `string` | The public link's token, the only credential of this request. | | `panel_id` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | The browser's IANA time zone, as for panel data. | | `max_data_points` | query | `integer` | Between 10 and 11000. Default `1000`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The frames the saved queries returned. | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | `400` | The request is malformed, a variable selection is invalid, or a free variable value is not one of its options (`selection_not_allowed`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `403` | The request carried query text; the code is `query_not_in_spec`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The link does not work (`not_found`), or the dashboard has no such panel (`panel_not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | A query or a variable cannot run, as for panel data. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | ## GET /public/{token}/variables/{name}/values List the values of one variable of a public link's dashboard. Needs no session or key: the token in the path is the only credential. Behaves like the variable values of a dashboard version, for the link's latest version. The `var-<name>` selections of earlier variables follow the link's rule, as for panel data, and a selection for the listed variable or a later one is ignored. No authentication. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `token` (required) | path | `string` | The public link's token, the only credential of this request. | | `name` (required) | path | `string` | | | `from` | query | `string` | | | `to` | query | `string` | | | `tz` | query | `string` | The browser's IANA time zone, as for panel data. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | Up to 1000 values; `truncated` is true when there were more. | [`VariableValues`](/docs/reference/api/schemas/#variablevalues) | | `400` | The request is malformed, or a free variable value is not one of its options (`selection_not_allowed`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `403` | The request carried query text; the code is `query_not_in_spec`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The link does not work (`not_found`). | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `422` | The variable's query cannot run, as for variable values. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `429` | The caller already has the maximum number of query requests in flight, or the server's shared upstream call slots stayed busy for 5 seconds. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `502` | A datasource is unavailable. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | | `504` | A datasource did not answer within the query timeout. | [`PanelDataError`](/docs/reference/api/schemas/#paneldataerror) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Health > The health endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/health/ · Markdown: https://slashobserve.com/docs/reference/api/health/index.md ## GET /health List dashboards with health problems, or the health of given dashboards. Anyone with a role can call this endpoint. It lists every dashboard, in folders the caller can see, with at least one problem. `no_data`, `query_failed` and `variable_failed` come from the last health check of the dashboard: an hourly job checks each dashboard about once a day, and again on the next run when its last check found a `query_failed` or `variable_failed` problem or it was saved since, oldest check first, running every panel and variable query of its latest version over the last 7 days with no viewer. `duplicate_title` means another dashboard in the same folder has the same title, compared case-insensitively, and `unopened` means nobody opened the dashboard in the last 90 days, counting from its creation when nobody ever did; both are computed on every read. A dashboard whose queries read the viewer (`${__user.*}`) is not checked and has `skipped` set to `depends_on_viewer`. Dashboards are ranked: 0 with a `query_failed` or `variable_failed` problem, 1 with `no_data`, 2 with `duplicate_title`, 3 with only `unopened`. The list is ordered by rank, then by `last_viewed_at` newest first with never-opened dashboards last, then by title; a `kind` filter keeps each dashboard's rank, so the same order holds inside one kind. `next_cursor` pages through that order; a cursor from a server before this order answers 400 `invalid_request` and the client restarts from the first page. The first page, sent without `cursor`, carries `summary`: counts of dashboards, not problems, over every dashboard in folders the caller can see, narrowed by `folder_id` and never by `kind`; later pages have `summary` null. Each dashboard carries `repair`, its latest health repair (a revision whose prompt starts as `POST /health/repairs` writes it) whatever its age, or null when it never had one. `job` is the state of the health job. With `dashboard_id`, only those dashboards are listed, each one the caller can see whether or not it has a problem: a checked dashboard with no problem comes back with empty `problems`, and one never checked has `state` `unchecked` with null `checked_at` and `checked_version`; `kind` still narrows the list to dashboards with a problem of that kind. `summary` is null on every page when `dashboard_id` is given. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `folder_id` | query | `string` (uuid) | Only dashboards in this folder; a folder the caller cannot see answers 404 `not_found`. | | `dashboard_id` | query | array of `string` (uuid) | Only these dashboards, repeated up to 50 times, including those without a problem; more than 50 values, or a value that is not a UUID, answers 400 `invalid_request`, and a repeated id counts once. An id that does not exist, or is in a folder the caller cannot see, is absent from the answer and never an error. At most 50 items. | | `kind` | query | [`HealthProblemKind`](/docs/reference/api/schemas/#healthproblemkind) | Only dashboards with this kind of problem, and only problems of this kind. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of dashboards with problems, or of the requested dashboards. | [`HealthList`](/docs/reference/api/schemas/#healthlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /health/repairs Queue the agent to repair the failing panels and variables the health check found. Editors and Admins can call this endpoint. Each dashboard gets one ordinary revision (`intent` `apply`) whose prompt starts "Repair the panels and variables the health check found failing" and then names each panel and variable with a `no_data`, `query_failed` or `variable_failed` problem from the last check. A dashboard is skipped with a reason: `active` when a revision is already queued or running on it, `nothing_to_repair` when its last check found no failing panel or variable or was of an older version than the latest, `not_found` when it does not exist or is in a folder the caller cannot see, `forbidden_role` when the caller cannot edit it, `provisioned` when it is a starter dashboard the server keeps current with each release, and `queue_full` when the caller already has 20 health repairs queued or running. Without a configured LLM provider the endpoint answers 503 `agent_unavailable`. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `dashboard_ids` (required) | array of `string` (uuid) | At most 50 items. | ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The repairs that were queued and the dashboards that were skipped. | [`RepairsQueued`](/docs/reference/api/schemas/#repairsqueued) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | | `503` | No LLM provider is configured (`agent_unavailable`). | [`Error`](/docs/reference/api/schemas/#error) | ## POST /health/run Start a health run now. Admins only. The run starts in the background and checks the dashboards that are due, as the hourly run does; when a run is already going, nothing more starts. Read `job` from `GET /health` to follow it. ### Responses | Status | Description | Body | | --- | --- | --- | | `202` | The run is starting. | | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Oauth > The oauth endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/oauth/ · Markdown: https://slashobserve.com/docs/reference/api/oauth/index.md ## GET /oauth/requests/{id} Read a pending request from an MCP client to act as the signed-in person. The consent page reads this to show what the person approves. A request lives 10 minutes and is answered once. `client.name` is the name the client registered under and is not verified; `redirect_host` is where the browser returns after the answer, and `local` is true when that is this computer. `replaces_grant` is true when the person already connected this client. Only signed-in people may call it: a service-account key gets 403 `forbidden`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The pending connection request. | `object` | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /oauth/requests/{id}/approve Approve an MCP client so it acts as the signed-in person. Answers once and consumes the request. `redirect_to` is the client's redirect URI with a one-time `code` (valid 60 seconds), the client's `state` and the issuer; the browser follows it. A person has at most 20 connected agents: approving a 21st client answers 409 `too_many_grants` and keeps the request, while approving a client the person already connected replaces that connection. Only signed-in people may call it, and a cookie session passes the cross-origin check: a service-account key gets 403 `forbidden`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request is approved. | `object` | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The person already has 20 connected agents (`too_many_grants`). The request stays pending. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /oauth/requests/{id}/deny Deny an MCP client's request to act as the signed-in person. Answers once and consumes the request. `redirect_to` is the client's redirect URI with `error=access_denied`, the client's `state` and the issuer. Only signed-in people may call it: a service-account key gets 403 `forbidden`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The request is denied. | `object` | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Grants > The grants endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/grants/ · Markdown: https://slashobserve.com/docs/reference/api/grants/index.md ## GET /me/grants List the MCP clients the signed-in person has connected. Newest first, live connections only: a disconnected or expired one is not listed. `client.name` is the name the client registered under and is not verified, and null when it registered none. `redirect_host` and `local` describe the client's first registered redirect URI. `last_used_at` is null until the client first uses an access token. Only signed-in people may call it: a service-account key gets 403 `forbidden`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of connected agents. | [`ConnectedAgentList`](/docs/reference/api/schemas/#connectedagentlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PATCH /me/grants/{id} Set how one of the signed-in person's MCP clients makes changes. `direct` is the default; `propose` makes the agent's dashboard writes proposals that someone who can edit merges. The mode applies from the agent's next request. Another person's connection, a connection already disconnected and one that does not exist all answer 404 `not_found`. Only signed-in people may call it: a service-account key gets 403 `forbidden`, so no agent changes its own mode. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Request body `application/json`, required. A [`UpdateConnectedAgentRequest`](/docs/reference/api/schemas/#updateconnectedagentrequest) object. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The connection with its new mode. | [`ConnectedAgent`](/docs/reference/api/schemas/#connectedagent) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /me/grants/{id} Disconnect one of the signed-in person's MCP clients. The client's access and refresh tokens stop working at once and the client must be approved again. Another person's connection, a connection already disconnected and one that does not exist all answer 404 `not_found`. Only signed-in people may call it: a service-account key gets 403 `forbidden`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The connection is disconnected. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /grants List every person's connected MCP clients. Admin only. Same shape and order as the signed-in person's own list, with every person's live connections. Service accounts cannot call it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 200. Default `50`. | | `cursor` | query | `string` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of connected agents. | [`ConnectedAgentList`](/docs/reference/api/schemas/#connectedagentlist) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## DELETE /grants/{id} Disconnect any person's MCP client. Admin only. The connection's tokens stop working at once, and the person can connect the client again. A connection already disconnected or that does not exist answers 404 `not_found`. Service accounts cannot call it. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `id` (required) | path | `string` (uuid) | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The connection is disconnected. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Agents > The agents endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/agents/ · Markdown: https://slashobserve.com/docs/reference/api/agents/index.md ## GET /agents List who can do work for the signed-in person. Puts the Observe Agent, the person's connected agents and the service accounts that take runs in one read. `observe_agent` names the configured provider and model (never an address or a key); `provider` and `model` are null while the agent is off. `runtime` is always `sidecar`, the `observe-agent` process. Its `last_7_days` covers every built-in run of the workspace for an Admin (`scope` is `workspace`) and only the caller's own runs for anyone else (`scope` is `you`). `connected` lists only the caller's own live connections, newest first and at most 100. `grant_id` is the id a mention names as `@[Name](grant:<grant_id>)`, and a service account's `id` is the one in `@[Name](service_account:<id>)`. `service_accounts` lists every account that takes runs, ordered by name and at most 100, with `last_7_days` for an Admin and null for anyone else, because a person needs the names to mention them. `present` is true while the agent holds a run or asked for work in the last 40 seconds, and `presence` says which: `working` while it holds a run, `listening` when it asked for work in the last 40 seconds and `offline` otherwise; see `docs/reference/states.md`. Each `last_7_days` counts the runs created in the last seven days assigned to that agent: `failed` leaves out canceled runs, `cost_usd` is the sum of the recorded run costs and null when a finished run has none, because an unknown price is never counted as zero, and `median_queue_wait_seconds` is the median time from request to start over the runs that started, null when none did. `writes_7d` counts the activity rows of the last seven days written by the caller over MCP under the connection's client name, so two connections of one client name share the count. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The agents. | [`AgentsOverview`](/docs/reference/api/schemas/#agentsoverview) | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /agents/runs List the recent runs of one agent. Lists the runs assigned to one agent, newest first, so the Agents page can show the work behind its seven day numbers. `kind` is `builtin` for the Observe Agent, `grant` for one of the caller's connected agents or `service_account` for a service account that takes runs. `id` is the grant id or the service account id, and it is required for `grant` and `service_account` and refused for `builtin`. For `builtin` and `service_account`, an Admin sees every run of the agent (`scope` is `workspace`) and anyone else only the runs they requested (`scope` is `you`). A `grant` is listed only for the person it belongs to, revoked or expired connections included so the history stays readable, and any other grant id answers 404 `not_found`, an Admin's too. An unknown service account answers 404 `not_found`. Suggestion runs are left out because they have no page to open, although the seven day numbers of `GET /agents` still count them; archived runs are included. A dashboard or observation in a folder the caller cannot see comes back as null, never with its id or title. `openable` is true only when the caller requested the run, because a run page opens only for the person who asked for it. `title` is the requester's title or the start of the prompt, and never empty. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `kind` (required) | query | `"builtin"`, `"grant"`, `"service_account"` | | | `id` | query | `string` (uuid) | The grant id or service account id; required for `grant` and `service_account`, refused for `builtin`. | | `limit` | query | `integer` | Between 1 and 50. Default `20`. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of runs. | [`AgentRunPage`](/docs/reference/api/schemas/#agentrunpage) | | `400` | The kind, id, limit or cursor is not valid (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The grant is not the caller's or the service account does not exist (`not_found`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## GET /agents/working List the active runs working on the caller's things. Lists the runs that are queued, running or canceling and that the caller requested, or that act on a dashboard or observation the caller created, newest first. A dashboard or observation counts only while it is in a folder the caller can see, and comes back as null otherwise, never with its id or title. An Admin gets no wider view: the list is about the caller's own runs and things. Suggestion runs and archived runs are left out. `mine` is true when the caller requested the run. `title` is the requester's title or the start of the prompt for a run the caller requested, and null for a run someone else requested, because a request is private to its author. `agent` names who works on it: `Observe Agent` for the built-in agent, the client name of a connected agent or the name of a service account. There is no cursor: `limit` caps the list and `truncated` is true when more active runs exist. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `limit` | query | `integer` | Between 1 and 50. Default `20`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The active runs. | [`WorkingRuns`](/docs/reference/api/schemas/#workingruns) | | `400` | The limit is not valid (`invalid_request`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Inbox > The inbox endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/inbox/ · Markdown: https://slashobserve.com/docs/reference/api/inbox/index.md ## GET /inbox List what asks something of the signed-in person, newest first. The inbox is the activity the caller can see, from the last 30 days, filtered to what asks something of them now; it stores no events of its own, so it cannot differ from `GET /activity`. Each item is an activity event with a `reason`, the first rule it matches, and `unread`. `proposal` is a proposal someone else opened on a dashboard whose folder the caller can edit and that is still open. `requested_block` is a block someone requested on an observation the caller created and can still edit, that is still requested. `mention` is a comment that mentions the caller by name. `reply` is a reply by someone else in a thread the caller wrote in, or a reply an agent run wrote for a run the caller requested. `run_failed` is a failed run the caller requested that nobody has continued. `repaired` is a health repair the caller started that saved a version. `proposal_closed` is a proposal the caller opened that someone else merged or discarded; its `excerpt` is the reason given for a discard. `access_request` is a request for Comment access to a dashboard or observation whose folder sharing the caller manages, that is still open: nobody has marked it done, the requester cannot comment yet and it is under 30 days old; its `excerpt` is the requester's note, and marking it done closes it for every person who received it. `view` chooses what the list holds: `for_you`, the default, every item with a reason; `proposals`, the `proposal` and `proposal_closed` items; `mentions`, the `mention` and `reply` items; and `everything`, every visible event from others plus every item with a reason, with `reason` null on those that have none. An item is unread when `PUT /api/v1/inbox/items/{seq}` marked it unread, or, when that never touched it, when it is newer than the position `POST /api/v1/inbox/read` stored for the caller; every item is unread until the caller reads once. `unread_count` counts the unread `for_you` items whatever the view is, and `100` means 100 or more. `question` is the first line of the thread message an agent run answered, cut to a title of at most 60 characters, on the item for that run's reply; it is null when that message was deleted or withdrawn, and it never comes from a chat prompt. `target_title` is the title of the dashboard, observation or proposal an item is about, and `excerpt` is the start of the comment for a `mention` or `reply`, the reason of a discarded proposal for `proposal_closed`, or the note of an `access_request`, as plain text; the rest of an item carries no comment, message or finding text, as in the activity log. A comment that mentions the caller and replies in a thread the caller wrote in is one `mention` item, not two. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `view` | query | `"for_you"`, `"everything"`, `"proposals"`, `"mentions"` | Default `"for_you"`. | | `filter` | query | `"open"`, `"unread"`, `"done"` | `open`, the default, lists every item the caller has not marked done; `unread` lists the open items that are unread; `done` lists the items the caller marked done with `PUT /api/v1/inbox/items/{seq}`. A done item is read, never counts in `unread_count`, and stays done when the inbox is read. Default `"open"`. | | `cursor` | query | `string` | The `next_cursor` of the previous page. | | `limit` | query | `integer` | Between 1 and 100. Default `50`. | ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | One page of the inbox. | [`InboxList`](/docs/reference/api/schemas/#inboxlist) | | `400` | The `view` is not one of the four (`invalid_view`), the `filter` is not `open`, `unread` or `done` (`invalid_filter`), the `cursor` is not one this server issued (`invalid_cursor`), or the `limit` is not an integer from 1 to 100 (`invalid_limit`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /inbox/read Mark the inbox read up to one event. Stores the caller's read position at the event with this `seq`: that event and everything older is read, and everything newer is unread. The position only moves forward, so a `seq` older than the stored one changes nothing. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `seq` (required) | `integer` (int64) | The `seq` of an activity event, normally the newest item the person has seen. | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The inbox is read up to the event, or already was. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | No activity has that `seq` (`unknown_seq`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## PUT /inbox/items/{seq} Mark one inbox item read, unread or done. Send `unread` to mark the item with this `seq` read or unread for the caller, whatever its place relative to the stored read position; marking a done item unread also takes it out of done. `POST /api/v1/inbox/read` later sets every item up to its `seq` to read, including those marked unread here. Send `done: true` to mark it done: it leaves the default list and `filter=unread`, counts as read, and stays done when the inbox is read; `done: false` brings it back to the open list as read. Send exactly one of `unread` and `done`. Only signed-in people may call it: a service-account key gets 403 `user_session_required`. ### Parameters | Name | In | Type | Description | | --- | --- | --- | --- | | `seq` (required) | path | `integer` (int64) | | ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `unread` | `boolean` | | | `done` | `boolean` | | ### Responses | Status | Description | Body | | --- | --- | --- | | `204` | The item is in the requested state. | | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not a signed-in person (`user_session_required`). | [`Error`](/docs/reference/api/schemas/#error) | | `422` | No activity has that `seq` (`unknown_seq`). | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Access requests > The access requests endpoints of the HTTP API. Source: https://slashobserve.com/docs/reference/api/access-requests/ · Markdown: https://slashobserve.com/docs/reference/api/access-requests/index.md ## GET /access-requests List the open Comment access requests on folders the caller manages. Lists the open requests on dashboards and observations whose folder the caller may manage, newest first, at most 100. Grant one by giving the requester Comment on the folder (`PUT /folders/{id}/permissions`) or by raising their role; this list changes nothing. An object in General (`folder.general`) cannot be granted that way, because General takes no entry: raise the requester's role or move the object to another folder. ### Responses | Status | Description | Body | | --- | --- | --- | | `200` | The open requests. | `object` | | `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | ## POST /access-requests Ask for Comment access to a dashboard or observation the caller can view. Puts a request, with the optional one-line note, in the inbox of the people who manage the sharing of the object's folder: its creator while they are an Editor and anyone with Admin on it by an entry, or every Admin of the workspace when the folder has none of them. It changes no access, and the answer never names who received it. A person or a service-account key may ask. The request closes when the requester can comment, after a folder access change or a role change, when a person who received it marks its inbox item done, or after 30 days. An object the caller cannot view answers 404 `not_found`, like an unknown id. ### Request body `application/json`, required. | Field | Type | Description | | --- | --- | --- | | `object` (required) | `object` | | | `note` | `string` | Trimmed before it is stored; one line of at most 200 characters for the people who can grant access. | ### Responses | Status | Description | Body | | --- | --- | --- | | `201` | The request is open. | [`AccessRequest`](/docs/reference/api/schemas/#accessrequest) | | `400` | The body is malformed (`invalid_request`) or the note has a line break or is over 200 characters (`invalid_note`). | [`Error`](/docs/reference/api/schemas/#error) | | `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) | | `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) | | `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) | | `409` | The caller can already comment on the object (`already_can_comment`), or already has an open request on it (`request_open`, with `requested_at`, which its message names too). | [`Error`](/docs/reference/api/schemas/#error) | | `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) | | `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Schemas > The request and response objects the HTTP API endpoints use. Source: https://slashobserve.com/docs/reference/api/schemas/ · Markdown: https://slashobserve.com/docs/reference/api/schemas/index.md ## Error | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `string` | | | `datasource` | `string` | Present with `admins_only_folder` when the content reads an Admins-only datasource, so it cannot leave its folder and public links are not available for it; the uid of that datasource. | | `reason` | `string` | Present when the text a caller sent failed the shared text rule (`docs/reference/text-rules.md`): `text_empty`, `text_invisible_only`, `text_invisible_characters`, `text_control_characters`, `text_bidi_override`, `text_too_long` or `text_invalid_utf8`. The `error` message names the field and says what to change. | | `needed_role` | `"viewer"`, `"commenter"`, `"editor"`, `"admin"` | On a `forbidden_role` refusal of a route with a role floor, the lowest role that may call it. | | `needed_access` | `"view"`, `"comment"`, `"edit"`, `"manage"` | On a `forbidden_role` refusal for a folder level, the level the caller needs on the folder named by `folder_title`. | | `folder_title` | `string` | The title of the folder that `needed_access` refers to; only sent to a caller who can see that folder. | | `latest_version` | `integer` | On a `version_not_found` refusal, the dashboard's latest version. | | `requested_at` | `string` (date-time) | On a `request_open` refusal, when the caller's open access request was made. | ## Issue | Field | Type | Description | | --- | --- | --- | | `path` (required) | `string` | | | `code` (required) | `string` | Spec parsing adds schema and semantic codes such as `schema`, `too_large`, `unknown_unit`, `duplicate_panel_id`, `unknown_variable`, `too_many_panels` (more than 200 panels counting row children), `duplicate_query_ref`, `unknown_query_ref` (an override or an expression names a query ref the panel does not have), `threshold_value_missing` (a threshold other than the first omits its value), `duplicate_element_id` (a canvas panel repeats an element id, path `/panels/{i}/display/elements/{k}/id`) and `unknown_element` (a canvas connection names no element, path `/panels/{i}/display/connections/{k}/from` or `/to`). A `timezone` the server cannot load is `unknown_timezone` (path `/timezone`). A link address with a scheme other than http, https or mailto is `unsafe_link` (path `/links/{i}/url` or the `url` of the panel, override or canvas element link). A dashboard or panel title that fails the text rule (`docs/reference/text-rules.md`) is reported at `/title` or `/panels/{i}/title` with the code `text_empty`, `text_invisible_only`, `text_invisible_characters`, `text_control_characters`, `text_bidi_override`, `text_too_long` or `text_invalid_utf8`; a title is trimmed before it is stored. Saving a dashboard also runs every panel and variable query and adds `unknown_datasource`, `time_range_invalid` (path `/time`), `variable_failed`, `variable_empty` and `variable_unresolved` (paths `/variables/{i}` or `/panels/{i}/queries/{j}/query`, with `/panels/{i}/panels/{j}` for a row child), and `query_invalid`, `query_forbidden`, `limit_exceeded`, `query_timeout`, `datasource_unavailable`, `not_found`, `query_empty`, `expression_error` and `internal` (paths `/panels/{i}/queries/{j}/query`, `/panels/{i}/queries/{j}/expression` for an expression query, `/panels/{i}/datasource` and `/panels/{i}/queries/{j}/datasource`; `query_empty` is reported once for the panel at `/panels/{i}/queries`, and never for an `alertlist` panel, whose empty result is valid). A query issue on a panel or variable the parent version lists in `unverified` may be kept instead of failing the save; see `POST /dashboards/{id}/versions`. | | `message` (required) | `string` | | ## ValidationError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `string` | | | `issues` (required) | array of [`Issue`](/docs/reference/api/schemas/#issue) | | | `reason` | `string` | Present when an observation title, summary or text block failed the shared text rule (`docs/reference/text-rules.md`); the same values as `reason` on `Error`. | ## Role One of `admin`, `editor`, `commenter`, `viewer`. ## Invite | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `email` (required) | `string` | | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) | | | `invited_by` (required) | `string` | The name of the Admin or service account that sent the invite. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `sign_in_url` (required) | `string` | The address to share with the person; signing in there with the invited email uses the invite. | ## InviteList | Field | Type | Description | | --- | --- | --- | | `invites` (required) | array of [`Invite`](/docs/reference/api/schemas/#invite) | | | `next_cursor` (required) | `string` or `null` | | ## TeamMember | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `email` (required) | `string` | | ## Team | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | The group name a folder entry uses to share with the team's members. | | `created_by` (required) | `string` | The name of the Admin or service account that created the team. | | `created_at` (required) | `string` (date-time) | | | `members` (required) | array of [`TeamMember`](/docs/reference/api/schemas/#teammember) | | ## TeamList | Field | Type | Description | | --- | --- | --- | | `teams` (required) | array of [`Team`](/docs/reference/api/schemas/#team) | At most 200 items. | ## CreateTeamRequest | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | ## CreateInviteRequest | Field | Type | Description | | --- | --- | --- | | `email` (required) | `string` | | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) | | ## RoleSource Where a person's role comes from. admin_emails, first_user and group are decided by the server settings or the identity provider and cannot be changed through the API. One of `admin_emails`, `first_user`, `group`, `manual`, `default`. ## Principal | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"service_account"` | | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `email` | `string` | | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) | | ## Instance | Field | Type | Description | | --- | --- | --- | | `public_url` (required) | `string` (uri) | | | `mcp_url` (required) | `string` (uri) | | | `oidc_issuer_url` (required) | `string` | The identity provider's issuer, as browsers reach it, or an empty string when browser sign-in is off and only service-account keys authenticate. | | `oidc_provider_name` (required) | `string` | The identity provider's display name, empty when none is configured. | | `allowed_email_domains` (required) | array of `string` | Empty when any domain may sign in. | | `any_email_domain` (required) | `boolean` | | | `session_ttl_seconds` (required) | `integer` | | | `version` (required) | `string` | The server's release version, `dev` for a local build. | ## SessionState | Field | Type | Description | | --- | --- | --- | | `authenticated` (required) | `boolean` | | | `principal` | [`Principal`](/docs/reference/api/schemas/#principal) | | ## ServiceAccount | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `description` (required) | `string` | | | `created_by` (required) | `string` (uuid) or `null` | | | `created_at` (required) | `string` (date-time) | | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) | | | `provisioned` (required) | `boolean` | The account comes from the server's service-accounts file (`SLASHOBSERVE_SERVICE_ACCOUNTS_FILE`); its role, description, `takes_runs` and file key change only there. | | `takes_runs` (required) | `boolean` | It may claim runs assigned to it with claim_run. Admins turn it on; an account from the service-accounts file takes it from `takesRuns`. | | `presence` (required) | `"working"`, `"listening"`, `"offline"` | working while it holds a run it claimed, listening when it asked for work in the last 40 seconds, otherwise offline. See `docs/reference/states.md`. | | `last_seen_at` (required) | `string` (date-time) or `null` | When it last asked for work or reported on a run; null when it never did. | ## ServiceAccountList | Field | Type | Description | | --- | --- | --- | | `items` (required) | array of [`ServiceAccount`](/docs/reference/api/schemas/#serviceaccount) | | ## CreateServiceAccountRequest | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `description` | `string` | | | `role` | [`Role`](/docs/reference/api/schemas/#role) | The role the account's keys act with; editor when omitted. | ## UpdateServiceAccountRequest | Field | Type | Description | | --- | --- | --- | | `role` | [`Role`](/docs/reference/api/schemas/#role) | | | `takes_runs` | `boolean` | | ## ServiceAccountKey | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `service_account_id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `display_prefix` (required) | `string` | | | `created_by` (required) | `string` (uuid) or `null` | | | `created_at` (required) | `string` (date-time) | | | `expires_at` (required) | `string` (date-time) or `null` | | | `last_used_at` (required) | `string` (date-time) or `null` | | | `revoked_at` (required) | `string` (date-time) or `null` | | | `state` (required) | `"revoked"`, `"expired"`, `"expiring"`, `"active"` | The key's state computed on the server clock when the response is made; `expiring` starts 7 days before `expires_at`. See `docs/reference/states.md`. | ## ServiceAccountKeyList | Field | Type | Description | | --- | --- | --- | | `items` (required) | array of [`ServiceAccountKey`](/docs/reference/api/schemas/#serviceaccountkey) | | ## CreateServiceAccountKeyRequest | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `expires_at` | `string` (date-time) or `null` | | ## IssuedServiceAccountKey | Field | Type | Description | | --- | --- | --- | | `key` (required) | [`ServiceAccountKey`](/docs/reference/api/schemas/#serviceaccountkey) | | | `token` (required) | `string` | The full key, returned only once. | ## Person | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `email` (required) | `string` | | | `created_at` (required) | `string` (date-time) | | | `last_login_at` (required) | `string` (date-time) | | | `last_seen_at` (required) | `string` (date-time) | Updated at most once a minute while a session is used; seen within the last 2 minutes means online now. | | `dashboard_count` (required) | `integer` | Dashboards whose first version this person saved, either directly or through an agent request they sent. Dashboards created with a service-account key are not counted. Only dashboards in folders you can see are counted, so another person's My Dashboards is left out. | | `key_count` (required) | `integer` | Unrevoked, unexpired service-account keys this person created. | | `session_count` (required) | `integer` | Unexpired sessions. | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) | | | `role_source` (required) | [`RoleSource`](/docs/reference/api/schemas/#rolesource) | | | `role_group` (required) | `string` or `null` | The identity-provider group that decided the role when role_source is group. | | `role_set_by` (required) | `string` or `null` | The name of the Admin who chose the role when role_source is manual. | | `role_locked` (required) | `boolean` | True when the role cannot be changed through the API. | | `deactivated_at` (required) | `string` (date-time) or `null` | When an Admin deactivated the person; null for an active person. A deactivated person cannot sign in, and their sessions and connected agents are gone. | | `deactivated_by` (required) | `string` or `null` | The name of the Admin who deactivated the person. | | `personal_items` (required) | `object` or `null` | What is in the person's My Dashboards and is deleted if they are removed; present only for a deactivated person. | ## ConnectedAgent | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `client` (required) | `object` | | | `person` (required) | `object` | | | `created_at` (required) | `string` (date-time) | | | `last_used_at` (required) | `string` (date-time) or `null` | Null until the client first uses an access token. | | `expires_at` (required) | `string` (date-time) | When the connection ends and the person must approve it again. | | `state` (required) | `"revoked"`, `"active"` | Always `active` in the list, which leaves out revoked and expired connections. See `docs/reference/states.md`. | | `mode` (required) | `"direct"`, `"propose"` | How the agent's changes land. direct is the default; with propose its dashboard writes become proposals that someone who can edit merges. The connection's person sets it with `PATCH /api/v1/me/grants/{id}`. | | `presence` (required) | `"working"`, `"listening"`, `"offline"` | working while it holds a run it claimed, listening when it asked for work in the last 40 seconds, otherwise offline. See `docs/reference/states.md`. | | `last_seen_at` (required) | `string` (date-time) or `null` | When it last asked for work or reported on a run; null when it never did. | ## UpdateConnectedAgentRequest | Field | Type | Description | | --- | --- | --- | | `mode` (required) | `"direct"`, `"propose"` | | ## ConnectedAgentList | Field | Type | Description | | --- | --- | --- | | `grants` (required) | array of [`ConnectedAgent`](/docs/reference/api/schemas/#connectedagent) | | | `next_cursor` (required) | `string` or `null` | | ## AgentRunStats | Field | Type | Description | | --- | --- | --- | | `runs` (required) | `integer` | | | `failed` (required) | `integer` | | | `cost_usd` (required) | `number` or `null` | Null when a finished run has no recorded cost. | | `median_queue_wait_seconds` (required) | `number` or `null` | Null when no run started. | ## AgentRun | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `intent` (required) | `"ask"`, `"apply"` | What the run may do: `ask` reads and answers, `apply` changes the dashboard, `suggest` proposes one panel. A run that saved a version is `apply`. | | `investigation` (required) | `boolean` | True when the run was started as an investigation that opens or writes into an observation, false for an ask from the Chat tab, the canvas, a thread or Ask this on an observation. Saving, sharing, showing on a page or withdrawing an answer never changes it. | | `title` (required) | `string` | The requester's title, else the first line of the prompt without `@observe`, cut at a word to 60 characters, else the intent word. | | `state` (required) | `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | | | `result_kind` (required) | `"none"`, `"version"`, `"partial_version"`, `"proposal"`, `"suggestion"`, `"observation"`, `"answer"` | | | `failure_code` (required) | `string` or `null` | | | `created_at` (required) | `string` (date-time) | | | `started_at` (required) | `string` (date-time) or `null` | | | `finished_at` (required) | `string` (date-time) or `null` | | | `cost_usd` (required) | `number` or `null` | The recorded run cost, null when the run has none. | | `requested_by` (required) | `object` | | | `openable` (required) | `boolean` | True when the caller requested the run, the only case in which its run page opens for them. | | `dashboard` (required) | `object` or `null` | Null when the run has no dashboard or the caller cannot see its folder. | | `observation` (required) | `object` or `null` | Null when the run has no observation or the caller cannot see its folder. | ## AgentRunPage | Field | Type | Description | | --- | --- | --- | | `scope` (required) | `"workspace"`, `"you"` | | | `items` (required) | array of [`AgentRun`](/docs/reference/api/schemas/#agentrun) | At most 50 items. | | `next_cursor` (required) | `string` or `null` | | ## WorkingRuns | Field | Type | Description | | --- | --- | --- | | `items` (required) | array of `object` | At most 50 items. | | `truncated` (required) | `boolean` | True when more active runs exist than `limit`. | ## AgentsOverview | Field | Type | Description | | --- | --- | --- | | `observe_agent` (required) | `object` | | | `connected` (required) | array of `object` | At most 100 items. | | `service_accounts` (required) | array of `object` | At most 100 items. | ## UpdatePersonRequest | Field | Type | Description | | --- | --- | --- | | `role` (required) | [`Role`](/docs/reference/api/schemas/#role) or `null` | The role to set, or null to clear the chosen role and fall back to the computed one. | ## OutboundDomain | Field | Type | Description | | --- | --- | --- | | `domain` (required) | `string` | A host name, or `*.` followed by a host name for its subdomains only, in lower case ASCII. | | `from_connection` (required) | `boolean` | True when saving a Grafana connection or a datasource added the entry; it is removed with the last webhook, connection or datasource that uses that host. | | `used_by` (required) | array of `object` | The webhooks, Grafana connections and datasources whose address this entry allows, so removing it would stop them; empty for anyone but an Admin, because those objects are Admin only. | | `added_at` (required) | `string` (date-time) or `null` | Null for an entry set by `SLASHOBSERVE_OUTBOUND_DOMAINS`. | | `added_by` (required) | `string` or `null` | The name of the person who allowed the domain; null for an entry set by `SLASHOBSERVE_OUTBOUND_DOMAINS` and when that person was deleted. | ## OutboundDomainList | Field | Type | Description | | --- | --- | --- | | `managed_by` (required) | `"settings"`, `"config"` | `config` when `SLASHOBSERVE_OUTBOUND_DOMAINS` is set; the list is then read-only. | | `domains` (required) | array of [`OutboundDomain`](/docs/reference/api/schemas/#outbounddomain) | | ## Permissions What the caller may do with the object; being able to read it implies viewing. | Field | Type | Description | | --- | --- | --- | | `comment` (required) | `boolean` | | | `edit` (required) | `boolean` | | | `manage` (required) | `boolean` | Rename, change the permissions of and delete a folder. | | `create` (required) | `boolean` | Create, duplicate or import dashboards into the folder, or move dashboards into it (the Edit level). | ## FolderLevel One of `view`, `comment`, `edit`, `admin`. ## Folder | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `general` (required) | `boolean` | True for the General folder, which holds dashboards without a folder of their own and is never restricted, renamed or deleted. | | `personal` (required) | `boolean` | True for the caller's own My Dashboards folder, which only they see, Admins included. It is never restricted, renamed or shared, takes new dashboards but no moves, and lists first. | | `restricted` (required) | `boolean` | True when the folder lists people or groups or only Admins can read it; false means open to everyone by instance role. | | `admins_only` (required) | `boolean` | True when only Admins can read the folder, whoever made it. Such a folder lists no people or groups, and only such a folder can hold content that reads an Admins-only datasource. | | `audit` (required) | `boolean` | True for the Audit folder, the one the server made to hold the starter dashboards over the audit trail, whatever it is now called. False for every other folder, and for all of them when the Audit folder was deleted, which the server does not recreate. The field cannot be set. | | `dashboard_count` (required) | `integer` | All dashboards in the folder, including ones the caller cannot see when the caller manages it. | | `grantees` (required) | array of `string` | The names of up to 5 listed people, then groups. At most 5 items. | | `grantee_count` (required) | `integer` | How many people and groups are listed. | | `created_by` (required) | [`Author`](/docs/reference/api/schemas/#author) or `null` | Null for General and for folders made before creators were recorded. For a personal folder, its owner. | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | | `level` (required) | [`FolderLevel`](/docs/reference/api/schemas/#folderlevel) | The caller's level on this folder and on every dashboard in it, the higher of what their role gives and their highest matching entry. Admins have `admin` on every folder except other people's personal folders, and a personal folder's owner has `edit`. | ## FolderPermissionEntry | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"group"` | | | `user` | `object` | Present when `kind` is `user`. | | `group` | `string` | Present when `kind` is `group`. | | `member_count` | `integer` | Present when `kind` is `group`; people who signed in with the group in their stored claims. | | `level` (required) | [`FolderLevel`](/docs/reference/api/schemas/#folderlevel) | | ## FolderPermissions | Field | Type | Description | | --- | --- | --- | | `restricted` (required) | `boolean` | | | `admins_only` (required) | `boolean` | True when only Admins can read the folder; `entries` is then empty. | | `entries` (required) | array of [`FolderPermissionEntry`](/docs/reference/api/schemas/#folderpermissionentry) | | ## SavedPrompt | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | Unique per owner and among shared prompts, ignoring case. Letters, numbers, spaces, `-` and `_`; it starts and ends with a letter or number, and runs of spaces are stored as one. | | `body` (required) | `string` | The prompt text sent to the agent, trimmed; at most 4000 characters, the same limit as `POST /observe`. | | `shared` (required) | `boolean` | True when everyone on the server can see and run it; false when only its owner can. | | `owner` (required) | [`SavedPromptOwner`](/docs/reference/api/schemas/#savedpromptowner) | | | `can_edit` (required) | `boolean` | Whether the caller may change or delete it. The server decides; clients never recompute it. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | ## SavedPromptOwner | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | The owner's display name, or their email when they have no name. | ## SavedPromptList | Field | Type | Description | | --- | --- | --- | | `prompts` (required) | array of [`SavedPrompt`](/docs/reference/api/schemas/#savedprompt) | At most 500 items. | ## Annotation | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) or `null` | Null for a global annotation, shown on every dashboard. | | `panel_id` (required) | `string` or `null` | | | `time_from` (required) | `string` (date-time) | | | `time_to` (required) | `string` (date-time) or `null` | The end of a range annotation; null for a single instant. | | `text` (required) | `string` | | | `tags` (required) | array of `string` | At most 10 items. | | `created_by` (required) | `string` (uuid) or `null` | The id of the person or service account that added it. | | `created_by_name` (required) | `string` or `null` | The name of the person or service account that added it; null when it is gone. | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) or `null` | Null when the person or service account is gone. | | `created_at` (required) | `string` (date-time) | | ## AnnotationList | Field | Type | Description | | --- | --- | --- | | `annotations` (required) | array of [`Annotation`](/docs/reference/api/schemas/#annotation) | At most 500 items. | | `next_cursor` (required) | `string` or `null` | | ## NewsItem | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | Plain text, never markup. | | `link` (required) | `string` or `null` | An absolute http or https URL without user info, or null when the feed gave none or an unsafe one. | | `published` (required) | `string` (date-time) or `null` | | | `summary` (required) | `string` | Plain text, never markup; may be empty. | ## ActionResult | Field | Type | Description | | --- | --- | --- | | `status` (required) | `integer` | The HTTP status the remote server answered with; a redirect is reported as its own 3xx status. | | `ok` (required) | `boolean` | True when the status is 2xx. | ## ActionError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `string` | | | `host` | `string` | The domain the request was meant for, present on `outbound_domain_not_allowed` and `action_failed`. | ## NewsFeed | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | | | `items` (required) | array of [`NewsItem`](/docs/reference/api/schemas/#newsitem) | In feed order, at most 50. At most 50 items. | | `fetched_at` (required) | `string` (date-time) | When the server fetched the feed; a cached feed keeps the time of its fetch. | ## DatasourceStatus | Field | Type | Description | | --- | --- | --- | | `uid` (required) | `string` | | | `type` (required) | `string` | | | `name` (required) | `string` | | | `source` (required) | `"file"`, `"app"`, `"builtin"` | `file` for an entry of the datasources file, which only the server's operator changes, `app` for one an Admin added in the app, and `builtin` for the audit trail datasource every server has, which only Admins see and nobody changes or deletes. | | `index` | `string` | The index pattern an Elasticsearch or OpenSearch datasource reads; absent on other types. | | `time_field` | `string` | The time field of an Elasticsearch or OpenSearch datasource; absent on other types. | | `audience` | `"everyone"`, `"admins"` | Who can query the datasource, for an Admin caller only; absent for everyone else. | | `healthy` (required) | `boolean` | | | `message` | `string` | A fixed sentence naming the kind of failure; absent when healthy. | | `detail` | `string` | The cause when the server knows it, such as a refused connection or the HTTP status the datasource answered; never an address, user or secret. | | `checked_at` (required) | `string` (date-time) | When the server last checked the datasource; checks are cached for 10 seconds, and `POST /datasources/{uid}/recheck` runs a new one. | | `dashboard_count` (required) | `integer` | Dashboards whose latest version uses this datasource. | ## DatasourceList | Field | Type | Description | | --- | --- | --- | | `datasources` (required) | array of [`DatasourceStatus`](/docs/reference/api/schemas/#datasourcestatus) | | ## DatasourceLimits | Field | Type | Description | | --- | --- | --- | | `timeout` | `string` | A duration such as `30s`; empty uses the adapter default. | | `max_series` | `integer` | | | `max_points` | `integer` | | | `max_rows` | `integer` | | | `max_concurrent_queries` | `integer` | The most queries this datasource runs at once across the fleet; 0 uses the default of 32. Between 0 and 1024. | ## DatasourceFieldRoles Which fields of an Elasticsearch or OpenSearch index play which role in logs and traces. | Field | Type | Description | | --- | --- | --- | | `message` | `string` | | | `level` | `string` | | | `service` | `string` | | | `trace_id` | `string` | | | `span_id` | `string` | | ## DatasourceSecrets Credentials, written and never read back. A field left out keeps what is stored; a value replaces it. | Field | Type | Description | | --- | --- | --- | | `password` | `string` | The basic-auth password, or the ClickHouse password. | | `bearer_token` | `string` | | | `api_key` | `string` | The Elasticsearch or OpenSearch API key. | | `headers` | `object` | Custom request headers by name. Every value is treated as a credential. | ## DatasourceDraft A datasource definition. Creating needs `uid`, `type` and `address`. Changing and testing a saved datasource take only the fields to change. | Field | Type | Description | | --- | --- | --- | | `uid` | `string` | | | `type` | `"prometheus"`, `"clickhouse"`, `"loki"`, `"tempo"`, `"jaeger"`, `"elasticsearch"`, `"opensearch"` | | | `name` | `string` | The display name; the uid when empty. | | `audience` | `"everyone"`, `"admins"` | Who can query the datasource, `everyone` by default. With `admins`, every other role, key and public link gets the same answer for it as for a datasource that does not exist. | | `grafana_uids` | array of `string` | Grafana datasource uids this one stands for when dashboards are imported. At most 20 items. | | `address` | `string` | An http or https URL, or `host:port` for ClickHouse. A login belongs in `username` and `secrets`, not here. | | `username` | `string` | The basic-auth user, or the ClickHouse user. | | `database` | `string` | ClickHouse only. | | `tls` | `boolean` | ClickHouse only. | | `tenant_id` | `string` | Loki only. | | `scrape_interval` | `string` | Prometheus only, a duration such as `15s`. | | `index` | `string` | Elasticsearch and OpenSearch only. | | `time_field` | `string` | | | `query_language` | `""`, `"kql"`, `"lucene"` | | | `fields` | [`DatasourceFieldRoles`](/docs/reference/api/schemas/#datasourcefieldroles) | | | `limits` | [`DatasourceLimits`](/docs/reference/api/schemas/#datasourcelimits) | | | `secrets` | [`DatasourceSecrets`](/docs/reference/api/schemas/#datasourcesecrets) | | | `clear_secrets` | array of `string` | Credentials to remove, each `password`, `bearer_token`, `api_key` or `header:<name>`. | ## DatasourceConfig A datasource added in the app, without its credentials. | Field | Type | Description | | --- | --- | --- | | `uid` (required) | `string` | | | `type` (required) | `string` | | | `name` (required) | `string` | | | `audience` (required) | `"everyone"`, `"admins"` | Who can query the datasource. | | `source` (required) | `"app"` | | | `grafana_uids` | array of `string` | | | `address` (required) | `string` | | | `username` | `string` | | | `database` | `string` | | | `tls` | `boolean` | | | `tenant_id` | `string` | | | `scrape_interval` | `string` | | | `index` | `string` | | | `time_field` | `string` | | | `query_language` | `string` | | | `fields` | [`DatasourceFieldRoles`](/docs/reference/api/schemas/#datasourcefieldroles) | | | `limits` | [`DatasourceLimits`](/docs/reference/api/schemas/#datasourcelimits) | | | `secrets_set` (required) | array of `string` | Which credentials are stored, each `password`, `bearer_token`, `api_key` or `header:<name>`. Their values are never returned. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | ## DatasourceTestResult | Field | Type | Description | | --- | --- | --- | | `healthy` (required) | `boolean` | | | `message` | `string` | A fixed sentence naming the kind of failure; absent when healthy. | | `detail` | `string` | The cause when the server knows it; never an address, user or secret. | ## InvalidDatasourceError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"invalid_datasource"` | | | `fields` (required) | array of `object` | | ## RestrictedContentError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | Names the datasource and says to use a folder only Admins can read. | | `code` (required) | `"restricted_content"` | | | `datasource` (required) | `string` | The uid of the Admins-only datasource the content reads. | | `items` | array of `object` | The content that blocks the change, when the change is to a folder or a datasource rather than to one piece of content. At most 20 items. | | `unlisted` | `integer` | How many more items that block the change are not in `items`; 0 when the list is complete, absent when `items` is. | | `hidden` | `integer` | How many more items that block a datasource change are in people's My Dashboards, which nobody else can open; absent when there are none. | ## DatasourceInUseError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"datasource_in_use"` | | | `used_by` (required) | array of `object` | | | `hidden` (required) | `integer` | How many more dashboards and saved searches use it in folders the caller cannot see. | ## MetricName | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `type` | `string` | | | `help` | `string` | | | `unit` | `string` | | | `table` | `string` | | ## DatasourceTables | Field | Type | Description | | --- | --- | --- | | `tables` (required) | array of `object` | | | `truncated` (required) | `boolean` | | | `truncated_by` | `"bytes"`, `"limit"` | | | `next_offset` | `integer` | | ## DatasourceColumns | Field | Type | Description | | --- | --- | --- | | `table` (required) | `string` | | | `columns` (required) | array of `object` | | | `truncated` (required) | `boolean` | | | `truncated_by` | `"bytes"`, `"limit"` | | | `next_offset` | `integer` | | ## DatasourceSpanSchema | Field | Type | Description | | --- | --- | --- | | `datasource` (required) | `string` | | | `columns` (required) | array of `string` | | | `rows` (required) | array of array of any | | | `attributes` (required) | array of `string` | | | `truncated` | `boolean` | | ## DatasourceSample | Field | Type | Description | | --- | --- | --- | | `table` (required) | `string` | | | `columns` (required) | array of `string` | | | `rows` (required) | array of array of any | | | `truncated` | `boolean` | | ## Author | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"service_account"` | | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `email` | `string` | | ## Actor Who made a change, as people see it. Display only, never used for access decisions. | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"service_account"` | | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | | | `client` (required) | `string` or `null` | The MCP client's display name, such as `Claude Code`, when `origin` is `mcp` and the client named itself; else null. | | `run_id` (required) | `string` (uuid) or `null` | The agent request when the built-in agent made the change for this person or key; else null. | | `label` (required) | `string` | The one display text: the name; `<name> (via <client>)` over MCP, `(via MCP)` when the client sent no name; `Observe Agent for <name>` when the built-in agent acted. | ## ActivityType One of `dashboard.created`, `dashboard.version_created`, `dashboard.restored`, `dashboard.moved`, `dashboard.deleted`, `annotation.created`, `annotation.updated`, `annotation.deleted`, `finding.created`, `finding.pinned`, `finding.moved`, `saved_search.created`, `saved_search.updated`, `saved_search.moved`, `saved_search.deleted`, `observation.created`, `observation.updated`, `observation.moved`, `observation.deleted`, `observation.resolved`, `observation.reopened`, `observation.published`, `observation.rca_withdrawn`, `observation.block_added`, `observation.block_updated`, `observation.block_kept`, `observation.block_discarded`, `observation.block_removed`, `proposal.opened`, `proposal.updated`, `proposal.merged`, `proposal.discarded`, `thread.opened`, `thread.replied`, `thread.edited`, `thread.deleted`, `thread.resolved`, `thread.reopened`, `thread.mentioned`, `run.queued`, `run.started`, `run.succeeded`, `run.failed`, `run.canceled`, `run.canceling`, `run.released`, `run.kept`, `public_link.created`, `public_link.revoked`, `access_request.opened`, `access_request.granted`, `user.role_changed`, `user.signed_out_everywhere`, `user.invited`, `user.invite_updated`, `user.invite_withdrawn`, `user.deactivated`, `user.reactivated`, `user.removed`, `service_account.created`, `service_account.updated`, `service_account.deleted`, `service_account.key_created`, `service_account.key_revoked`, `webhook.created`, `webhook.updated`, `webhook.secret_rotated`, `webhook.deleted`, `mcp_client.connected`, `mcp_client.disconnected`, `outbound_domain.added`, `outbound_domain.removed`, `grafana_connection.created`, `grafana_connection.updated`, `grafana_connection.deleted`, `datasource.created`, `datasource.updated`, `datasource.audience_changed`, `datasource.deleted`. ## ActivityEvent One entry of the activity log. | Field | Type | Description | | --- | --- | --- | | `seq` (required) | `integer` (int64) | The event's id; `Last-Event-ID` of the stream takes it. | | `type` (required) | [`ActivityType`](/docs/reference/api/schemas/#activitytype) | | | `target` (required) | `object` | | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the event belongs to; it may no longer exist. | | `folder_id` (required) | `string` (uuid) or `null` | The folder that decides who sees the event; null for an event with no folder, which only its actor and Admins see. | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `data` (required) | `object` | Ids, numbers, enums, titles and the version summary of the change, by type as `listActivity` lists; never body text. | | `created_at` (required) | `string` (date-time) | | ## ActivityList | Field | Type | Description | | --- | --- | --- | | `activity` (required) | array of [`ActivityEvent`](/docs/reference/api/schemas/#activityevent) | At most 100 items. | | `next_cursor` (required) | `string` or `null` | | ## AccessRequest A request for Comment access to a dashboard or observation. | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `object` (required) | `object` | | | `folder` (required) | `object` | The folder the object is in. | | `requested_by` (required) | `object` | | | `note` (required) | `string` | The requester's one-line note, empty when they wrote none. | | `created_at` (required) | `string` (date-time) | | ## InboxItem An activity event as `listActivity` returns it, with why it is in the inbox and whether it is unread. | Field | Type | Description | | --- | --- | --- | | `seq` (required) | `integer` (int64) | | | `type` (required) | [`ActivityType`](/docs/reference/api/schemas/#activitytype) | | | `target` (required) | `object` | | | `dashboard_id` (required) | `string` (uuid) or `null` | | | `folder_id` (required) | `string` (uuid) or `null` | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `data` (required) | `object` | | | `created_at` (required) | `string` (date-time) | | | `reason` (required) | `"proposal"`, `"requested_block"`, `"mention"`, `"reply"`, `"run_failed"`, `"repaired"`, `"proposal_closed"`, `"access_request"` or `null` | The first rule the event matches, or null in the `everything` view when it matches none. | | `unread` (required) | `boolean` | | | `target_title` (required) | `string` or `null` | The title of the dashboard, observation or proposal the event is about, or null when it has none, no longer exists, or the caller can no longer read it. | | `excerpt` (required) | `string` or `null` | The start of the comment for a `mention` or `reply`, with each mention shown as `@Name`, the error of a failed run, or the note of an `access_request`, as plain text of at most 200 characters; null for other items, and for a comment in a thread the caller can no longer read. | | `question` (required) | `string` or `null` | The first line of the thread message an agent run answered, cut to a title of at most 60 characters, on a `thread.replied` item the run wrote; null for every other item, when that message is gone, and when the caller cannot read the thread. | ## InboxList | Field | Type | Description | | --- | --- | --- | | `items` (required) | array of [`InboxItem`](/docs/reference/api/schemas/#inboxitem) | At most 100 items. | | `next_cursor` (required) | `string` or `null` | | | `unread_count` (required) | `integer` | How many `for_you` items are unread, at most 100; 100 means 100 or more. Between 0 and 100. | ## SearchSnippetSegment | Field | Type | Description | | --- | --- | --- | | `text` (required) | `string` | | | `match` (required) | `boolean` | True when the text is one of the matched words; render it as plain text, never as HTML. | ## SearchResultFolder The folder the result is read through. | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | ## SearchTarget What a comment is on; null for every other kind. | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"dashboard"`, `"annotation"`, `"observation"` | | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | ## SearchResult | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"dashboard"`, `"annotation"`, `"observation"`, `"comment"`, `"saved_search"` | | | `id` (required) | `string` (uuid) | The id of the object, or of the message for a comment. | | `title` (required) | `string` | The object's title; for a comment, the title of what it is on; for an annotation, the first line of its text. | | `snippet` (required) | array of [`SearchSnippetSegment`](/docs/reference/api/schemas/#searchsnippetsegment) | Up to two fragments of the object's text around the matched words, at most 300 characters in all; empty when the object has no text. At most 20 items. | | `url` (required) | `string` or `null` | The page that shows the object; a comment points at what it is on. Null for an annotation that is on no dashboard. | | `folder` (required) | [`SearchResultFolder`](/docs/reference/api/schemas/#searchresultfolder) | | | `target` (required) | [`SearchTarget`](/docs/reference/api/schemas/#searchtarget) | | | `thread_id` (required) | `string` (uuid) or `null` | The thread of a comment; null for every other kind. | | `updated_at` (required) | `string` (date-time) | When the object last changed; for a comment, when it was written or last edited. | ## SearchResultList | Field | Type | Description | | --- | --- | --- | | `results` (required) | array of [`SearchResult`](/docs/reference/api/schemas/#searchresult) | At most 50 items. | | `next_cursor` (required) | `string` or `null` | | ## Creator Who made version 1 of the dashboard. It never changes. | Field | Type | Description | | --- | --- | --- | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where version 1 came from; null for dashboards created before origins were recorded. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's name when `origin` is `mcp`, else null. | | `via` (required) | `"direct"`, `"agent"` | `agent` when the agent saved version 1; `author` is then the person or key that asked. | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | ## DashboardFolder | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `general` (required) | `boolean` | True for the General folder. | | `personal` (required) | `boolean` | True when the dashboard is in a personal folder. | ## DashboardSummary | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `tags` (required) | array of `string` | | | `latest_version` (required) | `integer` | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `updated_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `creator` (required) | [`Creator`](/docs/reference/api/schemas/#creator) | | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | | `provisioned` (required) | `boolean` | True for a starter dashboard the server keeps current with each release, such as those in the Audit folder. Its `permissions.edit` is false, every change to its content answers 409 `provisioned`, and duplicating it makes an ordinary editable dashboard. | ## HomeDashboard | Field | Type | Description | | --- | --- | --- | | `status` (required) | `"none"`, `"ok"`, `"gone"`, `"unreadable"` | `none` when no home dashboard is set, `ok` when it opens, `gone` when the dashboard was deleted and `unreadable` when the person can no longer see it. | | `dashboard` (required) | `object` or `null` | Set only when `status` is `ok`. | | `set_at` (required) | `string` (date-time) or `null` | When the person chose it; null when `status` is `none`. | ## DashboardListItem | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `description` (required) | `string` or `null` | The latest version's Spec description; null when it has none. | | `tags` (required) | array of `string` | | | `latest_version` (required) | `integer` | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `updated_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `creator` (required) | [`Creator`](/docs/reference/api/schemas/#creator) | | | `datasource_uids` (required) | array of `string` | The distinct datasource uids the latest version uses, sorted. | | `open_comment_count` (required) | `integer` | Open comment threads on the dashboard; replies are not counted. | | `view_count` (required) | `integer` | Person-days on which someone opened the dashboard in the last 30 UTC days, today included. | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | | `provisioned` (required) | `boolean` | True for a starter dashboard the server keeps current with each release. Its `permissions.edit` is false, so a list never offers to move or change it. | ## VersionMeta | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | | | `parent_version` (required) | `integer` or `null` | | | `restored_from` (required) | `integer` or `null` | | | `summary` (required) | `string` | | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `created_at` (required) | `string` (date-time) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where the save came from; `web` is a signed-in browser, `cli` the observe CLI, `mcp` an MCP client, `api` any other bearer-key caller. A version saved by the agent records the origin of the request that asked for it. Null for versions saved before origins were recorded. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's self-reported `clientInfo.name` (for example `claude-code`), only when `origin` is `mcp`; unverified. | | `agent_request_id` (required) | `string` (uuid) or `null` | The agent request that saved this version; null for a version saved directly. | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `merged_proposal_id` (required) | `string` (uuid) or `null` | The proposal whose merge saved this version; null for any other version. | ## Version | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | | | `parent_version` (required) | `integer` or `null` | | | `restored_from` (required) | `integer` or `null` | | | `summary` (required) | `string` | | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `created_at` (required) | `string` (date-time) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where the save came from; `web` is a signed-in browser, `cli` the observe CLI, `mcp` an MCP client, `api` any other bearer-key caller. A version saved by the agent records the origin of the request that asked for it. Null for versions saved before origins were recorded. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's self-reported `clientInfo.name` (for example `claude-code`), only when `origin` is `mcp`; unverified. | | `agent_request_id` (required) | `string` (uuid) or `null` | The agent request that saved this version; null for a version saved directly. | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `merged_proposal_id` (required) | `string` (uuid) or `null` | The proposal whose merge saved this version; null for any other version. | | `spec` (required) | `object` | The ObserveSpec document, validated against its own schema. | | `unverified` (required) | [`Unverified`](/docs/reference/api/schemas/#unverified) | | ## Unverified Panels and variables of this version whose queries failed when it was saved but were kept: a Grafana import keeps every failing panel and variable, and a later save keeps one only while it stays unchanged (see `POST /dashboards/{id}/versions`). A starter dashboard leaves out the panels and variables that only returned no data, since its own panels are checked by people through health and an empty result there is not a defect; its copies list them like any dashboard. | Field | Type | Description | | --- | --- | --- | | `panels` (required) | array of [`UnverifiedPanel`](/docs/reference/api/schemas/#unverifiedpanel) | | | `variables` (required) | array of [`UnverifiedVariable`](/docs/reference/api/schemas/#unverifiedvariable) | | ## UnverifiedPanel | Field | Type | Description | | --- | --- | --- | | `panel_id` (required) | `string` | | | `issues` (required) | array of [`Issue`](/docs/reference/api/schemas/#issue) | | ## UnverifiedVariable | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `issues` (required) | array of [`Issue`](/docs/reference/api/schemas/#issue) | | ## DashboardWithVersion | Field | Type | Description | | --- | --- | --- | | `dashboard` (required) | [`DashboardSummary`](/docs/reference/api/schemas/#dashboardsummary) | | | `version` (required) | [`Version`](/docs/reference/api/schemas/#version) | | ## DashboardVersionSaved | Field | Type | Description | | --- | --- | --- | | `dashboard` (required) | [`DashboardSummary`](/docs/reference/api/schemas/#dashboardsummary) | | | `version` (required) | [`Version`](/docs/reference/api/schemas/#version) | | | `merged_from` | [`MergedFrom`](/docs/reference/api/schemas/#mergedfrom) | | ## MergedFrom Present when a stale save was merged on the server. | Field | Type | Description | | --- | --- | --- | | `base_version` (required) | `integer` | The `parent_version` the caller sent. | | `onto_version` (required) | `integer` | The latest version the save was merged onto. | ## SpecChange | Field | Type | Description | | --- | --- | --- | | `op` (required) | `"add"`, `"remove"`, `"replace"`, `"reorder"` | | | `path` (required) | `string` | JSON Pointer into the Spec document; the empty string is the whole document. | | `from` | any or `null` | The previous JSON value at the path. | | `to` | any or `null` | The new JSON value at the path. | ## VersionConflict | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `string` | | | `latest_version` (required) | `integer` | | | `conflicts` | array of [`MergeConflict`](/docs/reference/api/schemas/#mergeconflict) | Present when a save asked for `merge: auto` and the newer versions changed the same panels, variables or settings. | ## MergeConflict | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"panel"`, `"variable"`, `"setting"` | | | `id` (required) | `string` | | | `reason` (required) | `"both_changed"`, `"changed_and_removed"`, `"invalid"` | | | `message` (required) | `string` | | ## ProposalSummary A proposed change to a dashboard, without its document. | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `state` (required) | `"open"`, `"merged"`, `"discarded"` | | | `title` (required) | `string` | The summary of the head revision, cut to 200 characters; it changes when the author saves again with a summary. | | `revision` (required) | `integer` | The head revision; every save by the author while the proposal is open adds one. | | `base_version` (required) | `integer` | The version of the dashboard the head revision builds on. | | `summary` (required) | `string` | The head revision's summary. | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | | | `origin_client` (required) | `string` or `null` | | | `run_id` (required) | `string` (uuid) or `null` | The agent request whose saves the proposal holds; null for a proposal made by a person or an MCP client. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `closed_at` (required) | `string` (date-time) or `null` | | | `closed_by` (required) | [`Author`](/docs/reference/api/schemas/#author) or `null` | Who merged or discarded the proposal; null while it is open. | | `close_reason` (required) | `string` or `null` | Why the proposal was discarded, when the person or agent who discarded it gave a reason; null otherwise and always null for a merged proposal. | | `merged_version` (required) | `integer` or `null` | The version the merge saved; null while the proposal is open or discarded, and for a merge whose change was already in the dashboard. | | `behind` (required) | `boolean` | True when `latest_version` is newer than `base_version`. Computed on every read. | | `latest_version` (required) | `integer` | | | `allowed_actions` (required) | array of `"update"`, `"merge"`, `"discard"` | What the caller may do now. `update` means saving again to add a revision and has no route of its own; `merge` needs Edit on the dashboard and a connection that is not in propose mode; `discard` is for the author or someone who may merge. See docs/reference/states.md. | ## Proposal A proposed change to a dashboard with its head revision's document and what it changes. | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `state` (required) | `"open"`, `"merged"`, `"discarded"` | | | `title` (required) | `string` | The summary of the first revision, cut to 200 characters. | | `revision` (required) | `integer` | The head revision; every save by the author while the proposal is open adds one. | | `base_version` (required) | `integer` | The version of the dashboard the head revision builds on. | | `summary` (required) | `string` | The head revision's summary. | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | | | `origin_client` (required) | `string` or `null` | | | `run_id` (required) | `string` (uuid) or `null` | The agent request whose saves the proposal holds; null for a proposal made by a person or an MCP client. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `closed_at` (required) | `string` (date-time) or `null` | | | `closed_by` (required) | [`Author`](/docs/reference/api/schemas/#author) or `null` | Who merged or discarded the proposal; null while it is open. | | `close_reason` (required) | `string` or `null` | Why the proposal was discarded, when the person or agent who discarded it gave a reason; null otherwise and always null for a merged proposal. | | `merged_version` (required) | `integer` or `null` | The version the merge saved; null while the proposal is open or discarded, and for a merge whose change was already in the dashboard. | | `behind` (required) | `boolean` | True when `latest_version` is newer than `base_version`. Computed on every read. | | `latest_version` (required) | `integer` | | | `allowed_actions` (required) | array of `"update"`, `"merge"`, `"discard"` | What the caller may do now. `update` means saving again to add a revision and has no route of its own; `merge` needs Edit on the dashboard and a connection that is not in propose mode; `discard` is for the author or someone who may merge. See docs/reference/states.md. | | `spec` (required) | `object` | The ObserveSpec document of the head revision. | | `changes` (required) | array of [`ProposalChange`](/docs/reference/api/schemas/#proposalchange) | What the head revision adds, changes, removes or moves compared with `base_version`. | | `diff` (required) | array of [`SpecChange`](/docs/reference/api/schemas/#specchange) | The field-level changes of the head revision against `base_version`, the same shape `GET /dashboards/{id}/diff` returns for two versions. | | `conflicts` (required) | array of [`MergeConflict`](/docs/reference/api/schemas/#mergeconflict) | While the proposal is open and behind, the units that both it and the newer versions changed, which a merge needs a choice for; empty otherwise. | ## ProposalChange | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"panel"`, `"variable"`, `"setting"` | | | `id` (required) | `string` | | | `change` (required) | `"added"`, `"changed"`, `"removed"`, `"moved"` | | ## ProposalList | Field | Type | Description | | --- | --- | --- | | `proposals` (required) | array of [`ProposalSummary`](/docs/reference/api/schemas/#proposalsummary) | At most 100 items. | | `next_cursor` (required) | `string` or `null` | | ## ProposalCreated The answer to a save that became a proposal. | Field | Type | Description | | --- | --- | --- | | `proposal_id` (required) | `string` (uuid) | | | `revision` (required) | `integer` | The revision this save added. | | `opened` (required) | `boolean` | True when the save opened the proposal, false when it added a revision to the caller's open one. | ## MergeChoice | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"panel"`, `"variable"`, `"setting"` | | | `id` (required) | `string` | | | `take` (required) | `"ours"`, `"theirs"` | `ours` keeps the dashboard's newer version of the unit, `theirs` takes the proposal's. | ## MergeProposalRequest | Field | Type | Description | | --- | --- | --- | | `revision` (required) | `integer` | The head revision the caller read; a newer one answers 409 `proposal_changed`. Between 1 and 2147483647. | | `choices` | array of [`MergeChoice`](/docs/reference/api/schemas/#mergechoice) | One choice for each unit in `conflicts`. Without it a proposal with conflicts answers 409 `version_conflict`. At most 400 items. | ## ProposalChanged | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"proposal_changed"` | | | `revision` (required) | `integer` | The proposal's head revision now. | ## Comment | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `parent_id` (required) | `string` (uuid) or `null` | The thread's first comment, for a reply; null for a thread's first comment. | | `version` (required) | `integer` | | | `panel_id` (required) | `string` or `null` | The panel the thread is on; null for the whole dashboard. A reply has its thread's panel. | | `body` (required) | `string` | | | `status` (required) | `"open"`, `"resolved"` | For a reply, the status of its thread. | | `allowed_actions` (required) | array of `"open"`, `"reply"`, `"resolve"`, `"reopen"` | What the caller may do with this thread now, on its first comment; empty on a reply. `resolve` is absent while the thread's agent run is queued or running. See docs/reference/states.md. | | `unread` (required) | `boolean` | Whether the thread, on its first comment, holds a message from someone else, or an agent run's reply, that the caller has not read; always false on a reply and for a service-account key. `POST /api/v1/threads/{thread_id}/read` clears it. | | `author` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `edited_at` (required) | `string` (date-time) or `null` | When the body was last edited; null when it never was. | | `resolved_at` (required) | `string` (date-time) or `null` | | | `resolved_by` (required) | [`Author`](/docs/reference/api/schemas/#author) or `null` | | | `resolved_actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) or `null` | Who resolved the thread, with the one `label` to show; `Observe Agent for <name>` when an agent run did. Null on a reply and on an open thread. | | `resolved_by_version` (required) | `integer` or `null` | The version that fixed the thread, when the resolver named one. Also set by the server when an agent request sent from the thread succeeds. Always null on a reply. | | `panel_present` (required) | `boolean` | Whether the latest version of the dashboard still has the panel the comment is anchored to. Always true for a whole-dashboard comment. | | `mentions` (required) | array of [`Mention`](/docs/reference/api/schemas/#mention) | The people and agents the body mentions, in the order shown. | | `can_edit` (required) | `boolean` | Whether the caller may edit this comment's body, which only its author may do and only while the caller can still comment. | | `can_delete` (required) | `boolean` | Whether the caller may delete this comment; see `can_delete` on a thread message. | | `revision` (required) | `object` or `null` | The latest revision requested for this comment, or null when none was requested. | ## Mention | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"agent"`, `"grant"`, `"service_account"` | | | `id` (required) | `string` | The user's id for a `user` mention, `observe` for the built-in agent, the connected agent's grant id for a `grant` mention and the service account's id for a `service_account` mention. | | `name` (required) | `string` | The name the mention showed when it was written. | ## CommentEnvelope | Field | Type | Description | | --- | --- | --- | | `comment` (required) | [`Comment`](/docs/reference/api/schemas/#comment) | | ## Thread | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | The thread's id, which is also the id of its first message. | | `target` (required) | `object` | | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the thread is on; null for an annotation or an observation. | | `version` (required) | `integer` or `null` | The dashboard version the thread is anchored to; null for an annotation or an observation. | | `panel_id` (required) | `string` or `null` | The panel the thread is on; null for the whole object. | | `panel_present` (required) | `boolean` | Whether the latest version of the dashboard still has the panel the thread is anchored to. Always true when there is no panel. | | `status` (required) | `"open"`, `"resolved"` | | | `allowed_actions` (required) | array of `"reply"`, `"resolve"`, `"reopen"` | What the caller may do with the thread now; empty for a caller who may not comment, and without `resolve` for a caller who can only comment on a thread someone else started. See `docs/reference/states.md`. | | `unread` (required) | `boolean` | Whether the thread holds a message from someone else, or an agent run's reply, that the caller has not read since they last opened it, answered in it or joined; always false for a service-account key. `POST /api/v1/threads/{thread_id}/read` clears it. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `resolved_at` (required) | `string` (date-time) or `null` | | | `resolved_actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) or `null` | Who resolved the thread, `Observe Agent for <name>` when an agent run did; null while it is open. | | `resolved_by_version` (required) | `integer` or `null` | The version that fixed the thread, when the resolver named one or the agent request sent from the thread succeeded. | | `revision` (required) | `object` or `null` | The latest revision requested for this thread, or null when none was requested. | | `anchor` (required) | [`Anchor`](/docs/reference/api/schemas/#anchor) or `null` | The spot the thread points at; null for a thread about the whole dashboard, panel or observation. | | `block_id` (required) | `string` (uuid) or `null` | The observation block an anchored thread points into; null otherwise, or once the block is deleted. | | `agent` (required) | `object` or `null` | The thread's agent, the one a plain reply asks; null until a message asks an agent, and cleared when that agent can no longer take runs. | | `agent_off` (required) | `boolean` | True after a message was sent to everyone; plain replies then ask no agent until a message mentions one or is sent to the agent. | ## Anchor One spot on a panel or an observation block, with the fields its kind needs. Text in it may not contain control, bidirectional override or hidden characters, the rule thread messages follow (400 `invalid_request`). | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"time"`, `"range"`, `"series"`, `"point"`, `"row"`, `"column"`, `"cell"`, `"bar"`, `"segment"`, `"heat_cell"`, `"slice"`, `"value"`, `"log_line"`, `"span"`, `"element"`, `"text"`, `"title"`, `"variable"`, `"position"` | | | `pos` (required) | `object` | Where the spot is, as fractions of the panel or block from its top left corner. | | `from` | `string` (date-time) | The time of a time, point, heat cell or log line spot, or the start of a range. | | `to` | `string` (date-time) | The end of a range. | | `series` | `object` | The labels of the series a series, point, bar, segment, value or log line spot is on. | | `row` | `object` | The cells that name a table row. | | `column` | `string` | The column of a column or cell spot. | | `category` | `string` | The category of a bar, segment, heat cell or slice spot. | | `id` | `string` | The id of a log line, span, canvas element or variable. | | `quote` | `string` | The quoted text of a text spot, or of a row, log line or span. | | `shown` | `string` | The value as the panel showed it. | | `window` | `object` | The time range the panel showed. | ## Message | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `thread_id` (required) | `string` (uuid) | | | `body` (required) | `string` | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `edited_at` (required) | `string` (date-time) or `null` | When the body was last edited; null when it never was. | | `mentions` (required) | array of [`Mention`](/docs/reference/api/schemas/#mention) | | | `can_edit` (required) | `boolean` | Whether the caller may edit this message, which only its author may do and only while the caller can still comment; false for a reply an agent run wrote. | | `can_delete` (required) | `boolean` | Whether the caller may delete this message. Its author may, while they can still comment, unless an agent run wrote it; the first message of a thread also needs that nobody else wrote in the thread. Anyone who manages the target's folder may delete any message. | | `block_id` (required) | `string` (uuid) or `null` | The block of the observation this message is about; null for the whole observation, on every other target, and after the block was deleted. | | `reply_to` (required) | `object` or `null` | The message this one answers; null when it quotes nothing or the quoted message was deleted. | | `run` | `object` or `null` | The run this message started, set on the response of a write that asked an agent and on every read of the message while that run exists; null when the message started no run, and on an edit. | | `answer` | `object` or `null` | The answer the run that wrote this reply saved, read from its finding, on a thread list only. Null for a person's message, a run that saved no answer, an answer the caller cannot read, and on every other route. The reply's `body` is only the status sentence. | | `run_refusal` | `object` or `null` | Why a write that asked an agent stored the message and started no run; null otherwise. | ## ThreadPage | Field | Type | Description | | --- | --- | --- | | `threads` (required) | array of [`Thread`](/docs/reference/api/schemas/#thread) | | | `messages` (required) | array of [`Message`](/docs/reference/api/schemas/#message) | | | `next_cursor` (required) | `string` or `null` | | | `can_comment` (required) | `boolean` | Whether the caller may start threads and write messages on the target. | ## MentionablePeople | Field | Type | Description | | --- | --- | --- | | `more` (required) | `boolean` | True when more people match than `limit` returned; narrow `q` to reach them. | | `people` (required) | array of `object` | | ## DashboardViewers | Field | Type | Description | | --- | --- | --- | | `viewers` (required) | array of `object` | At most 50 items. | ## ThreadEnvelope | Field | Type | Description | | --- | --- | --- | | `thread` (required) | [`Thread`](/docs/reference/api/schemas/#thread) | | ## ThreadMessageEnvelope | Field | Type | Description | | --- | --- | --- | | `thread` (required) | [`Thread`](/docs/reference/api/schemas/#thread) | | | `message` (required) | [`Message`](/docs/reference/api/schemas/#message) | | ## ThreadSent | Field | Type | Description | | --- | --- | --- | | `thread` (required) | [`Thread`](/docs/reference/api/schemas/#thread) | | | `message` (required) | [`Message`](/docs/reference/api/schemas/#message) | | | `to` (required) | `"agent"`, `"everyone"` | How the message was delivered; `agent` when it asked an agent, whether or not a run started. | | `replayed` (required) | `boolean` | True when `client_id` named a message already posted, which is returned as it was and starts nothing. | ## Field | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `type` (required) | `"time"`, `"number"`, `"string"`, `"bool"`, `"other"` | | | `values` (required) | array of any or `null` | Time fields hold epoch milliseconds as integers, number fields hold numbers with `null` for gaps, and `other` fields hold JSON exactly as the datasource adapter produced it. | ## Frame | Field | Type | Description | | --- | --- | --- | | `ref` (required) | `string` | The ref of the panel query that produced this frame: its written ref, or A, B, C... by position. | | `name` | `string` | | | `labels` | `object` | | | `fields` (required) | array of [`Field`](/docs/reference/api/schemas/#field) | | ## QueryMeta | Field | Type | Description | | --- | --- | --- | | `ref` (required) | `string` | | | `kind` (required) | `"range"`, `"instant"` | | | `step_ms` (required) | `integer` | The query's resolution; 0 for an instant query. | | `executed` | `string` | The query text as it went to the datasource, after variables, macros and the dashboard's ad hoc filters and group by were applied; absent for an expression query and when the response was built before the server kept it. | | `exemplars` | `"ok"`, `"truncated"`, `"unavailable"`, `"unsupported"` | Present only when the query asked for exemplars (`exemplar: true` on a Prometheus range query, on the panel data and preview routes). `ok` has all of them, `truncated` has the 2,000 newest after thinning to one per step, `unavailable` means the exemplar call failed or timed out and the panel still succeeded, and `unsupported` means the datasource or the query kind has no exemplars. | ## DataMeta | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"range"`, `"instant"` | range when any visible query runs as a range query, which also decides how from and to are aligned. | | `from` (required) | `string` (date-time) | The start of the aligned range the query ran over. | | `to` (required) | `string` (date-time) | The end of the aligned range the query ran over. | | `step_ms` (required) | `integer` | The panel's resolution; 0 for an instant panel. | | `queries` (required) | array of [`QueryMeta`](/docs/reference/api/schemas/#querymeta) | Every query that ran, in panel order; hidden queries do not run. | | `cached` (required) | `boolean` | True when the response was served from the proxy's response cache instead of running the query. | | `executed_at` (required) | `string` (date-time) | When the query ran upstream, which for a cached response is earlier than the request. | | `source_panel` | `string` | The id of the panel whose queries ran, present only when the requested panel reuses another panel's results; the frames, queries and range are that panel's, and its transforms apply first when the reusing query sets withTransforms. | | `truncated` (required) | `boolean` | True when a query stopped at its row limit, so more rows exist in the range. | | `partial` (required) | `boolean` | True when a datasource answered without covering the whole range, such as Tempo searching only some of its blocks, or when a time series or trend panel returned only its highest series (see series_total). | | `series_shown` | `integer` | How many series the panel's data holds after the cap; present only when the cap dropped some. | | `series_total` | `integer` | How many series the panel's queries returned before the cap of 50 per query kept the highest peaks; present only when the cap dropped some, and then note says so. | | `warning` | `string` | The datasource's own text for why the answer is partial, such as a Prometheus warning that a store did not answer; present only when it gave one. | | `hint` | `string` | One plain sentence that says why a search returned no rows when the datasource can tell, present only on an empty Elasticsearch or OpenSearch result whose KQL query asks for a keyword value that no document has in the range: it names the value and the values the field does have, and says when one differs only by letter case, because keyword values are case sensitive. | | `note` | `string` | One plain sentence that says why a result is incomplete and how to get more, present only when `truncated` or `partial` is true or a page has a next page: read the next page with `page.next` as `cursor`, repeat an instant query of a logs or trace datasource with `page_size`, narrow `from` and `to`, or add a filter. Only the explore instant query and the MCP tool `query_instant` offer `page_size`, so the other responses name only narrowing. | | `rows` (required) | `integer` | The rows across all frames (log lines, traces, spans, table rows); an instant query counts one row per sample, so a vector of series counts one row per series, and a range query of series data counts 0. | | `rows_total` | `integer` | Present only when the datasource reports how many rows matched in the range. | | `oldest` | `string` (date-time) | The smallest value of the first time field across all frames, RFC 3339 UTC with nanoseconds; absent when no frame has a time field or no rows. To load older rows, repeat the request with `to` set to it. | | `newest` | `string` (date-time) | The largest value of the first time field across all frames, RFC 3339 UTC with nanoseconds; absent when no frame has a time field or no rows. To load newer rows, repeat the request with `from` set to it. | | `jobs_done` | `integer` | Tempo search jobs completed for this response; present only on Tempo search results. | | `jobs_total` | `integer` | Tempo search jobs planned for this response; when jobs_done is lower the result is partial and the window the finished jobs covered is unknown. | | `inspected_bytes` | `integer` | Bytes Tempo read for the search; present only on Tempo search results. | | `elapsed_ms` | `integer` | Wall time in milliseconds of the upstream run that produced the data; a cached response repeats the value of the run that filled the cache, like executed_at. | | `bytes` | `integer` | Size in bytes of the upstream trace payload on a Tempo trace read; absent on ClickHouse and on explore. | | `page` | [`PageMeta`](/docs/reference/api/schemas/#pagemeta) | | ## PageMeta Present when the request paged; `meta.truncated` is then false and `page.total` replaces `rows_total`. | Field | Type | Description | | --- | --- | --- | | `page` (required) | `integer` | The page read; with a cursor, the page the cursor named. | | `page_size` (required) | `integer` | Between 50 and 500. | | `total` | `integer` | The rows that match, as `total_relation` qualifies it; absent when the relation is `unknown`. | | `total_relation` (required) | `"eq"`, `"gte"`, `"unknown"` | `eq` is exact (ClickHouse counts; Loki and Tempo on the last page), `gte` means at least this many (Loki and Tempo while more pages exist), and `unknown` means the store could not count, such as a partial Tempo search. | | `has_next` (required) | `boolean` | | | `has_prev` (required) | `boolean` | True on every page past the first. | | `next` | `string` | The opaque cursor of the next page, present whenever `has_next` on Loki and Tempo; ClickHouse sends one too, and Elasticsearch and OpenSearch page by `page` and never send it. | | `prev` | `string` | The cursor that produced this page, present when `page` is above 1; a client that walks back further keeps the chain of cursors it received. | | `window` | `integer` | The largest row offset this store pages to, present only on stores with such a cap, such as an Elasticsearch index's `max_result_window`; a numbered page past it is refused. | | `plain` | `boolean` | True when the rows are a plain table, not log lines, such as a ClickHouse result with no `Timestamp` column; a client shows them as a table and has no volume to draw. | ## PanelDataError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `string` | | | `ref` | `string` | The query that failed, when one query's run failed. | ## LogVolume | Field | Type | Description | | --- | --- | --- | | `step_ms` (required) | `integer` | The width of every bucket in milliseconds, a whole number of seconds and at least one. | | `total` (required) | `integer` | The sum of every count in every bucket. | | `buckets` (required) | array of [`LogVolumeBucket`](/docs/reference/api/schemas/#logvolumebucket) | Every bucket of the aligned range, oldest first, empty buckets included. | | `partial` (required) | `boolean` | Whether the datasource ran out of time before it counted the whole range; the buckets before `counted_from` were not counted and read zero. | | `counted_from` | `string` (date-time) | Present only when `partial` is true, the start of the oldest bucket that was counted, or the end of the range when nothing was. | ## LogVolumeBucket | Field | Type | Description | | --- | --- | --- | | `start` (required) | `string` (date-time) | The bucket covers this instant up to, but not including, `start` plus `step_ms`. | | `error` (required) | `integer` | | | `warning` (required) | `integer` | | | `info` (required) | `integer` | | | `other` (required) | `integer` | | ## LogFacets | Field | Type | Description | | --- | --- | --- | | `sampled` (required) | `boolean` | Whether a sample of the newest lines was read for the fields the datasource cannot count exactly. | | `lines_sampled` (required) | `integer` | The lines the sample held, 0 when none was read. | | `fields` (required) | array of `object` | Exact fields first, then by cardinality ascending, then by name. | | `truncated` (required) | `boolean` | More fields exist than the 50 returned. | ## TraceStats | Field | Type | Description | | --- | --- | --- | | `step_ms` (required) | `integer` | The width of every bucket in milliseconds, a whole number of seconds and at least one. | | `partial` (required) | `boolean` | True when Tempo did not search every block, so the counts are a lower bound; always false on ClickHouse. | | `spans` (required) | `integer` | The sum of every bucket's spans. | | `errors` (required) | `integer` | The sum of every bucket's errors. | | `buckets` (required) | array of [`TraceStatsBucket`](/docs/reference/api/schemas/#tracestatsbucket) | Every bucket of the aligned range, oldest first, empty buckets included. | | `histogram` (required) | array of [`DurationBucket`](/docs/reference/api/schemas/#durationbucket) | The duration distribution of every matched span, ascending by `le_ms`, empty when nothing matched. | ## TraceStatsBucket | Field | Type | Description | | --- | --- | --- | | `start` (required) | `string` (date-time) | The bucket covers this instant up to, but not including, `start` plus `step_ms`. | | `spans` (required) | `integer` | | | `errors` (required) | `integer` | | | `p50_ms` (required) | `number` or `null` | The median span duration in milliseconds, null when the bucket has no spans. | | `p95_ms` (required) | `number` or `null` | | | `p99_ms` (required) | `number` or `null` | | ## DurationBucket | Field | Type | Description | | --- | --- | --- | | `le_ms` (required) | `number` | The upper edge of the bucket in milliseconds; the bucket holds the spans whose duration is at most this value and above the previous edge. | | `count` (required) | `integer` | | ## TraceCompare | Field | Type | Description | | --- | --- | --- | | `selected` (required) | [`TraceCompareSet`](/docs/reference/api/schemas/#tracecompareset) | | | `baseline` (required) | [`TraceCompareSet`](/docs/reference/api/schemas/#tracecompareset) | | | `attributes` (required) | `integer` | The number of distinct attribute names seen across both sets. | | `partial` (required) | `boolean` | True when fewer traces were read than requested in either set, because a trace was not found in the range or the deadline cut the read. | | `differences` (required) | array of [`TraceDifference`](/docs/reference/api/schemas/#tracedifference) | The attribute values whose shares differ by at least 0.1, ranked by the gap, then attribute, then value. | | `truncated` (required) | `boolean` | True when more pairs passed the threshold than `limit` allowed. | ## TraceCompareSet | Field | Type | Description | | --- | --- | --- | | `requested` (required) | `integer` | The distinct trace ids sent. | | `read` (required) | `integer` | The traces whose spans were read. | ## TraceDifference | Field | Type | Description | | --- | --- | --- | | `attribute` (required) | `string` | `name`, `kind`, `status`, `resource.<key>` or `span.<key>`. | | `value` (required) | `string` | The value as text, cut to 256 bytes. | | `selected_share` (required) | `number` | The share of read selected traces with a span carrying the pair, rounded to 4 decimals. Between 0 and 1. | | `baseline_share` (required) | `number` | The share of read baseline traces with a span carrying the pair, rounded to 4 decimals. Between 0 and 1. | | `selected_count` (required) | `integer` | | | `baseline_count` (required) | `integer` | | ## LogContext | Field | Type | Description | | --- | --- | --- | | `anchor` (required) | `string` | The `TimeNs` of the request. | | `before` (required) | [`LogContextSide`](/docs/reference/api/schemas/#logcontextside) | | | `after` (required) | [`LogContextSide`](/docs/reference/api/schemas/#logcontextside) | | ## LogContextSide | Field | Type | Description | | --- | --- | --- | | `frames` (required) | array of [`Frame`](/docs/reference/api/schemas/#frame) | The lines of this side in the panel data frame shape, every frame with `ref` `A` and a `TimeNs` string field beside `Time`. | | `truncated` (required) | `boolean` | More lines exist in the window on this side than were asked for. | ## LogPatterns | Field | Type | Description | | --- | --- | --- | | `source` (required) | `"loki"`, `"elasticsearch"`, `"server"` | `loki` when Loki's pattern index answered, `elasticsearch` when the cluster's `categorize_text` aggregation answered, `server` when the patterns were computed from a sample of the newest lines. | | `lines_sampled` (required) | `integer` | The lines the server read to compute the patterns; 0 when the datasource's index answered. | | `lines_matched` (required) | `integer` | The sum of every pattern's count, before the `limit` cut. | | `patterns` (required) | array of [`LogPattern`](/docs/reference/api/schemas/#logpattern) | The top patterns by count descending, then by pattern. | | `truncated` (required) | `boolean` | More patterns exist than `limit`. | ## LogPattern | Field | Type | Description | | --- | --- | --- | | `pattern` (required) | `string` | The line template, with every variable token written `<*>`. | | `count` (required) | `integer` | The lines the pattern covers, over the range from Loki's index or within the sample. | | `sample` (required) | `string` | The newest sampled line of the pattern; empty when the index answered. | | `first` (required) | `string` | RFC 3339 time of the first sample bucket or oldest sampled line; empty when the time is unknown. | | `last` (required) | `string` | RFC 3339 time of the last sample bucket or newest sampled line; empty when the time is unknown. | | `trend` (required) | array of [`LogPatternTrendBucket`](/docs/reference/api/schemas/#logpatterntrendbucket) | Exactly 30 buckets of equal width covering the range from `from` to `to`, the first starting at `from`; empty buckets are present with a `count` of 0. At most 30 items. | | `level` (required) | `"error"`, `"warning"`, `"info"`, `"other"`, `""` | On `loki` the first level word in the pattern, on `server` the level most of the pattern's sampled lines carry; empty when there is none. | ## LogPatternTrendBucket | Field | Type | Description | | --- | --- | --- | | `start` (required) | `string` | RFC 3339 start of the bucket. | | `count` (required) | `integer` | The lines of the pattern in the bucket. | ## PanelData | Field | Type | Description | | --- | --- | --- | | `frames` (required) | array of [`Frame`](/docs/reference/api/schemas/#frame) | | | `exemplars` | array of [`Frame`](/docs/reference/api/schemas/#frame) | Present only when at least one query asked for exemplars, and then possibly empty. Each frame is one series' exemplars, its `ref` naming the query and its `labels` the series labels; the fields are `Time` (epoch milliseconds), `Value`, then one string field per exemplar label key. | | `meta` (required) | [`DataMeta`](/docs/reference/api/schemas/#datameta) | | ## VariableValues | Field | Type | Description | | --- | --- | --- | | `values` (required) | array of `string` | The values a selection may hold. | | `texts` | array of `string` | The display text of each value, same length and order as values; present only when some text differs from its value. | | `truncated` (required) | `boolean` | | | `cached` (required) | `boolean` | True when the list was served from the proxy's response cache instead of running the query. | ## Diagnostic | Field | Type | Description | | --- | --- | --- | | `severity` (required) | `"error"`, `"warning"` | | | `message` (required) | `string` | | | `start` (required) | `integer` | Byte offset of the first byte the diagnostic covers. | | `end` (required) | `integer` | Byte offset just past the last byte the diagnostic covers. | ## LintResult | Field | Type | Description | | --- | --- | --- | | `diagnostics` (required) | array of [`Diagnostic`](/docs/reference/api/schemas/#diagnostic) | | ## Revision | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `intent` (required) | `"apply"` | Always `apply`; the new-dashboard request that created the dashboard is the one with a null `base_version`, and it appears once it has succeeded. | | `investigation` (required) | `boolean` | Always false; a version is saved by an apply run, never by an investigation. | | `comment_id` (required) | `string` (uuid) or `null` | The comment that requested the revision; null for a prompt, or after the comment was deleted. | | `panel_id` (required) | `string` or `null` | The panel the request is about (a comment's panel, or the panel a prompt was sent from); null for the whole dashboard. | | `prompt` (required) | `string` | The follow-up text, or the comment body; empty when `redacted`. | | `base_version` (required) | `integer` or `null` | The version the requester was looking at; null for the `observe` request that created the dashboard. The agent revises the latest version. | | `status` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | | | `state` (required) | `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | Where the request is in its life: `queued`, `running`, `canceling` (the requester canceled it and its worker is stopping), `succeeded`, `failed` or `canceled`. `status` keeps its four values; a `canceling` request has status `running`, and a `canceled` one has status `failed` with the failure code `canceled`. The moves between states are in `docs/reference/states.md`. | | `result_kind` (required) | `"none"`, `"version"`, `"partial_version"`, `"proposal"`, `"suggestion"`, `"observation"`, `"answer"` | What the request left behind: `none`, `version` (a saved dashboard version), `partial_version` (the requester kept the build of a stopped request as a version), `proposal` (reserved), `suggestion`, `observation` (a finding written into an observation, which `observation_id` names) or `answer` (a finding kept on the run with `observation_id` null until its requester saves it with `POST /observe/{id}/observation`, which turns it into `observation`). A finding wins over a version. | | `attempts` (required) | `integer` | Between 0 and 2. | | `allowed_actions` (required) | array of `"cancel"`, `"keep_build"`, `"continue"`, `"retry"`, `"pin"`, `"archive"` | What the caller may do with the revision now, in display order and by the same rule as `AgentRequest.allowed_actions`. `retry` is offered to anyone who can see a finished revision and may start that kind of request, not only the requester; every other action is the requester's. | | `result_version` (required) | `integer` or `null` | The version the revision saved, set when the status is `succeeded` unless the agent answered with a finding. | | `error` (required) | `string` or `null` | Why the revision failed, set when the status is `failed`. | | `failure_code` (required) | `string` or `null` | Why the request failed, as one code (the codes of `AgentRequest.failure_code`), set when the status is `failed` and null otherwise. Clients must tolerate codes they do not know. | | `build` (required) | [`AgentBuildProgress`](/docs/reference/api/schemas/#agentbuildprogress) or `null` | Progress of the build the agent assembles for this request, null when there is none. | | `build_saved_at` (required) | `string` (date-time) or `null` | When the requester saved the stopped build of a `failed` request as a version; null otherwise. | | `continues_id` (required) | `string` (uuid) or `null` | The stopped request this one continues. | | `continued_by` (required) | `string` (uuid) or `null` | The request that continues this one; its build moved there. | | `retried_by` (required) | `string` (uuid) or `null` | The request that retried this failed or stopped one. It cannot be retried again, so a second retry is refused instead of making a duplicate. | | `continue_note` (required) | `string` or `null` | The note given when continuing a stopped request, null when none was given or this request continues nothing. | | `redacted` (required) | `boolean` | True when the request came from someone's private chat and the caller is neither its requester nor an Admin: `prompt` is then empty and `continue_note` and `error` null, while the status, times, requester, kind, `failure_code` and saved version stay. | | `requested_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where the request came from; `web` is a signed-in browser, `cli` the observe CLI, `mcp` an MCP client, `api` any other bearer-key caller. Null for requests made before origins were recorded. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's self-reported `clientInfo.name` (for example `claude-code`), only when `origin` is `mcp`; unverified. | | `created_at` (required) | `string` (date-time) | | | `started_at` (required) | `string` (date-time) or `null` | | | `finished_at` (required) | `string` (date-time) or `null` | | ## RevisionEnvelope | Field | Type | Description | | --- | --- | --- | | `revision` (required) | [`Revision`](/docs/reference/api/schemas/#revision) | | ## SuggestionEnvelope | Field | Type | Description | | --- | --- | --- | | `suggestion` (required) | [`Suggestion`](/docs/reference/api/schemas/#suggestion) | | ## Suggestion | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `panel_id` (required) | `string` | The panel the agent was asked to change. | | `base_version` (required) | `integer` | The version the proposal is judged inside. | | `prompt` (required) | `string` | | | `status` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | | | `steps` (required) | array of [`AgentStep`](/docs/reference/api/schemas/#agentstep) | At most 2000 items. | | `panel` (required) | `object` or `null` | The proposed panel, set only when the status is `succeeded`. It is not saved anywhere; the client decides whether to apply it. | | `error` (required) | `string` or `null` | Why the suggestion failed, set only when the status is `failed`. | | `failure_code` (required) | `string` or `null` | Why the suggestion failed, as one code, set when the status is `failed` and null otherwise. One of `run_timeout`, `call_timeout`, `rate_limited`, `provider_error`, `output_limit`, `no_tool_call`, `refused`, `validation_exhausted`, `conflict`, `invalid_task`, `not_found`, `draft_invalid`, `canceled`, `load_failed`, `context_failed`, `tool_failed`, `result_too_large`, `tool_panicked`, `malformed_result`, `internal`, `no_fixture`, `requester_gone`, `requester_forbidden`, `check_failed`, `crashed`, `no_suggestion`, `no_finding`, `lease_expired`, `no_progress`, `agent_unavailable`, `agent_failed` or `budget_exhausted`. Clients must tolerate codes they do not know. | | `usage` (required) | [`AgentUsage`](/docs/reference/api/schemas/#agentusage) or `null` | Tokens, model calls and timings of the attempt that finished the suggestion. Null when no model call was attempted. | | `requested_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where the request came from. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's self-reported `clientInfo.name`, only when `origin` is `mcp`; unverified. | | `created_at` (required) | `string` (date-time) | | | `started_at` (required) | `string` (date-time) or `null` | | | `finished_at` (required) | `string` (date-time) or `null` | | ## AgentInfo | Field | Type | Description | | --- | --- | --- | | `available` (required) | `boolean` | | | `provider` (required) | `string` or `null` | The configured LLM provider, null when no agent is configured. | | `model` (required) | `string` or `null` | The model the agent uses, null when no agent is configured. | | `effort` (required) | `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"` or `null` | Reasoning effort of the Anthropic provider; null otherwise. | ## AgentStep | Field | Type | Description | | --- | --- | --- | | `at` (required) | `string` (date-time) | | | `attempt` (required) | `integer` | The attempt that ran the step. A shutdown release gives the attempt back and keeps its steps, so the re-claimed run continues the same step list; an attempt keeps its most recent 1000 steps. Clients detect a restarted list by each step's `at`, not by `attempt` alone. | | `phase` (required) | `"discover"`, `"lint"`, `"query"`, `"save"`, `"repair"` | | | `tool` (required) | `string` | | | `status` (required) | `"ok"`, `"error"` | | | `message` (required) | `string` | The tool's fixed progress text, for example `Listed 37 metrics on prom`. | | `duration_ms` (required) | `integer` | | ## AgentUsage | Field | Type | Description | | --- | --- | --- | | `provider` (required) | `string` | | | `model` (required) | `string` | | | `input_tokens` (required) | `integer` | | | `output_tokens` (required) | `integer` | | | `cache_read_tokens` (required) | `integer` | | | `cache_write_tokens` (required) | `integer` | | | `model_calls` (required) | `integer` | | | `repair_rounds` (required) | `integer` | | | `tool_calls` (required) | `integer` | Tool calls the model made. | | `failed_calls` (required) | `integer` | Model calls that failed. The call that ended a failed run counts here, so a run that fails on its first call reports `model_calls` 0 and `failed_calls` 1. | | `retries` (required) | `integer` | Extra HTTP attempts made inside model calls after a retryable answer or an idle or first-token timeout, including the resend after an answer cut off at the output limit. | | `model_ms` (required) | `integer` | Wall-clock milliseconds spent waiting on the model, retries included. | | `tool_ms` (required) | `integer` | Wall-clock milliseconds spent running tools; tools of one turn that run in parallel count once. | | `max_save_output_tokens` (required) | `integer` | The largest output token count of any model turn that contained a save, or 0 when no turn did. | | `build_saves` (required) | `integer` | Accepted saves into the request's build during the run, counted across every session of the run. | | `renewals` (required) | `integer` | Compactions made because the session's history passed the renewal size after an accepted save; also counted in `compactions`. | | `compactions` (required) | `integer` | Times the run compacted its session history (on renewal, on the first cut-off answer, or when the model answered without a tool call while the build held fewer panels than planned). | | `nudges` (required) | `integer` | Steering messages sent one call before the save-now rule refuses reads. | | `save_now_refusals` (required) | `integer` | Read calls refused because six model calls passed without a save (or twelve without a proposal in a suggest run). | | `stalled_turns` (required) | `integer` | Turns in which the agent answered no call because every call was refused. | | `one_panel_refusals` (required) | `integer` | Saves refused for adding or changing more than one panel. | | `cost_usd` (required) | `number` (double) or `null` | Estimated cost in USD of the attempt that finished the request, from its tokens and the server's price table (see SLASHOBSERVE_LLM_PRICES_FILE). Null when the model has no complete price, and for requests that finished before costs were recorded. | ## AgentBuildProgress How far a request's build has come, without its Spec; the build title is for the requester only. | Field | Type | Description | | --- | --- | --- | | `saves` (required) | `integer` | Accepted build saves so far; a client refetches the build when it changes. | | `panels` (required) | `integer` | Panels in the build, row children included and rows themselves excluded. | | `planned_panels` (required) | `integer` | Panels the agent expects the finished dashboard to have, rows not counted; 0 when it gave no estimate. It is an estimate, so `panels` can exceed it. Between 0 and 200. | | `title` (required) | `string` or `null` | The build's current dashboard title; null for anyone but the principal that made the request, because a build is visible only to its requester. | | `updated_at` (required) | `string` (date-time) | | ## AgentBuild | Field | Type | Description | | --- | --- | --- | | `request_id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard being revised; null for a new-dashboard request. | | `base_version` (required) | `integer` or `null` | The version the revision started from; null for a new-dashboard request. | | `saves` (required) | `integer` | | | `panels` (required) | `integer` | | | `planned_panels` (required) | `integer` | Panels the agent expects the finished dashboard to have, rows not counted; 0 when it gave no estimate. It is an estimate, so `panels` can exceed it. Between 0 and 200. | | `spec` (required) | `object` | The ObserveSpec document as built so far, checked like a version. | | `updated_at` (required) | `string` (date-time) | | ## AnswerSaved | Field | Type | Description | | --- | --- | --- | | `observation_id` (required) | `string` (uuid) | | | `url` (required) | `string` | The address of the observation, empty when the server has no public URL configured. | | `replayed` (required) | `boolean` | True when the answer was already an observation, so this call changed nothing. | ## AnswerShared | Field | Type | Description | | --- | --- | --- | | `thread_id` (required) | `string` (uuid) | The comment thread that holds the question and the answer. | | `message_id` (required) | `string` (uuid) | The message that holds the question; the agent's answer is the reply under it. | | `replayed` (required) | `boolean` | True when the run was already shared, so this call changed nothing. | ## AgentBuildSaved | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `version` (required) | `integer` | | | `url` (required) | `string` | The address of the dashboard, empty when the server has no public URL configured. | | `replayed` (required) | `boolean` | True when the request had already saved a version, so this call changed nothing. | ## AgentRequest | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `kind` (required) | `"build"`, `"investigate"` | `investigate` for an investigation that ends with a finding, `build` for every other request, including one that answered a question with a finding. | | `title` (required) | `string` | The title the requester gave the request, or the first line of its prompt, without `@observe` and cut at a word to 60 characters, when they gave none; empty when `redacted`. | | `intent` (required) | `"ask"`, `"apply"` | What the run may do: `ask` reads and answers, `apply` changes the dashboard, `suggest` proposes one panel. A run that saved a version is `apply`. | | `investigation` (required) | `boolean` | True when the run was started as an investigation that opens or writes into an observation, false for an ask from the Chat tab, the canvas, a thread or Ask this on an observation. Saving, sharing, showing on a page or withdrawing an answer never changes it. | | `trigger` (required) | `"person"`, `"mention"`, `"schedule"`, `"webhook"`, `"slack"` | What started the run. `person`: the requester asked, through the web app, the CLI or the API. `mention`: a mention of the Observe Agent in a comment started the run. The other values are reserved for runs that a schedule, an inbound webhook or Slack will start. Clients must tolerate values they do not know. | | `prompt` (required) | `string` | The requester's text; empty when `redacted`. | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the request targets; for a new-dashboard request it is null until the request has succeeded. | | `base_version` (required) | `integer` or `null` | The version a revision was requested against; null for a new-dashboard request. | | `panel_id` (required) | `string` or `null` | | | `comment_id` (required) | `string` (uuid) or `null` | | | `status` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | | | `state` (required) | `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | Where the request is in its life: `queued`, `running`, `canceling` (the requester canceled it and its worker is stopping), `succeeded`, `failed` or `canceled`. `status` keeps its four values; a `canceling` request has status `running`, and a `canceled` one has status `failed` with the failure code `canceled`. The moves between states are in `docs/reference/states.md`. | | `result_kind` (required) | `"none"`, `"version"`, `"partial_version"`, `"proposal"`, `"suggestion"`, `"observation"`, `"answer"` | What the request left behind: `none`, `version` (a saved dashboard version), `partial_version` (the requester kept the build of a stopped request as a version), `proposal` (reserved), `suggestion`, `observation` (a finding written into an observation, which `observation_id` names) or `answer` (a finding kept on the run with `observation_id` null until its requester saves it with `POST /observe/{id}/observation`, which turns it into `observation`). A finding wins over a version. | | `attempts` (required) | `integer` | Between 0 and 2. | | `attempt` (required) | `integer` | The attempt number of the worker that holds or last held the request; equal to `attempts`. | | `allowed_actions` (required) | array of `"cancel"`, `"keep_build"`, `"continue"`, `"retry"`, `"pin"`, `"archive"` | What the caller may do with the request now, in display order. `retry` is offered to anyone who can see a finished request and may start that kind of request, not only the requester; every other action is the requester's. The list comes from the same table as `docs/reference/states.md`. | | `result_version` (required) | `integer` or `null` | The version the request saved, set when the status is `succeeded` unless the agent answered with a finding and, once the requester saved a stopped build, when it is `failed`. | | `url` (required) | `string` or `null` | The address of the dashboard, or of the observation for an investigation or for a question whose answer was saved as an observation, set when the status is `succeeded`; null while an answer is only on the request. | | `error` (required) | `string` or `null` | Why the request failed, set when the status is `failed`. | | `failure_code` (required) | `string` or `null` | Why the request failed, as one code, set when the status is `failed` and null otherwise. One of `run_timeout`, `call_timeout`, `rate_limited`, `provider_error`, `output_limit`, `no_tool_call`, `refused`, `validation_exhausted`, `conflict`, `invalid_task`, `not_found`, `draft_invalid`, `canceled`, `load_failed`, `context_failed`, `tool_failed`, `result_too_large`, `tool_panicked`, `malformed_result`, `internal`, `no_fixture`, `requester_gone`, `requester_forbidden`, `check_failed`, `crashed`, `no_suggestion`, `no_finding`, `lease_expired`, `no_progress`, `agent_unavailable`, `agent_failed` or `budget_exhausted`. Clients must tolerate codes they do not know. | | `steps` (required) | array of [`AgentStep`](/docs/reference/api/schemas/#agentstep) | At most 2000 items. | | `live_text` (required) | `string` or `null` | The end of the text the model has written in this attempt, while the request is running; null otherwise. It is kept only in server memory and is gone once the request finishes. Steps remain the record of what the agent did. | | `usage` (required) | [`AgentUsage`](/docs/reference/api/schemas/#agentusage) or `null` | Tokens, model calls, repair rounds and timings of the attempt that finished the request. Null when no model call was attempted. | | `build` (required) | [`AgentBuildProgress`](/docs/reference/api/schemas/#agentbuildprogress) or `null` | Progress of the build the agent assembles for this request, null when there is none. Shown to everyone who can see the request; the build's Spec is readable only by the requester through `GET /observe/{id}/build`. | | `build_saved_at` (required) | `string` (date-time) or `null` | When the requester saved the stopped build of a `failed` request as a version; null otherwise. The request stays `failed` with its `failure_code`. | | `queue_position` (required) | `integer` or `null` | 1-based place among queued requests in claim order, null unless queued. The worker skips a request whose dashboard already has a running revision, so the order can shift. | | `cancel_requested_at` (required) | `string` (date-time) or `null` | When the requester asked to cancel the request; null when they did not. A running request keeps running until its worker sees the flag, then ends `failed` with the `canceled` failure code and keeps its build. | | `canceled_by` (required) | [`Author`](/docs/reference/api/schemas/#author) or `null` | Who asked to cancel the request; the email is never set. | | `can_cancel` (required) | `boolean` | Whether the caller may cancel this request now; the same as `cancel` in `allowed_actions`. Only the requester may, while it is queued, running or canceling, and never a suggestion. | | `read_only` (required) | `boolean` | True when the caller sees this request only as an Admin, through a thread it was shared in, or `redacted`; nothing may be done with it. | | `redacted` (required) | `boolean` | True when the request came from someone's private chat and the caller is neither its requester nor an Admin, for example another Editor reading a dashboard change or an answer saved into an observation. `title`, `prompt` and every step `message` are then empty, and `live_text`, `continue_note` and `error` null; the status, times, requester, kind, `failure_code`, steps' tools and saved version stay. An investigation is never redacted, and an answer shared into a thread is not redacted for a caller who can read that thread; anyone else who reaches it, through its observation for example, reads it redacted. | | `continues_id` (required) | `string` (uuid) or `null` | The stopped request this one continues. | | `continue_note` (required) | `string` or `null` | The note given when continuing a stopped request, null when none was given or this request continues nothing. | | `continued_by` (required) | `string` (uuid) or `null` | The request that continues this one; its build moved there. | | `retried_by` (required) | `string` (uuid) or `null` | The request that retried this failed or stopped one. It cannot be retried again, so a second retry is refused instead of making a duplicate. | | `requested_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `assigned_to` (required) | `object` or `null` | The outside agent this run waits for or runs on; null when the server's own agent runs it. | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | Where the request came from; `web` is a signed-in browser, `cli` the observe CLI, `mcp` an MCP client, `api` any other bearer-key caller. Null for requests made before origins were recorded. A label only, never used for access decisions. | | `origin_client` (required) | `string` or `null` | The MCP client's self-reported `clientInfo.name` (for example `claude-code`), only when `origin` is `mcp`; unverified. | | `created_at` (required) | `string` (date-time) | | | `started_at` (required) | `string` (date-time) or `null` | | | `finished_at` (required) | `string` (date-time) or `null` | | | `pinned_at` (required) | `string` (date-time) or `null` | When the requester pinned the request; null when it is not pinned. | | `archived_at` (required) | `string` (date-time) or `null` | When the requester archived the request; an archived request is left out of `GET /observe`. | | `from` (required) | `string` (date-time) or `null` | The start of the window an investigation was asked to look at; null when none was given. | | `to` (required) | `string` (date-time) or `null` | The end of the window an investigation was asked to look at; null when none was given. | | `as_of` (required) | `string` (date-time) or `null` | The now the run resolved every relative time to, set by an Admin to replay a past incident; null for a run on the live clock. | | `chat_id` (required) | `string` (uuid) or `null` | The chat the request belongs to, the id of its first request; a request that follows no other has its own id. Send it back as `chat_id` on the list to read every turn of the chat. Null for a run an ask in a thread started, which is shared work in that thread and belongs to no chat, and for anyone but the requester and Admins, who read the request only through the dashboard it is on and never the chat around it. | | `observation_id` (required) | `string` (uuid) or `null` | The observation an investigation writes into. Its run shows there as a block and its conclusion lands there when the finding is saved. Null for other runs, and when no folder allowed a new observation. | | `subject_observation_id` (required) | `string` (uuid) or `null` | The observation the run is about without writing into it, such as an ask from an observation's chat or thread; it stays set after the answer is saved into another observation. Null when the run is about no observation this way, when `redacted`, and when the caller cannot open that observation, as for `observation_id`. | | `shared_thread_id` (required) | `string` (uuid) or `null` | The comment thread this private question's answer is shared in, from `POST /observe/{id}/share`. Shown only to the requester, and null for everyone else, for a run that was never shared and once the requester withdraws it with `DELETE /threads/{id}/share`. | | `anchor` (required) | [`Anchor`](/docs/reference/api/schemas/#anchor) or `null` | The spot on the dashboard or observation this question points at, as it was sent. Shown only to the person who asked it, and null for everyone else, including an Admin reading the chat and a reader of a thread the answer was shared in. | | `block_id` (required) | `string` (uuid) or `null` | The observation block `anchor` sits on. Shown only to the person who asked it, as `anchor` is. | | `finding` (required) | [`Finding`](/docs/reference/api/schemas/#finding) or `null` | The finding the run saved: an investigation's, or the answer a request gave instead of a dashboard or a version; null for other runs and until one is saved. The answer to a plain question has `observation_id` null until its requester saves it as an observation, and only the requester and an Admin read it. | | `observation_rename` | `"renamed"`, `"kept"` | Present only in the answer to a rename of the first request of a chat with no dashboard that has exactly one observation made from it, which the caller can see. `renamed` when that observation now has the chat's title, `kept` when the caller may not edit it and its title was left as it is. | | `replayed` | `boolean` | Present and true only in the answer to a `POST /observe` whose `client_id` you had already sent; the request is the one that send started and nothing new was queued. | ## ChatTurnSummary | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `state` (required) | `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | | | `prompt` (required) | `string` | | | `investigation` (required) | `boolean` | True when the run was started as an investigation that opens or writes into an observation, false for an ask from the Chat tab, the canvas, a thread or Ask this on an observation. Saving, sharing, showing on a page or withdrawing an answer never changes it. | | `subject_observation_id` (required) | `string` (uuid) or `null` | The observation the turn is about without writing into it, such as an ask from an observation's chat or thread; it stays set after the answer is saved into another observation, and is null otherwise or when the caller cannot open that observation. | | `anchor` (required) | [`Anchor`](/docs/reference/api/schemas/#anchor) or `null` | The spot on the dashboard or observation this question points at, as it was sent. Shown only to the person who asked it, and null for everyone else, including an Admin reading the chat and a reader of a thread the answer was shared in. | | `block_id` (required) | `string` (uuid) or `null` | The observation block `anchor` sits on. Shown only to the person who asked it, as `anchor` is. | ## Chat | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | The chat's id, which is also the id of its first request. | | `title` (required) | `string` | | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the chat is about; a chat about nothing gains the dashboard its first saved build made. | | `dashboard_title` (required) | `string` or `null` | The title of `dashboard_id`, null when the chat is about no dashboard or the caller cannot see it, as an Admin cannot see one in someone's personal folder. | | `observation_id` (required) | `string` (uuid) or `null` | The observation the chat is about, null when the caller cannot open it. | | `pinned_at` (required) | `string` (date-time) or `null` | | | `created_at` (required) | `string` (date-time) | | | `last_turn_at` (required) | `string` (date-time) | | | `turns` (required) | `integer` | | | `last_turn` (required) | [`ChatTurnSummary`](/docs/reference/api/schemas/#chatturnsummary) or `null` | | | `owner` (required) | `object` | Who started the chat, by the name on its first request. | | `read_only` (required) | `boolean` | True when the caller reads the chat only as an Admin, so it sends no turn and takes no action on it. | ## ChatList | Field | Type | Description | | --- | --- | --- | | `chats` (required) | array of [`Chat`](/docs/reference/api/schemas/#chat) | | | `next_cursor` (required) | `string` or `null` | | ## ChatDetail | Field | Type | Description | | --- | --- | --- | | `chat` (required) | [`Chat`](/docs/reference/api/schemas/#chat) | | | `turns` (required) | array of [`AgentRequest`](/docs/reference/api/schemas/#agentrequest) | | ## RequestSummary | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `requested_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `intent` (required) | `"ask"`, `"apply"` | What the run may do: `ask` reads and answers, `apply` changes the dashboard, `suggest` proposes one panel. A run that saved a version is `apply`. | | `investigation` (required) | `boolean` | True when the run was started as an investigation that opens or writes into an observation, false for an ask from the Chat tab, the canvas, a thread or Ask this on an observation. Saving, sharing, showing on a page or withdrawing an answer never changes it. | | `trigger` (required) | `"person"`, `"mention"`, `"schedule"`, `"webhook"`, `"slack"` | What started the run. `person`: the requester asked, through the web app, the CLI or the API. `mention`: a mention of the Observe Agent in a comment started the run. The other values are reserved for runs that a schedule, an inbound webhook or Slack will start. Clients must tolerate values they do not know. | | `prompt` (required) | `string` | | | `status` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | | | `state` (required) | `"queued"`, `"running"`, `"canceling"`, `"succeeded"`, `"failed"`, `"canceled"` | Where the request is in its life: `queued`, `running`, `canceling` (the requester canceled it and its worker is stopping), `succeeded`, `failed` or `canceled`. `status` keeps its four values; a `canceling` request has status `running`, and a `canceled` one has status `failed` with the failure code `canceled`. The moves between states are in `docs/reference/states.md`. | | `result_kind` (required) | `"none"`, `"version"`, `"partial_version"`, `"proposal"`, `"suggestion"`, `"observation"`, `"answer"` | What the request left behind: `none`, `version` (a saved dashboard version), `partial_version` (the requester kept the build of a stopped request as a version), `proposal` (reserved), `suggestion`, `observation` (a finding written into an observation, which `observation_id` names) or `answer` (a finding kept on the run with `observation_id` null until its requester saves it with `POST /observe/{id}/observation`, which turns it into `observation`). A finding wins over a version. | | `allowed_actions` (required) | array of `"cancel"`, `"keep_build"`, `"continue"`, `"retry"`, `"pin"`, `"archive"` | What the caller may do with the request now; empty on another principal's request that the caller sees only as an Admin. | | `dashboard_id` (required) | `string` (uuid) or `null` | | | `dashboard_title` (required) | `string` or `null` | The dashboard's current title; null when the request has no dashboard or the dashboard is in a folder you cannot see. | | `panel_id` (required) | `string` or `null` | | | `base_version` (required) | `integer` or `null` | The version an `apply` run started from; null for a new-dashboard request and for an ask. | | `comment_id` (required) | `string` (uuid) or `null` | The comment thread an `apply` run answers; null for a chat turn. | | `result_version` (required) | `integer` or `null` | | | `url` (required) | `string` or `null` | | | `error` (required) | `string` or `null` | | | `failure_code` (required) | `string` or `null` | Why the request failed, as one code (the codes of `AgentRequest.failure_code`), set when the status is `failed` and null otherwise. Clients must tolerate codes they do not know. | | `build` (required) | [`AgentBuildProgress`](/docs/reference/api/schemas/#agentbuildprogress) or `null` | Progress of the build the agent assembles for this request, null when there is none. | | `build_saved_at` (required) | `string` (date-time) or `null` | When the requester saved the stopped build of a `failed` request as a version; null otherwise. | | `kind` (required) | `"build"`, `"investigate"` | | | `title` (required) | `string` | The title the requester gave the request, or the first line of its prompt, without `@observe` and cut at a word to 60 characters, when they gave none. | | `pinned_at` (required) | `string` (date-time) or `null` | When the requester pinned the request; pinned requests come first in the list. | | `continues_id` (required) | `string` (uuid) or `null` | The stopped request this one continues. | | `continued_by` (required) | `string` (uuid) or `null` | The request that continues this one; its build moved there. | | `retried_by` (required) | `string` (uuid) or `null` | The request that retried this failed or stopped one. It cannot be retried again, so a second retry is refused instead of making a duplicate. | | `continue_note` (required) | `string` or `null` | The note given when continuing a stopped request, null when none was given or this request continues nothing. | | `observation_id` (required) | `string` (uuid) or `null` | The observation an investigation writes into. Its run shows there as a block and its conclusion lands there when the finding is saved. Null for other runs, and when no folder allowed a new observation. | | `observation_title` (required) | `string` or `null` | The observation's current title; null when the request has no observation or the observation is in a folder you cannot see. | | `chat_id` (required) | `string` (uuid) or `null` | The chat the request belongs to, the id of its first request; a request that follows no other has its own id. Null for a run an ask in a thread started, which belongs to no chat. | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"` or `null` | | | `origin_client` (required) | `string` or `null` | | | `created_at` (required) | `string` (date-time) | | | `started_at` (required) | `string` (date-time) or `null` | | | `finished_at` (required) | `string` (date-time) or `null` | | | `anchor` (required) | [`Anchor`](/docs/reference/api/schemas/#anchor) or `null` | The spot on the dashboard or observation this question points at, as it was sent. Shown only to the person who asked it, and null for everyone else, including an Admin reading the chat and a reader of a thread the answer was shared in. | | `block_id` (required) | `string` (uuid) or `null` | The observation block `anchor` sits on. Shown only to the person who asked it, as `anchor` is. | ## ContinueObserveRequest | Field | Type | Description | | --- | --- | --- | | `note` | `string` or `null` | An instruction for the continued run, trimmed; 1 to 4000 visible characters without control or bidirectional override characters, the same rule as a prompt. | ## InvalidTransition The answer to an action the object's state does not allow. | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"invalid_transition"` | | | `state` (required) | `string` | The state the object is in. | | `allowed_actions` (required) | array of `string` | The actions the caller may take in that state, as in the object's own `allowed_actions`. | ## AgentRequestEnvelope | Field | Type | Description | | --- | --- | --- | | `request` (required) | [`AgentRequest`](/docs/reference/api/schemas/#agentrequest) | | ## FindingAuthor | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"user"`, `"service_account"` | | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | ## FindingAskOn | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `title` (required) | `string` | The dashboard's title, for a button such as "Ask this on Checkout". | ## Finding | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `observation_id` (required) | `string` (uuid) or `null` | The observation this finding lives in; null for the answer to a plain question, which stays on its run until its requester saves it as an observation with `POST /observe/{id}/observation`. | | `agent_request_id` (required) | `string` (uuid) or `null` | The investigation that saved the finding; null for a finding saved over MCP, or after the request was deleted. | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the finding is about; null when it is about none. | | `folder_id` (required) | `string` (uuid) or `null` | The folder of the finding's observation when the finding has no dashboard; null when it is on a dashboard. | | `ask_on` (required) | [`FindingAskOn`](/docs/reference/api/schemas/#findingaskon) or `null` | The one dashboard the agent resolved for a request made on Home that asks to change an existing dashboard, which a Home request cannot do. Start an ordinary revision with the same prompt and this `dashboard_id` to make the change. Null when the finding is about a dashboard, when the agent named none or several, and for a reader who cannot view the dashboard; the list routes always leave it null. | | `title` (required) | `string` | | | `markdown` (required) | `string` | The finding as Markdown of at most 400 words. | | `evidence` (required) | array of `object` | Up to 4 panel Specs whose queries were checked when the finding was saved, with ids `evidence-1` to `evidence-4`. At most 4 items. | | `suggested_change` (required) | `string` or `null` | One plain-text sentence describing a change to the dashboard that would help, which only an ask about a dashboard may carry; null when the agent suggested none. Nothing applies it until a person starts a revision with it. | | `observe_worthy` (required) | `boolean` | True when the agent judged the answer worth keeping as an observation, because it describes a jump, a drop or an error spike; it only promotes saving the answer and saves nothing. | | `restricted` (required) | `boolean` | True when the run that wrote the answer read a datasource only Admins can query, such as the audit trail, which only an Admin's private chat or a run whose every reader is an Admin can do, or when the dashboard or observation the answer is about sits in a folder only Admins can read. Such an answer is shared, saved, pinned, applied or made a dashboard only in a folder only Admins can read; anywhere else the server answers 409 `restricted_answer`. | | `from` (required) | `string` (date-time) | The start of the window the evidence shows. | | `to` (required) | `string` (date-time) | The end of the window the evidence shows. | | `as_of` (required) | `string` (date-time) or `null` | The now the investigation was done as of, when its run was started with `as_of`; null for a run on the live clock. | | `annotation_id` (required) | `string` (uuid) or `null` | The annotation the finding was pinned as; null until it is pinned. | | `created_by` (required) | [`FindingAuthor`](/docs/reference/api/schemas/#findingauthor) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `url` (required) | `string` or `null` | Opens the finding's observation; null while the finding has no observation, or when the server has no public URL configured. | ## FindingEnvelope | Field | Type | Description | | --- | --- | --- | | `finding` (required) | [`Finding`](/docs/reference/api/schemas/#finding) | | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) or `null` | The folder of the finding's observation, whose access rule decides who reads the finding; null for an answer that is not an observation yet, which only its requester and an Admin read. | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | ## SavedSearchFilters The filters of a search beyond its query. A logs search takes only `columns`, a metrics search only `mode`, and a traces search the others. | Field | Type | Description | | --- | --- | --- | | `columns` | array of `string` | The visible columns of a logs search, in order. At most 20 items. | | `service` | `string` | | | `span` | `string` | | | `min` | `string` | The shortest span duration, such as `250ms` or `2s`. A trace matches when one span that also fits the service and span name is that long. | | `max` | `string` | The longest span duration, such as `250ms` or `2s`. A trace matches when one span that also fits the service and span name is no longer. | | `errors` | `boolean` | Only traces with an error. | | `mode` | `"graph"`, `"table"` | A metrics search as a time series (`graph`, the default) or as the table of an instant query. | ## SavedSearch | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `kind` (required) | `"logs"`, `"traces"`, `"metrics"` | | | `title` (required) | `string` | | | `datasource_uid` (required) | `string` | | | `query` (required) | `string` or `null` | The query as it runs, with the filter pills folded in; null for a trace search made of filters only. | | `filters` (required) | [`SavedSearchFilters`](/docs/reference/api/schemas/#savedsearchfilters) | | | `from` (required) | `string` | The start of the range as written, such as `now-1h`. | | `to` (required) | `string` | The end of the range as written, such as `now`. | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | When the search was saved, renamed or moved last. | | `url` (required) | `string` | The address of the logs, traces or metrics page that reopens the search, relative when the server has no public URL configured. | ## SavedSearchReplayed | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `kind` (required) | `"logs"`, `"traces"`, `"metrics"` | | | `title` (required) | `string` | | | `datasource_uid` (required) | `string` | | | `query` (required) | `string` or `null` | | | `filters` (required) | [`SavedSearchFilters`](/docs/reference/api/schemas/#savedsearchfilters) | | | `from` (required) | `string` | | | `to` (required) | `string` | | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `url` (required) | `string` | | | `replayed` (required) | `boolean` | Always true; the search this key already saved with the same title, datasource, query, filters, range and folder, returned instead of a second copy. | ## SavedSearchList | Field | Type | Description | | --- | --- | --- | | `saved_searches` (required) | array of [`SavedSearch`](/docs/reference/api/schemas/#savedsearch) | | | `next_cursor` (required) | `string` or `null` | | ## CreateSavedSearchRequest | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"logs"`, `"traces"`, `"metrics"` | | | `title` (required) | `string` | 1 to 120 characters after trimming, without control characters. | | `datasource_uid` (required) | `string` | The uid of a datasource that exists and fits the kind, which is Prometheus for metrics. | | `query` | `string` or `null` | 1 to 8000 characters; required for a logs or metrics search. | | `filters` | [`SavedSearchFilters`](/docs/reference/api/schemas/#savedsearchfilters) | | | `from` | `string` | A time expression the time range accepts. Default `"now-1h"`. | | `to` | `string` | Default `"now"`. | | `folder_id` | `string` (uuid) | The folder to save in, which needs Create. Default the caller's My Dashboards, else General. | ## UpdateSavedSearchRequest | Field | Type | Description | | --- | --- | --- | | `title` | `string` | | | `folder_id` | `string` (uuid) | | | `query` | `string` | The new query, 1 to 8000 characters; an empty string clears the query of a trace search and is refused for a logs search. | | `filters` | [`SavedSearchFilters`](/docs/reference/api/schemas/#savedsearchfilters) or `null` | Replaces all the filters, so send every one the search should keep; null clears them. | | `from` | `string` | A time expression the time range accepts. | | `to` | `string` | | ## FindingList | Field | Type | Description | | --- | --- | --- | | `findings` (required) | array of [`Finding`](/docs/reference/api/schemas/#finding) | | | `next_cursor` (required) | `string` or `null` | | ## ImportRequest | Field | Type | Description | | --- | --- | --- | | `json` (required) | `string` | The Grafana dashboard JSON text, exactly as pasted or uploaded. | | `mapping` | `object` or `null` | Source datasource key to our datasource uid; keys and values are 1 to 200 bytes. | | `folder` | `string` | The title of the folder for the new dashboard, trimmed and checked like a folder title; 400 `invalid_request` otherwise. Only the import uses it; the preview checks it and ignores it. | | `update_dashboard` | `string` (uuid) | The id of a dashboard an earlier import made, to save this JSON as its next version instead of making a new dashboard. Needs Edit on the dashboard; the folder is not changed. Only the import uses it; the preview ignores it. | | `refuse_existing` | `boolean` | Answer 409 `already_imported`, with `existing`, instead of making a second dashboard when the caller can see a dashboard that already holds this Grafana uid. Ignored with `update_dashboard`, and by the preview. | ## ImportExisting | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `version` (required) | `integer` | The dashboard's latest version. | | `can_update` (required) | `boolean` | True when the caller has Edit on the dashboard, so `update_dashboard` is accepted. | ## AlreadyImported | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"already_imported"` | | | `existing` (required) | [`ImportExisting`](/docs/reference/api/schemas/#importexisting) | | ## ImportSummary | Field | Type | Description | | --- | --- | --- | | `format` (required) | `"classic"`, `"export"`, `"api"` | | | `title` (required) | `string` | | | `uid` (required) | `string` | | | `schema_version` (required) | `integer` | | | `bytes` (required) | `integer` | | | `panels` (required) | `integer` | | | `rows` (required) | `integer` | | | `variables` (required) | `integer` | | ## ImportSourceDatasource | Field | Type | Description | | --- | --- | --- | | `key` (required) | `string` | How the dashboard refers to the datasource (a uid, a name or an `${DS_...}` input). | | `name` (required) | `string` or `null` | | | `type` (required) | `string` or `null` | The Grafana datasource type. | | `kind` (required) | `string` or `null` | Our datasource type it needs (`prometheus`, `clickhouse`, `loki` or `tempo`); null for a built-in datasource. A kind with no configured datasource has no candidates, does not block the import, and its panels import as placeholders. | | `panels` (required) | `integer` | | | `match` (required) | `string` or `null` | The uid of our datasource it will use; null while unmatched. | | `matched_by` (required) | `"mapping"`, `"uid"`, `"alias"`, `"only"` or `null` | | | `candidates` (required) | array of `string` | The uids of ours of the same kind. | ## ImportQueryLine | Field | Type | Description | | --- | --- | --- | | `ref_id` (required) | `string` | | | `ref` (required) | `string` or `null` | | | `datasource` (required) | `string` or `null` | | | `rewrites` (required) | array of `string` | | | `dropped` (required) | `string` or `null` | | ## ImportPanelLine | Field | Type | Description | | --- | --- | --- | | `panel_id` (required) | `string` | | | `grafana_id` (required) | `integer` or `null` | | | `grafana_path` (required) | `string` | | | `title` (required) | `string` | | | `type` (required) | `string` | | | `source_type` (required) | `string` | | | `row` (required) | `string` or `null` | | | `status` (required) | `"imported"`, `"partial"`, `"placeholder"`, `"unverified"` | | | `reasons` (required) | array of `string` | | | `paths` (required) | array of `string` | | | `queries` (required) | array of [`ImportQueryLine`](/docs/reference/api/schemas/#importqueryline) | | ## ImportNote | Field | Type | Description | | --- | --- | --- | | `subject` (required) | `string` | | | `status` (required) | `"imported"`, `"partial"`, `"placeholder"`, `"unverified"` | | | `reason` (required) | `string` | | | `paths` (required) | array of `string` | | ## ImportCounts | Field | Type | Description | | --- | --- | --- | | `total` (required) | `integer` | | | `imported` (required) | `integer` | | | `partial` (required) | `integer` | | | `placeholder` (required) | `integer` | | | `unverified` (required) | `integer` | | ## ImportOptionLine | Field | Type | Description | | --- | --- | --- | | `path` (required) | `string` | The Grafana option path relative to its block, in report syntax. | | `outcome` (required) | `"mapped"`, `"excluded"`, `"reported"`, `"default"`, `"no_effect"`, `"bookkeeping"` | `default`, `no_effect` and `bookkeeping` are implicit options: a Grafana default value, an option with no visible effect, and editor bookkeeping; they need no Spec setting. | | `spec` (required) | array of `string` | The ObserveSpec fields the option became, relative to the block's Spec object, array indexes written `[]`; empty when the option was not imported, is implicit, or no catalog names its field. | | `reason` (required) | `string` or `null` | Why the option was excluded or not imported; null for every other outcome. | ## ImportBlock | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"dashboard"`, `"variable"`, `"row"`, `"panel"`, `"query"`, `"transformation"`, `"field_config"`, `"override"` | | | `path` (required) | `string` | The Grafana path of the block from the dashboard root; empty for the dashboard. | | `title` (required) | `string` | The panel or row title, variable name, query ref id, transformation id or override matcher id; empty for the dashboard and field config. | | `source_type` (required) | `string` | The Grafana panel or variable type, or the query kind; empty otherwise. | | `panel_id` (required) | `string` or `null` | The id of the Spec panel, for panel and row blocks; it matches `panels[].panel_id`. | | `outcome` (required) | `"excluded"`, `"reported"` or `null` | Set when the whole block was not imported. | | `reason` (required) | `string` or `null` | | | `options` (required) | array of [`ImportOptionLine`](/docs/reference/api/schemas/#importoptionline) | | | `implicit` (required) | `integer` | How many implicit options the block carried (outcomes `default`, `no_effect` and `bookkeeping`), including any the size limits left out of `options`. | | `omitted` (required) | `integer` | Options of any outcome not listed because of the report's size limits. | | `blocks` (required) | array of [`ImportBlock`](/docs/reference/api/schemas/#importblock) | Child blocks. | ## ImportReport | Field | Type | Description | | --- | --- | --- | | `importer_version` (required) | `integer` | | | `verified` (required) | `boolean` | True once every query ran at save time; always false in a preview. | | `counts` (required) | [`ImportCounts`](/docs/reference/api/schemas/#importcounts) | | | `panels` (required) | array of [`ImportPanelLine`](/docs/reference/api/schemas/#importpanelline) | | | `notes` (required) | array of [`ImportNote`](/docs/reference/api/schemas/#importnote) | | | `blocks` | array of [`ImportBlock`](/docs/reference/api/schemas/#importblock) | The report grouped by dashboard block. Absent in reports stored before importer version 2. | ## ImportPreview | Field | Type | Description | | --- | --- | --- | | `summary` (required) | [`ImportSummary`](/docs/reference/api/schemas/#importsummary) | | | `datasources` (required) | array of [`ImportSourceDatasource`](/docs/reference/api/schemas/#importsourcedatasource) | | | `existing` (required) | [`ImportExisting`](/docs/reference/api/schemas/#importexisting) or `null` | The dashboard that already holds this Grafana uid, when the caller can see it; null otherwise. | | `ready` (required) | `boolean` | True when every source datasource has a match, so the import can be saved. | | `report` (required) | [`ImportReport`](/docs/reference/api/schemas/#importreport) | | | `spec` (required) | `object` or `null` | The converted ObserveSpec document; null when `ready` is false. | ## ImportRecord | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `version` (required) | `integer` | The dashboard version the import produced. | | `source` (required) | `"grafana"` | | | `importer_version` (required) | `integer` | | | `title` (required) | `string` | | | `mapping` (required) | `object` | | | `summary` (required) | [`ImportSummary`](/docs/reference/api/schemas/#importsummary) | | | `datasources` (required) | array of [`ImportSourceDatasource`](/docs/reference/api/schemas/#importsourcedatasource) | | | `report` (required) | [`ImportReport`](/docs/reference/api/schemas/#importreport) | | | `grafana_uid` | `string` | The Grafana dashboard uid this import answers for, or empty. Only the first import of a uid holds it, and only a uid of 1 to 40 letters, digits, `-` or `_`; a later import of the same uid, from a file or a connection, gets an empty value. | | `created_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `actor` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | ## ImportMeta | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `dashboard_id` (required) | `string` (uuid) | | | `version` (required) | `integer` | | | `importer_version` (required) | `integer` | | | `title` (required) | `string` | | | `counts` (required) | [`ImportCounts`](/docs/reference/api/schemas/#importcounts) | | | `created_by` (required) | [`Author`](/docs/reference/api/schemas/#author) | | | `created_at` (required) | `string` (date-time) | | ## ImportList | Field | Type | Description | | --- | --- | --- | | `imports` (required) | array of [`ImportMeta`](/docs/reference/api/schemas/#importmeta) | | | `next_cursor` (required) | `string` or `null` | | ## ImportedDashboard | Field | Type | Description | | --- | --- | --- | | `dashboard` (required) | [`DashboardSummary`](/docs/reference/api/schemas/#dashboardsummary) | | | `version` (required) | [`Version`](/docs/reference/api/schemas/#version) | | | `import` (required) | [`ImportRecord`](/docs/reference/api/schemas/#importrecord) | | | `folder_note` (required) | `string` or `null` | Why the dashboard is not in the requested folder, or null when it is where the request or the source asked. | ## DatasourcesUnresolved | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"datasources_unresolved"` | | | `datasources` (required) | array of [`ImportSourceDatasource`](/docs/reference/api/schemas/#importsourcedatasource) | | ## ProvisionStatus | Field | Type | Description | | --- | --- | --- | | `dir` (required) | `string` or `null` | The value of `SLASHOBSERVE_PROVISION_DIR`, or null when provisioning is off. | | `dashboards` (required) | array of `object` | Files that became a dashboard, including files that have since left the directory, because their dashboards stay. | | `errors` (required) | array of `object` | Files in the directory that never became a dashboard. | ## GrafanaConnectionTest | Field | Type | Description | | --- | --- | --- | | `at` (required) | `string` (date-time) | | | `ok` (required) | `boolean` | | | `message` (required) | `string` | A fixed sentence chosen by the outcome, such as the folder and dashboard counts or why Grafana could not be read. | ## GrafanaImportSummary | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `status` (required) | `"running"`, `"finished"`, `"failed"`, `"canceled"` | `failed` means the run could not list Grafana's dashboards; one failing dashboard only counts in `failed`. | | `total` (required) | `integer` | The dashboards chosen, known once the dashboards are listed; 0 until then. | | `done` (required) | `integer` | | | `failed` (required) | `integer` | | | `skipped` (required) | `integer` | Dashboards imported before whose Grafana version is not newer. | | `error` (required) | `string` or `null` | Why the run failed; null unless `status` is `failed`. | | `started_at` (required) | `string` (date-time) | | | `finished_at` (required) | `string` (date-time) or `null` | | | `state` (required) | `"running"`, `"finished"`, `"failed"`, `"canceled"` | The same value as `status`, from the state table in docs/reference/states.md. | | `allowed_actions` (required) | array of `"cancel"` | What the caller may do now: `cancel` while the import runs. | ## GrafanaImportResult | Field | Type | Description | | --- | --- | --- | | `uid` (required) | `string` | The Grafana dashboard uid. | | `title` (required) | `string` | | | `outcome` (required) | `"imported"`, `"updated"`, `"skipped"`, `"failed"` | | | `dashboard_id` (required) | `string` (uuid) or `null` | | | `unverified_panels` (required) | `integer` | | | `placeholder_panels` (required) | `integer` | | | `error` (required) | `string` or `null` | A fixed sentence chosen by the kind of failure; null unless `outcome` is `failed`. | ## GrafanaImport | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `connection_id` (required) | `string` (uuid) | | | `status` (required) | `"running"`, `"finished"`, `"failed"`, `"canceled"` | | | `total` (required) | `integer` | | | `done` (required) | `integer` | | | `failed` (required) | `integer` | | | `skipped` (required) | `integer` | | | `error` (required) | `string` or `null` | | | `started_at` (required) | `string` (date-time) | | | `finished_at` (required) | `string` (date-time) or `null` | | | `state` (required) | `"running"`, `"finished"`, `"failed"`, `"canceled"` | The same value as `status`, from the state table in docs/reference/states.md. | | `allowed_actions` (required) | array of `"cancel"` | What the caller may do now: `cancel` while the import runs. | | `results` (required) | array of [`GrafanaImportResult`](/docs/reference/api/schemas/#grafanaimportresult) | One entry per dashboard handled so far, in the order they finished. | ## GrafanaConnection | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `url` (required) | `string` | The Grafana base URL as stored, without a trailing slash. | | `created_by` (required) | `string` (uuid) or `null` | The id of the person or service account that stored the connection. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `last_test` (required) | [`GrafanaConnectionTest`](/docs/reference/api/schemas/#grafanaconnectiontest) or `null` | Null until the connection is tested, and again after its URL or token changes. | | `last_sync` (required) | [`GrafanaImportSummary`](/docs/reference/api/schemas/#grafanaimportsummary) or `null` | The summary of the last finished import, or null before the first one. | ## Webhook | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `name` (required) | `string` | | | `url` (required) | `string` | The https address events are posted to. | | `format` (required) | [`WebhookFormat`](/docs/reference/api/schemas/#webhookformat) | | | `event_types` (required) | array of [`ActivityType`](/docs/reference/api/schemas/#activitytype) | At most 79 items. | | `owner` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `enabled` (required) | `boolean` | | | `state` (required) | `"disabled"`, `"retrying"`, `"sending"` | Computed from `enabled` and `consecutive_failures`. See `docs/reference/states.md`. | | `disabled_reason` (required) | `"manual"`, `"gone"`, `"failing"`, `"owner"`, `"secret_unreadable"` or `null` | `manual` an Admin disabled it; `gone` the receiver answered 410; `failing` 50 attempts in a row failed; `owner` the owner is gone or no longer an Admin; `secret_unreadable` `SLASHOBSERVE_SECRET_KEY` is unset or changed. | | `disabled_at` (required) | `string` (date-time) or `null` | | | `consecutive_failures` (required) | `integer` | | | `next_attempt_at` (required) | `string` (date-time) | The earliest time of the next attempt; in the past while the webhook has nothing to send. | | `waiting_events` (required) | `object` or `null` | How many events the webhook still has to send, while `consecutive_failures` is above 0 and the owner can be read; null otherwise. | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | ## WebhookFormat `generic` is the signed JSON envelope of the webhooks guide; `slack` posts `{"text": ...}` and `teams` an Adaptive Card message, each with one line that names the actor, the event type and its title. One of `generic`, `slack`, `teams`. ## WebhookList | Field | Type | Description | | --- | --- | --- | | `webhooks` (required) | array of [`Webhook`](/docs/reference/api/schemas/#webhook) | At most 20 items. | ## WebhookWithSecret | Field | Type | Description | | --- | --- | --- | | `webhook` (required) | [`Webhook`](/docs/reference/api/schemas/#webhook) | | | `secret` (required) | `string` | The signing secret, `whsec_` and 43 characters. It is shown only in this response. | ## CreateWebhookRequest | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `url` (required) | `string` | An https address on port 443 with a domain name, no user info and no fragment. | | `format` | [`WebhookFormat`](/docs/reference/api/schemas/#webhookformat) | | | `event_types` (required) | array of [`ActivityType`](/docs/reference/api/schemas/#activitytype) | At most 79 items. | ## UpdateWebhookRequest | Field | Type | Description | | --- | --- | --- | | `name` | `string` | | | `url` | `string` | | | `format` | [`WebhookFormat`](/docs/reference/api/schemas/#webhookformat) | | | `event_types` | array of [`ActivityType`](/docs/reference/api/schemas/#activitytype) | At most 79 items. | | `enabled` | `boolean` | | | `owner` | `"me"` | `me` makes the caller the webhook's owner; any other value is refused. | ## WebhookDelivery | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | The attempt's id, ordered by time. | | `delivery_id` (required) | `string` | The `X-SlashObserve-Delivery` header of the attempt; the same for every attempt at one event. | | `event_type` (required) | `string` | The event's activity type, or `webhook.test`. | | `activity_seq` (required) | `integer` (int64) or `null` | The `seq` of the activity event; null for a test. | | `attempted_at` (required) | `string` (date-time) | | | `duration_ms` (required) | `integer` | | | `status_code` (required) | `integer` or `null` | The receiver's HTTP status; null when it was not reached. | | `outcome` (required) | `"delivered"`, `"failed"`, `"skipped"` | | | `error_code` (required) | `"status"`, `"unreachable"`, `"blocked_address"`, `"domain_not_allowed"`, `"too_large"`, `"skipped_by_admin"` or `null` | Null when delivered. `too_large` is `skipped`, because the event can never fit the 64 KiB request limit; `skipped_by_admin` is `skipped`, because an Admin chose to pass the event over. | ## WebhookSkipResult | Field | Type | Description | | --- | --- | --- | | `webhook` (required) | [`Webhook`](/docs/reference/api/schemas/#webhook) | | | `skipped` (required) | [`WebhookDelivery`](/docs/reference/api/schemas/#webhookdelivery) | | ## WebhookTestResult | Field | Type | Description | | --- | --- | --- | | `delivery` (required) | [`WebhookDelivery`](/docs/reference/api/schemas/#webhookdelivery) | | ## WebhookDeliveryList | Field | Type | Description | | --- | --- | --- | | `deliveries` (required) | array of [`WebhookDelivery`](/docs/reference/api/schemas/#webhookdelivery) | At most 100 items. | | `next_cursor` (required) | `string` or `null` | | ## GrafanaConnectionList | Field | Type | Description | | --- | --- | --- | | `connections` (required) | array of [`GrafanaConnection`](/docs/reference/api/schemas/#grafanaconnection) | | ## CreateGrafanaConnectionRequest | Field | Type | Description | | --- | --- | --- | | `name` (required) | `string` | | | `url` (required) | `string` | The Grafana base URL, http or https, with a domain name and no user info, query or fragment. | | `token` (required) | `string` | A Grafana service-account token with Viewer access to the folders to import. | ## UpdateGrafanaConnectionRequest | Field | Type | Description | | --- | --- | --- | | `name` | `string` | | | `url` | `string` | A new URL needs `token` in the same request. | | `token` | `string` | | ## StartGrafanaImportRequest | Field | Type | Description | | --- | --- | --- | | `folders` (required) | `"all"` or array of `string` | "all", or the Grafana folder uids to import, each with its subfolders; `general` names the dashboards outside any folder. | | `mapping` | `object` | Grafana datasource uid or name to the uid of a datasource here, for the datasources the automatic match leaves open. | ## GrafanaFolder | Field | Type | Description | | --- | --- | --- | | `uid` (required) | `string` | | | `title` (required) | `string` | | | `dashboards` (required) | `integer` | | ## GrafanaDatasource | Field | Type | Description | | --- | --- | --- | | `uid` (required) | `string` | | | `name` (required) | `string` | | | `type` (required) | `string` | The Grafana plugin id, such as `prometheus`. | | `kind` (required) | `string` or `null` | Our datasource type the importer maps it to (`prometheus`, `clickhouse`, `loki` or `tempo`); null when SlashObserve does not query this type, and its panels import as placeholders. A kind with no configured datasource has no candidates, and its panels also import as placeholders. | | `candidates` (required) | array of `string` | The uids of our datasources of that kind, the only valid mapping targets. | | `matched_uid` (required) | `string` or `null` | | ## RepairList | Field | Type | Description | | --- | --- | --- | | `dashboards` (required) | array of [`RepairItem`](/docs/reference/api/schemas/#repairitem) | | | `next_cursor` (required) | `string` or `null` | | ## RepairItem | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `url` (required) | `string` | The dashboard's address in the web app. | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `unverified_panels` (required) | `integer` | | | `unverified_variables` (required) | `integer` | | | `placeholder_panels` (required) | `integer` | Placeholder panels, top level or inside rows; people replace them, the agent does not. | | `last_import_at` (required) | `string` (date-time) or `null` | When the version the dashboard's import record points at was saved; null for a dashboard that was not imported, such as a duplicate of one. | | `repair` (required) | [`RepairStatus`](/docs/reference/api/schemas/#repairstatus) or `null` | | ## RepairStatus | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | The agent request id. | | `status` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | | | `finished_at` (required) | `string` (date-time) or `null` | | ## RequestRepairsRequest | Field | Type | Description | | --- | --- | --- | | `dashboard_ids` | array of `string` (uuid) | At most 100 items. | | `all` | `true` | | | `folder_id` | `string` (uuid) | Only with `all`. | ## RepairsQueued | Field | Type | Description | | --- | --- | --- | | `queued` (required) | array of `object` | | | `skipped` (required) | array of `object` | | ## GrafanaResolved | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `url` (required) | `string` | The web app path of the dashboard. | ## FetchGrafanaLinkRequest | Field | Type | Description | | --- | --- | --- | | `url` (required) | `string` | A link to a Grafana dashboard on the address of a stored connection, such as `https://grafana.example.com/d/<uid>/<slug>?orgId=1`. | ## GrafanaLinkedDashboard | Field | Type | Description | | --- | --- | --- | | `connection_id` (required) | `string` (uuid) | | | `uid` (required) | `string` | | | `title` (required) | `string` | | | `json` (required) | `string` | The dashboard as Grafana returned it, a JSON document in a string that `POST /imports` takes as its `json`. | ## PublicLinkSelections Variable selections by variable name; `$__all` selects All. Type: `object`. ## PublicLink | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `prefix` (required) | `string` | The first 12 characters of the token, to tell links apart; the token itself is never shown again. | | `label` (required) | `string` | What the link is for, set when it was created; empty when none was given. | | `variables` (required) | `"frozen"`, `"free"` | | | `selections` (required) | [`PublicLinkSelections`](/docs/reference/api/schemas/#publiclinkselections) | | | `expires_at` (required) | `string` (date-time) or `null` | | | `created_by` (required) | `object` | | | `created_at` (required) | `string` (date-time) | | | `last_viewed_at` (required) | `string` (date-time) or `null` | When the link was last opened, recorded at most once a minute. | | `expired` (required) | `boolean` | | | `usable` (required) | `boolean` | False when the link is expired or the dashboard's latest version reads the viewer's identity. | | `state` (required) | `"expired"`, `"active"` | Computed from `expired`. See `docs/reference/states.md`. | ## CreatePublicLinkRequest | Field | Type | Description | | --- | --- | --- | | `label` | `string` | Optional name for the link, up to 80 characters without control characters, so a list of links says what each is for. | | `variables` (required) | `"frozen"`, `"free"` | | | `selections` | [`PublicLinkSelections`](/docs/reference/api/schemas/#publiclinkselections) | | | `expires_at` | `string` (date-time) or `null` | When the link stops working; null or absent for no expiry. | ## CreatedPublicLink | Field | Type | Description | | --- | --- | --- | | `link` (required) | [`PublicLink`](/docs/reference/api/schemas/#publiclink) | | | `token` (required) | `string` | `pub_` plus 43 base64url characters, returned only in this response. | | `url` (required) | `string` | The address that opens the link, `<SLASHOBSERVE_PUBLIC_URL>/p/<token>`. | ## PublicDashboard | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `version` (required) | `integer` | | | `spec` (required) | `object` | The latest version's ObserveSpec without query text. | | `variables` (required) | `"frozen"`, `"free"` | | | `selections` (required) | [`PublicLinkSelections`](/docs/reference/api/schemas/#publiclinkselections) | | | `expires_at` (required) | `string` (date-time) or `null` | | | `datasources` (required) | array of `object` | | ## HealthProblemKind One of `no_data`, `query_failed`, `variable_failed`, `duplicate_title`, `unopened`. ## HealthProblem | Field | Type | Description | | --- | --- | --- | | `kind` (required) | [`HealthProblemKind`](/docs/reference/api/schemas/#healthproblemkind) | | | `panel_id` (required) | `string` or `null` | The panel the problem is in, or null for a variable or a dashboard-wide problem. | | `panel_title` (required) | `string` or `null` | | | `variable` (required) | `string` or `null` | The variable that resolves to nothing, for `variable_failed`. | | `code` (required) | `string` or `null` | The check's issue code, such as `query_empty`, or `check_failed` when the check itself could not run; null for `duplicate_title` and `unopened`. | | `message` (required) | `string` or `null` | | ## HealthItem | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `url` (required) | `string` | The dashboard's address in the web app. | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `can_edit` (required) | `boolean` | Whether the caller may edit the dashboard, and so ask for a repair; false for a starter dashboard, which the server keeps current with each release. | | `state` (required) | `"unchecked"`, `"outdated"`, `"skipped"`, `"failing"`, `"healthy"` | The dashboard's health computed from the last check, whatever the `kind` filter. See `docs/reference/states.md`. | | `checked_version` (required) | `integer` or `null` | The version the last health check ran on; null before the first check. | | `checked_at` (required) | `string` (date-time) or `null` | | | `last_viewed_at` (required) | `string` (date-time) or `null` | The latest time anyone opened the dashboard; null when nobody did since opens are recorded. | | `skipped` (required) | `"depends_on_viewer"` or `null` | Why the last check ran no query. | | `problems` (required) | array of [`HealthProblem`](/docs/reference/api/schemas/#healthproblem) | | | `repair` (required) | [`HealthRepair`](/docs/reference/api/schemas/#healthrepair) or `null` | The dashboard's latest health repair, whatever its age; null when it never had one. | ## HealthRepair | Field | Type | Description | | --- | --- | --- | | `state` (required) | `"queued"`, `"running"`, `"succeeded"`, `"failed"` | The status of the repair's run, kept for compatibility; read `outcome` instead. | | `outcome` (required) | `"queued"`, `"running"`, `"repaired"`, `"still_failing"`, `"failed"` | What the repair came to, computed from the run and the latest health check. See `docs/reference/states.md`. | | `request_id` (required) | `string` (uuid) | The revision request of the repair. | | `version` (required) | `integer` or `null` | The version a succeeded repair saved; null in any other state. | | `error` (required) | `string` or `null` | The failure sentence of a failed repair; null in any other state. | | `updated_at` (required) | `string` (date-time) | When the repair finished, else when it started, else when it was queued. | ## HealthJob | Field | Type | Description | | --- | --- | --- | | `last_started_at` (required) | `string` (date-time) or `null` | | | `last_finished_at` (required) | `string` (date-time) or `null` | | | `last_outcome` (required) | `"succeeded"`, `"failed"`, `"interrupted"` or `null` | | | `running` (required) | `boolean` | | ## HealthList | Field | Type | Description | | --- | --- | --- | | `dashboards` (required) | array of [`HealthItem`](/docs/reference/api/schemas/#healthitem) | | | `next_cursor` (required) | `string` or `null` | | | `summary` (required) | [`HealthSummary`](/docs/reference/api/schemas/#healthsummary) or `null` | Counts over every dashboard in the visible folders, narrowed by `folder_id` and never by `kind`; set on the first page and null when `cursor` is sent. | | `job` (required) | [`HealthJob`](/docs/reference/api/schemas/#healthjob) | | ## HealthSummary Each count is of dashboards, not problems. | Field | Type | Description | | --- | --- | --- | | `dashboards` (required) | `integer` | Dashboards with any problem. | | `failing` (required) | `integer` | Dashboards with a `query_failed` or `variable_failed` problem. | | `query_failed` (required) | `integer` | | | `variable_failed` (required) | `integer` | | | `no_data` (required) | `integer` | | | `duplicate_titles` (required) | `integer` | Dashboards with a `duplicate_title` problem. | | `unopened` (required) | `integer` | | ## ApplyResult | Field | Type | Description | | --- | --- | --- | | `path` (required) | `string` | | | `outcome` (required) | `"created"`, `"updated"`, `"unchanged"` | | | `dashboard_id` (required) | `string` (uuid) | | | `version` (required) | `integer` | The version saved, or the latest version when nothing changed. | ## AppliedList | Field | Type | Description | | --- | --- | --- | | `applied` (required) | array of `object` | | ## DraftQueryRequest | Field | Type | Description | | --- | --- | --- | | `question` (required) | `string` | | | `from` | `string` | | | `to` | `string` | | | `signal` | `"logs"`, `"traces"`, `"metrics"` | | ## DraftQuery | Field | Type | Description | | --- | --- | --- | | `query` (required) | `string` | LogQL, ClickHouse SQL, TraceQL, PromQL or KQL (or a `lucene:` or Query DSL body); empty when `language` is `filters`. | | `language` (required) | `"logql"`, `"clickhouse_sql"`, `"traceql"`, `"promql"`, `"kql"`, `"filters"` | | | `trace_filters` (required) | [`TraceFilters`](/docs/reference/api/schemas/#tracefilters) or `null` | The Traces form's fields; null unless `language` is `filters`. | | `explanation` (required) | `string` | | | `warnings` (required) | array of `string` | | ## TraceFilters Each field is present only when set. | Field | Type | Description | | --- | --- | --- | | `service` | `string` | | | `span` | `string` | | | `min` | `string` | A duration such as `250ms`. | | `max` | `string` | A duration such as `2s`. | | `errors` | `boolean` | | ## CannotTranslate | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"cannot_translate"` | | | `reason` (required) | `string` | | ## ObservationState See `docs/reference/states.md`. One of `open`, `resolved`. ## ObservationAction An action the caller may take in the observation's state, in the order of `docs/reference/states.md`; `publish` is taken through the RCA routes. One of `update`, `move`, `resolve`, `reopen`, `publish`, `delete`. ## ObservationBlockKind One of `text`, `panel`, `snapshot`, `run`. ## ObservationBlockState A block is deleted when it is removed or discarded, so `deleted` is never stored or returned. See `docs/reference/states.md`. One of `live`, `requested`. ## ObservationBlockAction An action the caller may take on the block in its state. One of `update`, `keep`, `discard`, `remove`. ## ObservationBlockWidth A block takes one, two or three thirds of the page's width, or all of it; a phone shows one column whatever the width. One of `third`, `half`, `two_thirds`, `full`. ## ObservationBlockHeight The height in pixels of a panel or snapshot block's content area, or null for the height its width has by default; a text or run block takes no height, and a height for one is refused with `invalid_block`. Type: `integer` or `null`. ## Observation | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `folder_id` (required) | `string` (uuid) | | | `title` (required) | `string` | | | `state` (required) | [`ObservationState`](/docs/reference/api/schemas/#observationstate) | | | `summary` (required) | `string` or `null` | The one-line summary given when it was resolved; kept when it is reopened, so read it with `state`, and an RCA published while the observation is open carries none; null until the first resolve. | | `from` (required) | `string` (date-time) or `null` | The start of the time range the observation is about, with `to`; both or neither. | | `to` (required) | `string` (date-time) or `null` | | | `thread_id` (required) | `string` (uuid) or `null` | The observation's one discussion thread, once someone has opened it. | | `run_id` (required) | `string` (uuid) or `null` | The agent request that made the observation, when one did. | | `dashboard_id` (required) | `string` (uuid) or `null` | The dashboard the run that made the observation was about, the one a pin goes to by default; set only when the observation is read by id. | | `pinned` (required) | `boolean` | Whether the observation is pinned to `dashboard_id`; set only when the observation is read by id. | | `can_pin` (required) | `boolean` | Whether the caller may pin the observation to `dashboard_id`, which needs edit access to that dashboard; set only when the observation is read by id. | | `message_count` (required) | `integer` | How many messages the observation's discussion thread holds, replies included; 0 while it has no thread. | | `url` (required) | `string` | `<SLASHOBSERVE_PUBLIC_URL>/o/<id>`. | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | When the observation or any of its blocks last changed. | | `resolved_at` (required) | `string` (date-time) or `null` | | | `allowed_actions` (required) | array of [`ObservationAction`](/docs/reference/api/schemas/#observationaction) | | | `blocks` | array of [`ObservationBlock`](/docs/reference/api/schemas/#observationblock) | The blocks in page order; present when one observation is read, absent from lists. | | `chat_rename` | `"renamed"`, `"kept"` | Present only in the answer to a title change of the one observation made from a chat with no dashboard. `renamed` when the chat now has the observation's title, `kept` when the caller did not start that chat and its title was left as it is. | ## ObservationBlock | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `observation_id` (required) | `string` (uuid) | | | `kind` (required) | [`ObservationBlockKind`](/docs/reference/api/schemas/#observationblockkind) | | | `state` (required) | [`ObservationBlockState`](/docs/reference/api/schemas/#observationblockstate) | | | `position` (required) | `integer` | Zero-based and dense, so the blocks of an observation hold 0 to n-1. | | `width` (required) | [`ObservationBlockWidth`](/docs/reference/api/schemas/#observationblockwidth) | | | `height` (required) | [`ObservationBlockHeight`](/docs/reference/api/schemas/#observationblockheight) | | | `version` (required) | `integer` | Starts at 1 and grows with each change to this block's content, width, height or position through `PATCH /blocks/{id}`; reordering other blocks and `PUT /observations/{id}/layout` do not change it. A write to the block's content names the version it read. | | `body` (required) | `object` | A `text` block has `{markdown}`; a `panel` block has `{panel, variables?, from?, to?}` where `panel` is a Spec panel without `id` and `gridPos` and `variables` are the Spec variable definitions the panel's queries use, each with a `default` that holds the value the person saw when the block was added; a `snapshot` block has `{snapshot_id}`; a `run` block has `{run_id, cites}`. | | `snapshot_id` (required) | `string` (uuid) or `null` | The frozen data of a `snapshot` block, read with `GET /snapshots/{id}`. | | `run_id` (required) | `string` (uuid) or `null` | | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `updated_at` (required) | `string` (date-time) | | | `allowed_actions` (required) | array of [`ObservationBlockAction`](/docs/reference/api/schemas/#observationblockaction) | | ## ObservationEnvelope | Field | Type | Description | | --- | --- | --- | | `observation` (required) | [`Observation`](/docs/reference/api/schemas/#observation) | | | `folder` (required) | [`DashboardFolder`](/docs/reference/api/schemas/#dashboardfolder) | | | `permissions` (required) | [`Permissions`](/docs/reference/api/schemas/#permissions) | | ## ObservationList | Field | Type | Description | | --- | --- | --- | | `observations` (required) | array of [`Observation`](/docs/reference/api/schemas/#observation) | | | `next_cursor` (required) | `string` or `null` | | | `total` (required) | `integer` or `null` | The number of observations that match the filters, present only when the request has `offset`. | ## BlockEnvelope | Field | Type | Description | | --- | --- | --- | | `block` (required) | [`ObservationBlock`](/docs/reference/api/schemas/#observationblock) | | ## BlockConflict The answer to a write that names a block version other than the current one. | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"version_conflict"` | | | `current` (required) | [`ObservationBlock`](/docs/reference/api/schemas/#observationblock) | | ## CreateObservationRequest | Field | Type | Description | | --- | --- | --- | | `title` (required) | `string` | Trimmed, 1 to 200 characters. | | `folder_id` | `string` (uuid) | The folder to file it in; absent means the caller's My Dashboards, then General. Needs Edit on the folder. | | `from` | `string` (date-time) | | | `to` | `string` (date-time) | | | `first_block` | `object` | A text or panel block written in the same transaction as the observation. | ## UpdateObservationRequest At least one field. `from` and `to` are set together, or both null to clear the range. | Field | Type | Description | | --- | --- | --- | | `title` | `string` | | | `from` | `string` (date-time) or `null` | | | `to` | `string` (date-time) or `null` | | ## MoveObservationRequest | Field | Type | Description | | --- | --- | --- | | `folder_id` (required) | `string` (uuid) | | ## ResolveObservationRequest | Field | Type | Description | | --- | --- | --- | | `summary` (required) | `string` | Trimmed, one line of 1 to 500 characters. | ## AddObservationBlockRequest | Field | Type | Description | | --- | --- | --- | | `kind` (required) | `"text"`, `"panel"`, `"snapshot"` | `run` is never added through the API (`kind_not_addable`). | | `body` | `object` | Required for `text` and `panel`, and absent for `snapshot`; see `body` of a block. A panel body may carry `variable_values`, an object of name to a list of values, instead of `variables`: each name becomes a custom variable with those values as its options and default, and the stored block shows `variables`. | | `width` | [`ObservationBlockWidth`](/docs/reference/api/schemas/#observationblockwidth) | | | `height` | [`ObservationBlockHeight`](/docs/reference/api/schemas/#observationblockheight) | | | `position` | `integer` | Where to insert it; clamped to the end, and the blocks after it shift. Absent means the end. | | `from_block_id` | `string` (uuid) | A `snapshot` block freezes this panel block of the same observation now. | ## UpdateObservationBlockRequest | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | | | `body` | `object` | Only for `text` and `panel` blocks (`body_not_editable` otherwise). | | `width` | [`ObservationBlockWidth`](/docs/reference/api/schemas/#observationblockwidth) | | | `height` | [`ObservationBlockHeight`](/docs/reference/api/schemas/#observationblockheight) | | | `position` | `integer` | Moves the block; clamped to the last position, and the blocks in between shift. | | `follow_page` | `boolean` | True clears a panel block's own range, so it follows the observation's range; never sent with `body`. | ## ObservationLayoutRequest | Field | Type | Description | | --- | --- | --- | | `blocks` (required) | array of `object` | The blocks in the order the page should show them, each at most once. At most 100 items. | ## ObservationLayout | Field | Type | Description | | --- | --- | --- | | `blocks` (required) | array of [`ObservationBlock`](/docs/reference/api/schemas/#observationblock) | Every block the caller sees, in the stored order, with its position, width and height. | ## PinObservationRequest | Field | Type | Description | | --- | --- | --- | | `dashboard_id` | `string` (uuid) | The dashboard to pin to; the one the observation's run was about when absent. | ## MakeDashboardRequest | Field | Type | Description | | --- | --- | --- | | `new` | `boolean` | Make another dashboard even when the caller already made one from this observation or block. | ## ObservationPin | Field | Type | Description | | --- | --- | --- | | `dashboard_id` (required) | `string` (uuid) | | | `annotation_id` (required) | `string` (uuid) | | ## KeepObservationBlockRequest | Field | Type | Description | | --- | --- | --- | | `version` (required) | `integer` | | ## Snapshot | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `observation_id` (required) | `string` (uuid) | | | `panel` (required) | `object` | The frozen panel without its `queries`, enough to draw `data`. | | `query` (required) | array of `object` | The frozen panel's `queries`, kept for provenance inside the workspace; never part of an RCA. | | `data` (required) | [`PanelData`](/docs/reference/api/schemas/#paneldata) | | | `user_scoped` (required) | `boolean` | True when the queries read the viewer's identity, so the data is the freezing person's view. | | `time_from` (required) | `string` (date-time) | | | `time_to` (required) | `string` (date-time) | | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | ## RCABlock One block of a published RCA, in page order. Type: `object` or `object`. ## ObservationRCA | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `observation_id` (required) | `string` (uuid) | | | `revision` (required) | `integer` | Numbered per observation from 1; a published revision never changes. | | `title` (required) | `string` | | | `summary` (required) | `string` or `null` | | | `observation_state` (required) | [`ObservationState`](/docs/reference/api/schemas/#observationstate) | | | `from` (required) | `string` (date-time) or `null` | | | `to` (required) | `string` (date-time) or `null` | | | `blocks` (required) | array of [`RCABlock`](/docs/reference/api/schemas/#rcablock) | | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | ## ObservationRCASummary | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `revision` (required) | `integer` | | | `title` (required) | `string` | | | `summary` (required) | `string` or `null` | | | `observation_state` (required) | [`ObservationState`](/docs/reference/api/schemas/#observationstate) | | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | ## RCAPublicLink | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `revision` (required) | `integer` | The RCA revision the link shows. | | `prefix` (required) | `string` | The first 12 characters of the token; the token itself is never shown again. | | `expires_at` (required) | `string` (date-time) or `null` | | | `created_by` (required) | [`Actor`](/docs/reference/api/schemas/#actor) | | | `created_at` (required) | `string` (date-time) | | | `last_viewed_at` (required) | `string` (date-time) or `null` | | | `expired` (required) | `boolean` | | | `state` (required) | `"expired"`, `"active"` | | ## CreateRCAPublicLinkRequest | Field | Type | Description | | --- | --- | --- | | `expires_at` | `string` (date-time) or `null` | When the link stops working; null or absent for no expiry. | ## CreatedRCAPublicLink | Field | Type | Description | | --- | --- | --- | | `link` (required) | [`RCAPublicLink`](/docs/reference/api/schemas/#rcapubliclink) | | | `token` (required) | `string` | `pub_` plus 43 base64url characters, returned only in this response. | | `url` (required) | `string` | The address that opens the link, `<SLASHOBSERVE_PUBLIC_URL>/rca/<token>`. | ## PublicRCA A published RCA as a public link shows it, which is the RCA without the observation id and without actor ids. | Field | Type | Description | | --- | --- | --- | | `revision` (required) | `integer` | | | `title` (required) | `string` | | | `summary` (required) | `string` or `null` | | | `observation_state` (required) | [`ObservationState`](/docs/reference/api/schemas/#observationstate) | | | `from` (required) | `string` (date-time) or `null` | | | `to` (required) | `string` (date-time) or `null` | | | `blocks` (required) | array of [`RCABlock`](/docs/reference/api/schemas/#rcablock) | | | `published_by` (required) | `string` | The name of whoever published it. | | `created_at` (required) | `string` (date-time) | | | `superseded_by` (required) | `integer` or `null` | The number of the newest revision when a newer one has been published since this one, otherwise null. It tells a reader of an old link that the conclusion may have changed; it leaks nothing of the live observation. | ## AuditEvent One recorded action, with who did it, through what, to what and how it ended. | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` (uuid) | | | `seq` (required) | `integer` (int64) | | | `occurred_at` (required) | `string` (date-time) | | | `category` (required) | `"auth"`, `"access"`, `"content"`, `"conversation"`, `"agent"`, `"query"`, `"admin"`, `"system"` | | | `action` (required) | `string` | | | `outcome` (required) | `"success"`, `"denied"`, `"failed"`, `"unknown"` | | | `reason` (required) | `string` or `null` | | | `status` (required) | `integer` or `null` | | | `duration_ms` (required) | `integer` or `null` | | | `actor_kind` (required) | `"user"`, `"service_account"`, `"anonymous"`, `"system"` | | | `actor_id` (required) | `string` (uuid) or `null` | | | `actor_name` (required) | `string` or `null` | | | `actor_role` (required) | `string` or `null` | | | `initiator` (required) | `"person"`, `"agent"`, `"system"` | | | `agent_id` (required) | `string` (uuid) or `null` | | | `agent_name` (required) | `string` or `null` | | | `run_id` (required) | `string` (uuid) or `null` | | | `auth_method` (required) | `string` or `null` | | | `credential_id` (required) | `string` or `null` | | | `origin` (required) | `"web"`, `"cli"`, `"mcp"`, `"api"`, `"agent"`, `"job"`, `"provision"` | | | `origin_client` (required) | `string` or `null` | | | `tool` (required) | `string` or `null` | | | `client_ip` (required) | `string` or `null` | | | `user_agent` (required) | `string` or `null` | | | `request_id` (required) | `string` (uuid) or `null` | | | `trace_id` (required) | `string` or `null` | | | `http_method` (required) | `string` or `null` | | | `route` (required) | `string` or `null` | | | `target_kind` (required) | `string` or `null` | | | `target_id` (required) | `string` or `null` | | | `target_name` (required) | `string` or `null` | | | `folder_id` (required) | `string` (uuid) or `null` | | | `dashboard_id` (required) | `string` (uuid) or `null` | | | `observation_id` (required) | `string` (uuid) or `null` | | | `thread_id` (required) | `string` (uuid) or `null` | | | `chat_id` (required) | `string` (uuid) or `null` | | | `datasource_uid` (required) | `string` or `null` | | | `data` (required) | `object` | The action's own fields, as the audit catalog declares them; never secrets, prompt, comment or query text. | | `server_id` (required) | `string` | | | `server_version` (required) | `string` | | ## AuditEventList | Field | Type | Description | | --- | --- | --- | | `events` (required) | array of [`AuditEvent`](/docs/reference/api/schemas/#auditevent) | At most 1000 items. | | `next_cursor` (required) | `string` or `null` | | | `form` (required) | `"kql"`, `"lucene"`, `"dsl"` | The form `q` was read in. | | `since` (required) | `string` (date-time) | The resolved start of the window, inclusive. | | `until` (required) | `string` (date-time) | The resolved end of the window, exclusive. | | `warnings` (required) | array of `string` | Things that make the query probably not mean what it says, such as a misspelled `and`, `or` or `not`, or a Lucene operator in lower case, that is searched as text; empty when there are none. | ## AuditEventDetail | Field | Type | Description | | --- | --- | --- | | `event` (required) | [`AuditEvent`](/docs/reference/api/schemas/#auditevent) | | | `same_request` (required) | array of [`AuditEvent`](/docs/reference/api/schemas/#auditevent) | At most 50 items. | | `same_run` (required) | array of [`AuditEvent`](/docs/reference/api/schemas/#auditevent) | At most 50 items. | ## AuditFacets | Field | Type | Description | | --- | --- | --- | | `field` (required) | `string` | | | `values` (required) | array of `object` | At most 100 items. | | `form` (required) | `"kql"`, `"lucene"`, `"dsl"` | The form `q` was read in. | | `since` (required) | `string` (date-time) | The resolved start of the window, inclusive. | | `until` (required) | `string` (date-time) | The resolved end of the window, exclusive. | | `warnings` (required) | array of `string` | Things that make the query probably not mean what it says, such as a misspelled `and`, `or` or `not`, or a Lucene operator in lower case, that is searched as text; empty when there are none. | ## AuditHistogram | Field | Type | Description | | --- | --- | --- | | `step_ms` (required) | `integer` (int64) | The width of each bucket in milliseconds. | | `total` (required) | `integer` (int64) | The matching events in the window. | | `buckets` (required) | array of `object` | At most 201 items. | | `form` (required) | `"kql"`, `"lucene"`, `"dsl"` | The form `q` was read in. | | `since` (required) | `string` (date-time) | The resolved start of the window, inclusive. | | `until` (required) | `string` (date-time) | The resolved end of the window, exclusive. | | `warnings` (required) | array of `string` | Things that make the query probably not mean what it says, such as a misspelled `and`, `or` or `not`, or a Lucene operator in lower case, that is searched as text; empty when there are none. | ## AuditAggregation | Field | Type | Description | | --- | --- | --- | | `levels` (required) | array of `object` | | | `metrics` (required) | array of `object` | | | `rows` (required) | array of `object` | At most 100000 items. | | `truncated` (required) | `boolean` | True when the rows stop at the limit and more exist. | | `form` (required) | `"kql"`, `"lucene"`, `"dsl"` | The form `q` was read in. | | `since` (required) | `string` (date-time) | The resolved start of the window, inclusive. | | `until` (required) | `string` (date-time) | The resolved end of the window, exclusive. | | `warnings` (required) | array of `string` | Things that make the query probably not mean what it says, such as a misspelled `and`, `or` or `not`, or a Lucene operator in lower case, that is searched as text; empty when there are none. | ## AuditFieldList | Field | Type | Description | | --- | --- | --- | | `fields` (required) | array of `object` | | ## AuditQueryError | Field | Type | Description | | --- | --- | --- | | `error` (required) | `string` | | | `code` (required) | `"query_invalid"`, `"query_timeout"` | | | `start` | `integer` | For a parse error, the byte offset in `q` where the problem starts. | | `end` | `integer` | For a parse error, the byte offset in `q` where the problem ends. | Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # ObserveSpec schema > ObserveSpec v0: one SlashObserve dashboard. Absent fields mean the default. Source: https://slashobserve.com/docs/reference/observespec/ · Markdown: https://slashobserve.com/docs/reference/observespec/index.md ## Fields | Field | Type | Description | | --- | --- | --- | | `specVersion` (required) | `"0"` | | | `title` (required) | `string` | | | `description` | `string` | | | `tags` | array of `string` | At most 20 items. | | `time` (required) | `timeRange` | | | `refresh` | `string` | Auto-refresh interval such as 30s, 1m, 1h or 1d. | | `timePicker` | `object` | What the time picker offers: hidden removes it, refreshIntervals replaces the auto-refresh choices and quickRanges the preset ranges. A refresh that is not in refreshIntervals is still allowed. | | `liveNow` | `boolean` | Refresh the dashboard every few seconds until a refresh interval is chosen, as Grafana's live now redraws time charts continuously. | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. Relative times (now/d, now-1d) resolve in this zone. | | `weekStart` | `"monday"`, `"sunday"`, `"saturday"` | The first day of the week for now/w. Absent means monday. | | `fiscalYearStartMonth` | `integer` | The month the fiscal year starts in for now/fy and now/fQ, 0 (January) to 11 (December). Absent means 0. Between 0 and 11. | | `nowDelay` | `string` | How far behind the real time now is for every relative time, such as 30s or 1m. | | `cursorSync` | `"off"`, `"crosshair"`, `"tooltip"` | How hovering one time chart shows on the others: off, crosshair (the hovered time is marked on every time chart) or tooltip (their tooltips open too). Grafana's graphTooltip 0, 1 and 2. | | `variables` | array of `variable` | At most 20 items. | | `links` | array of `dashboardLink` | At most 20 items. | | `panels` (required) | array of `panel` | At most 200 panels in total, row children included; ids are unique across all of them. At most 200 items. | ## Variable types - [`query`](/docs/reference/observespec/variables/query/) - [`custom`](/docs/reference/observespec/variables/custom/) - [`constant`](/docs/reference/observespec/variables/constant/) - [`interval`](/docs/reference/observespec/variables/interval/) - [`textbox`](/docs/reference/observespec/variables/textbox/) - [`datasource`](/docs/reference/observespec/variables/datasource/) - [`adhoc`](/docs/reference/observespec/variables/adhoc/) - [`groupby`](/docs/reference/observespec/variables/groupby/) ## Panel types - [`timeseries`](/docs/reference/observespec/panels/timeseries/) - [`stat`](/docs/reference/observespec/panels/stat/) - [`gauge`](/docs/reference/observespec/panels/gauge/) - [`bargauge`](/docs/reference/observespec/panels/bargauge/) - [`table`](/docs/reference/observespec/panels/table/) - [`piechart`](/docs/reference/observespec/panels/piechart/) - [`heatmap`](/docs/reference/observespec/panels/heatmap/) - [`histogram`](/docs/reference/observespec/panels/histogram/) - [`state-timeline`](/docs/reference/observespec/panels/state-timeline/) - [`logs`](/docs/reference/observespec/panels/logs/) - [`barchart`](/docs/reference/observespec/panels/barchart/) - [`status-history`](/docs/reference/observespec/panels/status-history/) - [`trend`](/docs/reference/observespec/panels/trend/) - [`xychart`](/docs/reference/observespec/panels/xychart/) - [`candlestick`](/docs/reference/observespec/panels/candlestick/) - [`nodeGraph`](/docs/reference/observespec/panels/nodegraph/) - [`traces`](/docs/reference/observespec/panels/traces/) - [`flamegraph`](/docs/reference/observespec/panels/flamegraph/) - [`geomap`](/docs/reference/observespec/panels/geomap/) - [`canvas`](/docs/reference/observespec/panels/canvas/) - [`alertlist`](/docs/reference/observespec/panels/alertlist/) - [`text`](/docs/reference/observespec/panels/text/) - [`placeholder`](/docs/reference/observespec/panels/placeholder/) - [`row`](/docs/reference/observespec/panels/row/) - [`dashlist`](/docs/reference/observespec/panels/dashlist/) - [`news`](/docs/reference/observespec/panels/news/) The JSON Schema is published at [`/schemas/observespec.v0.json`](/schemas/observespec.v0.json). Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # query > Fields of a `query` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/query/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/query/index.md ## Example ```json { "name": "pod", "type": "query", "datasource": "prom", "multi": true, "includeAll": true, "query": "label_values(http_requests_total{service=\"checkout\"}, pod)" } ``` From [`spec/examples/checkout-service-health.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/checkout-service-health.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"query"` | | | `datasource` (required) | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `query` (required) | `query` | | | `regex` | `string` | | | `sort` | `"alpha"`, `"alphaDesc"`, `"num"`, `"numDesc"`, `"alphaCaseInsensitive"`, `"alphaCaseInsensitiveDesc"`, `"natural"`, `"naturalDesc"` | | | `refresh` | `"load"`, `"timeRange"` or `"never"` | | | `staticOptions` | array of `object` | Options offered next to the query results. At most 50 items. | | `staticOrder` | `"before"`, `"after"`, `"sorted"` | Where staticOptions go: before the query results (the default), after them, or merged and sorted with the variable's sort. | | `allowCustomValue` | `boolean` | | | `multi` | `boolean` | | | `includeAll` | `boolean` | | | `allValue` | `string` | | | `default` | `selection` | Default selection: one value, several for a multi variable, or $__all. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # custom > Fields of a `custom` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/custom/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/custom/index.md ## Example ```json { "name": "env", "type": "custom", "options": [ "prod", "staging" ] } ``` From [`spec/examples/decision9-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/decision9-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"custom"` | | | `options` (required) | array of `string` or `object` | At most 200 items. | | `allowCustomValue` | `boolean` | | | `multi` | `boolean` | | | `includeAll` | `boolean` | | | `allValue` | `string` | | | `default` | `selection` | Default selection: one value, several for a multi variable, or $__all. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # constant > Fields of a `constant` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/constant/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/constant/index.md ## Example ```json { "name": "team", "type": "constant", "value": "payments" } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"constant"` | | | `value` (required) | `string` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # interval > Fields of a `interval` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/interval/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/interval/index.md ## Example ```json { "name": "window", "type": "interval", "options": [ "1m", "5m", "1h" ], "auto": true, "autoSteps": 30, "autoMin": "10s", "default": "5m" } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"interval"` | | | `options` (required) | array of `string` | At most 50 items. | | `auto` | `boolean` | | | `autoSteps` | `integer` | Between 1 and 1000. | | `autoMin` | `string` | | | `default` | `string` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # textbox > Fields of a `textbox` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/textbox/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/textbox/index.md ## Example ```json { "name": "filter", "type": "textbox", "default": "" } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"textbox"` | | | `default` | `string` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # datasource > Fields of a `datasource` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/datasource/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/datasource/index.md ## Example ```json { "name": "ds", "type": "datasource", "datasourceType": "prometheus", "default": "prom" } ``` From [`spec/examples/datasource-variable.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/datasource-variable.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"datasource"` | | | `datasourceType` (required) | `"prometheus"`, `"clickhouse"`, `"loki"`, `"tempo"`, `"elasticsearch"`, `"opensearch"` | | | `regex` | `string` | | | `default` | `datasourceUid` | A configured datasource uid; its type comes from the server's registry. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # adhoc > Fields of a `adhoc` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/adhoc/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/adhoc/index.md ## Example ```json { "name": "adhoc", "type": "adhoc", "datasource": "prom", "keys": [ "service", "env", "pod" ], "listedValuesOnly": true, "baseFilters": [ { "key": "env", "operator": "=", "value": "prod" } ], "default": [ { "key": "service", "operator": "=", "value": "checkout", "keyLabel": "Service", "valueLabel": "Checkout" } ] } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"adhoc"` | | | `datasource` (required) | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `applyToAll` | `true` | Only ClickHouse needs it: also filter every query on this datasource that does not use this variable, on each table the query reads. Prometheus, Elasticsearch and OpenSearch filter every query on the datasource whether or not it is set. | | `default` | array of `adhocFilter` | At most 20 items. | | `baseFilters` | array of `adhocFilter` | Filters always applied to this variable's queries, ANDed with the selected filters as a whole; never shown and never in the URL. At most 20 items. | | `keys` | array of `string` | The keys the filter picker offers instead of asking the datasource. At most 100 items. | | `listedValuesOnly` | `boolean` | A filter's key and value must be picked from the lists the picker shows; absent means any text may be typed. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # groupby > Fields of a `groupby` variable. Source: https://slashobserve.com/docs/reference/observespec/variables/groupby/ · Markdown: https://slashobserve.com/docs/reference/observespec/variables/groupby/index.md ## Example ```json { "name": "groupby", "type": "groupby", "datasource": "prom", "default": [ "pod" ], "keys": [ "pod", "service", "env" ] } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `name` (required) | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `label` | `string` | | | `description` | `string` | | | `hide` | `"label"`, `"variable"` | | | `skipUrlSync` | `boolean` | The variable's value is not read from or written to the URL. | | `type` (required) | `"groupby"` | | | `datasource` (required) | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `default` | array of `string` | At most 20 items. | | `keys` | array of `string` | The labels the picker offers instead of asking the datasource. At most 100 items. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # timeseries > Fields and display options of a `timeseries` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/timeseries/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/timeseries/index.md ## Example ```json { "id": "p_rps", "type": "timeseries", "title": "Requests per second by pod", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "prom", "unit": "reqps", "queries": [ { "query": "sum by (pod) (rate(http_requests_total{service=\"checkout\",pod=~\"$pod\"}[$__rate_interval]))", "legend": "{{pod}}" } ] } ``` From [`spec/examples/checkout-service-health.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/checkout-service-health.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendMode` | `"list"`, `"table"` | | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `legendHideZero` | `true`, `false` | | | `legendHideEmpty` | `true`, `false` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipCumulative` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | | `xAxis` | `"shown"`, `"hidden"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # stat > Fields and display options of a `stat` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/stat/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/stat/index.md ## Example ```json { "id": "p_status", "type": "stat", "title": "Checkout up", "gridPos": { "x": 12, "y": 0, "w": 6, "h": 4 }, "datasource": "prom", "queries": [ { "query": "min(up{service=\"checkout\"})", "instant": true } ], "mappings": [ { "value": "1", "text": "Up", "color": "ok" }, { "range": [ null, 0 ], "text": "Down", "color": "critical" }, { "regex": "^[0-9]+$", "text": "Numeric" }, { "special": "null", "text": "No data", "color": "info" } ], "thresholds": [ { "color": "critical" }, { "value": 1, "color": "ok" } ], "actions": [ { "title": "Acknowledge", "method": "POST", "url": "https://ops.example.com/api/ack", "contentType": "application/json", "body": "{\"service\":\"checkout\",\"env\":\"${env}\",\"reason\":\"${reason}\"}", "variables": [ { "key": "reason", "name": "Reason" } ], "color": "warning", "oneClick": true, "confirm": "Acknowledge the checkout alert?" } ], "display": { "graph": false, "colorMode": "background" } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `reduce` | `reducer` | | | `allValues` | `true`, `false` | | | `limit` | `integer` | Between 1 and 5000. | | `fields` | `string` | | | `colorMode` | `"value"`, `"background"`, `"none"` | | | `graph` | `true`, `false` | | | `graphStyle` | `"area"`, `"line"` | | | `textMode` | `"value"`, `"name"`, `"valueAndName"`, `"none"` | | | `orientation` | `"auto"`, `"horizontal"`, `"vertical"` | | | `justify` | `"auto"`, `"center"` | | | `titleSize` | `integer` | Between 1 and 200. | | `valueSize` | `integer` | Between 1 and 200. | | `percentSize` | `integer` | Between 1 and 200. | | `percentChange` | `true`, `false` | | | `percentChangeColor` | `"standard"`, `"inverted"`, `"value"` | | | `wideLayout` | `true`, `false` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # gauge > Fields and display options of a `gauge` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/gauge/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/gauge/index.md ## Example ```json { "id": "p_drift", "type": "gauge", "title": "Clock drift", "gridPos": { "x": 0, "y": 49, "w": 6, "h": 6 }, "datasource": "prom", "unit": "s", "min": -50, "max": 50, "neutral": 0, "queries": [ { "query": "node_timex_offset_seconds{service=\"checkout\"}", "instant": true } ] } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `reduce` | `reducer` | | | `allValues` | `true`, `false` | | | `limit` | `integer` | Between 1 and 5000. | | `fields` | `string` | | | `thresholdMarkers` | `true`, `false` | | | `thresholdLabels` | `true`, `false` | | | `minWidth` | `integer` | Between 1 and 2000. | | `minHeight` | `integer` | Between 1 and 2000. | | `titleSize` | `integer` | Between 1 and 200. | | `valueSize` | `integer` | Between 1 and 200. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # bargauge > Fields and display options of a `bargauge` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/bargauge/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/bargauge/index.md ## Example ```json { "id": "cpu_by_pod", "type": "bargauge", "title": "CPU by pod", "gridPos": { "x": 6, "y": 0, "w": 6, "h": 4 }, "datasource": "prom", "queries": [ { "query": "sum by (pod) (rate(container_cpu_usage_seconds_total{service=~\"$service\"}[$__rate_interval]))", "legend": "{{pod}}" } ], "unit": "percentunit", "min": 0, "max": 1, "thresholds": [ { "value": 0.7, "color": "warning" }, { "value": 0.9, "color": "#d44a3a" } ] } ``` From [`spec/examples/shop-overview.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/shop-overview.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `reduce` | `reducer` | | | `allValues` | `true`, `false` | | | `limit` | `integer` | Between 1 and 5000. | | `fields` | `string` | | | `orientation` | `"auto"`, `"horizontal"`, `"vertical"` | | | `barStyle` | `"basic"`, `"lcd"` | | | `valueMode` | `"color"`, `"text"`, `"hidden"` | | | `namePlacement` | `"auto"`, `"top"`, `"left"`, `"hidden"` | | | `showUnfilled` | `true`, `false` | | | `minWidth` | `integer` | Between 1 and 2000. | | `minHeight` | `integer` | Between 1 and 2000. | | `maxHeight` | `integer` | Between 1 and 2000. | | `titleSize` | `integer` | Between 1 and 200. | | `valueSize` | `integer` | Between 1 and 200. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # table > Fields and display options of a `table` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/table/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/table/index.md ## Example ```json { "id": "p_errlogs", "type": "table", "title": "Error logs by message (ClickHouse)", "gridPos": { "x": 0, "y": 8, "w": 24, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT Body AS message, count() AS n FROM otel_logs WHERE ServiceName = 'checkout' AND SeverityText = 'ERROR' AND $__timeFilter(Timestamp) GROUP BY message ORDER BY n DESC LIMIT 20" } ] } ``` From [`spec/examples/checkout-service-health.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/checkout-service-health.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `header` | `true`, `false` | | | `footer` | array of `reducer` | At most 5 items. | | `footerFields` | array of `string` | Limits the footer to the columns with these field names; absent means every number column. At most 50 items. | | `footerCountRows` | `true`, `false` | Adds a footer row with the number of rows. | | `cellHeight` | `"sm"`, `"md"`, `"lg"`, `"auto"` | The height of a table row: sm is the compact row, md and lg add padding, and auto fits each row to its content up to maxRowHeight. | | `maxRowHeight` | `integer` | The tallest a row may grow, in pixels, when cellHeight is auto or a cell has dynamicHeight. Between 20 and 1000. | | `frameIndex` | `integer` | Shows only this frame when the data has several and no transform merges them (the last frame when the index is past it); absent shows every frame, one after another. Between 0 and 99. | | `pagination` | `true`, `false` | Shows the rows in pages sized to the panel, with previous and next buttons. | | `frozenColumns` | `integer` | The number of columns from the left that stay in view while the table scrolls sideways. Between 0 and 10. | | `sortBy` | `string` | The name of the column the table starts sorted by. | | `sortDesc` | `true`, `false` | Sorts the starting sort from the largest value down. | | `typeIcons` | `true`, `false` | Shows an icon for the column type before each header. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # piechart > Fields and display options of a `piechart` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/piechart/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/piechart/index.md ## Example ```json { "id": "p_share", "type": "piechart", "title": "Requests by pod", "gridPos": { "x": 0, "y": 33, "w": 8, "h": 8 }, "datasource": "prom", "queries": [ { "query": "sum by (pod) (rate(http_requests_total{service=\"checkout\"}[5m]))", "instant": true } ], "display": { "sort": "asc" } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `reduce` | `reducer` | | | `allValues` | `true`, `false` | | | `limit` | `integer` | Between 1 and 5000. | | `fields` | `string` | | | `sort` | `"desc"`, `"asc"`, `"none"` | | | `pieType` | `"pie"`, `"donut"` | | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `sliceLabels` | array of `"name"`, `"value"`, `"percent"` | At most 3 items. | | `titleSize` | `integer` | Between 1 and 200. | | `valueSize` | `integer` | Between 1 and 200. | | `legendShow` | array of `"value"`, `"percent"` | At most 2 items. | | `legendMode` | `"list"`, `"table"` | | | `legendSortBy` | `"name"`, `"value"` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # heatmap > Fields and display options of a `heatmap` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/heatmap/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/heatmap/index.md ## Example ```json { "id": "p_latency_heat", "type": "heatmap", "title": "Request latency over time", "gridPos": { "x": 0, "y": 55, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "http_request_duration_seconds{service=\"checkout\"}" } ], "display": { "calculate": true, "xBuckets": { "mode": "count", "value": 12 }, "xBucketScale": "log", "xBucketLogBase": 10 } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `calculate` | `true`, `false` | | | `yScale` | `"linear"`, `"log"`, `"symlog"` | | | `colorMode` | `"scheme"`, `"opacity"` | scheme colors the cells with colorScheme; opacity varies the opacity of colorFill. Absent means opacity. | | `colorScheme` | `"greenYellowRed"`, `"redYellowGreen"`, `"blueYellowRed"`, `"yellowRed"`, `"bluePurple"`, `"yellowBlue"`, `"blues"`, `"reds"`, `"greens"`, `"purples"`, `"oranges"`, `"viridis"`, `"magma"`, `"plasma"`, `"inferno"`, `"cividis"`, `"warm"` | | | `colorSteps` | `integer` | Number of distinct colors in scheme mode; absent means a continuous ramp. Between 2 and 128. | | `colorScale` | `"linear"`, `"exponential"` | | | `colorExponent` | `number` | Exponent of an exponential colorScale; 0.5 when absent. Between 0.1 and 2. | | `colorFill` | `color` | The color whose opacity varies in opacity mode; absent means the first series color. | | `colorMin` | `number` | | | `colorMax` | `number` | | | `colorReverse` | `true`, `false` | | | `cellGap` | `integer` | Pixels between cells. Between 0 and 25. | | `cellRadius` | `integer` | Cell corner radius in pixels. Between 0 and 10. | | `cellUnit` | `unit` | A Grafana unit id, or a custom suffix:, prefix:, time:, si:, count: or currency: unit. | | `cellDecimals` | `integer` | Between 0 and 10. | | `legend` | `"bottom"`, `"hidden"` | Whether the color scale is shown under the chart; bottom when absent. | | `hideBelow` | `number` | Cells with a value at or below this are not drawn; 0 when absent. | | `hideAbove` | `number` | Cells with a value at or above this are not drawn. | | `showValues` | `"auto"`, `"always"`, `"never"` | Whether cells carry their value as text: auto only where it fits, always, or never (the default). | | `xBuckets` | `object` | How calculate groups time into columns: size is seconds per column and count is the number of columns; without a value the size is the data step and the count is one column per sample time. Absent keeps one column per sample time. | | `yBuckets` | `object` | How calculate groups values into rows: size is the value range of a row (the exponent step on a log scale) and count is the number of rows; without a value the size is a round step that gives about 16 rows and the count is 16. Absent means 16 rows. | | `yBucketScale` | `"linear"`, `"log"`, `"symlog"` | Spacing of calculated rows; absent follows yScale. | | `yBucketLogBase` | `2`, `10` | Base of a logarithmic yBucketScale; 2 when absent. | | `xBucketScale` | `"linear"`, `"log"`, `"symlog"` | Spacing of calculated columns; log and symlog space them by the logarithm of the time, with 16 columns when xBuckets has no count, and a size is then a step in scaled units, not seconds. Absent is linear. | | `xBucketLogBase` | `2`, `10` | Base of a logarithmic xBucketScale; 2 when absent. | | `rowsLayout` | `"auto"`, `"le"`, `"ge"`, `"unknown"` | How pre-bucketed series are read: le takes each bound as the upper edge of its row, ge as the lower edge, unknown draws one ordinary row per series, and auto uses le for series with an le label. | | `rowsValue` | `fieldName` | The field holding the cell value when the data is already bucketed in rows; a frame without a field of this name keeps all its number fields. | | `yUnit` | `unit` | Unit of the row labels; absent uses the field's unit. | | `yDecimals` | `integer` | Between 0 and 10. | | `yMin` | `number` | Rows that end at or below this value are not drawn. | | `yMax` | `number` | Rows that start at or above this value are not drawn. | | `yReverse` | `true`, `false` | Draws the lowest row at the top. | | `yAxis` | `"left"`, `"right"`, `"hidden"` | Side of the row labels; left when absent. | | `yAxisWidth` | `integer` | Width of the row labels in pixels; absent fits the longest label. Between 0 and 400. | | `yAxisLabel` | `string` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | single shows the hovered cell, all lists every row of its column, hidden shows no tooltip; single when absent. | | `tooltipHistogram` | `true`, `false` | Adds a small histogram of the hovered column's rows to the tooltip. | | `tooltipColorScale` | `true`, `false` | Adds the color scale to the tooltip with a marker at the hovered value. | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | | `exemplars` | `true`, `false` | Whether the exemplars of queries that ask for them are drawn; true when absent. | | `exemplarColor` | `color` | The color of exemplar diamonds; absent means the foreground color. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # histogram > Fields and display options of a `histogram` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/histogram/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/histogram/index.md ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `bucketSize` | `number` | | | `bucketCount` | `integer` | Between 1 and 1000. | | `bucketOffset` | `number` | | | `combine` | `true`, `false` | | | `stack` | `"none"`, `"normal"`, `"percent"` | | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # state-timeline > Fields and display options of a `state-timeline` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/state-timeline/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/state-timeline/index.md ## Example ```json { "id": "p_states", "type": "state-timeline", "title": "Pod states", "gridPos": { "x": 0, "y": 41, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "up{service=\"checkout\"}" } ], "display": { "perPage": 5 } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `mergeValues` | `true`, `false` | | | `showValues` | `"auto"`, `"always"`, `"never"` | | | `rowHeight` | `number` | Between 0.1 and 1. | | `perPage` | `integer` | Between 1 and 100. | | `alignValue` | `"left"`, `"center"`, `"right"` | | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # logs > Fields and display options of a `logs` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/logs/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/logs/index.md ## Example ```json { "id": "p_lines", "type": "logs", "title": "Error lines", "gridPos": { "x": 8, "y": 33, "w": 16, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT Timestamp, SeverityText, Body FROM otel_logs WHERE $__timeFilter(Timestamp) ORDER BY Timestamp DESC LIMIT 100", "format": "logs" } ], "display": { "showTime": true, "showLabels": true, "lineFields": [ "SeverityText", "Body" ], "showAttributes": false, "timePrecision": "ns" } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `wrap` | `true`, `false` | | | `showTime` | `true`, `false` | | | `order` | `"newest"`, `"oldest"` | | | `showLabels` | `true`, `false` | | | `showCommonLabels` | `true`, `false` | | | `details` | `true`, `false` | | | `prettify` | `true`, `false` | | | `dedup` | `"none"`, `"exact"`, `"numbers"`, `"signature"` | | | `controls` | `true`, `false` | | | `fontSize` | `"default"`, `"small"` | | | `highlight` | `true`, `false` | | | `lineFields` | array of `fieldName` | At most 20 items. | | `showAttributes` | `true`, `false` | | | `timePrecision` | `"ms"`, `"ns"` | | | `detailsMode` | `"inline"`, `"sidebar"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # barchart > Fields and display options of a `barchart` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/barchart/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/barchart/index.md ## Example ```json { "id": "p_bars", "type": "barchart", "title": "Requests by route", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "sum by (route) (increase(http_requests_total{service=\"frontend\"}[1h]))", "instant": true, "format": "table" } ], "display": { "orientation": "horizontal", "xField": "route", "showValues": "always" } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `orientation` | `"auto"`, `"horizontal"`, `"vertical"` | | | `xField` | `fieldName` | A field name or series name in the panel's frames. | | `showValues` | `"auto"`, `"always"`, `"never"` | | | `barWidth` | `number` | | | `groupWidth` | `number` | | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | | `xTickRotation` | `integer` | Between -90 and 90. | | `xTickSpacing` | `integer` | Between 0 and 500. | | `xTickMaxLength` | `integer` | Between 1 and 200. | | `barRadius` | `number` | Between 0 and 0.5. | | `fullHighlight` | `true`, `false` | | | `colorByField` | `fieldName` | A field name or series name in the panel's frames. | | `valueSize` | `integer` | Between 6 and 100. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # status-history > Fields and display options of a `status-history` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/status-history/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/status-history/index.md ## Example ```json { "id": "p_history", "type": "status-history", "title": "Pod status history", "gridPos": { "x": 12, "y": 41, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "up{service=\"checkout\"}" } ], "display": { "perPage": 5 } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `showValues` | `"auto"`, `"always"`, `"never"` | | | `rowHeight` | `number` | Between 0.1 and 1. | | `perPage` | `integer` | Between 1 and 100. | | `columnWidth` | `number` | Between 0.1 and 1. | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # trend > Fields and display options of a `trend` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/trend/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/trend/index.md ## Example ```json { "id": "p_trend", "type": "trend", "title": "Latency by payload size", "gridPos": { "x": 0, "y": 8, "w": 12, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT toUInt32(length(Body) / 100) * 100 AS size, avg(length(Body)) AS avg_len FROM otel_logs WHERE $__timeFilter(Timestamp) GROUP BY size ORDER BY size", "format": "table" } ], "display": { "xField": "size", "legend": "bottom" } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `xField` | `fieldName` | A field name or series name in the panel's frames. | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendMode` | `"list"`, `"table"` | | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `legendHideZero` | `true`, `false` | | | `legendHideEmpty` | `true`, `false` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipCumulative` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | | `xAxis` | `"shown"`, `"hidden"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # xychart > Fields and display options of a `xychart` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/xychart/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/xychart/index.md ## Example ```json { "id": "p_xy", "type": "xychart", "title": "Body length against severity", "gridPos": { "x": 12, "y": 8, "w": 12, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT SeverityNumber AS severity, length(Body) AS body_length FROM otel_logs WHERE $__timeFilter(Timestamp) LIMIT 500", "format": "table" } ], "display": { "xField": "severity", "show": "points", "pointSize": 6 } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `xField` | `fieldName` | A field name or series name in the panel's frames. | | `show` | `"points"`, `"lines"`, `"points+lines"` | | | `pointSize` | `integer` | Between 1 and 40. | | `pointSizeMin` | `integer` | Between 1 and 100. | | `pointSizeMax` | `integer` | Between 1 and 100. | | `series` | array of `object` | At most 20 items. | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # candlestick > Fields and display options of a `candlestick` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/candlestick/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/candlestick/index.md ## Example ```json { "id": "p_candles", "type": "candlestick", "title": "Open file descriptors", "gridPos": { "x": 0, "y": 17, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "ref": "open", "query": "min_over_time(process_open_fds[5m])" }, { "ref": "high", "query": "max_over_time(process_open_fds[5m])" }, { "ref": "low", "query": "min_over_time(process_open_fds[5m])" }, { "ref": "close", "query": "process_open_fds" } ], "display": { "legendMode": "table", "legendValues": [ "mean", "p95" ], "flatColor": "info" } } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `mode` | `"candles+volume"`, `"candles"`, `"volume"` | | | `candleStyle` | `"candles"`, `"ohlcbars"` | | | `colorStrategy` | `"open-close"`, `"close-close"` | | | `flatColor` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `upColor` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `downColor` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `open` | `fieldName` | A field name or series name in the panel's frames. | | `high` | `fieldName` | A field name or series name in the panel's frames. | | `low` | `fieldName` | A field name or series name in the panel's frames. | | `close` | `fieldName` | A field name or series name in the panel's frames. | | `volume` | `fieldName` | A field name or series name in the panel's frames. | | `legend` | `"bottom"`, `"right"`, `"hidden"` | | | `legendMode` | `"list"`, `"table"` | | | `legendValues` | array of `anyReducer` | At most 8 items. | | `legendSortBy` | `"name"` or `reducer` | | | `legendSortDesc` | `true`, `false` | | | `legendWidth` | `integer` | Between 40 and 2000. | | `tooltip` | `"single"`, `"all"`, `"hidden"` | | | `tooltipSort` | `"none"`, `"asc"`, `"desc"` | | | `tooltipHideZeros` | `true`, `false` | | | `tooltipCumulative` | `true`, `false` | | | `tooltipMaxWidth` | `integer` | Between 100 and 2000. | | `tooltipMaxHeight` | `integer` | Between 100 and 2000. | | `includeAllFields` | `true`, `false` | | | `xAxis` | `"shown"`, `"hidden"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # nodeGraph > Fields and display options of a `nodeGraph` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/nodegraph/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/nodegraph/index.md ## Example ```json { "id": "p_map", "type": "nodeGraph", "title": "Service map", "gridPos": { "x": 12, "y": 16, "w": 12, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT concat(p.ServiceName, ' -> ', c.ServiceName) AS id, p.ServiceName AS source, c.ServiceName AS target, count() AS mainstat FROM otel_traces AS c INNER JOIN otel_traces AS p ON c.ParentSpanId = p.SpanId AND c.TraceId = p.TraceId WHERE $__timeFilter(c.Timestamp) AND $__timeFilter(p.Timestamp) AND p.ServiceName != c.ServiceName GROUP BY source, target LIMIT 200", "format": "table" } ], "display": { "layout": "layered" } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `layout` | `"layered"`, `"grid"`, `"force"` | | | `wheelZoom` | `true`, `false` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # traces > Fields and display options of a `traces` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/traces/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/traces/index.md ## Example ```json { "id": "p_trace", "type": "traces", "title": "Latest trace", "gridPos": { "x": 0, "y": 24, "w": 12, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT TraceId AS traceID, SpanId AS spanID, ParentSpanId AS parentSpanID, ServiceName AS serviceName, SpanName AS operationName, Timestamp AS startTime, Duration / 1000000 AS duration, SpanAttributes AS tags FROM otel_traces WHERE TraceId = (SELECT TraceId FROM otel_traces WHERE $__timeFilter(Timestamp) ORDER BY Timestamp DESC LIMIT 1) ORDER BY startTime LIMIT 1000", "format": "table" } ], "display": {} } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `spanSearch` | `string` | Spans match when this text, in any case, appears in their service, operation, id, attribute keys or attribute values. | | `serviceNames` | array of `string` | Spans match when their service is one of these names, or none of them with excludeServices. At most 50 items. | | `excludeServices` | `true`, `false` | Spans match when their service is not one of serviceNames. | | `spanNames` | array of `string` | Spans match when their operation is one of these names, or none of them with excludeSpanNames. At most 50 items. | | `excludeSpanNames` | `true`, `false` | Spans match when their operation is not one of spanNames. | | `minSpanDuration` | `number` | Spans match when they last at least this many milliseconds. Between 0 and 86400000. | | `maxSpanDuration` | `number` | Spans match when they last at most this many milliseconds. Between 0 and 86400000. | | `matchesOnly` | `true`, `false` | Shows only the spans that match the search, service, operation and duration filters; otherwise the other spans are dimmed. | | `criticalPathOnly` | `true`, `false` | Shows only the spans on the critical path, the chain of spans that decides how long the trace takes. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # flamegraph > Fields of a `flamegraph` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/flamegraph/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/flamegraph/index.md ## Example ```json { "id": "p_flame", "type": "flamegraph", "title": "Profile", "gridPos": { "x": 12, "y": 24, "w": 12, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT 0 AS level, 10 AS value, 2 AS self, 'root' AS label UNION ALL SELECT 1 AS level, 8 AS value, 8 AS self, 'child' AS label", "format": "table" } ], "display": {} } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # geomap > Fields and display options of a `geomap` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/geomap/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/geomap/index.md ## Example ```json { "id": "p_geo", "type": "geomap", "title": "Regions", "gridPos": { "x": 0, "y": 0, "w": 12, "h": 10 }, "datasource": "prom", "queries": [ { "ref": "A", "query": "sum by (lat, lon) (up)" } ], "display": { "view": "europe", "zoom": 4, "minZoom": 2, "maxZoom": 10, "fitPadding": 10, "basemap": "carto", "basemapTheme": "dark", "basemapLabels": true, "basemapOpacity": 0.8, "showScale": true, "showMeasure": false, "tooltip": "details", "layers": [ { "type": "heatmap", "name": "Load", "query": "A", "location": "coords", "latField": "lat", "lonField": "lon", "radius": 12, "blur": 8 }, { "type": "geojson", "name": "Countries", "source": "countries", "rules": [ { "property": "name", "operation": "eq", "value": "France", "color": "warning", "opacity": 0.5 } ] } ] } } ``` From [`spec/examples/decision9-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/decision9-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `view` | `"fit"`, `"world"`, `"coords"`, `"north-america"`, `"south-america"`, `"europe"`, `"africa"`, `"west-asia"`, `"south-asia"`, `"south-east-asia"`, `"east-asia"`, `"australia"`, `"oceania"` | | | `lat` | `number` | Between -85 and 85. | | `lon` | `number` | Between -180 and 180. | | `zoom` | `number` | Between 1 and 18. | | `location` | `"auto"`, `"coords"`, `"geohash"` | | | `latField` | `fieldName` | A field name or series name in the panel's frames. | | `lonField` | `fieldName` | A field name or series name in the panel's frames. | | `geohashField` | `fieldName` | A field name or series name in the panel's frames. | | `sizeField` | `fieldName` | A field name or series name in the panel's frames. | | `colorField` | `fieldName` | A field name or series name in the panel's frames. | | `markerSize` | `integer` | Between 1 and 100. | | `markerSizeMax` | `integer` | Between 1 and 100. | | `basemap` | `"outline"`, `"carto"`, `"esri"`, `"osm"`, `"xyz"`, `"none"` | | | `basemapTheme` | `"auto"`, `"light"`, `"dark"` | | | `basemapLabels` | `true`, `false` | | | `esriServer` | `"streets"`, `"world-imagery"`, `"world-physical"`, `"topo"`, `"usa-topo"`, `"ocean"` | | | `basemapUrl` | `httpsUrl` | An https address whose host is written out; ${var} references may appear only after the host. | | `basemapAttribution` | `string` | | | `basemapOpacity` | `number` | Between 0 and 1. | | `noRepeat` | `true`, `false` | The basemap and tile layers draw one world, never repeated sideways. | | `basemapMinZoom` | `integer` | The lowest zoom level the XYZ tile server serves; below it the nearest served level is scaled. Between 0 and 18. | | `basemapMaxZoom` | `integer` | The highest zoom level the XYZ tile server serves; above it the nearest served level is scaled. Between 0 and 18. | | `minZoom` | `number` | Between 0 and 18. | | `maxZoom` | `number` | Between 0 and 18. | | `fitLayer` | `string` | | | `fitLastOnly` | `true`, `false` | | | `fitPadding` | `integer` | Between 0 and 50. | | `sharedView` | `true`, `false` | | | `showZoom` | `true`, `false` | | | `mouseWheelZoom` | `true`, `false` | | | `showAttribution` | `true`, `false` | | | `showScale` | `true`, `false` | | | `showMeasure` | `true`, `false` | | | `showDebug` | `true`, `false` | | | `tooltip` | `"details"`, `"none"` | | | `layers` | array of `geomapLayer` | At most 10 items. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # canvas > Fields and display options of a `canvas` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/canvas/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/canvas/index.md ## Example ```json { "id": "p_canvas", "type": "canvas", "title": "Floor plan", "gridPos": { "x": 12, "y": 0, "w": 12, "h": 10 }, "datasource": "prom", "queries": [ { "ref": "A", "query": "sum(up)" } ], "display": { "backgroundColor": "#101820", "backgroundImage": { "url": "https://example.com/images/floorplan.png" }, "backgroundSize": "contain", "panZoom": true, "tooltip": "details", "elements": [ { "id": "db", "kind": "icon", "left": 5, "top": 10, "width": 12, "height": 20, "image": { "url": "https://example.com/icons/database.svg" }, "iconColor": "info" }, { "id": "deploy", "kind": "button", "left": 40, "top": 10, "width": 25, "height": 15, "text": "Deploy", "buttonStyle": "primary", "oneClick": "action", "actions": [ { "title": "Deploy", "method": "POST", "url": "https://deploy.example.com/api/deploy", "contentType": "application/json", "body": "{\"env\": \"${env}\"}", "headers": [ { "name": "X-Env", "value": "${env}" } ], "query": [ { "name": "dry_run", "value": "false" } ], "confirm": "Deploy to ${env}?" } ] }, { "id": "zone", "kind": "rectangle", "left": 50, "top": 50, "width": 30, "height": 30, "placement": { "horizontal": "left", "vertical": "top", "left": 200, "top": 120, "width": 160, "height": 90 }, "borderWidth": 2, "radius": 8 } ], "connections": [ { "from": "db", "to": "deploy", "path": "curved", "lineStyle": "dashed", "arrow": "forward" } ] } } ``` From [`spec/examples/decision9-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/decision9-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `reduce` | `reducer` | | | `elements` | array of `canvasElement` | At most 50 items. | | `connections` | array of `canvasConnection` | At most 100 items. | | `backgroundColor` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `backgroundImage` | `imageRef` | | | `backgroundSize` | `"original"`, `"contain"`, `"cover"`, `"fill"`, `"tile"` | | | `borderColor` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `borderWidth` | `integer` | Between 0 and 20. | | `borderRadius` | `integer` | Between 0 and 100. | | `panZoom` | `true`, `false` | | | `infinitePan` | `true`, `false` | | | `tooltip` | `"details"`, `"none"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # alertlist > Fields and display options of a `alertlist` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/alertlist/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/alertlist/index.md ## Example ```json { "id": "p_alerts", "type": "alertlist", "title": "Firing alerts", "gridPos": { "x": 0, "y": 40, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "ALERTS{alertstate=\"firing\"}", "instant": true, "format": "table" } ], "display": { "limit": 10, "sort": "importance", "viewMode": "list" } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` (required) | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"timeseries"`, `"stat"`, `"gauge"`, `"bargauge"`, `"table"`, `"piechart"`, `"heatmap"`, `"histogram"`, `"state-timeline"`, `"logs"`, `"barchart"`, `"status-history"`, `"trend"`, `"xychart"`, `"candlestick"`, `"nodeGraph"`, `"traces"`, `"flamegraph"`, `"geomap"`, `"canvas"`, `"alertlist"` | | | `datasource` | `datasourceRef` | A configured datasource uid, or ${name} naming a datasource variable declared in variables (before this variable, when used by one); queries then run on the datasource selected in that variable, and macros follow its datasourceType. | | `queries` (required) | array of `panelQuery` or `expressionQuery` or `dashboardQuery` | At most 26 items. | | `overrides` | array of [`override`](/docs/reference/observespec/overrides-and-mappings/#overrides) | At most 50 items. | | `transform` | array of [`transform`](/docs/reference/observespec/transforms/) | At most 20 items. | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `repeatDirection` | `"h"`, `"v"` | | | `maxPerRow` | `integer` | Between 1 and 24. | | `timeFrom` | `string` | | | `timeShift` | `string` | | | `timezone` | `string` | browser, utc or an IANA zone such as Asia/Kolkata. The times this panel draws are shown in this zone instead of the dashboard's. | | `hideTimeOverride` | `boolean` | Do not show the time override note (from timeFrom and timeShift) in the panel header. The override still applies to the queries. Absent means shown. | | `interval` | `intervalRef` | A minimum step such as 30s, or ${name} naming an interval variable; queries then use the step selected in that variable. | | `maxDataPoints` | `integer` | Between 10 and 11000. | | `transparent` | `boolean` | | | `titleHidden` | `boolean` | Keep the title as the panel's name for menus and screen readers but do not show it. Absent means shown. | Every data panel also takes the [field options](/docs/reference/observespec/field-options/). ## Display options | Field | Values | Description | | --- | --- | --- | | `limit` | `integer` | Between 1 and 100. | | `sort` | `"alphaAsc"`, `"alphaDesc"`, `"importance"`, `"timeAsc"`, `"timeDesc"` | | | `viewMode` | `"list"`, `"stat"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # text > Fields of a `text` panel. Source: https://slashobserve.com/docs/reference/observespec/panels/text/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/text/index.md ## Example ```json { "id": "p_html", "type": "text", "title": "Notes", "gridPos": { "x": 0, "y": 10, "w": 24, "h": 5 }, "content": "<p>Runbook for <b>checkout</b></p>", "mode": "html" } ``` From [`spec/examples/decision9-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/decision9-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"text"` | | | `transparent` | `boolean` | | | `content` (required) | `string` | Markdown, rendered sanitized. | | `mode` | `"markdown"`, `"html"`, `"code"` | markdown (default): Markdown with sanitized inline HTML. html: sanitized HTML. code: the content shown as code. The agent never writes HTML. | | `code` | `object` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # placeholder > Written only by the importer for a Grafana panel we cannot render yet; the agent may move or delete it but not create one. Source: https://slashobserve.com/docs/reference/observespec/panels/placeholder/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/placeholder/index.md ## Example ```json { "id": "p_world", "type": "placeholder", "title": "Traffic map", "gridPos": { "x": 0, "y": 8, "w": 12, "h": 4 }, "reason": "Grafana panel type worldmap is not supported yet", "sourceType": "worldmap" } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"placeholder"` | | | `reason` (required) | `string` | | | `sourceType` | `string` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # row > Child panels are always nested, collapsed or not. Source: https://slashobserve.com/docs/reference/observespec/panels/row/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/row/index.md ## Example ```json { "id": "r_logs", "type": "row", "title": "Logs", "collapsed": false, "gridPos": { "x": 0, "y": 12, "w": 24, "h": 1 }, "panels": [ { "id": "p_errors", "type": "stat", "title": "Error logs", "gridPos": { "x": 0, "y": 13, "w": 6, "h": 4 }, "datasource": "ch", "queries": [ { "query": "SELECT count() FROM otel_logs WHERE SeverityText = 'ERROR' AND $__timeFilter(Timestamp)" } ], "display": { "graphStyle": "line", "percentChange": true, "percentSize": 14 } }, { "id": "p_reuse", "type": "table", "title": "Requests and errors as a table", "gridPos": { "x": 6, "y": 13, "w": 12, "h": 4 }, "queries": [ { "ref": "A", "source": { "panel": "p_rps", "withTransforms": true } } ] }, { "id": "p_candles", "type": "candlestick", "title": "Open file descriptors", "gridPos": { "x": 0, "y": 17, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "ref": "open", "query": "min_over_time(process_open_fds[5m])" }, { "ref": "high", "query": "max_over_time(process_open_fds[5m])" }, { "ref": "low", "query": "min_over_time(process_open_fds[5m])" }, { "ref": "close", "query": "process_open_fds" } ], "display": { "legendMode": "table", "legendValues": [ "mean", "p95" ], "flatColor": "info" } }, { "id": "p_canvas", "type": "canvas", "title": "Descriptor limit", "gridPos": { "x": 12, "y": 17, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "ref": "A", "query": "process_max_fds" } ], "display": { "elements": [ { "id": "limit_icon", "kind": "icon", "left": 5, "top": 10, "width": 15, "height": 30, "icon": "bolt", "iconColor": "info", "stroke": "critical", "strokeWidth": 2 }, { "id": "limit_text", "kind": "text", "left": 25, "top": 10, "width": 60, "height": 30, "textTemplate": "Limit ${__data.fields.Value} descriptors", "field": "Value" } ] } }, { "id": "p_sites", "type": "geomap", "title": "Sites", "gridPos": { "x": 0, "y": 25, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "sum by (lat, lon, icon) (up)" } ], "display": { "noRepeat": true, "basemap": "xyz", "basemapUrl": "https://tile.example.com/{z}/{x}/{y}.png", "basemapMinZoom": 1, "basemapMaxZoom": 12, "layers": [ { "type": "markers", "name": "Sites", "location": "coords", "latField": "lat", "lonField": "lon", "symbolField": "icon", "text": "Site", "textAlign": "left", "textOffsetX": 6, "rotation": 45, "fillOpacity": 0.6, "symbolAlign": "right", "symbolVerticalAlign": "bottom", "showLegend": true } ] } }, { "id": "p_share", "type": "piechart", "title": "Requests by pod", "gridPos": { "x": 0, "y": 33, "w": 8, "h": 8 }, "datasource": "prom", "queries": [ { "query": "sum by (pod) (rate(http_requests_total{service=\"checkout\"}[5m]))", "instant": true } ], "display": { "sort": "asc" } }, { "id": "p_lines", "type": "logs", "title": "Error lines", "gridPos": { "x": 8, "y": 33, "w": 16, "h": 8 }, "datasource": "ch", "queries": [ { "query": "SELECT Timestamp, SeverityText, Body FROM otel_logs WHERE $__timeFilter(Timestamp) ORDER BY Timestamp DESC LIMIT 100", "format": "logs" } ], "display": { "showTime": true, "showLabels": true, "lineFields": [ "SeverityText", "Body" ], "showAttributes": false, "timePrecision": "ns" } }, { "id": "p_states", "type": "state-timeline", "title": "Pod states", "gridPos": { "x": 0, "y": 41, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "up{service=\"checkout\"}" } ], "display": { "perPage": 5 } }, { "id": "p_history", "type": "status-history", "title": "Pod status history", "gridPos": { "x": 12, "y": 41, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "up{service=\"checkout\"}" } ], "display": { "perPage": 5 } }, { "id": "p_drift", "type": "gauge", "title": "Clock drift", "gridPos": { "x": 0, "y": 49, "w": 6, "h": 6 }, "datasource": "prom", "unit": "s", "min": -50, "max": 50, "neutral": 0, "queries": [ { "query": "node_timex_offset_seconds{service=\"checkout\"}", "instant": true } ] }, { "id": "p_latency_heat", "type": "heatmap", "title": "Request latency over time", "gridPos": { "x": 0, "y": 55, "w": 12, "h": 8 }, "datasource": "prom", "queries": [ { "query": "http_request_duration_seconds{service=\"checkout\"}" } ], "display": { "calculate": true, "xBuckets": { "mode": "count", "value": 12 }, "xBucketScale": "log", "xBucketLogBase": 10 } } ] } ``` From [`spec/examples/evolved-features.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/evolved-features.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `type` (required) | `"row"` | | | `title` (required) | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `collapsed` | `boolean` | | | `repeat` | `variableName` | Referenced in queries as $name, ${name} or ${name:format}. | | `panels` | array of `dataPanel` or `textPanel` or `placeholderPanel` or `dashlistPanel` or `newsPanel` | At most 200 items. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # dashlist > Links to other dashboards on this server; no datasource or queries. Source: https://slashobserve.com/docs/reference/observespec/panels/dashlist/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/dashlist/index.md ## Example ```json { "id": "p_dashboards", "type": "dashlist", "title": "Related dashboards", "gridPos": { "x": 12, "y": 40, "w": 12, "h": 8 }, "display": { "tags": [ "example" ], "limit": 5 } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"dashlist"` | | ## Display options | Field | Values | Description | | --- | --- | --- | | `query` | `string` | | | `tags` | array of `string` | At most 10 items. | | `limit` | `integer` | Between 1 and 100. | | `keepTime` | `true`, `false` | | | `includeVars` | `true`, `false` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # news > The latest items of one RSS or Atom feed, fetched by the server for allowlisted domains; no datasource or queries. Source: https://slashobserve.com/docs/reference/observespec/panels/news/ · Markdown: https://slashobserve.com/docs/reference/observespec/panels/news/index.md ## Example ```json { "id": "p_news", "type": "news", "title": "Grafana blog", "gridPos": { "x": 0, "y": 48, "w": 12, "h": 8 }, "display": { "feedUrl": "https://grafana.com/blog/news.xml" } } ``` From [`spec/examples/panel-types.json`](https://github.com/slashobserve/slashobserve/blob/main/spec/examples/panel-types.json). ## Fields | Field | Type | Description | | --- | --- | --- | | `id` (required) | `string` | Stable across versions; comments anchor to it. | | `title` | `string` | | | `description` | `string` | | | `gridPos` (required) | `gridPos` | Position on the 24-column grid; x + w must not exceed 24. | | `responsive` | `false` | false keeps the panel at its gridPos size at every width down to the single-column view. Absent means the view may widen and wrap the panel when it would be too narrow for its type. A save that changes an existing panel's w or h sets false. | | `type` (required) | `"news"` | | ## Display options | Field | Values | Description | | --- | --- | --- | | `feedUrl` | `string` | An https RSS or Atom feed URL. The server fetches it only when its domain is on the outbound allowlist. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Field options > Options every data panel and every override accepts, such as unit, decimals, thresholds and mappings. Source: https://slashobserve.com/docs/reference/observespec/field-options/ · Markdown: https://slashobserve.com/docs/reference/observespec/field-options/index.md ## Fields | Field | Type | Description | | --- | --- | --- | | `unit` | `unit` | A Grafana unit id, or a custom suffix:, prefix:, time:, si:, count: or currency: unit. | | `decimals` | `integer` | Between 0 and 10. | | `min` | `number` | | | `max` | `number` | | | `fieldMinMax` | `boolean` | Gauges and bar gauges that find their range from the data: true ranges each field by its own values, false (the default) by the values of every field shown. Other panels already range each field by its own values. | | `thresholds` | `thresholds` | Strictly ascending by value. | | `thresholdMode` | `"absolute"`, `"percentage"` | | | `color` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | | `colorMode` | `"palette"`, `"paletteByName"`, `"fixed"`, `"shades"`, `"thresholds"`, `"scheme"` | | | `colorScheme` | `"greenYellowRed"`, `"redYellowGreen"`, `"blueYellowRed"`, `"yellowRed"`, `"bluePurple"`, `"yellowBlue"`, `"blues"`, `"reds"`, `"greens"`, `"purples"`, `"oranges"`, `"viridis"`, `"magma"`, `"plasma"`, `"inferno"`, `"cividis"`, `"warm"` | | | `colorBy` | `"last"`, `"min"`, `"max"` | | | `displayName` | `string` | | | `noValue` | `string` | | | `mappings` | array of [`mapping`](/docs/reference/observespec/overrides-and-mappings/#mappings) | At most 50 items. | | `links` | array of `link` | At most 20 items. | | `actions` | array of `action` | HTTP actions a person with Edit runs from table cells, stat tiles, gauges and bars; only people and imports write them. At most 10 items. | | `style` | `"line"`, `"bars"`, `"points"` | | | `fill` | `integer` | Between 0 and 100. | | `lineStyle` | `"solid"`, `"dashed"`, `"dotted"`, `"square"` | The pattern of a line: dashed, dotted (round dots) or square (square dots). | | `lineDash` | array of `integer` | The dash and gap lengths in pixels when lineStyle is dashed. At most 2 items. | | `lineColor` | `color` | A fixed color for the line, overriding the series color for the line only. | | `fillColor` | `color` | A fixed color for the area fill, overriding the series color for the fill only. | | `pointColor` | `color` | A fixed color for the points, overriding the series color for the points only. | | `showValues` | `boolean` | Print each point's formatted value above it. | | `lineInterpolation` | `"linear"`, `"smooth"`, `"stepBefore"`, `"stepAfter"` | | | `lineWidth` | `integer` | Between 0 and 10. | | `points` | `"auto"`, `"always"`, `"never"` | | | `pointSize` | `integer` | Between 1 and 40. | | `pointShape` | `"circle"`, `"square"` | The shape of the points on every panel that draws points. | | `pointStrokeWidth` | `integer` | Between 0 and 20. | | `spanNulls` | `boolean` or `integer` | | | `stack` | `"none"`, `"normal"`, `"percent"` | | | `axis` | `"left"`, `"right"`, `"hidden"` | | | `hidden` | `boolean` | | | `axisLabel` | `string` | | | `axisSoftMin` | `number` | | | `axisSoftMax` | `number` | | | `scale` | `"linear"`, `"log"`, `"symlog"` | | | `logBase` | `2`, `10` | | | `linearThreshold` | `number` | | | `axisCenteredZero` | `boolean` | | | `axisWidth` | `integer` | Between 0 and 400. | | `axisGrid` | `boolean` | | | `axisBorder` | `boolean` | | | `axisColor` | `"text"`, `"series"` | | | `width` | `integer` | A table column's fixed width in pixels; absent means the column shares the remaining width. Only table panels draw it. Between 20 and 2000. | | `minWidth` | `integer` | The least width in pixels a table column shrinks to. Only table panels draw it. Between 20 and 2000. | | `align` | `"auto"`, `"left"`, `"center"`, `"right"` | Where a table column puts its header and cells; auto right-aligns numbers and left-aligns the rest. Only table panels draw it. | | `filterable` | `boolean` | Adds a value filter to the table column's header. Only table panels draw it. | | `inspect` | `boolean` | Adds a button to every cell of the table column that opens its value in a dialog. Only table panels draw it. | | `hideHeader` | `boolean` | Hides the text of the table column's header; screen readers still read it. Only table panels draw it. | | `wrapHeader` | `boolean` | Wraps the text of the table column's header onto several lines. Only table panels draw it. | | `fieldDescription` | `string` | Describes the field; a table shows it as a tooltip on the column header. Named apart from the panel's own description because field props sit beside it on the panel. Only table panels draw it. | | `tooltipField` | `fieldName` | The name of a field whose value in the same row is shown as a tooltip on this column's cells. Only table panels draw it. | | `tooltipPlacement` | `"auto"`, `"top"`, `"bottom"`, `"left"`, `"right"` | Where the cell tooltip of tooltipField opens; auto lets the browser choose. Only table panels draw it. | | `cell` | `object` | How a table column draws its cells; absent means the plain cell with colors from thresholds and colored mappings. Only table panels draw it. | | `valueTransform` | `"negativeY"`, `"constant"` | | | `hideInLegend` | `boolean` | | | `hideInTooltip` | `boolean` | | | `stackGroup` | `string` | | | `fillBelowTo` | `string` | | | `insertNulls` | `integer` or `true` | Break the series where two points are further apart than this many milliseconds, or, as true, further apart than the query interval. | | `neutral` | `number` | The value a gauge or bar gauge bar grows from instead of the minimum. | | `nullAsZero` | `boolean` | | | `barAlignment` | `"before"`, `"center"`, `"after"` | | | `barWidthFactor` | `number` | Between 0.05 and 1. | | `barMaxWidth` | `integer` | Between 1 and 200. | | `thresholdsStyle` | `"off"`, `"line"`, `"dashed"`, `"area"`, `"line+area"`, `"dashed+area"`, `"series"` | | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Overrides and mappings > Change field options for matching series, and map raw values to text and colours. Source: https://slashobserve.com/docs/reference/observespec/overrides-and-mappings/ · Markdown: https://slashobserve.com/docs/reference/observespec/overrides-and-mappings/index.md ## Overrides | Field | Type | Description | | --- | --- | --- | | `match` (required) | `match` | | Every [field option](/docs/reference/observespec/field-options/) can also be set on an override. ## Mappings Value mapping; needs text, color or both. ### value | Field | Type | Description | | --- | --- | --- | | `value` (required) | `string` | | | `text` | `string` | | | `color` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | ### range | Field | Type | Description | | --- | --- | --- | | `range` (required) | array of any | At most 2 items. | | `text` | `string` | | | `color` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | ### regex | Field | Type | Description | | --- | --- | --- | | `regex` (required) | `string` | | | `text` | `string` | | | `color` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | ### special | Field | Type | Description | | --- | --- | --- | | `special` (required) | `"null"`, `"nan"`, `"empty"`, `"true"`, `"false"` | | | `text` | `string` | | | `color` | `color` | A semantic color (ok, info, warning, critical, or text, the theme's text color) or a #rrggbb hex color. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # Transforms > Transforms that reshape query results in the browser before a panel draws them. Source: https://slashobserve.com/docs/reference/observespec/transforms/ · Markdown: https://slashobserve.com/docs/reference/observespec/transforms/index.md ## merge | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"merge"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## seriesToRows | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"seriesToRows"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## organize | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"organize"` | | | `exclude` | array of `string` | At most 100 items. | | `rename` | `object` | | | `order` | array of `string` | At most 100 items. | | `include` | array of `string` | Keep only the fields with these names; exclude then removes from them. At most 100 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## reduce | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"reduce"` | | | `reducers` (required) | array of `anyReducer` | At most 10 items. | | `mode` | `"seriesToRows"`, `"reduceFields"` | | | `includeTime` | `boolean` | Reduce the time field too. | | `labelsToFields` | `boolean` | Add one text field per label key: a column in seriesToRows mode, a one-row field in reduceFields mode. | | `fields` | array of `fieldName` | Reduce only the number fields with these names; absent reduces every number field. At most 100 items. | | `fieldsRegex` | `string` | Reduce only the number fields whose name matches this pattern, anchored unless written /re/flags. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## joinByField | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"joinByField"` | | | `field` | `string` | | | `mode` | `"outer"`, `"inner"` or `"outerTabular"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## filterFieldsByName | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"filterFieldsByName"` | | | `include` | array of `string` | At most 100 items. | | `includeRegex` | `string` | | | `exclude` | array of `string` | Drop the fields with these names, after include. At most 100 items. | | `excludeRegex` | `string` | | | `variable` | `variableName` | Also include the fields named by the selected values of this variable; All, or no selection, adds nothing. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## calculateField | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"calculateField"` | | | `alias` (required) | `string` | | | `expr` | `string` | field_or_number op field_or_number, op one of + - * / % ^; put spaces around op when a field name contains spaces. | | `reduceRow` | `reducer` | | | `include` | array of `fieldName` | With reduceRow, reduce only the number fields with these names; names the frame lacks are skipped. At most 50 items. | | `unary` | `object` | Apply fn to a number field; absent field means the first number field, absent fn means abs. | | `index` | `object` | The row number from 0, or with percentile its place from 0 to 1. | | `cumulative` | `object` | A running total or running mean of a number field; absent field means the first number field, absent fn means sum. | | `window` | `object` | A moving mean, standard deviation or variance of a number field over size rows or a share of the rows (0.1 when neither is written); trailing windows end at the row, centered ones surround it, and windows at the edges shrink. | | `replace` | `boolean` | Keep only the time field and the new field. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## sortBy | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"sortBy"` | | | `field` (required) | `string` | | | `desc` | `boolean` | | | `then` | array of `object` | Further sort keys, applied in order to rows that tie on field. At most 10 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## limit | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"limit"` | | | `count` (required) | `integer` or `string` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## convertFieldType | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"convertFieldType"` | | | `conversions` (required) | array of `object` | At most 50 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## formatString | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"formatString"` | | | `field` (required) | `fieldName` | A field name or series name in the panel's frames. | | `format` (required) | `"upper"`, `"lower"`, `"title"`, `"trim"`, `"substring"` or `"sentence"`, `"pascal"`, `"camel"`, `"snake"`, `"kebab"` | | | `start` | `integer` | Between 0 and 10000. | | `end` | `integer` | Between 0 and 10000. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## formatTime | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"formatTime"` | | | `field` (required) | `fieldName` | A field name or series name in the panel's frames. | | `format` (required) | `string` | | | `utc` | `boolean` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## renameByRegex | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"renameByRegex"` | | | `regex` (required) | `string` | | | `renameTo` (required) | `string` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## filterByValue | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"filterByValue"` | | | `keep` | `"include"`, `"exclude"` | | | `match` | `"any"`, `"all"` | | | `filters` (required) | array of `object` | At most 20 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## filterByRefId | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"filterByRefId"` | | | `include` (required) | array of `queryRef` | At most 26 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## extractFields | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"extractFields"` | | | `field` (required) | `fieldName` | A field name or series name in the panel's frames. | | `format` | `"auto"`, `"json"`, `"kvp"` or `"delimiter"`, `"regexp"` | | | `replace` | `boolean` | | | `keepTime` | `boolean` | | | `paths` | array of `object` | At most 50 items. | | `delimiter` | `string` | | | `regex` | `string` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## labelsToFields | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"labelsToFields"` | | | `mode` | `"columns"`, `"rows"` | | | `include` | array of `fieldName` | At most 100 items. | | `valueLabel` | `string` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## joinByLabels | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"joinByLabels"` | | | `value` (required) | `fieldName` | A field name or series name in the panel's frames. | | `on` | array of `fieldName` | At most 20 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## partitionByValues | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"partitionByValues"` | | | `fields` (required) | array of `fieldName` | At most 10 items. | | `keepFields` | `boolean` | | | `naming` | `"labels"` or `"name"`, `"append"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## prepareTimeSeries | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"prepareTimeSeries"` | | | `format` (required) | `"wide"`, `"many"`, `"long"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## timeSeriesTable | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"timeSeriesTable"` | | | `stats` | `object` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## rowsToFields | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"rowsToFields"` | | | `mappings` | array of `object` | At most 20 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## configFromData | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"configFromData"` | | | `configQuery` (required) | `queryRef` | | | `mappings` (required) | array of `object` | At most 20 items. | | `applyTo` | `match` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## concatenate | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"concatenate"` | | | `nameMode` | `"drop"`, `"field"`, `"label"` | | | `nameLabel` | `string` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## groupBy | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"groupBy"` | | | `by` | array of `fieldName` | At most 20 items. | | `aggregate` | array of `object` | At most 20 items. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## groupingToMatrix | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"groupingToMatrix"` | | | `column` | `fieldName` | A field name or series name in the panel's frames. | | `row` | `fieldName` | A field name or series name in the panel's frames. | | `value` | `fieldName` | A field name or series name in the panel's frames. | | `empty` | `"empty"`, `"zero"`, `"true"`, `"false"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## groupToNestedTable | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"groupToNestedTable"` | | | `by` | array of `fieldName` | At most 20 items. | | `aggregate` | array of `object` | At most 20 items. | | `hideHeaders` | `boolean` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## histogram | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"histogram"` | | | `bucketCount` | `integer` | Between 1 and 1000. | | `bucketSize` | `number` | | | `bucketOffset` | `number` | | | `combine` | `boolean` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## regression | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"regression"` | | | `model` | `"linear"`, `"polynomial"` | | | `degree` | `integer` | Between 1 and 5. | | `x` | `fieldName` | A field name or series name in the panel's frames. | | `y` | `fieldName` | A field name or series name in the panel's frames. | | `predictions` | `integer` | Between 1 and 1000. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## transpose | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"transpose"` | | | `firstName` | `fieldName` | A field name or series name in the panel's frames. | | `restName` | `fieldName` | A field name or series name in the panel's frames. | | `empty` | `"empty"`, `"zero"`, `"true"`, `"false"` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## heatmap | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"heatmap"` | | | `xBuckets` | `heatmapBuckets` | | | `yBuckets` | `heatmapBuckets` | | | `yScale` | `"linear"`, `"log"`, `"symlog"`, `"ordinal"` | Spacing of the value rows; ordinal gives each distinct value its own row, in order of first appearance. | | `yLogBase` | `2`, `10` | | | `xScale` | `"linear"`, `"log"`, `"symlog"` | Spacing of the time columns; log and symlog space them by the logarithm of the time, with 16 columns when xBuckets has no count, and a size is then a step in scaled units, not seconds. Absent is linear. | | `xLogBase` | `2`, `10` | Base of a logarithmic xScale; 2 when absent. | | `keepOriginalData` | `boolean` | | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## spatial | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"spatial"` | | | `action` | `"prepare"`, `"calculate"`, `"modify"` | prepare (the default) adds lat and lon fields from the source location; calculate adds the heading or distance from the previous row, or the area of the polygon the rows outline; modify builds lines. | | `source` | `spatialLocation` | Where a row is: auto (the default) takes latitude and longitude fields named lat, latitude, lon, lng or longitude, else a field named geohash; coords names the latitude and longitude fields; geohash names the geohash field; lookup names the text field looked up in the gazetteer (countries by default). | | `calc` | `"heading"`, `"distance"`, `"area"` | For calculate: heading in degrees and distance in meters from the previous located row, or area in square meters of the polygon whose corners are the located rows in order. Absent means heading. | | `field` | `fieldName` | The name of the calculated field. Absent means Heading, Distance or Area. | | `modify` | `"lineBuilder"`, `"asLine"` | For modify: lineBuilder draws one line per row from the source to the target location; asLine keeps the located rows, in order, as the points of one line. Absent means lineBuilder. | | `target` | `spatialLocation` | Where a row is: auto (the default) takes latitude and longitude fields named lat, latitude, lon, lng or longitude, else a field named geohash; coords names the latitude and longitude fields; geohash names the geohash field; lookup names the text field looked up in the gazetteer (countries by default). | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | ## fieldLookup | Field | Type | Description | | --- | --- | --- | | `type` (required) | `"fieldLookup"` | | | `lookupField` | `fieldName` | The text field holding the names or codes to look up. Absent means the first text field. | | `gazetteer` | `"countries"`, `"usa-states"` | The built-in list the names are looked up in. Absent means countries. | | `queries` | `transformQueries` | The queries a transformation applies to: only their frames go through it, the other frames pass through unchanged, and absent means every query. | Generated from [`spec/schema/observespec.v0.json`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/spec/schema/observespec.v0.json) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new). # API behavior > How the HTTP API treats list queries, unknown query parameters, rejected panels, caching and compression, for scripts, agents and proxies. Source: https://slashobserve.com/docs/reference/api-behavior/ · Markdown: https://slashobserve.com/docs/reference/api-behavior/index.md This page covers behaviors of `/api/v1` that are easy to trip over from a script. Read it before you write a client that lists items, filters them or caches reads. ## Catch a misspelt parameter A list route is a `GET` that returns a page of items. It refuses a query parameter it does not document, so a misspelt filter never returns an unfiltered list. 1. Send a request with a parameter the route does not take: ```sh curl -sS -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/dashboards?health=duplicate_title" ``` 2. Read the `400` answer. It has the code `invalid_request` and names the parameters the route does take: ```json {"error": "unknown query parameter health; this route takes ...", "code": "invalid_request"} ``` 3. Fix the name and send the request again. A value the parameter does not accept is refused the same way. `?order=oldest` answers `query parameter "order" must be one of updated, folder, views, name`. A query string that cannot be parsed, such as an unescaped `;`, is refused as well. ## Detect an ignored parameter on other routes Every other route reads the parameters it documents and ignores the rest. So that you notice, the server names the ignored parameters in a response header: ```http X-Unknown-Query-Parameters: health ``` The status and body do not change. A script that must not act on an ignored parameter should fail when the header is present. ## Read every page of a list 1. Request the list with a `limit`: ```sh curl -sS -H "Authorization: Bearer $OBSERVE_TOKEN" \ "$OBSERVE_SERVER/api/v1/activity?limit=50" ``` 2. Read `next_cursor` from the answer. It is `null` on the last page. 3. Send the value back unchanged as `cursor` to read the next page. The `observe` command line follows cursors with `--all`; see [the command line](/docs/use/cli/#lists-and-paging). ## Save a panel as a service account A person's session may save a panel block that returns no data, after the web app warns. A service-account key may not. When a key adds or changes a panel block of an observation, the server runs the same panel check as the `add_block` and `update_block` MCP tools. A rejected panel answers `422 invalid_spec` with `issues` that name the failing paths. ## Reference ### Query parameters - A list route refuses an undocumented parameter, a value the parameter does not accept and an unparseable query string, with `400 invalid_request`. - The refusal names up to 10 unknown parameters, separated by commas, and ends with `...` when more were unknown. - Every other route ignores undocumented parameters and sets `X-Unknown-Query-Parameters` in every deployment. The header lists up to 10 names, separated by commas, and ends with `...` when more were ignored. A name that is not 1 to 64 letters, digits or `_.[]-` is left out of the list, and `...` ends the list. - Parameters that start with `var-` are dashboard variable selections. The document does not list them by name, so the server never reports them. - Routes that read a free-form query by design, such as the query proxy and the log tail, already answer `400 invalid_request` for a parameter they do not know. - With `SLASHOBSERVE_API_CONTRACT_CHECK=true`, which is meant for test stacks, a request with an unknown parameter makes the response a `500 contract_violation`. An integration test of a client then finds the mistake before it ships. See [Configuration](/docs/reference/configuration/#testing-only). ### Paging | Item | Rule | | --- | --- | | `limit` | An integer from 1 up to a maximum the route documents. | | `cursor` | The `next_cursor` of the previous page, unchanged. | | `next_cursor` | `null` on the last page. | | A `limit` out of range | `400 invalid_request`. | | A cursor the server does not recognize | `400 invalid_request`. | ### Caching Every `/api/v1` response is `Cache-Control: no-store` unless this table says otherwise. | Route | Header | |---|---| | `GET /api/v1/folders` | `private, no-cache`, `ETag`, `Vary: Authorization, Cookie` | | `GET /api/v1/dashboards/{id}/versions/{version}` | `private, no-cache`, `ETag`, `Vary: Authorization, Cookie` | | `GET /api/v1/assets/image` | `private, max-age=3600` | | `GET /api/v1/assets/geojson` | `private, max-age=3600` | ### Details of `no-cache` and `ETag` `no-cache` means a browser or proxy keeps a copy but asks the server before every use. The server still checks who is asking and what they may see. It answers `304 Not Modified` without a body when the `ETag` sent in `If-None-Match` is still current. The tag is a weak hash of the body, so it changes when the dashboard, a folder or the caller's permissions on it change. Query proxy data, such as `/dashboards/{id}/versions/{version}/panels/{panel_id}/data`, is never cached. It comes from a live data source and depends on who asks. ### Compression - A `GET` or `HEAD` response of 1024 bytes or more is gzip-compressed when the client sends `Accept-Encoding: gzip`. - Event streams and responses to other methods are never compressed. # Audit queries > How to search, count, export and follow the audit trail over the CLI, API and MCP, with the query forms, the event fields, the data of each event, the window and the limits. Source: https://slashobserve.com/docs/reference/audit-queries/ · Markdown: https://slashobserve.com/docs/reference/audit-queries/index.md The audit trail records every sign-in, read, change, agent tool call and refusal, with who did it, through what, to what and how it ended. Only Admins read it, and an Admin service-account key can too. Every read of the trail is itself recorded, so the trail shows who searched it for what. ## Search the trail In the web app, choose **Audit**, then **Log**; see [Audit log](/docs/use/activity/#audit-log). To search from a terminal or a script, use the CLI, the HTTP API or MCP. All three read through the same server code and need an Admin credential. 1. Sign in once with an Admin service-account key, as [CLI](/docs/use/cli/#sign-in) shows. 2. Search for events, newest first: ```sh observe audit search --query 'outcome:denied and origin:mcp' --from now-7d ``` You see one line per event: when, who, through what, the action, how it ended and its target. 3. Open one event with the other events of its request and run: ```sh observe audit show <event id> ``` 4. For the raw JSON, call the HTTP API: ```sh curl -fsS -H "Authorization: Bearer $OBSERVE_TOKEN" \ --get "$OBSERVE_SERVER/api/v1/audit/events" \ --data-urlencode 'q=outcome:denied and origin:mcp' \ --data-urlencode 'since=now-7d' ``` An agent calls the `search_audit_events` tool with the same `query`. The window is the last 24 hours unless you set one. The CLI takes `--from` and `--to`, and the API takes `since` and `until`. An empty query matches every event in the window. ## Write a query A query is KQL unless it starts with `lucene:` or `{`. Use the fields from [Fields](#fields). KQL, the default, joins `field:value` terms with `and`, `or` and `not`, and groups them with parentheses: ```text outcome:denied and origin:mcp action:dashboard.* and not actor_name:"Sam Lee" status >= 500 or reason:query_timeout target:dashboard/8f3c2a1e-0d6f-4b7e-9d39-5a7f0f0c4a11 client_ip:10.4.0.0/16 and initiator:agent ``` Lucene, after a `lucene:` prefix, uses `AND`, `OR`, `NOT`, `+` and `-`, ranges in brackets and wildcards at the end of a word. Fuzzy and proximity searches are refused. ```text lucene: outcome:denied AND origin:(mcp OR cli) lucene: status:[500 TO 599] -action:auth.* lucene: occurred_at:[2026-11-01 TO 2026-11-08} ``` The Query DSL is a JSON body that starts with `{`, with an optional `query`, `size` (the page size of a search) and `aggs`. ```json {"query": {"bool": {"filter": [{"term": {"outcome": "denied"}}, {"range": {"status": {"gte": 400}}}]}}, "size": 50} ``` Free text, a word with no field, matches the action, the actor's and the target's names, the reason, the tool, the route and a query's text. ## Fix a query that is refused A query that cannot be read answers 422 `query_invalid` with the parser's message, and with `start` and `end`, the byte offsets in the query to underline. Over MCP the message names the same offsets. The CLI prints the query with a caret line under the span and keeps `start` and `end` in the `--json` error. A query with a likely typo is still searched, and the answer lists a warning. A word between two terms that is a known misspelling of an operator (`andd`, `adn`, `nad`, `annd`, `orr`, `nto`, `nott`) is searched as text. So is an operator in the wrong case in Lucene (`a or b`, `a And b`), because only `AND`, `OR` and `NOT` are operators there. The search, facets, histogram and aggregate answers list it in `warnings`, such as `"andd" is searched as text; did you mean "and"?`. `warnings` is an empty list when there is nothing to warn about, and the CLI prints each on standard error as `warning: ...`. A query that names an unknown field says which valid fields are nearest to it. ## Count and group events 1. Count the top values of a field: ```sh observe audit facets actor_name --query 'action:dashboard.*' ``` 2. Count events over time: ```sh observe audit histogram --query 'outcome:denied' --from now-7d ``` 3. Group and total with a Query DSL body that has `aggs`: ```sh observe audit aggregate --from now-7d \ --query '{"aggs": {"by_origin": {"terms": {"field": "origin"}, "aggs": {"people": {"cardinality": {"field": "actor_id"}}}}}}' ``` A `date_histogram` takes an optional `time_zone`, `UTC` or a named zone such as `Europe/Berlin`. Its buckets then start on that zone's clock, so a `1d` bucket starts at local midnight. An offset such as `+05:30` is refused. `aggs` runs only through the aggregate endpoint; [Aggregation limits](#aggregation-limits) lists what it accepts. ## Export events `observe audit export` writes events as NDJSON or CSV: ```sh observe audit export --from 2026-11-01T00:00:00Z --to 2026-11-08T00:00:00Z --format csv --file audit.csv ``` Without `--file` it writes to standard output. Over HTTP, `GET /api/v1/audit/export` streams the same events. An export has no MCP tool, because an MCP answer holds at most 16 KiB. An agent pages the same events with `search_audit_events`. ## Follow new events `GET /api/v1/audit/stream?q=<query>` is a server-sent event stream. It takes the same query text as a search and no window. It sends each event that matches the query and is recorded after it opens, in the order the events committed. The CLI does the same: ```sh observe audit search --query 'outcome:denied' --follow ``` It prints the matching events recorded from now on until you press Ctrl-C, and `--json` prints each as one JSON line. `--follow` cannot be combined with `--all`, `--cursor`, `--limit`, `--from` or `--to`. When the connection drops, the CLI reconnects from the last event it printed. The stream has no MCP tool of its own. An agent calls `search_audit_events` again to read new events. [Stream details](#stream-details) lists the frames and limits. ## Reference ### Fields Every event has these fields. `GET /api/v1/audit/fields`, `list_audit_fields` and `observe audit fields` list them with their descriptions. Field names ignore case. A field with an alias takes either name in a query, in KQL, Lucene and a Query DSL body alike. The query lint of the audit datasource accepts either name, and the `fields` list shows every alias. | Field | Alias | Type | What it holds | | ----- | ----- | ---- | ------------- | | `occurred_at` | | date | When the event happened | | `id` | | uuid | Event id | | `category` | | enum | `auth`, `access`, `content`, `conversation`, `agent`, `query`, `admin` or `system` | | `action` | | text | What was attempted, such as `dashboard.update`; `dashboard.*` matches a prefix | | `outcome` | | enum | `success`, `denied`, `failed` or `unknown` | | `reason` | | text | The API error code of a refusal or failure, such as `forbidden_role` | | `status` | | int | HTTP status of the request | | `duration_ms` | `duration` | int | How long the action took, in milliseconds | | `actor_kind` | `actor.kind` | enum | Whose permissions were used: `user`, `service_account`, `anonymous` or `system` | | `actor_id` | `actor.id` | uuid | The user or service account | | `actor_name` | `actor`, `actor.name` | text | The actor's name when the event happened | | `actor_email` | `actor.email` | text | The user's current email address | | `actor_role` | `actor.role` | text | The actor's role when the event happened | | `initiator` | | enum | Who started it: `person`, `agent` or `system` | | `agent_id`, `agent_name` | | uuid, text | The agent that took the run | | `run_id` | `run` | uuid | The agent run that made the event | | `auth_method` | | enum | `session`, `api_key`, `oauth`, `public_link` or `none` | | `credential_id` | | text | The session, key, grant or public link used, never the secret | | `origin` | | enum | `web`, `cli`, `mcp`, `api`, `agent`, `job`, `provision` or `unknown` | | `origin_client` | | text | The connected client's name | | `tool` | | text | The MCP or agent tool | | `client_ip` | `ip` | ip | The caller's address; a query takes an address or a CIDR such as `10.4.0.0/16` | | `user_agent` | | text | The request's user agent | | `request_id` | `request` | uuid | The request id, also the `X-Request-Id` response header | | `trace_id` | | text | The request's trace id, when one was sent | | `http_method`, `route` | | text | The request's method and route template | | `target` | | target | What the event was about, as `kind/id` | | `target_kind`, `target_id`, `target_name` | `target.kind`, `target.id`, `target.name` | text | The parts of the target, and its name when the event happened | | `folder_id`, `dashboard_id`, `observation_id`, `thread_id`, `chat_id` | | uuid | The objects the event touched | | `datasource_uid` | `datasource` | text | The datasource a query ran on | | `server_id`, `server_version` | | text | The server replica and build that recorded the event | Events also carry `seq` and `data`, which a query cannot name. `data` holds the action's own fields; see [Event data](#event-data). ### Details of the fields - `outcome` is `unknown` for a redirect or an event whose commit the server could not confirm. A `run.finish` is `success` when the run saved its result and `failed` when it failed, timed out or was canceled. Its `result` says which of `succeeded`, `failed` or `canceled`. - A `run.finish` recorded by a server older than 0.1.4 says `success` whatever the run's result. Read `data.result` on those events, which a query cannot filter on. Every later one agrees with its run. - `actor` alone also matches the actor's current email address. - `actor_email` is read from the user and not stored in the event. A service account has none, and a query can match it but not count it. - `agent_id` and `agent_name` appear on every event of a run session: its tool calls, the changes they make, and `run.start`, `run.finish` and `run.release`. The value is `Observe Agent` with no id, a connected agent's grant id and client name, or a service account's id and name. They are empty on what a person does to a run, such as `run.queue`, `run.cancel` and `run.keep`. They are also empty on the `run.finish` of a run that no agent took (canceled while queued, or expired unclaimed), and outside a run. - `origin` is `agent` for what the built-in agent does with its run key, and `unknown` for history copied from activity that recorded no origin. - `client_ip` behind a proxy is the proxy's address unless `SLASHOBSERVE_TRUSTED_PROXIES` lists the proxy. See [Put TLS in front](/docs/operate/production/#put-tls-in-front). - `target` takes `kind/id` such as `dashboard/8f3c...`, and `dashboard` alone and `dashboard/8f*` work too. ### Event data An event's `data` holds fields that belong to its action and that a query cannot name. Read them from a result. The server keeps only the fields an action declares, and no event holds a message body, a prompt or an answer. | Action | Data | What it holds | | ------ | ---- | ------------- | | `dashboard.view` | `version` | The version number the reader was shown | | `observation.view` | `updated_at` | When the observation last changed before the reader opened it, as an RFC 3339 time | | `observation.arrange` | `title`, `changed` | Which of `height`, `order` and `width` changed | | `saved_prompt.*` changes | `owner_id`, `changed`, `from_name` | A change to a shared prompt; see the details below | | `datasource.test`, `grafana_connection.test` | `type`, `host`, `healthy` | An Admin's connection test | | `grafana_connection.fetch_dashboard` | `host` | The connection used and its host | | any action that was denied | `needed_role`, `needed_access` | What the refusal said the request needed | | `run.finish` | `model`, `input_tokens`, `output_tokens` | The model and tokens the run reported | | `thread.open`, `thread.message`, `chat.turn` | `body_length`, `anchor_kind` | The message length in characters, and the anchor kind | | `audit.search`, `audit.export` | `form`, `since`, `until`, `query`, `row_count` | The query as sent, its form, the window and the rows | | `audit.search` | `view`, `field` | The read, and the field of a count | | `audit.export` | `format`, `truncated` | The export's format, and whether it stopped at the limit | | `query.run` | `query`, `row_count`, `from`, `to`, `stream` | One datasource query; see [How queries are recorded](#how-queries-are-recorded) | | `auth.login_failed`, `auth.credential_rejected`, `auth.csrf_rejected` | `count`, `overflow` | Folded refusals; see [How refusals are folded](#how-refusals-are-folded) | Events carry no `visible_to` field. Who can see a run is recorded by the `run.share` and `run.withdraw` events instead. ### Details of event data - `observation.view` records a time, as an RFC 3339 time, because an observation has no versions. - `observation.arrange` is an arrangement of an observation's blocks that changed something, and is not an `observation.update`. Over the API, a request that changes nothing is still recorded, with reason `no_change` and without `changed`. - A `saved_prompt.create`, `saved_prompt.update`, `saved_prompt.share`, `saved_prompt.unshare` or `saved_prompt.delete` event covers a prompt that is shared, or that becomes shared or private. `owner_id` is the prompt's owner, and `changed` lists which of `name`, `body` and `shared` changed. `from_name` is the name before a change to a prompt that stays shared. An unshare names the prompt by its name while it was shared, never its new private name. A change that alters nothing has reason `no_change`. A successful change to a prompt that is private before and after is never recorded. A refused or failed request on one is recorded without its name. The text is never recorded. - A connection test records the datasource's `type` (datasources only), the `host` that was called and whether it answered `healthy`. An unhealthy test has outcome `failed` and reason `unhealthy`. The address, any credential and the response are never recorded. - `grafana_connection.fetch_dashboard` is an Admin's fetch of a dashboard from a link, naming the connection that was used and its host. The link and the dashboard are never recorded. - `needed_role` and `needed_access` hold the role or the folder access level the refusal said the request needed, over the API and over MCP. They are left out when the refusal named none. A refusal raised by a plain role check that names none, and failed and successful events, never carry them. - `run.finish` leaves out `model` and the token counts when the run reported none. The activity feed does not carry them. - `body_length` is the length of the message or prompt, never its text. `anchor_kind` is the kind of point the thread or turn is anchored to, such as `series` or `position`, and is left out when there is none. ### How reads of the trail are recorded Searching, exporting and opening the stream are recorded as `audit.search` or `audit.export`. The event holds the query as sent, with known secrets masked, cut at 4 KiB and marked `[truncated]`. It also holds the query's form, the window and the row count. - A plain search has `data.view` set to `events`. The counts of a field, the histogram, an aggregation and opening one event are `audit.search` too, with `data.view` set to `facets`, `histogram`, `aggregate` or `event`. - A count of a field also holds `data.field`. Opening one event records the query `id:<event id>`. - A read is recorded once per caller, view, field and query text in 10 minutes. The repeats, the pages after the first and a page that refreshes itself add no event. The first read after the 10 minutes is recorded again. - The field list reads no event and records nothing. - An export and each opening of the stream are recorded every time. - A query that is refused is recorded every time, as a `failed` event with its reason. ### How views and lists are recorded - A view of a chat or an agent request, as `chat.view` or `run.view`, is recorded once per reader and subject in 10 minutes. The owner's own views count. - A list of chats or requests is one `chat.list` or `run.list` event, recorded once per reader and scope in 10 minutes, never one per row. - The Agents page's list of one agent's runs is a `run.list` with scope `workspace` for an Admin or `you`. Its target is the connected agent or service account. - A refused view is recorded every time. - A call that answers 404 `not_found` for an id the caller cannot see is recorded every time. The event is a denied `request.refuse` or the route's own view action. Its target is the kind and id the caller asked for, and its reason is `not_found`. This holds for every route that names the id, whatever its method, including the dashboard versions, a diff, a folder, the datasource schema and a presence ping. Probing for hidden ids therefore leaves a trace. - Any other 404 under a visible object, such as a dashboard that was never imported or a version that does not exist, is not recorded. - An unknown trace id on a datasource the caller can read is a failed `query.run`, not a denial. ### How queries are recorded Every query a person or an agent composes is a `query.run`. Its target and its `datasource_uid` are the datasource's uid. That covers the Logs, Metrics and Traces pages, the draft previews, the agent's and MCP query tools, and the CLI. - `data.query` is the text that ran, cut at 4 KiB with ` [truncated]` appended. The secrets listed under [the exported record](/docs/operate/audit-export/#the-record) are replaced by `***`. Any other secret in a query text is stored as typed and exported with the event, so it reaches the trail. - `data.row_count` is how many rows, points or spans came back. - `data.from` and `data.to` are the range it read, as RFC 3339 times. - A request or tool call that ran several queries on one datasource is one event. It has the distinct texts on separate lines, the rows added up and the widest range. - The same caller's same query over the same period on the same datasource within 10 minutes is recorded once when it succeeds. A caller is one person, service-account key or agent run, so each run and each key records its own reads. A failed or refused query is recorded every time, and a live tail is never folded. - The period is the range's length to the minute and the start of the stretch of that length it begins in. A page that refreshes the last 15 minutes is recorded at most once each 15 minutes, and a wider or other range is recorded on its own. - A panel on a saved dashboard version is not recorded query by query. Its queries are fixed by the version, and the dashboard view carries it. - A `query.run` whose `data` holds `stream: true` is a live tail of a logs query. It is written when the stream ends. Its `duration_ms` is how long the stream stayed open, up to the 30 minute limit, not how long a query took. ### How refusals are folded Repeated refusals are folded so an attack cannot flood the trail. `auth.credential_rejected`, `auth.csrf_rejected` and `auth.login_failed` events that share an action, reason, target, actor and provider error are one key. - The first event of a key is written at once with `data.count` of 1. - The rest of that key's minute become one later event whose `data.count` is how many more there were. There is no later event when there were none. The `count` of all the events of a key adds up to the refusals. - When more than 1000 keys are open, refusals of new keys fold under one anonymous event marked `data.overflow`. It names no actor or target, and those events follow the same rule. ### Window and limits Every read covers a window from `since`, inclusive, to `until`, exclusive. | Item | Rule | | --- | --- | | `since`, `until` | An RFC 3339 time, epoch milliseconds or a relative time such as `now-7d`. | | Default window | `until` is now, and `since` is 24 hours before `until`. | | Longest window | 366 days. A longer one answers 400 `invalid_request`; read a longer period one window at a time. | | Statement timeout | 30 seconds. A read past it answers 422 `query_timeout`. | | Search page | 100 events by default, at most 1,000. | | Search order | Newest first by `occurred_at`, then `id`. | | Export | Up to 1,000,000 events. | | Facet values | 10 by default, at most 100. | | Histogram buckets | 60 by default, at most 200. | | MCP search | 20 events by default, at most 100, in at most 16 KiB. | | Event detail | Up to 50 events of the same request within an hour and 50 of the same run within a day. | Each read runs in a read-only transaction. ### Details of paging and export - `next_cursor` pages through one search without repeating or skipping an event, even while new events are recorded. It keeps the window of the first page, and a cursor sent with another query is refused. - An export stops at the value of its `X-Export-Row-Limit` header. A complete export ends with the HTTP trailer `X-Export-Truncated`: `true` when more matching events existed past the limit, `false` otherwise. - When a read fails after the first rows were sent, such as a statement timeout or a lost database connection, the server cuts the connection off. The failed export is recorded with its row count. The client sees an unexpected end of the body, not a short file that looks complete. - Before each page after the first, the server re-reads the caller's credentials and role. An export whose caller is no longer an Admin is cut off the same way and recorded as denied with `forbidden_role`. - When the 16 KiB cap, not `limit` or the end of the results, ends an MCP page early, the answer carries `truncated: true` and a `note` that says how many events it kept. `next_cursor` continues from there. ### Aggregation limits The aggregate endpoint runs `aggs` with these limits: - bucket aggregations are `date_histogram` and `terms`, up to three levels with one bucket aggregation per level; - metrics are `cardinality`, `value_count`, `min`, `max`, `avg`, `sum` and `percentiles`; - a body holds at most 50 aggregations; - a `terms` size is a whole number from 1 to 1000, 10 by default, and the sizes of nested levels multiply to at most 1000 groups; - `percentiles` takes 1 to 20 percents between 0 and 100; - a `date_histogram` interval is at most 366 days, and the window holds at most 11,000 of its buckets; - an aggregation whose buckets would make more than 100,000 rows is refused with the reason. The `query` of a Query DSL body takes `bool` (`must`, `filter`, `should`, `must_not`), `term`, `terms`, `match`, `match_phrase`, `range`, `wildcard`, `exists`, `multi_match`, `query_string`, `match_all` and `match_none`. ### Stream details - Each frame is an `audit` event with the audit event as its data. A new stream sends events from the 10 minutes before it opened onward and never one recorded earlier. - The first frame, `ready`, carries the id of the position the stream starts from. A client cut off before any event resumes without missing one. - Each frame's `id` is its position in the trail and the event's time. Send it back as `Last-Event-ID` to resume after it. A resumed stream sends every matching event committed after that frame whose time is at most 10 minutes before the frame's event, however long the client was away. - A `Last-Event-ID` whose event is more than 24 hours old answers 400 `invalid_request`. Read the gap with a search, then open a new stream. An id the stream did not send answers 400 `invalid_request` too. - Opening the stream records one `audit.search` event with the query, not one per event it delivers. - Every 5 seconds the server checks that the caller is still an Admin. It ends the stream with a `forbidden` frame (`forbidden_role`) once they are not. It also ends the stream at shutdown and after 30 minutes, and a client reconnects from its last id. - A caller may hold 5 audit streams and a server 20. One more answers 429 `too_many_streams` for a caller over its limit and 503 `too_many_streams` for a server over its limit. - Each stream reads the trail every 2 seconds, one read at a time, under a 5 second statement timeout. A stream whose read times out twice in a row ends with an `error` frame (`query_too_expensive`) saying the query is too expensive to follow. Narrow the query or search instead. ### API, MCP and the CLI | Read | API | MCP | CLI | | ---- | --- | --- | --- | | Search events | `GET /api/v1/audit/events` | `search_audit_events` | `observe audit search` | | One event with its request and run | `GET /api/v1/audit/events/{id}` | `get_audit_event` | `observe audit show <id>` | | Top values of a field | `GET /api/v1/audit/facets` | `list_audit_facets` | `observe audit facets <field>` | | Counts over time | `GET /api/v1/audit/histogram` | `get_audit_histogram` | `observe audit histogram` | | Aggregation | `GET /api/v1/audit/aggregate` | `aggregate_audit_events` | `observe audit aggregate` | | Fields | `GET /api/v1/audit/fields` | `list_audit_fields` | `observe audit fields` | | Export as NDJSON or CSV | `GET /api/v1/audit/export` | | `observe audit export` | | Follow new events | `GET /api/v1/audit/stream` | `search_audit_events` | `observe audit search --follow` | The filter is the `q` parameter of the API, the `query` argument of the MCP tools and the `--query` flag of the CLI. The window is `since` and `until` in the API and `--from` and `--to` in the CLI. Every route answers 403 `forbidden_role` to a caller below Admin. No route or tool changes or deletes an audit event. ### The audit datasource Every server has the built-in datasource `slashobserve-audit`, named Audit trail. It serves this trail in the OpenSearch format, so the Logs page, panels and the agent read it like an OpenSearch datasource. It is listed with type `opensearch` and source `builtin`. Only Admins and Admin keys see or query it, and nobody can edit or remove it. See [Datasources in the app](/docs/connect/datasources-in-the-app/). A datasources file entry with the uid `slashobserve-audit` stops the server at start with `audit_datasource_failed`. The four starter dashboards in the Audit folder are read-only, and the server brings each up to date with its release at every start. See [Audit folder](/docs/use/activity/#audit-folder). In the web app, **Open in Logs** on **Audit**, then **Log**, opens the Logs page on this datasource. **Audit**, then **Dashboards** or **Observations**, lists what the Audit folder holds. ### Details of the audit datasource - It takes the three query forms above. A KQL range query counts the matching events per interval. A logs panel or an instant query returns events newest first. A DSL body with `aggs` returns series when it holds a `date_histogram` and a table when it does not. - Each event comes back with the fields of [Fields](#fields) and a `message` line such as `dashboard.update denied (forbidden_role) by Sam via web on dashboard "Checkout"`. `outcome` stands in for a log level. - The Logs page histogram counts `failed` as error, `denied` as warning, `success` as info and `unknown` as other. - The time field is `occurred_at`, and the field list marks the fields that `terms` can group by. - It answers searches sorted by `occurred_at`, oldest or newest first, paged with `from` and `size`. A search reaches at most 10,000 events deep, counts totals up to 10,000 and returns at most 1,000 events a read. - It answers `date_histogram` and `terms` buckets, `date_histogram` with a `time_zone` as above, and the `cardinality`, `value_count`, `min`, `max`, `avg`, `sum` and `percentiles` metrics. - A request holds at most 20 aggregations, nested ones included, and a `terms` size of at most 1000. Its `date_histogram` buckets, empty ones filled in, come to at most 11,000. A request over any of these is refused as an invalid query. - The request body is at most 1 MiB. - Any other request, body key, sort field or aggregation is refused with 400 and a message that names it, which a panel shows as its query error. - The whole fleet runs at most 4 queries on it at once. Its queries are left out of the [proxy metrics](/docs/operate/metrics/), so `/metrics` never shows when Admins read the trail. - Reading through it is recorded as `query.run`, never as `audit.search`, with the datasource uid as its target and the same `data` as any other datasource. A panel on a saved dashboard records nothing beyond the dashboard view. The repeat rule of [How queries are recorded](#how-queries-are-recorded) keeps a dashboard that refreshes from filling the trail. ### Who an agent run can read the trail for An agent run reads the audit trail only when everyone who can read what the run writes is an Admin, so an answer never shows audit data to someone who could not query it. - An Admin's private chat reads it, whether or not the chat is about a dashboard or an observation, because the answer stays the Admin's until they share it. - A thread ask, a build, an investigation, a revision or a suggestion reads it only when one of these is in a folder only Admins can read, such as Audit: - the thread's dashboard or observation; - the build's folder; - the observation it files into; - the dashboard it changes. - Anywhere else the run does not see it. Its brief says the audit data is available in a private chat or in a folder only Admins can read. A query on it answers the tool error `admins_only_datasource`, recorded as a denied `agent.tool_call`. - The rule holds for the built-in agent and for a connected agent that took the run over MCP, because both reach datasources through the run's session. # States > Every state a run, comment thread and workspace object can be in, the actions each state allows and the activity event each move records. Source: https://slashobserve.com/docs/reference/states/ · Markdown: https://slashobserve.com/docs/reference/states/index.md This page is generated from the server's state tables by `make generate`, and a test fails when it falls behind them. An action listed for a state is offered in that object's `allowed_actions` to a caller who may take it. ## Run A run is one agent request, started by `POST /observe`, a comment, a prompt, an investigation or a suggestion. | State | Meaning | Actions | | --- | --- | --- | | `queued` | Waiting for a worker. | `cancel`, `pin`, `archive` | | `running` | A worker holds its lease and runs the agent. | `cancel`, `pin`, `archive` | | `canceling` | The requester canceled it and its worker is stopping. | `cancel`, `pin`, `archive` | | `succeeded` | It saved its result: a version, a suggestion, or a finding written into the investigation's observation or kept on the run until its requester saves it. Final. | `retry`, `pin`, `archive` | | `failed` | It stopped without a result; a build it left can be kept or continued. Final. | `keep_build`, `continue`, `retry`, `pin`, `archive` | | `canceled` | The requester canceled it; a build it left can be kept or continued. Final. | `keep_build`, `continue`, `retry`, `pin`, `archive` | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `enqueue` | - | `queued` | `run.queued` | requester | | `claim` | `queued`, `running` | `running` | `run.started` | server | | `release` | `running` | `queued` | `run.released` | server | | `cancel` | `queued`, `running`, `canceling` | `canceling`, `canceled`, `succeeded` | `run.canceling` or `run.canceled` or `run.succeeded` | requester | | `succeed` | `running`, `canceling` | `succeeded` | `run.succeeded` | server | | `fail` | `running` | `failed` | `run.failed` | server | | `settle` | `queued`, `canceling` | `canceled`, `succeeded` | `run.canceled` or `run.succeeded` | server | | `exhaust` | `running` | `failed`, `succeeded` | `run.failed` or `run.succeeded` | server | | `expire` | `queued`, `running` | `failed`, `succeeded` | `run.failed` or `run.succeeded` | server | | `keep_build` | `failed`, `canceled` | - | `run.kept` | requester | | `continue` | `failed`, `canceled` | - | - | requester | | `retry` | `succeeded`, `failed`, `canceled` | - | - | anyone who may start one | | `pin` | `queued`, `running`, `canceling`, `succeeded`, `failed`, `canceled` | - | - | requester | | `archive` | `queued`, `running`, `canceling`, `succeeded`, `failed`, `canceled` | - | - | requester | ## Comment thread A comment thread is a conversation on a dashboard, an observation, an annotation or a proposal, returned by `GET /threads` and by every route that opens, replies to, resolves or reopens one. | State | Meaning | Actions | | --- | --- | --- | | `open` | Waiting for an answer or a change. | `reply`, `resolve` | | `resolved` | Someone, or an agent run that saved the change it asked for, marked it done. | `reply`, `reopen` | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `open` | - | `open` | `thread.opened` | commenter | | `reply` | `open`, `resolved` | - | `thread.replied` | commenter | | `resolve` | `open` | `resolved` | `thread.resolved` | requester, editor, server | | `reopen` | `resolved` | `open` | `thread.reopened` | commenter | ## Observation An observation is a page of blocks in a folder, started by POST /observations or by an investigation. | State | Meaning | Actions | | --- | --- | --- | | `open` | Still being worked on: blocks are added and the discussion goes on. | `update`, `move`, `resolve`, `publish`, `delete` | | `resolved` | Closed with a one-line summary of what was found; it can be reopened. | `update`, `move`, `reopen`, `publish`, `delete` | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `create` | - | `open` | `observation.created` | editor | | `update` | `open`, `resolved` | - | `observation.updated` | editor | | `move` | `open`, `resolved` | - | `observation.moved` | editor | | `resolve` | `open` | `resolved` | `observation.resolved` | editor | | `reopen` | `resolved` | `open` | `observation.reopened` | editor | | `publish` | `open`, `resolved` | - | `observation.published` | editor | | `delete` | `open`, `resolved` | - | `observation.deleted` | admin, requester | ## Observation block A block is one item on an observation's page: Markdown, a live panel, a frozen snapshot or an agent run. | State | Meaning | Actions | | --- | --- | --- | | `live` | On the page for everyone who can see the observation. | `update`, `remove` | | `requested` | Asked for by someone who can comment but not edit; an editor keeps it or discards it. | `update`, `keep`, `discard` | | `deleted` | Gone: the row is deleted, so this state is never stored. Final. | - | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `add` | - | `live` | `observation.block_added` | editor | | `add` | - | `requested` | `observation.block_added` | commenter | | `update` | `live`, `requested` | - | `observation.block_updated` | editor | | `keep` | `requested` | `live` | `observation.block_kept` | editor | | `discard` | `requested` | `deleted` | `observation.block_discarded` | editor, requester | | `remove` | `live` | `deleted` | `observation.block_removed` | editor | ## Proposal A proposal is a change to a dashboard that someone who can edit merges or discards, returned by `GET /api/v1/proposals/{id}`. | State | Meaning | Actions | | --- | --- | --- | | `open` | Waiting for someone who can edit to merge or discard it. | `update`, `merge`, `discard` | | `merged` | Its change was saved as a new version of the dashboard. Final. | - | | `discarded` | Closed without saving its change. Final. | - | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `propose` | - | `open` | `proposal.opened` | commenter | | `update` | `open` | - | `proposal.updated` | requester | | `merge` | `open` | `merged` | `proposal.merged` | editor | | `discard` | `open` | `discarded` | `proposal.discarded` | requester, editor | ## Dashboard health `GET /health` returns the `state` of each dashboard that has a problem. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `unchecked` | The health check has not checked this dashboard yet. | | `outdated` | The last check ran on an older version than the latest one. | | `skipped` | The last check skipped the dashboard because its queries read the viewer's identity, so no one result applies. | | `failing` | The last check found a panel query or a variable that fails. | | `healthy` | None of the above. No data, a duplicate title and not being opened stay problems in the list but do not make a dashboard failing. | ## Health repair `GET /health` returns the `outcome` of a dashboard's latest repair beside the repair run's own `state`. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `queued` | The repair run waits for a worker. | | `running` | The repair run is running or stopping. | | `repaired` | The run saved a version that the health check has not checked yet. | | `still_failing` | The run saved a version and the check that ran on it still lists the dashboard. | | `failed` | The run failed or was canceled. | ## Webhook `GET /webhooks` returns the `state` of each webhook. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `disabled` | An admin turned it off, or the server did because the receiver is gone, deliveries kept failing, its owner is no longer an admin or its secret cannot be read; disabled_reason says which. | | `retrying` | The last delivery failed and the server retries in order. | | `sending` | None of the above: deliveries go out as events happen. | ## Service-account key `GET /service-accounts/{id}/keys` returns the `state` of each key. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `revoked` | An admin revoked it. | | `expired` | Its expiry time has passed. | | `expiring` | It expires within 7 days. | | `active` | None of the above. | ## Connected agent `GET /me/grants` and `GET /grants` return the `state` of each connected agent. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `revoked` | The person or an admin revoked it; it leaves the list. | | `active` | It may call /mcp as its person until expires_at. | ## Public link `GET /dashboards/{id}/public-links` returns the `state` of each link. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `expired` | Its expiry time has passed; the link no longer opens. | | `active` | None of the above; usable says whether the dashboard's latest version can be shown publicly. | ## Grafana import A Grafana import is one run of `POST /grafana/{id}/imports`, answered by `GET /grafana/{id}/imports/{sync_id}`; its moves write server log lines with these names, not activity events, because a Grafana connection is Admin only. | State | Meaning | Actions | | --- | --- | --- | | `running` | A server holds its lease and imports the chosen dashboards. | `cancel` | | `finished` | Every chosen dashboard was handled, each imported, updated, skipped or failed on its own. Final. | - | | `failed` | It stopped early: Grafana could not be listed, the import could not continue as the person who started it, or its server stopped twice without handing it on. Final. | - | | `canceled` | An Admin stopped it; the dashboards it already imported stay. Final. | - | | Action | From | To | Event | By | | --- | --- | --- | --- | --- | | `start` | - | `running` | `grafana sync started` | admin | | `claim` | `running` | `running` | `grafana sync resumed` | server | | `release` | `running` | `running` | `grafana sync released` | server | | `finish` | `running` | `finished` | `grafana sync finished` | server | | `fail` | `running` | `failed` | `grafana sync failed` | server | | `exhaust` | `running` | `failed` | `grafana sync lease expired twice` | server | | `cancel` | `running` | `canceled` | `grafana sync canceled` | admin | ## Agent presence Whether an outside agent is taking runs: derived from when it last asked for work and the runs it holds. This state is computed from stored fields on every read; nothing stores it. | State | When | | --- | --- | | `working` | It holds the lease of a run it claimed. | | `listening` | It asked for work in the last 40 seconds. | | `offline` | It has not asked for work in 40 seconds and holds no run. | # Text rules > What the server accepts in a title, a name, a comment, a prompt or a note, how it trims text and counts its length, and the reason code it returns when text is refused. Source: https://slashobserve.com/docs/reference/text-rules/ · Markdown: https://slashobserve.com/docs/reference/text-rules/index.md Titles, names, comments, prompts and notes follow one text rule. The server applies it on the web, over the API, through the CLI and over MCP, and the web app applies the same rule before it sends, so a form shows a problem as you type. ## Fix text the server refused A refused write answers with the endpoint's usual error code and, where the endpoint reports one, a `reason` from the [reason table](#reason-codes). A dashboard or panel title reports the reason as the `code` of its issue at `/title` or `/panels/{i}/title`. 1. Read the `error` message. It names the field and says what to change, for example `title must be at most 200 characters; shorten it`. 2. Find the `reason` in the [reason table](#reason-codes) to see what to remove or shorten. 3. Send the text again. ## Know what the server trims The server removes spaces and zero-width characters at the start and end of a field, so ` QA lead ` is stored as `QA lead`. Spaces and hidden characters inside the text stay, apart from the cases refused in [What is checked](#what-is-checked). An observation text block is checked as it is sent and is not trimmed. ## Keep an old title that breaks the rules A dashboard or panel title that an earlier version already holds is kept as it is when you save, duplicate or build on that dashboard, even when it breaks the rules. An old dashboard never blocks a save over a title nobody touched. A title you type or change is checked in full. In the same way, an observation text block whose text is sent back unchanged is not checked again. A block saved earlier with control characters can still be moved or resized. ## Reference ### What is checked The server checks the characters of a field in this order and reports the first failure. 1. It must be valid UTF-8. 2. Spaces and zero-width characters at its start and end are removed. 3. What is left must hold at least one visible character. 4. Each character is checked in turn, and the first bad one decides the reason: - a control character is refused, and a one-line field counts line breaks and tabs as control characters; - a bidirectional override or isolate character (U+202A to U+202E and U+2066 to U+2069) is refused, because it can make a name read as another name; - a tag character (U+E0000 to U+E007F) is refused unless it follows a black flag (U+1F3F4); - in a one-line field, a zero-width or hidden character is refused, because two names that differ only by such a character would look identical. 5. Its length, counted in Unicode characters and not bytes, must be within the limit. ### Details of the characters - A comment, a prompt and an observation text block may hold line breaks and tabs. A title, name or note is one line. - A zero-width joiner (U+200D) and a zero-width non-joiner (U+200C) are allowed inside text, because emoji sequences and some scripts need them. - A multi-line field allows other zero-width characters inside it. - A one-line field refuses these hidden characters inside it: U+200B, U+FEFF, U+00AD, U+180E, U+2060 to U+2064, U+206A to U+206F, and the fillers U+034F, U+115F, U+1160, U+2800, U+3164 and U+FFA0. - Tag characters are allowed only after a black flag, which is how the England, Scotland and Wales flags are written. Anywhere else, in any field, they are refused with `text_invisible_characters`. ### Where it applies | Text | Limit | One line | | --- | --- | --- | | Dashboard title and panel titles | 200 | yes | | Folder name | 100 | yes | | Saved search title | 120 | yes | | Observation title | 200 | yes | | Observation summary | 500 | yes | | Observation text block | 8000 | no | | Chat title | 120 | yes | | Public link label | 80 | yes | | Prompt, continue note, saved prompt body, comment and thread message | 4000 | no | | Annotation text | 2000 | no | The limits count characters. A public link label may be empty, and the other fields need at least one visible character. A refused public link label answers `label must be at most 80 characters without control characters` and no `reason`. A saved prompt's name, a comment access request's note, a service account's name and a team name follow their own rules, described with them. See [Saved prompts](/docs/teams/saved-prompts/), [Folders and access](/docs/teams/folders/#ask-for-comment-access), [People](/docs/teams/people/#teams) and [Service-account keys](/docs/operate/service-account-keys/). ### Reason codes | Reason | What to change | | --- | --- | | `text_empty` | Enter some text. | | `text_invisible_only` | The text has only spaces or invisible characters; enter visible text. | | `text_invisible_characters` | Remove the zero-width or hidden characters. | | `text_control_characters` | Remove the control characters, and the line breaks and tabs in a one-line field. | | `text_bidi_override` | Remove the bidirectional override characters. | | `text_too_long` | Shorten the text to the limit. | | `text_invalid_utf8` | Send valid UTF-8. | # Running benchmarks > How contributors run the Observe Agent on o11y-bench tasks through the Harbor adapter, with the replay model or a real one. Source: https://slashobserve.com/docs/contributing/benchmarks/ · Markdown: https://slashobserve.com/docs/contributing/benchmarks/index.md The `benchmarks/` folder lets you measure the Observe Agent against an external benchmark. It holds a Harbor agent that runs the Observe Agent on the benchmark's tasks. The first benchmark is o11y-bench. Use it to check that the adapter still works end to end, or to compare agent changes on the same tasks. For each task the adapter starts a throwaway server and Postgres and points the server at the task's stores. It asks the task's question as of the time the task's data ends, and writes the answer in the form the benchmark grades. It also saves the run's full trajectory, token counts and cost beside the result, so grading can be repeated without a model. ## Run the adapter's tests `make test-benchmarks` runs the adapter's unit tests, and `make test` and CI include it. It needs `uv` only, and CI never calls a model from the adapter. ## Run one task A trial needs Docker, a checkout of o11y-bench, `mise`, `uv` and a server image that supports `as_of` on a run. Build the image from a checkout of main or v0.1.5 or later with `docker build -t slashobserve-server:local .`. 1. Run the replay script with the path of your o11y-bench checkout and a task name: ```sh benchmarks/run-replay.sh /path/to/o11y-bench promql-error-rate ``` 2. The replay model runs the task with no key, so the answer is a fixed text and the run proves the plumbing. 3. The script prints the path of the trial's `trajectory.json` when it finishes. Set `SLASHOBSERVE_SERVER_IMAGE` to use another image than `slashobserve-server:local`. ## Run tasks with a real model A real run spends tokens, so start with one task and a cost cap. For a real model, a subset of tasks, the options, the spend cap and the tasks that are skipped, read [`benchmarks/README.md`](https://github.com/slashobserve/slashobserve/blob/main/benchmarks/README.md) in the repository. ## Reference ### What runs where | Part | Needs | | --- | --- | | `make test-benchmarks` | `uv` only. | | One trial | Docker, a checkout of o11y-bench and a server image that supports `as_of` on a run. | | Grading | `ANTHROPIC_API_KEY`, because the o11y-bench judge is a model call; the replay script skips it. | ### What a trial does 1. It starts a throwaway Postgres and the server image, with a datasources file that points at the task's stores. 2. It starts a run with the task statement as the prompt and `as_of` set to the time the task's data ends. 3. It polls the run until it finishes, writes the result into the trial's `agent/` folder and removes both containers. ### Where the details are [`benchmarks/README.md`](https://github.com/slashobserve/slashobserve/blob/main/benchmarks/README.md) covers the trial step by step, the requirements, the `--ak` options, the cost cap, the skipped tasks, cleanup and the pinned dependencies. # Testing > How to run the unit, component, API and browser suites, the two-server checks and load test, coverage and the docs lint, and what CI runs for each change. Source: https://slashobserve.com/docs/contributing/testing/ · Markdown: https://slashobserve.com/docs/contributing/testing/index.md SlashObserve has unit tests, component tests, an API suite, a browser suite and a docs check. This page shows how to run each one on your machine and what CI runs for a pull request. Start with [Check your change before you push](#check-your-change-before-you-push); the end-to-end suites and the load test need Docker and take longer. ## Check your change before you push 1. Run `make agent` once, so a server built from source can find `observe-agent`. When a model provider is configured, the server starts `observe-agent` and fails to start if it is not on the path. 2. Run `make test`. It runs every unit suite in [Run the unit tests](#run-the-unit-tests). 3. Run `make lint`. It runs the Go, web and agent linters, the docs lint and the Helm chart checks. 4. Run `make ci` for what the CI `check` job stands for: `make lint`, `make test`, a `go mod tidy -diff` check and `make build`. Run one part of the unit tests on its own while you work. The browser and API suites are not part of `make ci`; see [Run the API suite](#run-the-api-suite) and [Run the browser suite](#run-the-browser-suite). ## Run the unit tests `make test` runs these, one after the other: - `go test -race ./...`, with a 20 minute timeout - the web Vitest suite - `bun test` for `observe-agent` - the Python unit tests of the benchmark adapter, which need `uv`; see [Running benchmarks](/docs/contributing/benchmarks/) - the tests of the release, install, docs lint, CI change, Astronomy Shop and replicas scripts Run one part with `make test-go`, `make test-web`, `make test-agent`, `make test-benchmarks` or `make test-scripts`. `make test-go GO_TEST_PKGS=./internal/db/...` narrows the Go packages. From the repository root you can also run `go test -race ./...`, and from `web/` you can run `bun run test`. Go tests sit next to the code as `*_test.go` files. Web tests for pure helpers sit next to the code as `*.test.ts` files. Tests that need a database or a datasource start the real store through testcontainers, so Docker must be running. ## Write a component test Web components are tested with Vitest, Testing Library and happy-dom, in `*.test.tsx` files next to the component. They run in the same `bun run test` as the unit tests. 1. Render the component with `renderWithProviders` from `web/src/test/render.tsx`. It wraps the component in a fresh TanStack Query client with retries off and returns a `user` from `user-event` for clicks and typing. 2. Pass `queryClient` to seed the cache. 3. Pass `route`, a route `path` and a starting `url`, when the component reads or writes the URL. The component then renders inside a memory router. 4. Stub only what the test cannot run, such as `fetch` with `vi.stubGlobal`. 5. Find elements by role and accessible name, the way a person using a screen reader would. `web/src/test/setup.ts` adds the Testing Library matchers, unmounts each test's components and stubs the browser APIs that happy-dom lacks. ## Run the API suite The API suite checks the HTTP API, the MCP endpoint, the CLI and the shop's telemetry with real requests, against a full stack. 1. Run `make e2e`. It resets the isolated `slashobserve-e2e` compose stack, builds the server image from your checkout, boots the stack, and runs `scripts/e2e.sh`. 2. Read the output. Each check prints a `PASS` line, and the first failure prints a `FAIL` line and stops the run. 3. Leave the stack running if you want the browser suite next. Stop it with `scripts/e2e.sh down`, which also removes its volumes, and read its container logs with `scripts/e2e.sh logs`. The stack is the OpenTelemetry Astronomy Shop of `deploy/astronomy` plus the server and Dex. The server answers on http://localhost:18080, and the shop on http://localhost:18081. The shop's images are the ones `make demo` pulls, so the first run downloads them. The stack has its own compose project, ports and state, so it runs beside your `make demo` stack and never touches it. The suite runs the replay model provider, so it never calls a live model. Replay answers each prompt from a fixture in `e2e/fixtures/llm/`; `e2e/CLAUDE.md` describes the fixture format. The suite checks: - the API, the MCP endpoint and the CLI - that every datasource the stack provisions reports healthy - the shop's span metrics, container metrics and host metrics in Prometheus - the shop's logs and traces in ClickHouse, and that the ClickHouse user is read-only - the Grafana imports - a `paymentFailure` fault, which has to show in metrics, traces and logs - that every API call matched the OpenAPI contract, which the server checks while the suite runs - that the server log holds no service-account key The fault checks read only the last two minutes of data, so an error from an earlier run does not satisfy them. ## Run the browser suite The browser suite runs the Playwright specs in `web/e2e` against the e2e stack. 1. Run `make e2e-browser`. It reuses the running, healthy e2e stack, or boots one, installs Chromium, and runs the specs. 2. When the specs finish, it also checks the OpenAPI contract and the server log, as the API suite does. 3. After a code change, run `make e2e` again first, because reuse does not rebuild the server image. The browser suite needs no API suite first and no more history than the boot waits for. `make e2e-up` does only the boot, which is what a job wants while it installs the browsers. `make e2e-all` runs the API suite and then the browser suite. Run the two one after the other and never at the same time against one stack, because both set the `paymentFailure` flag and reset it when they finish. Specs import `test` and `expect` from `web/e2e/fixtures.ts`, which fails a test whose page logs a console error. The `setup` project signs in through Dex once and saves `web/e2e/.auth/user.json`. ## Run part of the browser suite Set `PW_SHARD` to the part you want, for example `PW_SHARD=2/4 make e2e-browser` for the second of four. List what a shard holds without a stack by running `PW_SHARD=2/4 bunx playwright test --list` from `web/`. Every shard runs the sign-in setup first. ## Start the stack early `make e2e-warm` starts every service except the server and returns. The shop and Prometheus then collect data while the server image builds. The next `make e2e`, `make e2e-up` or `make e2e-browser` within 30 minutes adopts that stack, starts the server and waits for health as usual. With no warm stack, they reset and boot as before. The warm step needs the shop's images, never the server image. ## Read a CI failure CI runs the browser suite as four shards, each on its own stack, with two workers and one retry. A test that passes only on the retry still fails the run. Playwright records a trace on the retry, a screenshot on a failure and a video it keeps on a failure. Locally the suite runs with one worker, no retries and the list reporter. When a shard fails, its HTML report, test results and compose logs are uploaded as the `playwright-shard-N` artifact. When the API suite fails, its compose logs are uploaded as `e2e-logs`. Both artifacts are kept for 7 days. ## Test two servers `make replicas-up` builds this checkout and boots the isolated `slashobserve-replicas` compose stack. It has two servers behind HAProxy and PgBouncer in transaction mode, with `SLASHOBSERVE_DATABASE_DIRECT_URL` pointing straight at Postgres. It runs the replay model provider and a Prometheus that scrapes both servers, which is the data source of the load test's dashboard. HAProxy answers on http://localhost:48080 and spreads requests over both servers. Server 1 alone answers on http://localhost:48081 and server 2 alone on http://localhost:48082, so a check can write on one server and read on the other. The stack's project name, ports and volumes differ from the demo and the e2e stack, so it runs beside them and never stops, resets or reads them. `make replicas-down` removes only its containers and volumes. Nothing here runs in CI. `scripts/replicas.sh` also has `stop`, `kill` and `start` for one server, `workers` to recreate the servers with another `SLASHOBSERVE_AGENT_WORKERS`, `status`, `logs` and `keys`. The service accounts the load test signs in with are created under `/tmp/slashobserve-replicas`, and their keys are never printed. ### Run the two-server checklist Run `make replicas-check`. It recreates the stack, runs `scripts/replicas.sh check`, prints one `PASS`, `FAIL` or `KNOWN` line per item, and takes about 15 minutes. The checklist covers: - migrations, provisioning and scheduled jobs run once across both servers - the fleet count and the divided limits are right - events, agent runs, webhook leases, logins and OAuth tokens cross servers - the status of a Grafana import is the same on both servers - a server stopped gracefully, killed and restarted leaves no request lost A `KNOWN` line is a gap that [Scaling](/docs/operate/scaling/) documents, and whoever fixes it sees the line change. `scripts/replicas.sh check C5` reruns one item on a running stack, except C1 to C3, which need a fresh boot. Run the checklist before a release that changes the scheduler, the agent queue, events, OAuth, webhooks, the fleet or provisioning, and paste its output into the pull request. ## Run the load test Run `make loadtest`. It recreates the replicas stack and measures it with `go run ./loadtest`, which uses only the Go standard library. The series takes about 50 minutes. It runs this series: 1. All four scenarios on one server, with 8 agent workers. 2. All four scenarios on two servers, with 8 agent workers. 3. The agent builds alone on two servers with 2 agent workers. 4. The agent builds alone on two servers with 16 agent workers. To run one pass on the stack as it is, with the running servers as replicas, use `scripts/replicas.sh load [--only viewers|streams|mcp|agent] <label>`. The tool refuses to run against anything but this stack: a loopback target on port 58080 is the demo and one on 8080 is a local server, and both are rejected. Another host needs `--remote <host>` with that exact host name. It never prints a key and deletes or resets nothing. ### Read the load test report Each pass writes `loadtest/reports/<time>-<label>/`, which is git-ignored. - `report.md` has one table per scenario and then a table of gates. - Under the tables, it lists the peak CPU and memory of every container, the Postgres connections by state and the PgBouncer pool. - `slow-queries.txt` has the ten slowest statements. - `report.json` holds every number. The run fails when a gate fails. The 300 ms server time for panel data and the 5 second queue wait at 8 workers are measurements next to the targets of [Scaling](/docs/operate/scaling/), not gates. ## Measure coverage Run `COVER=1 make test`. It writes the Go profile to `coverage.out` and prints its `total:` line, and it writes the web summary to `web/coverage/coverage-summary.json` and prints it. Read the Go profile per function with `go tool cover -func=coverage.out`. Generated web files (`*.gen.ts`) are left out of the web numbers. CI does not measure coverage. ## Check the docs Run `scripts/docs-lint.sh`. It checks every page under `docs/`, and `make lint` runs it. It prints one `path:line: rule` line for each problem and fails when it finds any. Set `DOCS_DIR` to lint another folder, for example a copy of a page you are drafting. ## Reference ### Commands | Command | What it does | | --- | --- | | `make test` | Every unit suite. | | `make test-go` | `go test -race`, with `GO_TEST_PKGS` to narrow the packages. | | `make test-web` | The web Vitest suite. | | `make test-agent` | `bun test` for `observe-agent`. | | `make test-benchmarks` | The benchmark adapter's tests; needs `uv`. | | `make test-scripts` | The tests of the shell scripts. | | `make lint` | Go, web and agent linters, the docs lint and the Helm chart checks. | | `make ci` | `lint`, `test`, a tidy check and `build`. | | `make e2e` | Reset and boot the e2e stack, then run the API suite. | | `make e2e-warm` | Start the e2e stack without the server. | | `make e2e-up` | Reuse or boot the e2e stack and stop. | | `make e2e-browser` | Reuse or boot the e2e stack and run Playwright. | | `make e2e-all` | The API suite, then the browser suite. | | `make replicas-up` | Boot the two-server stack. | | `make replicas-down` | Remove the two-server stack. | | `make replicas-check` | Recreate the stack and run the checklist. | | `make loadtest` | Recreate the stack and run the load test series. | | `make audit` | `govulncheck` and `bun audit` for the web and agent lockfiles. | Details of `make test-scripts`: - `scripts/release-scripts-test.sh` tests the release tag and notes scripts. - `scripts/install-test.sh` tests `install.sh` against fake release assets. - `scripts/docs-lint-test.sh` tests the docs lint rules against fixture pages. - `scripts/ci-changes-test.sh` tests which CI jobs a set of changed files needs. - `scripts/astronomy-test.sh` tests the Astronomy Shop's flag target against a fixture flag file. - `scripts/replicas-test.sh` tests the replicas stack's wait for a request rate in Prometheus, against a stubbed `curl`. ### E2E stack settings | Variable | Default | What it sets | | --- | --- | --- | | `SLASHOBSERVE_E2E_PROJECT` | `slashobserve-e2e` | The compose project. | | `SLASHOBSERVE_E2E_PORT` | `18080` | The server's host port. | | `SLASHOBSERVE_E2E_DEX_PORT` | `15556` | Dex's host port. | | `SLASHOBSERVE_E2E_PROMETHEUS_PORT` | `19090` | Prometheus's host port. | | `SLASHOBSERVE_E2E_SHOP_PORT` | `18081` | The shop's host port, which also serves its Jaeger UI and flag UI. | | `SLASHOBSERVE_IMAGE` | `slashobserve-e2e:local` | A prebuilt server image to run instead of building the checkout. | | `SLASHOBSERVE_E2E_BASE_URL` | `http://localhost:18080` | The address Playwright tests, when you run `bun run e2e` directly. | | `PW_SHARD` | none | The Playwright shard to run, as `N/total`. | Details of the e2e stack: - The stack runs through `scripts/astronomy.sh compose` with the extra layer `deploy/astronomy/compose.e2e.yaml`. - Every `make e2e` resets the stack with `down --volumes`. - The shop's flag file and key live in `deploy/astronomy/.state/<project>`, apart from the demo's, so parallel stacks never share a flag file or a key. - With `SLASHOBSERVE_IMAGE` set, `deploy/astronomy/compose.prebuilt.yaml` replaces the build layer, and compose pulls the image when it is missing. - All ports bind to 127.0.0.1. - A direct `bun run e2e live-fault` reads the project from `SLASHOBSERVE_E2E_PROJECT`, so it edits the e2e stack's flag file and never the demo's. ### Waits and locks | What | How long | | --- | --- | | Compose waiting for every service to be healthy | 15 minutes | | The server answering `/readyz` after that | 60 seconds | | Prometheus holding the shop's span metrics | 5 minutes | | ClickHouse holding log and trace rows | 3 minutes | | Prometheus holding 4 minutes of span metrics, before the import checks | 5 minutes | | `make e2e-up` or `make e2e-browser` finding data on a running stack | 30 seconds, then it reboots | | A warm stack that can be adopted | 30 minutes old at most | | `run`, `up` and `browser` waiting for a live `warm` | 10 minutes | Details of the lock: - `scripts/e2e.sh` holds an exclusive lock on `/tmp/<project>-run.lock` for a whole run, so a second run against the same project fails with `another e2e run is active`. - The warm marker is `/tmp/<project>-warm`; `scripts/e2e.sh down` removes it. - A warm stack is adopted once, and only when Prometheus is running and no server container exists. ### Replicas stack ports | Variable | Default | What it serves | | --- | --- | --- | | `SLASHOBSERVE_REPLICAS_PORT` | `48080` | HAProxy, round-robin over both servers. | | `SLASHOBSERVE_REPLICAS_ONE_PORT` | `48081` | Server 1 alone. | | `SLASHOBSERVE_REPLICAS_TWO_PORT` | `48082` | Server 2 alone. | | `SLASHOBSERVE_REPLICAS_DEX_PORT` | `45556` | Dex. | | `SLASHOBSERVE_REPLICAS_PROMETHEUS_PORT` | `49090` | Prometheus. | All ports bind to 127.0.0.1. Loki and Tempo ports are reserved, but the stack does not start them. ### Load test scenarios | Scenario | What it does | | --- | --- | | `viewers` | 200 viewers reload one dashboard of 12 panels every 10 seconds, first on one shared time range and then on a different range each. | | `streams` | 500 open activity streams while one editor writes annotations. | | `mcp` | 10 MCP clients that call tools. | | `agent` | 20 and then 50 agent builds started at once on the replay model. | Details of the agent scenario: - Each build takes about 6 seconds of model time, so the builds measure the queue and the database, not a model. - The server admits 20 new-dashboard requests at once and 3 per caller, so the 50 builds are 20 at once and the rest as slots free up. - The report counts how often a submission was told to retry. - Each viewer key is limited to 8 panel requests at once, as the server limits each caller. ### Load test gates A gate fails the run when any of these happens: - any 5xx response or dropped connection - any 4xx other than 429 on more than 0.1% of requests - a stream that was refused or dropped - a stream event that was lost or duplicated - an agent build that fails or runs more than once - a JSON-RPC or tool error in the MCP scenario, or an MCP call shed while each server's share of the calls fits its cap - a container that restarted or was killed for memory ### What CI runs | Job | Runs when | What it runs | | --- | --- | --- | | `changes` | Always. | `scripts/ci-changes.sh`, which decides which of the other jobs run. | | `go-lint` | A file outside `web/` and `observe-agent/` changed. | `make lint-go lint-deploy tidy-check`: golangci-lint, `sqlc diff`, the docs lint, the Helm chart checks and the tidy check. | | `go-test` | A file outside `web/` and `observe-agent/` changed. | `make test-go` in six shards: `grafana`, `db`, `datasource`, `agent`, `rest-1` and `rest-2`, split by `scripts/go-test-shard.sh`. | | `web-lint` | A file other than Go or prose changed. | `make lint-web lint-agent test-agent test-scripts test-benchmarks`. | | `web-test` | A file other than Go or prose changed. | The web Vitest suite in two shards. | | `build` | Non-prose files changed. | `make build`, then `make generate`, which must leave every file unchanged. | | `image` | `Dockerfile` or `.dockerignore` changed. | A build of the `Dockerfile` from its own stages. | | `e2e-api` | Non-test, non-prose files changed. | `make e2e`, with a 30 minute limit. | | `e2e-browser` | Non-test, non-prose files changed. | `make e2e-browser` in four shards, each on its own stack, with a 30 minute limit. | | `audit` | A lockfile, `package.json`, `go.mod` or `tools/` changed, on `main` and daily. | `make audit`. | | `check` | Always. | Passes when every lint, test, build and image job that ran has passed; `audit` and the two end-to-end jobs are separate. | Details of how CI picks jobs: - A pull request runs only the jobs its changed files need, and a skipped job counts as passed. - `main` and a manual run start every job. - The daily run starts only `audit`. - A web-only change skips the Go jobs, except when it changes `web/src/spec/defaults.gen.ts` or `observe-agent/src/protocol.ts`, which Go tests read. - A Go-only change skips the web jobs. - A change to documentation skips every job but the Go ones, whose lint runs the docs check. - A change to unit tests skips the two end-to-end jobs. - A change under `.github/`, to `Makefile`, `scripts/ci-changes.sh` or `scripts/go-test-shard.sh` runs every job. - A draft pull request runs neither end-to-end job; marking it ready for review runs them. Details of how the end-to-end jobs start: - Each job compiles the server and the agent on the runner and builds the server image `slashobserve-e2e:ci` from those binaries. - Each job runs `make e2e-warm` in the background first, so the shop starts while the image builds. - Each browser shard starts the stack with `make e2e-up` while Chromium installs, then runs `make e2e-browser` with `PW_SHARD=N/4`. ### Docs lint rules A page passes when: - its front matter has a `title` and a `description` - no line starts with a level 1 `# ` heading - it has no em dash or en dash, anywhere in the file - every relative link to a `.md` file or an image points at a file that exists, and every image has alt text - each prose line holds one sentence - no paragraph runs longer than 8 prose lines without a blank line - a page with more than 60 non-blank lines has at least one `## ` heading A prose line is any line outside front matter and code blocks that is not a heading, a list item or a table row. It holds more than one sentence when a period followed by a space and a capital letter appears outside inline code, parentheses and double quotes. The lint checks relative links to files only; it does not check `#anchor` fragments.