[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-anthropic-grafana-api":3,"mdc-jbhxi4-key":39,"related-org-anthropic-grafana-api":2795,"related-repo-anthropic-grafana-api":2982},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":12,"stars":29,"repoUrl":30,"updatedAt":31,"license":32,"forks":33,"topics":34,"repo":35,"sourceUrl":37,"mdContent":38},"grafana-api","query and manage Grafana dashboards and alerts","Work with a Grafana instance — search and read dashboards, run datasource queries (Prometheus, Loki, PostgreSQL, etc.), inspect alert rules and silences, post annotations, and manage folders. Use this whenever the user mentions a Grafana dashboard, panel, or alert; pastes a Grafana URL; asks \"what does this dashboard show\", \"query this metric in Grafana\", \"is this alert firing\", \"silence this alert\", or wants to create\u002Fexport a dashboard — even if they don't say \"API\". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},"anthropic","Anthropic","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fanthropic.png","anthropics",[13,17,20,23,26],{"name":14,"slug":15,"type":16},"Observability","observability","tag",{"name":18,"slug":19,"type":16},"Dashboards","dashboards",{"name":21,"slug":22,"type":16},"Prometheus","prometheus",{"name":24,"slug":25,"type":16},"Monitoring","monitoring",{"name":27,"slug":28,"type":16},"API Development","api-development",30,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins","2026-06-25T07:41:44.791063",null,12,[],{"repoUrl":30,"stars":29,"forks":33,"topics":36,"description":32},[],"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fclaude-tag-plugins\u002Ftree\u002FHEAD\u002Fgrafana\u002Fskills\u002Fgrafana-api","---\nname: grafana-api\ndescription: Work with a Grafana instance — search and read dashboards, run datasource queries (Prometheus, Loki, PostgreSQL, etc.), inspect alert rules and silences, post annotations, and manage folders. Use this whenever the user mentions a Grafana dashboard, panel, or alert; pastes a Grafana URL; asks \"what does this dashboard show\", \"query this metric in Grafana\", \"is this alert firing\", \"silence this alert\", or wants to create\u002Fexport a dashboard — even if they don't say \"API\". Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.\n---\n\nGrafana's base URL is the instance: Grafana Cloud at `https:\u002F\u002F\u003Cyour-org>.grafana.net`, or self-hosted at\nwherever the org runs it (e.g. `https:\u002F\u002Fgrafana.example.com`). The API surface is the same; only the\nbase URL differs.\n\n**Time units are not uniform across endpoints**: `\u002Fapi\u002Fds\u002Fquery` and `\u002Fapi\u002Fannotations` take Unix\n**milliseconds**; alert state-history takes Unix **seconds**; Alertmanager silences take\n**RFC-3339**. Mixing them returns empty results, not errors.\n\n## Request setup\n\nAuthentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent `401`\u002F`403` means the credential isn't configured for this workspace\n— report that instead of debugging auth.\n\nThe instance URL must be real — it's part of every request path:\n\n```bash\nexport GRAFANA_URL=\"https:\u002F\u002Fgrafana.example.com\"   # no trailing slash\nexport GRAFANA_TOKEN=\"placeholder\"                 # injected by the runtime; any value works\n```\n\nEvery request:\n\n```bash\ncurl -sS \"${GRAFANA_URL}\u002Fapi\u002F...\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"\n```\n\n**Sanity check** — confirm the URL is right and the workspace is wired up:\n\n```bash\ncurl -sS -w '\\nHTTP %{http_code}\\n' \"${GRAFANA_URL}\u002Fapi\u002Fuser\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"\n# 200 → the current user\u002Fservice account. 401 → {\"message\":\"Unauthorized\"} — report it, don't debug auth.\n# Service accounts also work: \u002Fapi\u002Forg returns the current org.\n```\n\nA `403` usually means the configured identity lacks the needed role (Viewer \u003C Editor \u003C Admin).\nDatasource queries and dashboard reads only need Viewer.\n\nHelper used below (optional):\n\n```bash\ngrafana() { curl -sS \"$@\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"; }\n```\n\n## Core operations\n\n### 1. Search dashboards and folders\n\n```bash\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fsearch\" -G \\\n  --data-urlencode \"query=api latency\" \\\n  --data-urlencode \"type=dash-db\" \\\n  --data-urlencode \"limit=50\" | jq '.[] | {uid, title, folderTitle, url}'\n```\n\n`type` is `dash-db` (dashboards) or `dash-folder` (folders); omit it for both. Also: `tag=`,\n`folderUIDs=`, `starred=true`.\n\n### 2. Get a dashboard by UID\n\nThe UID is the short string in the dashboard URL: `...\u002Fd\u002F\u003Cuid>\u002F\u003Cslug>`.\n\n```bash\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fdashboards\u002Fuid\u002Fabc123xy\" | \\\n  jq '{title: .dashboard.title, folder: .meta.folderTitle, panels: [.dashboard.panels[]? | {id, title, type}]}'\n```\n\nEach panel's PromQL\u002FLogQL\u002FSQL is under `.dashboard.panels[].targets`. A bad UID returns\n`{\"message\":\"Dashboard not found\"}` (404).\n\n### 3. Run a datasource query\n\nThis is how you ask the same questions a panel asks. First find the datasource UID:\n\n```bash\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fdatasources\" | jq '.[] | {uid, name, type}'\n```\n\nThen POST to `\u002Fapi\u002Fds\u002Fquery`. The `queries[]` shape depends on the datasource `type`; this is a\nPrometheus example:\n\n```bash\nNOW_MS=$(( $(date +%s) * 1000 )); FROM_MS=$(( NOW_MS - 3600000 ))\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fds\u002Fquery\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"from\": \"'\"${FROM_MS}\"'\",\n    \"to\": \"'\"${NOW_MS}\"'\",\n    \"queries\": [{\n      \"refId\": \"A\",\n      \"datasource\": {\"uid\": \"\u003Cdatasource_uid>\"},\n      \"expr\": \"sum(rate(http_requests_total{job=\\\"api\\\"}[5m])) by (status)\",\n      \"intervalMs\": 30000,\n      \"maxDataPoints\": 500\n    }]\n  }' | jq '.results.A.error \u002F\u002F .results.A.frames[0].data.values'\n```\n\nFor Loki, use `\"expr\": \"{job=\\\"api\\\"} |= \\\"error\\\"\"` and optionally `\"queryType\": \"range\"`. For SQL\ndatasources, use `\"rawSql\": \"SELECT ...\"` and `\"format\": \"table\"`.\n\nResponses are Grafana **data frames**: `results.\u003CrefId>.frames[]` with parallel column arrays in\n`data.values` and column metadata in `schema.fields`. **On a datasource-side failure `frames` is\nempty and the error from Prometheus\u002FLoki\u002FSQL is embedded in `results.\u003CrefId>.error`** — the HTTP\nstatus may still be 200 or 500, so check that field rather than relying on status alone.\n\n### 4. List alert rules\n\nTwo surfaces with different jobs:\n\n```bash\n# live STATE (firing\u002Fpending\u002Finactive) — read-only\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fprometheus\u002Fgrafana\u002Fapi\u002Fv1\u002Frules\" | \\\n  jq '.data.groups[]? | {folder: .file, group: .name, rules: [.rules[] | {name, state, health}]}'\n\n# DEFINITIONS (query, condition, labels, for-duration) — full CRUD, no runtime state\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fv1\u002Fprovisioning\u002Falert-rules\" | jq '.[] | {uid, title, folderUID, condition}'\n```\n\nThe `grafana` segment in the first path is the literal `{am_name}` for the built-in Alertmanager;\nexternal Alertmanagers use their datasource UID. Resources written via the provisioning API are\nlocked in the UI unless you send `X-Disable-Provenance: true` on the write.\n\n### 5. Silences\n\n`startsAt`\u002F`endsAt` are RFC-3339 (`date -u +%Y-%m-%dT%H:%M:%SZ`).\n\n```bash\n# active silences\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilences\" | \\\n  jq '.[] | select(.status.state==\"active\") | {id, comment, matchers, endsAt}'\n\n# create a 2-hour silence matching a label\n# GNU date; on BSD\u002FmacOS use: date -u -v+2H +%Y-%m-%dT%H:%M:%SZ\nSTART=$(date -u +%Y-%m-%dT%H:%M:%SZ)\nEND=$(date -u -d \"+2 hours\" +%Y-%m-%dT%H:%M:%SZ)\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilences\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"matchers\": [{\"name\": \"alertname\", \"value\": \"HighErrorRate\", \"isRegex\": false, \"isEqual\": true}],\n    \"startsAt\": \"'\"${START}\"'\", \"endsAt\": \"'\"${END}\"'\",\n    \"createdBy\": \"api\", \"comment\": \"investigating\"\n  }'\n# success → {\"silenceID\": \"...\"}\n\n# expire a silence\ngrafana -X DELETE \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilence\u002F\u003Csilence_id>\"\n```\n\n### 6. Annotations\n\n`time`\u002F`timeEnd` are Unix milliseconds.\n\n```bash\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fannotations\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"time\": '\"$(( $(date +%s) * 1000 ))\"', \"tags\": [\"deploy\",\"api\"], \"text\": \"Deployed v2.3.1\"}'\n\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fannotations?from=${FROM_MS}&to=${NOW_MS}&tags=deploy\" | jq .\n```\n\n### 7. Folders\n\n```bash\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Ffolders\" | jq '.[] | {uid, title}'\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Ffolders\" -H \"Content-Type: application\u002Fjson\" -d '{\"title\": \"Team API\"}'\n```\n\n### 8. Create or update a dashboard\n\n```bash\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fdashboards\u002Fdb\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"dashboard\": {\"uid\": null, \"title\": \"My Dashboard\", \"panels\": [], \"schemaVersion\": 41},\n    \"folderUid\": \"\u003Cfolder_uid>\",\n    \"overwrite\": false,\n    \"message\": \"created via API\"\n  }'\n```\n\nTo **update**: `GET` the dashboard first and send the **whole JSON back** with your change applied —\nthis endpoint replaces the dashboard. Set `dashboard.uid` to the existing UID and either include the\ncurrent `dashboard.version` (Grafana returns `412` on mismatch) or set `overwrite: true`.\n\n## Pagination\n\n`\u002Fapi\u002Fsearch` and `\u002Fapi\u002Ffolders` use `limit` + `page` query params (1-indexed). `\u002Fapi\u002Fsearch`\ndefaults to 1000 and caps at 5000. `\u002Fapi\u002Fannotations` has `limit` (default 100) but no `page` —\nnarrow the `from`\u002F`to` window instead. Alertmanager endpoints are not paginated. When you hit a cap,\nnarrow with `query=`, `tag=`, or `folderUIDs=` instead of paging through everything.\n\n## Rate limits\n\nSelf-hosted Grafana has no built-in per-token rate limits by default. Grafana Cloud may return\n`429` on heavy API or query traffic — limits vary by plan and endpoint, so honor `Retry-After`\nif present, otherwise back off.\n**`\u002Fapi\u002Fds\u002Fquery` is the expensive path**: each call fans out to the underlying database, so batch\nmultiple `queries[]` into one request instead of looping.\n\n## Error handling\n\nError bodies always carry `\"message\"` (sometimes `\"messageId\"`\u002F`\"traceID\"`). Service-specific cases:\n\n- **`412`** — Version conflict on dashboard save. `GET` the latest, reapply your change, include `version`, or set `overwrite: true`.\n- **`200`\u002F`500` on `\u002Fapi\u002Fds\u002Fquery`** — Datasource-side failure. The Prometheus\u002FLoki\u002FSQL error is embedded in `results.\u003CrefId>.error`; `frames` is empty.\n- **`403`** — Insufficient role. Viewer \u003C Editor \u003C Admin; folder-level permissions also apply.\n\n`401` → credential not configured for this workspace (report, don't debug). UIDs are case-sensitive\nshort strings, not titles.\n\n## Going deeper\n\n`references\u002Fapi.md` has the full endpoint catalog — dashboards, folders, datasources, ds\u002Fquery\nper-datasource shapes, the full unified-alerting surface (alert rules, contact points, notification\npolicies, mute timings, Alertmanager), annotations, snapshots, orgs\u002Fusers\u002Fteams, service accounts,\nand short URLs. Read it when you need an endpoint beyond the ones above.\n",{"data":40,"body":41},{"name":4,"description":6},{"type":42,"children":43},"root",[44,69,117,124,145,150,240,245,320,330,430,442,447,531,537,544,683,734,740,752,816,837,843,848,904,931,1251,1286,1342,1348,1353,1490,1518,1524,1550,1934,1940,1958,2165,2171,2295,2301,2429,2486,2492,2588,2594,2634,2640,2668,2762,2772,2778,2789],{"type":45,"tag":46,"props":47,"children":48},"element","p",{},[49,52,59,61,67],{"type":50,"value":51},"text","Grafana's base URL is the instance: Grafana Cloud at ",{"type":45,"tag":53,"props":54,"children":56},"code",{"className":55},[],[57],{"type":50,"value":58},"https:\u002F\u002F\u003Cyour-org>.grafana.net",{"type":50,"value":60},", or self-hosted at\nwherever the org runs it (e.g. ",{"type":45,"tag":53,"props":62,"children":64},{"className":63},[],[65],{"type":50,"value":66},"https:\u002F\u002Fgrafana.example.com",{"type":50,"value":68},"). The API surface is the same; only the\nbase URL differs.",{"type":45,"tag":46,"props":70,"children":71},{},[72,78,80,86,88,94,96,101,103,108,110,115],{"type":45,"tag":73,"props":74,"children":75},"strong",{},[76],{"type":50,"value":77},"Time units are not uniform across endpoints",{"type":50,"value":79},": ",{"type":45,"tag":53,"props":81,"children":83},{"className":82},[],[84],{"type":50,"value":85},"\u002Fapi\u002Fds\u002Fquery",{"type":50,"value":87}," and ",{"type":45,"tag":53,"props":89,"children":91},{"className":90},[],[92],{"type":50,"value":93},"\u002Fapi\u002Fannotations",{"type":50,"value":95}," take Unix\n",{"type":45,"tag":73,"props":97,"children":98},{},[99],{"type":50,"value":100},"milliseconds",{"type":50,"value":102},"; alert state-history takes Unix ",{"type":45,"tag":73,"props":104,"children":105},{},[106],{"type":50,"value":107},"seconds",{"type":50,"value":109},"; Alertmanager silences take\n",{"type":45,"tag":73,"props":111,"children":112},{},[113],{"type":50,"value":114},"RFC-3339",{"type":50,"value":116},". Mixing them returns empty results, not errors.",{"type":45,"tag":118,"props":119,"children":121},"h2",{"id":120},"request-setup",[122],{"type":50,"value":123},"Request setup",{"type":45,"tag":46,"props":125,"children":126},{},[127,129,135,137,143],{"type":50,"value":128},"Authentication is handled by the runtime — credentials are injected into outbound requests to this\nAPI, so there is nothing to set up. Do not try to create, mint, refresh, or validate tokens or keys.\nCredential variables exist only to keep requests well-formed; if one is unset, set it to any\nplaceholder value. A persistent ",{"type":45,"tag":53,"props":130,"children":132},{"className":131},[],[133],{"type":50,"value":134},"401",{"type":50,"value":136},"\u002F",{"type":45,"tag":53,"props":138,"children":140},{"className":139},[],[141],{"type":50,"value":142},"403",{"type":50,"value":144}," means the credential isn't configured for this workspace\n— report that instead of debugging auth.",{"type":45,"tag":46,"props":146,"children":147},{},[148],{"type":50,"value":149},"The instance URL must be real — it's part of every request path:",{"type":45,"tag":151,"props":152,"children":157},"pre",{"className":153,"code":154,"language":155,"meta":156,"style":156},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","export GRAFANA_URL=\"https:\u002F\u002Fgrafana.example.com\"   # no trailing slash\nexport GRAFANA_TOKEN=\"placeholder\"                 # injected by the runtime; any value works\n","bash","",[158],{"type":45,"tag":53,"props":159,"children":160},{"__ignoreMap":156},[161,205],{"type":45,"tag":162,"props":163,"children":166},"span",{"class":164,"line":165},"line",1,[167,173,179,185,190,195,199],{"type":45,"tag":162,"props":168,"children":170},{"style":169},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[171],{"type":50,"value":172},"export",{"type":45,"tag":162,"props":174,"children":176},{"style":175},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[177],{"type":50,"value":178}," GRAFANA_URL",{"type":45,"tag":162,"props":180,"children":182},{"style":181},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[183],{"type":50,"value":184},"=",{"type":45,"tag":162,"props":186,"children":187},{"style":181},[188],{"type":50,"value":189},"\"",{"type":45,"tag":162,"props":191,"children":193},{"style":192},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[194],{"type":50,"value":66},{"type":45,"tag":162,"props":196,"children":197},{"style":181},[198],{"type":50,"value":189},{"type":45,"tag":162,"props":200,"children":202},{"style":201},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic",[203],{"type":50,"value":204},"   # no trailing slash\n",{"type":45,"tag":162,"props":206,"children":208},{"class":164,"line":207},2,[209,213,218,222,226,231,235],{"type":45,"tag":162,"props":210,"children":211},{"style":169},[212],{"type":50,"value":172},{"type":45,"tag":162,"props":214,"children":215},{"style":175},[216],{"type":50,"value":217}," GRAFANA_TOKEN",{"type":45,"tag":162,"props":219,"children":220},{"style":181},[221],{"type":50,"value":184},{"type":45,"tag":162,"props":223,"children":224},{"style":181},[225],{"type":50,"value":189},{"type":45,"tag":162,"props":227,"children":228},{"style":192},[229],{"type":50,"value":230},"placeholder",{"type":45,"tag":162,"props":232,"children":233},{"style":181},[234],{"type":50,"value":189},{"type":45,"tag":162,"props":236,"children":237},{"style":201},[238],{"type":50,"value":239},"                 # injected by the runtime; any value works\n",{"type":45,"tag":46,"props":241,"children":242},{},[243],{"type":50,"value":244},"Every request:",{"type":45,"tag":151,"props":246,"children":248},{"className":153,"code":247,"language":155,"meta":156,"style":156},"curl -sS \"${GRAFANA_URL}\u002Fapi\u002F...\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"\n",[249],{"type":45,"tag":53,"props":250,"children":251},{"__ignoreMap":156},[252],{"type":45,"tag":162,"props":253,"children":254},{"class":164,"line":165},[255,261,266,271,276,281,286,290,295,300,305,310,315],{"type":45,"tag":162,"props":256,"children":258},{"style":257},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[259],{"type":50,"value":260},"curl",{"type":45,"tag":162,"props":262,"children":263},{"style":192},[264],{"type":50,"value":265}," -sS",{"type":45,"tag":162,"props":267,"children":268},{"style":181},[269],{"type":50,"value":270}," \"${",{"type":45,"tag":162,"props":272,"children":273},{"style":175},[274],{"type":50,"value":275},"GRAFANA_URL",{"type":45,"tag":162,"props":277,"children":278},{"style":181},[279],{"type":50,"value":280},"}",{"type":45,"tag":162,"props":282,"children":283},{"style":192},[284],{"type":50,"value":285},"\u002Fapi\u002F...",{"type":45,"tag":162,"props":287,"children":288},{"style":181},[289],{"type":50,"value":189},{"type":45,"tag":162,"props":291,"children":292},{"style":192},[293],{"type":50,"value":294}," -H",{"type":45,"tag":162,"props":296,"children":297},{"style":181},[298],{"type":50,"value":299}," \"",{"type":45,"tag":162,"props":301,"children":302},{"style":192},[303],{"type":50,"value":304},"Authorization: Bearer ",{"type":45,"tag":162,"props":306,"children":307},{"style":181},[308],{"type":50,"value":309},"${",{"type":45,"tag":162,"props":311,"children":312},{"style":175},[313],{"type":50,"value":314},"GRAFANA_TOKEN",{"type":45,"tag":162,"props":316,"children":317},{"style":181},[318],{"type":50,"value":319},"}\"\n",{"type":45,"tag":46,"props":321,"children":322},{},[323,328],{"type":45,"tag":73,"props":324,"children":325},{},[326],{"type":50,"value":327},"Sanity check",{"type":50,"value":329}," — confirm the URL is right and the workspace is wired up:",{"type":45,"tag":151,"props":331,"children":333},{"className":153,"code":332,"language":155,"meta":156,"style":156},"curl -sS -w '\\nHTTP %{http_code}\\n' \"${GRAFANA_URL}\u002Fapi\u002Fuser\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"\n# 200 → the current user\u002Fservice account. 401 → {\"message\":\"Unauthorized\"} — report it, don't debug auth.\n# Service accounts also work: \u002Fapi\u002Forg returns the current org.\n",[334],{"type":45,"tag":53,"props":335,"children":336},{"__ignoreMap":156},[337,413,421],{"type":45,"tag":162,"props":338,"children":339},{"class":164,"line":165},[340,344,348,353,358,363,368,372,376,380,385,389,393,397,401,405,409],{"type":45,"tag":162,"props":341,"children":342},{"style":257},[343],{"type":50,"value":260},{"type":45,"tag":162,"props":345,"children":346},{"style":192},[347],{"type":50,"value":265},{"type":45,"tag":162,"props":349,"children":350},{"style":192},[351],{"type":50,"value":352}," -w",{"type":45,"tag":162,"props":354,"children":355},{"style":181},[356],{"type":50,"value":357}," '",{"type":45,"tag":162,"props":359,"children":360},{"style":192},[361],{"type":50,"value":362},"\\nHTTP %{http_code}\\n",{"type":45,"tag":162,"props":364,"children":365},{"style":181},[366],{"type":50,"value":367},"'",{"type":45,"tag":162,"props":369,"children":370},{"style":181},[371],{"type":50,"value":270},{"type":45,"tag":162,"props":373,"children":374},{"style":175},[375],{"type":50,"value":275},{"type":45,"tag":162,"props":377,"children":378},{"style":181},[379],{"type":50,"value":280},{"type":45,"tag":162,"props":381,"children":382},{"style":192},[383],{"type":50,"value":384},"\u002Fapi\u002Fuser",{"type":45,"tag":162,"props":386,"children":387},{"style":181},[388],{"type":50,"value":189},{"type":45,"tag":162,"props":390,"children":391},{"style":192},[392],{"type":50,"value":294},{"type":45,"tag":162,"props":394,"children":395},{"style":181},[396],{"type":50,"value":299},{"type":45,"tag":162,"props":398,"children":399},{"style":192},[400],{"type":50,"value":304},{"type":45,"tag":162,"props":402,"children":403},{"style":181},[404],{"type":50,"value":309},{"type":45,"tag":162,"props":406,"children":407},{"style":175},[408],{"type":50,"value":314},{"type":45,"tag":162,"props":410,"children":411},{"style":181},[412],{"type":50,"value":319},{"type":45,"tag":162,"props":414,"children":415},{"class":164,"line":207},[416],{"type":45,"tag":162,"props":417,"children":418},{"style":201},[419],{"type":50,"value":420},"# 200 → the current user\u002Fservice account. 401 → {\"message\":\"Unauthorized\"} — report it, don't debug auth.\n",{"type":45,"tag":162,"props":422,"children":424},{"class":164,"line":423},3,[425],{"type":45,"tag":162,"props":426,"children":427},{"style":201},[428],{"type":50,"value":429},"# Service accounts also work: \u002Fapi\u002Forg returns the current org.\n",{"type":45,"tag":46,"props":431,"children":432},{},[433,435,440],{"type":50,"value":434},"A ",{"type":45,"tag":53,"props":436,"children":438},{"className":437},[],[439],{"type":50,"value":142},{"type":50,"value":441}," usually means the configured identity lacks the needed role (Viewer \u003C Editor \u003C Admin).\nDatasource queries and dashboard reads only need Viewer.",{"type":45,"tag":46,"props":443,"children":444},{},[445],{"type":50,"value":446},"Helper used below (optional):",{"type":45,"tag":151,"props":448,"children":450},{"className":153,"code":449,"language":155,"meta":156,"style":156},"grafana() { curl -sS \"$@\" -H \"Authorization: Bearer ${GRAFANA_TOKEN}\"; }\n",[451],{"type":45,"tag":53,"props":452,"children":453},{"__ignoreMap":156},[454],{"type":45,"tag":162,"props":455,"children":456},{"class":164,"line":165},[457,463,468,473,478,482,486,492,496,500,504,508,512,516,521,526],{"type":45,"tag":162,"props":458,"children":460},{"style":459},"--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF",[461],{"type":50,"value":462},"grafana",{"type":45,"tag":162,"props":464,"children":465},{"style":181},[466],{"type":50,"value":467},"()",{"type":45,"tag":162,"props":469,"children":470},{"style":181},[471],{"type":50,"value":472}," {",{"type":45,"tag":162,"props":474,"children":475},{"style":257},[476],{"type":50,"value":477}," curl",{"type":45,"tag":162,"props":479,"children":480},{"style":192},[481],{"type":50,"value":265},{"type":45,"tag":162,"props":483,"children":484},{"style":181},[485],{"type":50,"value":299},{"type":45,"tag":162,"props":487,"children":489},{"style":488},"--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic",[490],{"type":50,"value":491},"$@",{"type":45,"tag":162,"props":493,"children":494},{"style":181},[495],{"type":50,"value":189},{"type":45,"tag":162,"props":497,"children":498},{"style":192},[499],{"type":50,"value":294},{"type":45,"tag":162,"props":501,"children":502},{"style":181},[503],{"type":50,"value":299},{"type":45,"tag":162,"props":505,"children":506},{"style":192},[507],{"type":50,"value":304},{"type":45,"tag":162,"props":509,"children":510},{"style":181},[511],{"type":50,"value":309},{"type":45,"tag":162,"props":513,"children":514},{"style":175},[515],{"type":50,"value":314},{"type":45,"tag":162,"props":517,"children":518},{"style":181},[519],{"type":50,"value":520},"}\"",{"type":45,"tag":162,"props":522,"children":523},{"style":181},[524],{"type":50,"value":525},";",{"type":45,"tag":162,"props":527,"children":528},{"style":181},[529],{"type":50,"value":530}," }\n",{"type":45,"tag":118,"props":532,"children":534},{"id":533},"core-operations",[535],{"type":50,"value":536},"Core operations",{"type":45,"tag":538,"props":539,"children":541},"h3",{"id":540},"_1-search-dashboards-and-folders",[542],{"type":50,"value":543},"1. Search dashboards and folders",{"type":45,"tag":151,"props":545,"children":547},{"className":153,"code":546,"language":155,"meta":156,"style":156},"grafana \"${GRAFANA_URL}\u002Fapi\u002Fsearch\" -G \\\n  --data-urlencode \"query=api latency\" \\\n  --data-urlencode \"type=dash-db\" \\\n  --data-urlencode \"limit=50\" | jq '.[] | {uid, title, folderTitle, url}'\n",[548],{"type":45,"tag":53,"props":549,"children":550},{"__ignoreMap":156},[551,589,614,638],{"type":45,"tag":162,"props":552,"children":553},{"class":164,"line":165},[554,558,562,566,570,575,579,584],{"type":45,"tag":162,"props":555,"children":556},{"style":257},[557],{"type":50,"value":462},{"type":45,"tag":162,"props":559,"children":560},{"style":181},[561],{"type":50,"value":270},{"type":45,"tag":162,"props":563,"children":564},{"style":175},[565],{"type":50,"value":275},{"type":45,"tag":162,"props":567,"children":568},{"style":181},[569],{"type":50,"value":280},{"type":45,"tag":162,"props":571,"children":572},{"style":192},[573],{"type":50,"value":574},"\u002Fapi\u002Fsearch",{"type":45,"tag":162,"props":576,"children":577},{"style":181},[578],{"type":50,"value":189},{"type":45,"tag":162,"props":580,"children":581},{"style":192},[582],{"type":50,"value":583}," -G",{"type":45,"tag":162,"props":585,"children":586},{"style":175},[587],{"type":50,"value":588}," \\\n",{"type":45,"tag":162,"props":590,"children":591},{"class":164,"line":207},[592,597,601,606,610],{"type":45,"tag":162,"props":593,"children":594},{"style":192},[595],{"type":50,"value":596},"  --data-urlencode",{"type":45,"tag":162,"props":598,"children":599},{"style":181},[600],{"type":50,"value":299},{"type":45,"tag":162,"props":602,"children":603},{"style":192},[604],{"type":50,"value":605},"query=api latency",{"type":45,"tag":162,"props":607,"children":608},{"style":181},[609],{"type":50,"value":189},{"type":45,"tag":162,"props":611,"children":612},{"style":175},[613],{"type":50,"value":588},{"type":45,"tag":162,"props":615,"children":616},{"class":164,"line":423},[617,621,625,630,634],{"type":45,"tag":162,"props":618,"children":619},{"style":192},[620],{"type":50,"value":596},{"type":45,"tag":162,"props":622,"children":623},{"style":181},[624],{"type":50,"value":299},{"type":45,"tag":162,"props":626,"children":627},{"style":192},[628],{"type":50,"value":629},"type=dash-db",{"type":45,"tag":162,"props":631,"children":632},{"style":181},[633],{"type":50,"value":189},{"type":45,"tag":162,"props":635,"children":636},{"style":175},[637],{"type":50,"value":588},{"type":45,"tag":162,"props":639,"children":641},{"class":164,"line":640},4,[642,646,650,655,659,664,669,673,678],{"type":45,"tag":162,"props":643,"children":644},{"style":192},[645],{"type":50,"value":596},{"type":45,"tag":162,"props":647,"children":648},{"style":181},[649],{"type":50,"value":299},{"type":45,"tag":162,"props":651,"children":652},{"style":192},[653],{"type":50,"value":654},"limit=50",{"type":45,"tag":162,"props":656,"children":657},{"style":181},[658],{"type":50,"value":189},{"type":45,"tag":162,"props":660,"children":661},{"style":181},[662],{"type":50,"value":663}," |",{"type":45,"tag":162,"props":665,"children":666},{"style":257},[667],{"type":50,"value":668}," jq",{"type":45,"tag":162,"props":670,"children":671},{"style":181},[672],{"type":50,"value":357},{"type":45,"tag":162,"props":674,"children":675},{"style":192},[676],{"type":50,"value":677},".[] | {uid, title, folderTitle, url}",{"type":45,"tag":162,"props":679,"children":680},{"style":181},[681],{"type":50,"value":682},"'\n",{"type":45,"tag":46,"props":684,"children":685},{},[686,692,694,700,702,708,710,716,718,724,726,732],{"type":45,"tag":53,"props":687,"children":689},{"className":688},[],[690],{"type":50,"value":691},"type",{"type":50,"value":693}," is ",{"type":45,"tag":53,"props":695,"children":697},{"className":696},[],[698],{"type":50,"value":699},"dash-db",{"type":50,"value":701}," (dashboards) or ",{"type":45,"tag":53,"props":703,"children":705},{"className":704},[],[706],{"type":50,"value":707},"dash-folder",{"type":50,"value":709}," (folders); omit it for both. Also: ",{"type":45,"tag":53,"props":711,"children":713},{"className":712},[],[714],{"type":50,"value":715},"tag=",{"type":50,"value":717},",\n",{"type":45,"tag":53,"props":719,"children":721},{"className":720},[],[722],{"type":50,"value":723},"folderUIDs=",{"type":50,"value":725},", ",{"type":45,"tag":53,"props":727,"children":729},{"className":728},[],[730],{"type":50,"value":731},"starred=true",{"type":50,"value":733},".",{"type":45,"tag":538,"props":735,"children":737},{"id":736},"_2-get-a-dashboard-by-uid",[738],{"type":50,"value":739},"2. Get a dashboard by UID",{"type":45,"tag":46,"props":741,"children":742},{},[743,745,751],{"type":50,"value":744},"The UID is the short string in the dashboard URL: ",{"type":45,"tag":53,"props":746,"children":748},{"className":747},[],[749],{"type":50,"value":750},"...\u002Fd\u002F\u003Cuid>\u002F\u003Cslug>",{"type":50,"value":733},{"type":45,"tag":151,"props":753,"children":755},{"className":153,"code":754,"language":155,"meta":156,"style":156},"grafana \"${GRAFANA_URL}\u002Fapi\u002Fdashboards\u002Fuid\u002Fabc123xy\" | \\\n  jq '{title: .dashboard.title, folder: .meta.folderTitle, panels: [.dashboard.panels[]? | {id, title, type}]}'\n",[756],{"type":45,"tag":53,"props":757,"children":758},{"__ignoreMap":156},[759,795],{"type":45,"tag":162,"props":760,"children":761},{"class":164,"line":165},[762,766,770,774,778,783,787,791],{"type":45,"tag":162,"props":763,"children":764},{"style":257},[765],{"type":50,"value":462},{"type":45,"tag":162,"props":767,"children":768},{"style":181},[769],{"type":50,"value":270},{"type":45,"tag":162,"props":771,"children":772},{"style":175},[773],{"type":50,"value":275},{"type":45,"tag":162,"props":775,"children":776},{"style":181},[777],{"type":50,"value":280},{"type":45,"tag":162,"props":779,"children":780},{"style":192},[781],{"type":50,"value":782},"\u002Fapi\u002Fdashboards\u002Fuid\u002Fabc123xy",{"type":45,"tag":162,"props":784,"children":785},{"style":181},[786],{"type":50,"value":189},{"type":45,"tag":162,"props":788,"children":789},{"style":181},[790],{"type":50,"value":663},{"type":45,"tag":162,"props":792,"children":793},{"style":175},[794],{"type":50,"value":588},{"type":45,"tag":162,"props":796,"children":797},{"class":164,"line":207},[798,803,807,812],{"type":45,"tag":162,"props":799,"children":800},{"style":257},[801],{"type":50,"value":802},"  jq",{"type":45,"tag":162,"props":804,"children":805},{"style":181},[806],{"type":50,"value":357},{"type":45,"tag":162,"props":808,"children":809},{"style":192},[810],{"type":50,"value":811},"{title: .dashboard.title, folder: .meta.folderTitle, panels: [.dashboard.panels[]? | {id, title, type}]}",{"type":45,"tag":162,"props":813,"children":814},{"style":181},[815],{"type":50,"value":682},{"type":45,"tag":46,"props":817,"children":818},{},[819,821,827,829,835],{"type":50,"value":820},"Each panel's PromQL\u002FLogQL\u002FSQL is under ",{"type":45,"tag":53,"props":822,"children":824},{"className":823},[],[825],{"type":50,"value":826},".dashboard.panels[].targets",{"type":50,"value":828},". A bad UID returns\n",{"type":45,"tag":53,"props":830,"children":832},{"className":831},[],[833],{"type":50,"value":834},"{\"message\":\"Dashboard not found\"}",{"type":50,"value":836}," (404).",{"type":45,"tag":538,"props":838,"children":840},{"id":839},"_3-run-a-datasource-query",[841],{"type":50,"value":842},"3. Run a datasource query",{"type":45,"tag":46,"props":844,"children":845},{},[846],{"type":50,"value":847},"This is how you ask the same questions a panel asks. First find the datasource UID:",{"type":45,"tag":151,"props":849,"children":851},{"className":153,"code":850,"language":155,"meta":156,"style":156},"grafana \"${GRAFANA_URL}\u002Fapi\u002Fdatasources\" | jq '.[] | {uid, name, type}'\n",[852],{"type":45,"tag":53,"props":853,"children":854},{"__ignoreMap":156},[855],{"type":45,"tag":162,"props":856,"children":857},{"class":164,"line":165},[858,862,866,870,874,879,883,887,891,895,900],{"type":45,"tag":162,"props":859,"children":860},{"style":257},[861],{"type":50,"value":462},{"type":45,"tag":162,"props":863,"children":864},{"style":181},[865],{"type":50,"value":270},{"type":45,"tag":162,"props":867,"children":868},{"style":175},[869],{"type":50,"value":275},{"type":45,"tag":162,"props":871,"children":872},{"style":181},[873],{"type":50,"value":280},{"type":45,"tag":162,"props":875,"children":876},{"style":192},[877],{"type":50,"value":878},"\u002Fapi\u002Fdatasources",{"type":45,"tag":162,"props":880,"children":881},{"style":181},[882],{"type":50,"value":189},{"type":45,"tag":162,"props":884,"children":885},{"style":181},[886],{"type":50,"value":663},{"type":45,"tag":162,"props":888,"children":889},{"style":257},[890],{"type":50,"value":668},{"type":45,"tag":162,"props":892,"children":893},{"style":181},[894],{"type":50,"value":357},{"type":45,"tag":162,"props":896,"children":897},{"style":192},[898],{"type":50,"value":899},".[] | {uid, name, type}",{"type":45,"tag":162,"props":901,"children":902},{"style":181},[903],{"type":50,"value":682},{"type":45,"tag":46,"props":905,"children":906},{},[907,909,914,916,922,924,929],{"type":50,"value":908},"Then POST to ",{"type":45,"tag":53,"props":910,"children":912},{"className":911},[],[913],{"type":50,"value":85},{"type":50,"value":915},". The ",{"type":45,"tag":53,"props":917,"children":919},{"className":918},[],[920],{"type":50,"value":921},"queries[]",{"type":50,"value":923}," shape depends on the datasource ",{"type":45,"tag":53,"props":925,"children":927},{"className":926},[],[928],{"type":50,"value":691},{"type":50,"value":930},"; this is a\nPrometheus example:",{"type":45,"tag":151,"props":932,"children":934},{"className":153,"code":933,"language":155,"meta":156,"style":156},"NOW_MS=$(( $(date +%s) * 1000 )); FROM_MS=$(( NOW_MS - 3600000 ))\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fds\u002Fquery\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"from\": \"'\"${FROM_MS}\"'\",\n    \"to\": \"'\"${NOW_MS}\"'\",\n    \"queries\": [{\n      \"refId\": \"A\",\n      \"datasource\": {\"uid\": \"\u003Cdatasource_uid>\"},\n      \"expr\": \"sum(rate(http_requests_total{job=\\\"api\\\"}[5m])) by (status)\",\n      \"intervalMs\": 30000,\n      \"maxDataPoints\": 500\n    }]\n  }' | jq '.results.A.error \u002F\u002F .results.A.frames[0].data.values'\n",[935],{"type":45,"tag":53,"props":936,"children":937},{"__ignoreMap":156},[938,1018,1059,1084,1101,1130,1155,1164,1173,1182,1191,1200,1208,1217],{"type":45,"tag":162,"props":939,"children":940},{"class":164,"line":165},[941,946,951,956,961,966,971,976,980,984,988,993,997,1002,1007,1013],{"type":45,"tag":162,"props":942,"children":943},{"style":175},[944],{"type":50,"value":945},"NOW_MS",{"type":45,"tag":162,"props":947,"children":948},{"style":181},[949],{"type":50,"value":950},"=$((",{"type":45,"tag":162,"props":952,"children":953},{"style":257},[954],{"type":50,"value":955}," $(date",{"type":45,"tag":162,"props":957,"children":958},{"style":192},[959],{"type":50,"value":960}," +%s",{"type":45,"tag":162,"props":962,"children":963},{"style":181},[964],{"type":50,"value":965},")",{"type":45,"tag":162,"props":967,"children":968},{"style":181},[969],{"type":50,"value":970}," *",{"type":45,"tag":162,"props":972,"children":973},{"style":175},[974],{"type":50,"value":975}," 1000 ",{"type":45,"tag":162,"props":977,"children":978},{"style":181},[979],{"type":50,"value":965},{"type":45,"tag":162,"props":981,"children":982},{"style":175},[983],{"type":50,"value":965},{"type":45,"tag":162,"props":985,"children":986},{"style":181},[987],{"type":50,"value":525},{"type":45,"tag":162,"props":989,"children":990},{"style":175},[991],{"type":50,"value":992}," FROM_MS",{"type":45,"tag":162,"props":994,"children":995},{"style":181},[996],{"type":50,"value":950},{"type":45,"tag":162,"props":998,"children":999},{"style":257},[1000],{"type":50,"value":1001}," NOW_MS",{"type":45,"tag":162,"props":1003,"children":1004},{"style":192},[1005],{"type":50,"value":1006}," -",{"type":45,"tag":162,"props":1008,"children":1010},{"style":1009},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1011],{"type":50,"value":1012}," 3600000",{"type":45,"tag":162,"props":1014,"children":1015},{"style":181},[1016],{"type":50,"value":1017}," ))\n",{"type":45,"tag":162,"props":1019,"children":1020},{"class":164,"line":207},[1021,1025,1030,1035,1039,1043,1047,1051,1055],{"type":45,"tag":162,"props":1022,"children":1023},{"style":257},[1024],{"type":50,"value":462},{"type":45,"tag":162,"props":1026,"children":1027},{"style":192},[1028],{"type":50,"value":1029}," -X",{"type":45,"tag":162,"props":1031,"children":1032},{"style":192},[1033],{"type":50,"value":1034}," POST",{"type":45,"tag":162,"props":1036,"children":1037},{"style":181},[1038],{"type":50,"value":270},{"type":45,"tag":162,"props":1040,"children":1041},{"style":175},[1042],{"type":50,"value":275},{"type":45,"tag":162,"props":1044,"children":1045},{"style":181},[1046],{"type":50,"value":280},{"type":45,"tag":162,"props":1048,"children":1049},{"style":192},[1050],{"type":50,"value":85},{"type":45,"tag":162,"props":1052,"children":1053},{"style":181},[1054],{"type":50,"value":189},{"type":45,"tag":162,"props":1056,"children":1057},{"style":175},[1058],{"type":50,"value":588},{"type":45,"tag":162,"props":1060,"children":1061},{"class":164,"line":423},[1062,1067,1071,1076,1080],{"type":45,"tag":162,"props":1063,"children":1064},{"style":192},[1065],{"type":50,"value":1066},"  -H",{"type":45,"tag":162,"props":1068,"children":1069},{"style":181},[1070],{"type":50,"value":299},{"type":45,"tag":162,"props":1072,"children":1073},{"style":192},[1074],{"type":50,"value":1075},"Content-Type: application\u002Fjson",{"type":45,"tag":162,"props":1077,"children":1078},{"style":181},[1079],{"type":50,"value":189},{"type":45,"tag":162,"props":1081,"children":1082},{"style":175},[1083],{"type":50,"value":588},{"type":45,"tag":162,"props":1085,"children":1086},{"class":164,"line":640},[1087,1092,1096],{"type":45,"tag":162,"props":1088,"children":1089},{"style":192},[1090],{"type":50,"value":1091},"  -d",{"type":45,"tag":162,"props":1093,"children":1094},{"style":181},[1095],{"type":50,"value":357},{"type":45,"tag":162,"props":1097,"children":1098},{"style":192},[1099],{"type":50,"value":1100},"{\n",{"type":45,"tag":162,"props":1102,"children":1104},{"class":164,"line":1103},5,[1105,1110,1115,1120,1125],{"type":45,"tag":162,"props":1106,"children":1107},{"style":192},[1108],{"type":50,"value":1109},"    \"from\": \"",{"type":45,"tag":162,"props":1111,"children":1112},{"style":181},[1113],{"type":50,"value":1114},"'\"${",{"type":45,"tag":162,"props":1116,"children":1117},{"style":175},[1118],{"type":50,"value":1119},"FROM_MS",{"type":45,"tag":162,"props":1121,"children":1122},{"style":181},[1123],{"type":50,"value":1124},"}\"'",{"type":45,"tag":162,"props":1126,"children":1127},{"style":192},[1128],{"type":50,"value":1129},"\",\n",{"type":45,"tag":162,"props":1131,"children":1133},{"class":164,"line":1132},6,[1134,1139,1143,1147,1151],{"type":45,"tag":162,"props":1135,"children":1136},{"style":192},[1137],{"type":50,"value":1138},"    \"to\": \"",{"type":45,"tag":162,"props":1140,"children":1141},{"style":181},[1142],{"type":50,"value":1114},{"type":45,"tag":162,"props":1144,"children":1145},{"style":175},[1146],{"type":50,"value":945},{"type":45,"tag":162,"props":1148,"children":1149},{"style":181},[1150],{"type":50,"value":1124},{"type":45,"tag":162,"props":1152,"children":1153},{"style":192},[1154],{"type":50,"value":1129},{"type":45,"tag":162,"props":1156,"children":1158},{"class":164,"line":1157},7,[1159],{"type":45,"tag":162,"props":1160,"children":1161},{"style":192},[1162],{"type":50,"value":1163},"    \"queries\": [{\n",{"type":45,"tag":162,"props":1165,"children":1167},{"class":164,"line":1166},8,[1168],{"type":45,"tag":162,"props":1169,"children":1170},{"style":192},[1171],{"type":50,"value":1172},"      \"refId\": \"A\",\n",{"type":45,"tag":162,"props":1174,"children":1176},{"class":164,"line":1175},9,[1177],{"type":45,"tag":162,"props":1178,"children":1179},{"style":192},[1180],{"type":50,"value":1181},"      \"datasource\": {\"uid\": \"\u003Cdatasource_uid>\"},\n",{"type":45,"tag":162,"props":1183,"children":1185},{"class":164,"line":1184},10,[1186],{"type":45,"tag":162,"props":1187,"children":1188},{"style":192},[1189],{"type":50,"value":1190},"      \"expr\": \"sum(rate(http_requests_total{job=\\\"api\\\"}[5m])) by (status)\",\n",{"type":45,"tag":162,"props":1192,"children":1194},{"class":164,"line":1193},11,[1195],{"type":45,"tag":162,"props":1196,"children":1197},{"style":192},[1198],{"type":50,"value":1199},"      \"intervalMs\": 30000,\n",{"type":45,"tag":162,"props":1201,"children":1202},{"class":164,"line":33},[1203],{"type":45,"tag":162,"props":1204,"children":1205},{"style":192},[1206],{"type":50,"value":1207},"      \"maxDataPoints\": 500\n",{"type":45,"tag":162,"props":1209,"children":1211},{"class":164,"line":1210},13,[1212],{"type":45,"tag":162,"props":1213,"children":1214},{"style":192},[1215],{"type":50,"value":1216},"    }]\n",{"type":45,"tag":162,"props":1218,"children":1220},{"class":164,"line":1219},14,[1221,1226,1230,1234,1238,1242,1247],{"type":45,"tag":162,"props":1222,"children":1223},{"style":192},[1224],{"type":50,"value":1225},"  }",{"type":45,"tag":162,"props":1227,"children":1228},{"style":181},[1229],{"type":50,"value":367},{"type":45,"tag":162,"props":1231,"children":1232},{"style":181},[1233],{"type":50,"value":663},{"type":45,"tag":162,"props":1235,"children":1236},{"style":257},[1237],{"type":50,"value":668},{"type":45,"tag":162,"props":1239,"children":1240},{"style":181},[1241],{"type":50,"value":357},{"type":45,"tag":162,"props":1243,"children":1244},{"style":192},[1245],{"type":50,"value":1246},".results.A.error \u002F\u002F .results.A.frames[0].data.values",{"type":45,"tag":162,"props":1248,"children":1249},{"style":181},[1250],{"type":50,"value":682},{"type":45,"tag":46,"props":1252,"children":1253},{},[1254,1256,1262,1264,1270,1272,1278,1279,1285],{"type":50,"value":1255},"For Loki, use ",{"type":45,"tag":53,"props":1257,"children":1259},{"className":1258},[],[1260],{"type":50,"value":1261},"\"expr\": \"{job=\\\"api\\\"} |= \\\"error\\\"\"",{"type":50,"value":1263}," and optionally ",{"type":45,"tag":53,"props":1265,"children":1267},{"className":1266},[],[1268],{"type":50,"value":1269},"\"queryType\": \"range\"",{"type":50,"value":1271},". For SQL\ndatasources, use ",{"type":45,"tag":53,"props":1273,"children":1275},{"className":1274},[],[1276],{"type":50,"value":1277},"\"rawSql\": \"SELECT ...\"",{"type":50,"value":87},{"type":45,"tag":53,"props":1280,"children":1282},{"className":1281},[],[1283],{"type":50,"value":1284},"\"format\": \"table\"",{"type":50,"value":733},{"type":45,"tag":46,"props":1287,"children":1288},{},[1289,1291,1296,1297,1303,1305,1311,1313,1319,1321,1340],{"type":50,"value":1290},"Responses are Grafana ",{"type":45,"tag":73,"props":1292,"children":1293},{},[1294],{"type":50,"value":1295},"data frames",{"type":50,"value":79},{"type":45,"tag":53,"props":1298,"children":1300},{"className":1299},[],[1301],{"type":50,"value":1302},"results.\u003CrefId>.frames[]",{"type":50,"value":1304}," with parallel column arrays in\n",{"type":45,"tag":53,"props":1306,"children":1308},{"className":1307},[],[1309],{"type":50,"value":1310},"data.values",{"type":50,"value":1312}," and column metadata in ",{"type":45,"tag":53,"props":1314,"children":1316},{"className":1315},[],[1317],{"type":50,"value":1318},"schema.fields",{"type":50,"value":1320},". ",{"type":45,"tag":73,"props":1322,"children":1323},{},[1324,1326,1332,1334],{"type":50,"value":1325},"On a datasource-side failure ",{"type":45,"tag":53,"props":1327,"children":1329},{"className":1328},[],[1330],{"type":50,"value":1331},"frames",{"type":50,"value":1333}," is\nempty and the error from Prometheus\u002FLoki\u002FSQL is embedded in ",{"type":45,"tag":53,"props":1335,"children":1337},{"className":1336},[],[1338],{"type":50,"value":1339},"results.\u003CrefId>.error",{"type":50,"value":1341}," — the HTTP\nstatus may still be 200 or 500, so check that field rather than relying on status alone.",{"type":45,"tag":538,"props":1343,"children":1345},{"id":1344},"_4-list-alert-rules",[1346],{"type":50,"value":1347},"4. List alert rules",{"type":45,"tag":46,"props":1349,"children":1350},{},[1351],{"type":50,"value":1352},"Two surfaces with different jobs:",{"type":45,"tag":151,"props":1354,"children":1356},{"className":153,"code":1355,"language":155,"meta":156,"style":156},"# live STATE (firing\u002Fpending\u002Finactive) — read-only\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fprometheus\u002Fgrafana\u002Fapi\u002Fv1\u002Frules\" | \\\n  jq '.data.groups[]? | {folder: .file, group: .name, rules: [.rules[] | {name, state, health}]}'\n\n# DEFINITIONS (query, condition, labels, for-duration) — full CRUD, no runtime state\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fv1\u002Fprovisioning\u002Falert-rules\" | jq '.[] | {uid, title, folderUID, condition}'\n",[1357],{"type":45,"tag":53,"props":1358,"children":1359},{"__ignoreMap":156},[1360,1368,1404,1424,1433,1441],{"type":45,"tag":162,"props":1361,"children":1362},{"class":164,"line":165},[1363],{"type":45,"tag":162,"props":1364,"children":1365},{"style":201},[1366],{"type":50,"value":1367},"# live STATE (firing\u002Fpending\u002Finactive) — read-only\n",{"type":45,"tag":162,"props":1369,"children":1370},{"class":164,"line":207},[1371,1375,1379,1383,1387,1392,1396,1400],{"type":45,"tag":162,"props":1372,"children":1373},{"style":257},[1374],{"type":50,"value":462},{"type":45,"tag":162,"props":1376,"children":1377},{"style":181},[1378],{"type":50,"value":270},{"type":45,"tag":162,"props":1380,"children":1381},{"style":175},[1382],{"type":50,"value":275},{"type":45,"tag":162,"props":1384,"children":1385},{"style":181},[1386],{"type":50,"value":280},{"type":45,"tag":162,"props":1388,"children":1389},{"style":192},[1390],{"type":50,"value":1391},"\u002Fapi\u002Fprometheus\u002Fgrafana\u002Fapi\u002Fv1\u002Frules",{"type":45,"tag":162,"props":1393,"children":1394},{"style":181},[1395],{"type":50,"value":189},{"type":45,"tag":162,"props":1397,"children":1398},{"style":181},[1399],{"type":50,"value":663},{"type":45,"tag":162,"props":1401,"children":1402},{"style":175},[1403],{"type":50,"value":588},{"type":45,"tag":162,"props":1405,"children":1406},{"class":164,"line":423},[1407,1411,1415,1420],{"type":45,"tag":162,"props":1408,"children":1409},{"style":257},[1410],{"type":50,"value":802},{"type":45,"tag":162,"props":1412,"children":1413},{"style":181},[1414],{"type":50,"value":357},{"type":45,"tag":162,"props":1416,"children":1417},{"style":192},[1418],{"type":50,"value":1419},".data.groups[]? | {folder: .file, group: .name, rules: [.rules[] | {name, state, health}]}",{"type":45,"tag":162,"props":1421,"children":1422},{"style":181},[1423],{"type":50,"value":682},{"type":45,"tag":162,"props":1425,"children":1426},{"class":164,"line":640},[1427],{"type":45,"tag":162,"props":1428,"children":1430},{"emptyLinePlaceholder":1429},true,[1431],{"type":50,"value":1432},"\n",{"type":45,"tag":162,"props":1434,"children":1435},{"class":164,"line":1103},[1436],{"type":45,"tag":162,"props":1437,"children":1438},{"style":201},[1439],{"type":50,"value":1440},"# DEFINITIONS (query, condition, labels, for-duration) — full CRUD, no runtime state\n",{"type":45,"tag":162,"props":1442,"children":1443},{"class":164,"line":1132},[1444,1448,1452,1456,1460,1465,1469,1473,1477,1481,1486],{"type":45,"tag":162,"props":1445,"children":1446},{"style":257},[1447],{"type":50,"value":462},{"type":45,"tag":162,"props":1449,"children":1450},{"style":181},[1451],{"type":50,"value":270},{"type":45,"tag":162,"props":1453,"children":1454},{"style":175},[1455],{"type":50,"value":275},{"type":45,"tag":162,"props":1457,"children":1458},{"style":181},[1459],{"type":50,"value":280},{"type":45,"tag":162,"props":1461,"children":1462},{"style":192},[1463],{"type":50,"value":1464},"\u002Fapi\u002Fv1\u002Fprovisioning\u002Falert-rules",{"type":45,"tag":162,"props":1466,"children":1467},{"style":181},[1468],{"type":50,"value":189},{"type":45,"tag":162,"props":1470,"children":1471},{"style":181},[1472],{"type":50,"value":663},{"type":45,"tag":162,"props":1474,"children":1475},{"style":257},[1476],{"type":50,"value":668},{"type":45,"tag":162,"props":1478,"children":1479},{"style":181},[1480],{"type":50,"value":357},{"type":45,"tag":162,"props":1482,"children":1483},{"style":192},[1484],{"type":50,"value":1485},".[] | {uid, title, folderUID, condition}",{"type":45,"tag":162,"props":1487,"children":1488},{"style":181},[1489],{"type":50,"value":682},{"type":45,"tag":46,"props":1491,"children":1492},{},[1493,1495,1500,1502,1508,1510,1516],{"type":50,"value":1494},"The ",{"type":45,"tag":53,"props":1496,"children":1498},{"className":1497},[],[1499],{"type":50,"value":462},{"type":50,"value":1501}," segment in the first path is the literal ",{"type":45,"tag":53,"props":1503,"children":1505},{"className":1504},[],[1506],{"type":50,"value":1507},"{am_name}",{"type":50,"value":1509}," for the built-in Alertmanager;\nexternal Alertmanagers use their datasource UID. Resources written via the provisioning API are\nlocked in the UI unless you send ",{"type":45,"tag":53,"props":1511,"children":1513},{"className":1512},[],[1514],{"type":50,"value":1515},"X-Disable-Provenance: true",{"type":50,"value":1517}," on the write.",{"type":45,"tag":538,"props":1519,"children":1521},{"id":1520},"_5-silences",[1522],{"type":50,"value":1523},"5. Silences",{"type":45,"tag":46,"props":1525,"children":1526},{},[1527,1533,1534,1540,1542,1548],{"type":45,"tag":53,"props":1528,"children":1530},{"className":1529},[],[1531],{"type":50,"value":1532},"startsAt",{"type":50,"value":136},{"type":45,"tag":53,"props":1535,"children":1537},{"className":1536},[],[1538],{"type":50,"value":1539},"endsAt",{"type":50,"value":1541}," are RFC-3339 (",{"type":45,"tag":53,"props":1543,"children":1545},{"className":1544},[],[1546],{"type":50,"value":1547},"date -u +%Y-%m-%dT%H:%M:%SZ",{"type":50,"value":1549},").",{"type":45,"tag":151,"props":1551,"children":1553},{"className":153,"code":1552,"language":155,"meta":156,"style":156},"# active silences\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilences\" | \\\n  jq '.[] | select(.status.state==\"active\") | {id, comment, matchers, endsAt}'\n\n# create a 2-hour silence matching a label\n# GNU date; on BSD\u002FmacOS use: date -u -v+2H +%Y-%m-%dT%H:%M:%SZ\nSTART=$(date -u +%Y-%m-%dT%H:%M:%SZ)\nEND=$(date -u -d \"+2 hours\" +%Y-%m-%dT%H:%M:%SZ)\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilences\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"matchers\": [{\"name\": \"alertname\", \"value\": \"HighErrorRate\", \"isRegex\": false, \"isEqual\": true}],\n    \"startsAt\": \"'\"${START}\"'\", \"endsAt\": \"'\"${END}\"'\",\n    \"createdBy\": \"api\", \"comment\": \"investigating\"\n  }'\n# success → {\"silenceID\": \"...\"}\n\n# expire a silence\ngrafana -X DELETE \"${GRAFANA_URL}\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilence\u002F\u003Csilence_id>\"\n",[1554],{"type":45,"tag":53,"props":1555,"children":1556},{"__ignoreMap":156},[1557,1565,1601,1621,1628,1636,1644,1677,1723,1762,1785,1800,1808,1849,1857,1869,1878,1886,1895],{"type":45,"tag":162,"props":1558,"children":1559},{"class":164,"line":165},[1560],{"type":45,"tag":162,"props":1561,"children":1562},{"style":201},[1563],{"type":50,"value":1564},"# active silences\n",{"type":45,"tag":162,"props":1566,"children":1567},{"class":164,"line":207},[1568,1572,1576,1580,1584,1589,1593,1597],{"type":45,"tag":162,"props":1569,"children":1570},{"style":257},[1571],{"type":50,"value":462},{"type":45,"tag":162,"props":1573,"children":1574},{"style":181},[1575],{"type":50,"value":270},{"type":45,"tag":162,"props":1577,"children":1578},{"style":175},[1579],{"type":50,"value":275},{"type":45,"tag":162,"props":1581,"children":1582},{"style":181},[1583],{"type":50,"value":280},{"type":45,"tag":162,"props":1585,"children":1586},{"style":192},[1587],{"type":50,"value":1588},"\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilences",{"type":45,"tag":162,"props":1590,"children":1591},{"style":181},[1592],{"type":50,"value":189},{"type":45,"tag":162,"props":1594,"children":1595},{"style":181},[1596],{"type":50,"value":663},{"type":45,"tag":162,"props":1598,"children":1599},{"style":175},[1600],{"type":50,"value":588},{"type":45,"tag":162,"props":1602,"children":1603},{"class":164,"line":423},[1604,1608,1612,1617],{"type":45,"tag":162,"props":1605,"children":1606},{"style":257},[1607],{"type":50,"value":802},{"type":45,"tag":162,"props":1609,"children":1610},{"style":181},[1611],{"type":50,"value":357},{"type":45,"tag":162,"props":1613,"children":1614},{"style":192},[1615],{"type":50,"value":1616},".[] | select(.status.state==\"active\") | {id, comment, matchers, endsAt}",{"type":45,"tag":162,"props":1618,"children":1619},{"style":181},[1620],{"type":50,"value":682},{"type":45,"tag":162,"props":1622,"children":1623},{"class":164,"line":640},[1624],{"type":45,"tag":162,"props":1625,"children":1626},{"emptyLinePlaceholder":1429},[1627],{"type":50,"value":1432},{"type":45,"tag":162,"props":1629,"children":1630},{"class":164,"line":1103},[1631],{"type":45,"tag":162,"props":1632,"children":1633},{"style":201},[1634],{"type":50,"value":1635},"# create a 2-hour silence matching a label\n",{"type":45,"tag":162,"props":1637,"children":1638},{"class":164,"line":1132},[1639],{"type":45,"tag":162,"props":1640,"children":1641},{"style":201},[1642],{"type":50,"value":1643},"# GNU date; on BSD\u002FmacOS use: date -u -v+2H +%Y-%m-%dT%H:%M:%SZ\n",{"type":45,"tag":162,"props":1645,"children":1646},{"class":164,"line":1157},[1647,1652,1657,1662,1667,1672],{"type":45,"tag":162,"props":1648,"children":1649},{"style":175},[1650],{"type":50,"value":1651},"START",{"type":45,"tag":162,"props":1653,"children":1654},{"style":181},[1655],{"type":50,"value":1656},"=$(",{"type":45,"tag":162,"props":1658,"children":1659},{"style":257},[1660],{"type":50,"value":1661},"date",{"type":45,"tag":162,"props":1663,"children":1664},{"style":192},[1665],{"type":50,"value":1666}," -u",{"type":45,"tag":162,"props":1668,"children":1669},{"style":192},[1670],{"type":50,"value":1671}," +%Y-%m-%dT%H:%M:%SZ",{"type":45,"tag":162,"props":1673,"children":1674},{"style":181},[1675],{"type":50,"value":1676},")\n",{"type":45,"tag":162,"props":1678,"children":1679},{"class":164,"line":1166},[1680,1685,1689,1693,1697,1702,1706,1711,1715,1719],{"type":45,"tag":162,"props":1681,"children":1682},{"style":175},[1683],{"type":50,"value":1684},"END",{"type":45,"tag":162,"props":1686,"children":1687},{"style":181},[1688],{"type":50,"value":1656},{"type":45,"tag":162,"props":1690,"children":1691},{"style":257},[1692],{"type":50,"value":1661},{"type":45,"tag":162,"props":1694,"children":1695},{"style":192},[1696],{"type":50,"value":1666},{"type":45,"tag":162,"props":1698,"children":1699},{"style":192},[1700],{"type":50,"value":1701}," -d",{"type":45,"tag":162,"props":1703,"children":1704},{"style":181},[1705],{"type":50,"value":299},{"type":45,"tag":162,"props":1707,"children":1708},{"style":192},[1709],{"type":50,"value":1710},"+2 hours",{"type":45,"tag":162,"props":1712,"children":1713},{"style":181},[1714],{"type":50,"value":189},{"type":45,"tag":162,"props":1716,"children":1717},{"style":192},[1718],{"type":50,"value":1671},{"type":45,"tag":162,"props":1720,"children":1721},{"style":181},[1722],{"type":50,"value":1676},{"type":45,"tag":162,"props":1724,"children":1725},{"class":164,"line":1175},[1726,1730,1734,1738,1742,1746,1750,1754,1758],{"type":45,"tag":162,"props":1727,"children":1728},{"style":257},[1729],{"type":50,"value":462},{"type":45,"tag":162,"props":1731,"children":1732},{"style":192},[1733],{"type":50,"value":1029},{"type":45,"tag":162,"props":1735,"children":1736},{"style":192},[1737],{"type":50,"value":1034},{"type":45,"tag":162,"props":1739,"children":1740},{"style":181},[1741],{"type":50,"value":270},{"type":45,"tag":162,"props":1743,"children":1744},{"style":175},[1745],{"type":50,"value":275},{"type":45,"tag":162,"props":1747,"children":1748},{"style":181},[1749],{"type":50,"value":280},{"type":45,"tag":162,"props":1751,"children":1752},{"style":192},[1753],{"type":50,"value":1588},{"type":45,"tag":162,"props":1755,"children":1756},{"style":181},[1757],{"type":50,"value":189},{"type":45,"tag":162,"props":1759,"children":1760},{"style":175},[1761],{"type":50,"value":588},{"type":45,"tag":162,"props":1763,"children":1764},{"class":164,"line":1184},[1765,1769,1773,1777,1781],{"type":45,"tag":162,"props":1766,"children":1767},{"style":192},[1768],{"type":50,"value":1066},{"type":45,"tag":162,"props":1770,"children":1771},{"style":181},[1772],{"type":50,"value":299},{"type":45,"tag":162,"props":1774,"children":1775},{"style":192},[1776],{"type":50,"value":1075},{"type":45,"tag":162,"props":1778,"children":1779},{"style":181},[1780],{"type":50,"value":189},{"type":45,"tag":162,"props":1782,"children":1783},{"style":175},[1784],{"type":50,"value":588},{"type":45,"tag":162,"props":1786,"children":1787},{"class":164,"line":1193},[1788,1792,1796],{"type":45,"tag":162,"props":1789,"children":1790},{"style":192},[1791],{"type":50,"value":1091},{"type":45,"tag":162,"props":1793,"children":1794},{"style":181},[1795],{"type":50,"value":357},{"type":45,"tag":162,"props":1797,"children":1798},{"style":192},[1799],{"type":50,"value":1100},{"type":45,"tag":162,"props":1801,"children":1802},{"class":164,"line":33},[1803],{"type":45,"tag":162,"props":1804,"children":1805},{"style":192},[1806],{"type":50,"value":1807},"    \"matchers\": [{\"name\": \"alertname\", \"value\": \"HighErrorRate\", \"isRegex\": false, \"isEqual\": true}],\n",{"type":45,"tag":162,"props":1809,"children":1810},{"class":164,"line":1210},[1811,1816,1820,1824,1828,1833,1837,1841,1845],{"type":45,"tag":162,"props":1812,"children":1813},{"style":192},[1814],{"type":50,"value":1815},"    \"startsAt\": \"",{"type":45,"tag":162,"props":1817,"children":1818},{"style":181},[1819],{"type":50,"value":1114},{"type":45,"tag":162,"props":1821,"children":1822},{"style":175},[1823],{"type":50,"value":1651},{"type":45,"tag":162,"props":1825,"children":1826},{"style":181},[1827],{"type":50,"value":1124},{"type":45,"tag":162,"props":1829,"children":1830},{"style":192},[1831],{"type":50,"value":1832},"\", \"endsAt\": \"",{"type":45,"tag":162,"props":1834,"children":1835},{"style":181},[1836],{"type":50,"value":1114},{"type":45,"tag":162,"props":1838,"children":1839},{"style":175},[1840],{"type":50,"value":1684},{"type":45,"tag":162,"props":1842,"children":1843},{"style":181},[1844],{"type":50,"value":1124},{"type":45,"tag":162,"props":1846,"children":1847},{"style":192},[1848],{"type":50,"value":1129},{"type":45,"tag":162,"props":1850,"children":1851},{"class":164,"line":1219},[1852],{"type":45,"tag":162,"props":1853,"children":1854},{"style":192},[1855],{"type":50,"value":1856},"    \"createdBy\": \"api\", \"comment\": \"investigating\"\n",{"type":45,"tag":162,"props":1858,"children":1860},{"class":164,"line":1859},15,[1861,1865],{"type":45,"tag":162,"props":1862,"children":1863},{"style":192},[1864],{"type":50,"value":1225},{"type":45,"tag":162,"props":1866,"children":1867},{"style":181},[1868],{"type":50,"value":682},{"type":45,"tag":162,"props":1870,"children":1872},{"class":164,"line":1871},16,[1873],{"type":45,"tag":162,"props":1874,"children":1875},{"style":201},[1876],{"type":50,"value":1877},"# success → {\"silenceID\": \"...\"}\n",{"type":45,"tag":162,"props":1879,"children":1881},{"class":164,"line":1880},17,[1882],{"type":45,"tag":162,"props":1883,"children":1884},{"emptyLinePlaceholder":1429},[1885],{"type":50,"value":1432},{"type":45,"tag":162,"props":1887,"children":1889},{"class":164,"line":1888},18,[1890],{"type":45,"tag":162,"props":1891,"children":1892},{"style":201},[1893],{"type":50,"value":1894},"# expire a silence\n",{"type":45,"tag":162,"props":1896,"children":1898},{"class":164,"line":1897},19,[1899,1903,1907,1912,1916,1920,1924,1929],{"type":45,"tag":162,"props":1900,"children":1901},{"style":257},[1902],{"type":50,"value":462},{"type":45,"tag":162,"props":1904,"children":1905},{"style":192},[1906],{"type":50,"value":1029},{"type":45,"tag":162,"props":1908,"children":1909},{"style":192},[1910],{"type":50,"value":1911}," DELETE",{"type":45,"tag":162,"props":1913,"children":1914},{"style":181},[1915],{"type":50,"value":270},{"type":45,"tag":162,"props":1917,"children":1918},{"style":175},[1919],{"type":50,"value":275},{"type":45,"tag":162,"props":1921,"children":1922},{"style":181},[1923],{"type":50,"value":280},{"type":45,"tag":162,"props":1925,"children":1926},{"style":192},[1927],{"type":50,"value":1928},"\u002Fapi\u002Falertmanager\u002Fgrafana\u002Fapi\u002Fv2\u002Fsilence\u002F\u003Csilence_id>",{"type":45,"tag":162,"props":1930,"children":1931},{"style":181},[1932],{"type":50,"value":1933},"\"\n",{"type":45,"tag":538,"props":1935,"children":1937},{"id":1936},"_6-annotations",[1938],{"type":50,"value":1939},"6. Annotations",{"type":45,"tag":46,"props":1941,"children":1942},{},[1943,1949,1950,1956],{"type":45,"tag":53,"props":1944,"children":1946},{"className":1945},[],[1947],{"type":50,"value":1948},"time",{"type":50,"value":136},{"type":45,"tag":53,"props":1951,"children":1953},{"className":1952},[],[1954],{"type":50,"value":1955},"timeEnd",{"type":50,"value":1957}," are Unix milliseconds.",{"type":45,"tag":151,"props":1959,"children":1961},{"className":153,"code":1960,"language":155,"meta":156,"style":156},"grafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fannotations\" -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\"time\": '\"$(( $(date +%s) * 1000 ))\"', \"tags\": [\"deploy\",\"api\"], \"text\": \"Deployed v2.3.1\"}'\n\ngrafana \"${GRAFANA_URL}\u002Fapi\u002Fannotations?from=${FROM_MS}&to=${NOW_MS}&tags=deploy\" | jq .\n",[1962],{"type":45,"tag":53,"props":1963,"children":1964},{"__ignoreMap":156},[1965,2020,2083,2090],{"type":45,"tag":162,"props":1966,"children":1967},{"class":164,"line":165},[1968,1972,1976,1980,1984,1988,1992,1996,2000,2004,2008,2012,2016],{"type":45,"tag":162,"props":1969,"children":1970},{"style":257},[1971],{"type":50,"value":462},{"type":45,"tag":162,"props":1973,"children":1974},{"style":192},[1975],{"type":50,"value":1029},{"type":45,"tag":162,"props":1977,"children":1978},{"style":192},[1979],{"type":50,"value":1034},{"type":45,"tag":162,"props":1981,"children":1982},{"style":181},[1983],{"type":50,"value":270},{"type":45,"tag":162,"props":1985,"children":1986},{"style":175},[1987],{"type":50,"value":275},{"type":45,"tag":162,"props":1989,"children":1990},{"style":181},[1991],{"type":50,"value":280},{"type":45,"tag":162,"props":1993,"children":1994},{"style":192},[1995],{"type":50,"value":93},{"type":45,"tag":162,"props":1997,"children":1998},{"style":181},[1999],{"type":50,"value":189},{"type":45,"tag":162,"props":2001,"children":2002},{"style":192},[2003],{"type":50,"value":294},{"type":45,"tag":162,"props":2005,"children":2006},{"style":181},[2007],{"type":50,"value":299},{"type":45,"tag":162,"props":2009,"children":2010},{"style":192},[2011],{"type":50,"value":1075},{"type":45,"tag":162,"props":2013,"children":2014},{"style":181},[2015],{"type":50,"value":189},{"type":45,"tag":162,"props":2017,"children":2018},{"style":175},[2019],{"type":50,"value":588},{"type":45,"tag":162,"props":2021,"children":2022},{"class":164,"line":207},[2023,2027,2031,2036,2041,2045,2049,2053,2057,2061,2065,2069,2074,2079],{"type":45,"tag":162,"props":2024,"children":2025},{"style":192},[2026],{"type":50,"value":1091},{"type":45,"tag":162,"props":2028,"children":2029},{"style":181},[2030],{"type":50,"value":357},{"type":45,"tag":162,"props":2032,"children":2033},{"style":192},[2034],{"type":50,"value":2035},"{\"time\": ",{"type":45,"tag":162,"props":2037,"children":2038},{"style":181},[2039],{"type":50,"value":2040},"'\"$((",{"type":45,"tag":162,"props":2042,"children":2043},{"style":257},[2044],{"type":50,"value":955},{"type":45,"tag":162,"props":2046,"children":2047},{"style":192},[2048],{"type":50,"value":960},{"type":45,"tag":162,"props":2050,"children":2051},{"style":181},[2052],{"type":50,"value":965},{"type":45,"tag":162,"props":2054,"children":2055},{"style":181},[2056],{"type":50,"value":970},{"type":45,"tag":162,"props":2058,"children":2059},{"style":192},[2060],{"type":50,"value":975},{"type":45,"tag":162,"props":2062,"children":2063},{"style":181},[2064],{"type":50,"value":965},{"type":45,"tag":162,"props":2066,"children":2067},{"style":192},[2068],{"type":50,"value":965},{"type":45,"tag":162,"props":2070,"children":2071},{"style":181},[2072],{"type":50,"value":2073},"\"'",{"type":45,"tag":162,"props":2075,"children":2076},{"style":192},[2077],{"type":50,"value":2078},", \"tags\": [\"deploy\",\"api\"], \"text\": \"Deployed v2.3.1\"}",{"type":45,"tag":162,"props":2080,"children":2081},{"style":181},[2082],{"type":50,"value":682},{"type":45,"tag":162,"props":2084,"children":2085},{"class":164,"line":423},[2086],{"type":45,"tag":162,"props":2087,"children":2088},{"emptyLinePlaceholder":1429},[2089],{"type":50,"value":1432},{"type":45,"tag":162,"props":2091,"children":2092},{"class":164,"line":640},[2093,2097,2101,2105,2109,2114,2118,2122,2126,2131,2135,2139,2143,2148,2152,2156,2160],{"type":45,"tag":162,"props":2094,"children":2095},{"style":257},[2096],{"type":50,"value":462},{"type":45,"tag":162,"props":2098,"children":2099},{"style":181},[2100],{"type":50,"value":270},{"type":45,"tag":162,"props":2102,"children":2103},{"style":175},[2104],{"type":50,"value":275},{"type":45,"tag":162,"props":2106,"children":2107},{"style":181},[2108],{"type":50,"value":280},{"type":45,"tag":162,"props":2110,"children":2111},{"style":192},[2112],{"type":50,"value":2113},"\u002Fapi\u002Fannotations?from=",{"type":45,"tag":162,"props":2115,"children":2116},{"style":181},[2117],{"type":50,"value":309},{"type":45,"tag":162,"props":2119,"children":2120},{"style":175},[2121],{"type":50,"value":1119},{"type":45,"tag":162,"props":2123,"children":2124},{"style":181},[2125],{"type":50,"value":280},{"type":45,"tag":162,"props":2127,"children":2128},{"style":192},[2129],{"type":50,"value":2130},"&to=",{"type":45,"tag":162,"props":2132,"children":2133},{"style":181},[2134],{"type":50,"value":309},{"type":45,"tag":162,"props":2136,"children":2137},{"style":175},[2138],{"type":50,"value":945},{"type":45,"tag":162,"props":2140,"children":2141},{"style":181},[2142],{"type":50,"value":280},{"type":45,"tag":162,"props":2144,"children":2145},{"style":192},[2146],{"type":50,"value":2147},"&tags=deploy",{"type":45,"tag":162,"props":2149,"children":2150},{"style":181},[2151],{"type":50,"value":189},{"type":45,"tag":162,"props":2153,"children":2154},{"style":181},[2155],{"type":50,"value":663},{"type":45,"tag":162,"props":2157,"children":2158},{"style":257},[2159],{"type":50,"value":668},{"type":45,"tag":162,"props":2161,"children":2162},{"style":192},[2163],{"type":50,"value":2164}," .\n",{"type":45,"tag":538,"props":2166,"children":2168},{"id":2167},"_7-folders",[2169],{"type":50,"value":2170},"7. Folders",{"type":45,"tag":151,"props":2172,"children":2174},{"className":153,"code":2173,"language":155,"meta":156,"style":156},"grafana \"${GRAFANA_URL}\u002Fapi\u002Ffolders\" | jq '.[] | {uid, title}'\ngrafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Ffolders\" -H \"Content-Type: application\u002Fjson\" -d '{\"title\": \"Team API\"}'\n",[2175],{"type":45,"tag":53,"props":2176,"children":2177},{"__ignoreMap":156},[2178,2227],{"type":45,"tag":162,"props":2179,"children":2180},{"class":164,"line":165},[2181,2185,2189,2193,2197,2202,2206,2210,2214,2218,2223],{"type":45,"tag":162,"props":2182,"children":2183},{"style":257},[2184],{"type":50,"value":462},{"type":45,"tag":162,"props":2186,"children":2187},{"style":181},[2188],{"type":50,"value":270},{"type":45,"tag":162,"props":2190,"children":2191},{"style":175},[2192],{"type":50,"value":275},{"type":45,"tag":162,"props":2194,"children":2195},{"style":181},[2196],{"type":50,"value":280},{"type":45,"tag":162,"props":2198,"children":2199},{"style":192},[2200],{"type":50,"value":2201},"\u002Fapi\u002Ffolders",{"type":45,"tag":162,"props":2203,"children":2204},{"style":181},[2205],{"type":50,"value":189},{"type":45,"tag":162,"props":2207,"children":2208},{"style":181},[2209],{"type":50,"value":663},{"type":45,"tag":162,"props":2211,"children":2212},{"style":257},[2213],{"type":50,"value":668},{"type":45,"tag":162,"props":2215,"children":2216},{"style":181},[2217],{"type":50,"value":357},{"type":45,"tag":162,"props":2219,"children":2220},{"style":192},[2221],{"type":50,"value":2222},".[] | {uid, title}",{"type":45,"tag":162,"props":2224,"children":2225},{"style":181},[2226],{"type":50,"value":682},{"type":45,"tag":162,"props":2228,"children":2229},{"class":164,"line":207},[2230,2234,2238,2242,2246,2250,2254,2258,2262,2266,2270,2274,2278,2282,2286,2291],{"type":45,"tag":162,"props":2231,"children":2232},{"style":257},[2233],{"type":50,"value":462},{"type":45,"tag":162,"props":2235,"children":2236},{"style":192},[2237],{"type":50,"value":1029},{"type":45,"tag":162,"props":2239,"children":2240},{"style":192},[2241],{"type":50,"value":1034},{"type":45,"tag":162,"props":2243,"children":2244},{"style":181},[2245],{"type":50,"value":270},{"type":45,"tag":162,"props":2247,"children":2248},{"style":175},[2249],{"type":50,"value":275},{"type":45,"tag":162,"props":2251,"children":2252},{"style":181},[2253],{"type":50,"value":280},{"type":45,"tag":162,"props":2255,"children":2256},{"style":192},[2257],{"type":50,"value":2201},{"type":45,"tag":162,"props":2259,"children":2260},{"style":181},[2261],{"type":50,"value":189},{"type":45,"tag":162,"props":2263,"children":2264},{"style":192},[2265],{"type":50,"value":294},{"type":45,"tag":162,"props":2267,"children":2268},{"style":181},[2269],{"type":50,"value":299},{"type":45,"tag":162,"props":2271,"children":2272},{"style":192},[2273],{"type":50,"value":1075},{"type":45,"tag":162,"props":2275,"children":2276},{"style":181},[2277],{"type":50,"value":189},{"type":45,"tag":162,"props":2279,"children":2280},{"style":192},[2281],{"type":50,"value":1701},{"type":45,"tag":162,"props":2283,"children":2284},{"style":181},[2285],{"type":50,"value":357},{"type":45,"tag":162,"props":2287,"children":2288},{"style":192},[2289],{"type":50,"value":2290},"{\"title\": \"Team API\"}",{"type":45,"tag":162,"props":2292,"children":2293},{"style":181},[2294],{"type":50,"value":682},{"type":45,"tag":538,"props":2296,"children":2298},{"id":2297},"_8-create-or-update-a-dashboard",[2299],{"type":50,"value":2300},"8. Create or update a dashboard",{"type":45,"tag":151,"props":2302,"children":2304},{"className":153,"code":2303,"language":155,"meta":156,"style":156},"grafana -X POST \"${GRAFANA_URL}\u002Fapi\u002Fdashboards\u002Fdb\" \\\n  -H \"Content-Type: application\u002Fjson\" \\\n  -d '{\n    \"dashboard\": {\"uid\": null, \"title\": \"My Dashboard\", \"panels\": [], \"schemaVersion\": 41},\n    \"folderUid\": \"\u003Cfolder_uid>\",\n    \"overwrite\": false,\n    \"message\": \"created via API\"\n  }'\n",[2305],{"type":45,"tag":53,"props":2306,"children":2307},{"__ignoreMap":156},[2308,2348,2371,2386,2394,2402,2410,2418],{"type":45,"tag":162,"props":2309,"children":2310},{"class":164,"line":165},[2311,2315,2319,2323,2327,2331,2335,2340,2344],{"type":45,"tag":162,"props":2312,"children":2313},{"style":257},[2314],{"type":50,"value":462},{"type":45,"tag":162,"props":2316,"children":2317},{"style":192},[2318],{"type":50,"value":1029},{"type":45,"tag":162,"props":2320,"children":2321},{"style":192},[2322],{"type":50,"value":1034},{"type":45,"tag":162,"props":2324,"children":2325},{"style":181},[2326],{"type":50,"value":270},{"type":45,"tag":162,"props":2328,"children":2329},{"style":175},[2330],{"type":50,"value":275},{"type":45,"tag":162,"props":2332,"children":2333},{"style":181},[2334],{"type":50,"value":280},{"type":45,"tag":162,"props":2336,"children":2337},{"style":192},[2338],{"type":50,"value":2339},"\u002Fapi\u002Fdashboards\u002Fdb",{"type":45,"tag":162,"props":2341,"children":2342},{"style":181},[2343],{"type":50,"value":189},{"type":45,"tag":162,"props":2345,"children":2346},{"style":175},[2347],{"type":50,"value":588},{"type":45,"tag":162,"props":2349,"children":2350},{"class":164,"line":207},[2351,2355,2359,2363,2367],{"type":45,"tag":162,"props":2352,"children":2353},{"style":192},[2354],{"type":50,"value":1066},{"type":45,"tag":162,"props":2356,"children":2357},{"style":181},[2358],{"type":50,"value":299},{"type":45,"tag":162,"props":2360,"children":2361},{"style":192},[2362],{"type":50,"value":1075},{"type":45,"tag":162,"props":2364,"children":2365},{"style":181},[2366],{"type":50,"value":189},{"type":45,"tag":162,"props":2368,"children":2369},{"style":175},[2370],{"type":50,"value":588},{"type":45,"tag":162,"props":2372,"children":2373},{"class":164,"line":423},[2374,2378,2382],{"type":45,"tag":162,"props":2375,"children":2376},{"style":192},[2377],{"type":50,"value":1091},{"type":45,"tag":162,"props":2379,"children":2380},{"style":181},[2381],{"type":50,"value":357},{"type":45,"tag":162,"props":2383,"children":2384},{"style":192},[2385],{"type":50,"value":1100},{"type":45,"tag":162,"props":2387,"children":2388},{"class":164,"line":640},[2389],{"type":45,"tag":162,"props":2390,"children":2391},{"style":192},[2392],{"type":50,"value":2393},"    \"dashboard\": {\"uid\": null, \"title\": \"My Dashboard\", \"panels\": [], \"schemaVersion\": 41},\n",{"type":45,"tag":162,"props":2395,"children":2396},{"class":164,"line":1103},[2397],{"type":45,"tag":162,"props":2398,"children":2399},{"style":192},[2400],{"type":50,"value":2401},"    \"folderUid\": \"\u003Cfolder_uid>\",\n",{"type":45,"tag":162,"props":2403,"children":2404},{"class":164,"line":1132},[2405],{"type":45,"tag":162,"props":2406,"children":2407},{"style":192},[2408],{"type":50,"value":2409},"    \"overwrite\": false,\n",{"type":45,"tag":162,"props":2411,"children":2412},{"class":164,"line":1157},[2413],{"type":45,"tag":162,"props":2414,"children":2415},{"style":192},[2416],{"type":50,"value":2417},"    \"message\": \"created via API\"\n",{"type":45,"tag":162,"props":2419,"children":2420},{"class":164,"line":1166},[2421,2425],{"type":45,"tag":162,"props":2422,"children":2423},{"style":192},[2424],{"type":50,"value":1225},{"type":45,"tag":162,"props":2426,"children":2427},{"style":181},[2428],{"type":50,"value":682},{"type":45,"tag":46,"props":2430,"children":2431},{},[2432,2434,2439,2440,2446,2448,2453,2455,2461,2463,2469,2471,2477,2479,2485],{"type":50,"value":2433},"To ",{"type":45,"tag":73,"props":2435,"children":2436},{},[2437],{"type":50,"value":2438},"update",{"type":50,"value":79},{"type":45,"tag":53,"props":2441,"children":2443},{"className":2442},[],[2444],{"type":50,"value":2445},"GET",{"type":50,"value":2447}," the dashboard first and send the ",{"type":45,"tag":73,"props":2449,"children":2450},{},[2451],{"type":50,"value":2452},"whole JSON back",{"type":50,"value":2454}," with your change applied —\nthis endpoint replaces the dashboard. Set ",{"type":45,"tag":53,"props":2456,"children":2458},{"className":2457},[],[2459],{"type":50,"value":2460},"dashboard.uid",{"type":50,"value":2462}," to the existing UID and either include the\ncurrent ",{"type":45,"tag":53,"props":2464,"children":2466},{"className":2465},[],[2467],{"type":50,"value":2468},"dashboard.version",{"type":50,"value":2470}," (Grafana returns ",{"type":45,"tag":53,"props":2472,"children":2474},{"className":2473},[],[2475],{"type":50,"value":2476},"412",{"type":50,"value":2478}," on mismatch) or set ",{"type":45,"tag":53,"props":2480,"children":2482},{"className":2481},[],[2483],{"type":50,"value":2484},"overwrite: true",{"type":50,"value":733},{"type":45,"tag":118,"props":2487,"children":2489},{"id":2488},"pagination",[2490],{"type":50,"value":2491},"Pagination",{"type":45,"tag":46,"props":2493,"children":2494},{},[2495,2500,2501,2506,2508,2514,2516,2522,2524,2529,2531,2536,2538,2543,2545,2550,2552,2558,2559,2565,2567,2573,2574,2579,2581,2586],{"type":45,"tag":53,"props":2496,"children":2498},{"className":2497},[],[2499],{"type":50,"value":574},{"type":50,"value":87},{"type":45,"tag":53,"props":2502,"children":2504},{"className":2503},[],[2505],{"type":50,"value":2201},{"type":50,"value":2507}," use ",{"type":45,"tag":53,"props":2509,"children":2511},{"className":2510},[],[2512],{"type":50,"value":2513},"limit",{"type":50,"value":2515}," + ",{"type":45,"tag":53,"props":2517,"children":2519},{"className":2518},[],[2520],{"type":50,"value":2521},"page",{"type":50,"value":2523}," query params (1-indexed). ",{"type":45,"tag":53,"props":2525,"children":2527},{"className":2526},[],[2528],{"type":50,"value":574},{"type":50,"value":2530},"\ndefaults to 1000 and caps at 5000. ",{"type":45,"tag":53,"props":2532,"children":2534},{"className":2533},[],[2535],{"type":50,"value":93},{"type":50,"value":2537}," has ",{"type":45,"tag":53,"props":2539,"children":2541},{"className":2540},[],[2542],{"type":50,"value":2513},{"type":50,"value":2544}," (default 100) but no ",{"type":45,"tag":53,"props":2546,"children":2548},{"className":2547},[],[2549],{"type":50,"value":2521},{"type":50,"value":2551}," —\nnarrow the ",{"type":45,"tag":53,"props":2553,"children":2555},{"className":2554},[],[2556],{"type":50,"value":2557},"from",{"type":50,"value":136},{"type":45,"tag":53,"props":2560,"children":2562},{"className":2561},[],[2563],{"type":50,"value":2564},"to",{"type":50,"value":2566}," window instead. Alertmanager endpoints are not paginated. When you hit a cap,\nnarrow with ",{"type":45,"tag":53,"props":2568,"children":2570},{"className":2569},[],[2571],{"type":50,"value":2572},"query=",{"type":50,"value":725},{"type":45,"tag":53,"props":2575,"children":2577},{"className":2576},[],[2578],{"type":50,"value":715},{"type":50,"value":2580},", or ",{"type":45,"tag":53,"props":2582,"children":2584},{"className":2583},[],[2585],{"type":50,"value":723},{"type":50,"value":2587}," instead of paging through everything.",{"type":45,"tag":118,"props":2589,"children":2591},{"id":2590},"rate-limits",[2592],{"type":50,"value":2593},"Rate limits",{"type":45,"tag":46,"props":2595,"children":2596},{},[2597,2599,2605,2607,2613,2615,2625,2627,2632],{"type":50,"value":2598},"Self-hosted Grafana has no built-in per-token rate limits by default. Grafana Cloud may return\n",{"type":45,"tag":53,"props":2600,"children":2602},{"className":2601},[],[2603],{"type":50,"value":2604},"429",{"type":50,"value":2606}," on heavy API or query traffic — limits vary by plan and endpoint, so honor ",{"type":45,"tag":53,"props":2608,"children":2610},{"className":2609},[],[2611],{"type":50,"value":2612},"Retry-After",{"type":50,"value":2614},"\nif present, otherwise back off.\n",{"type":45,"tag":73,"props":2616,"children":2617},{},[2618,2623],{"type":45,"tag":53,"props":2619,"children":2621},{"className":2620},[],[2622],{"type":50,"value":85},{"type":50,"value":2624}," is the expensive path",{"type":50,"value":2626},": each call fans out to the underlying database, so batch\nmultiple ",{"type":45,"tag":53,"props":2628,"children":2630},{"className":2629},[],[2631],{"type":50,"value":921},{"type":50,"value":2633}," into one request instead of looping.",{"type":45,"tag":118,"props":2635,"children":2637},{"id":2636},"error-handling",[2638],{"type":50,"value":2639},"Error handling",{"type":45,"tag":46,"props":2641,"children":2642},{},[2643,2645,2651,2653,2659,2660,2666],{"type":50,"value":2644},"Error bodies always carry ",{"type":45,"tag":53,"props":2646,"children":2648},{"className":2647},[],[2649],{"type":50,"value":2650},"\"message\"",{"type":50,"value":2652}," (sometimes ",{"type":45,"tag":53,"props":2654,"children":2656},{"className":2655},[],[2657],{"type":50,"value":2658},"\"messageId\"",{"type":50,"value":136},{"type":45,"tag":53,"props":2661,"children":2663},{"className":2662},[],[2664],{"type":50,"value":2665},"\"traceID\"",{"type":50,"value":2667},"). Service-specific cases:",{"type":45,"tag":2669,"props":2670,"children":2671},"ul",{},[2672,2707,2749],{"type":45,"tag":2673,"props":2674,"children":2675},"li",{},[2676,2684,2686,2691,2693,2699,2701,2706],{"type":45,"tag":73,"props":2677,"children":2678},{},[2679],{"type":45,"tag":53,"props":2680,"children":2682},{"className":2681},[],[2683],{"type":50,"value":2476},{"type":50,"value":2685}," — Version conflict on dashboard save. ",{"type":45,"tag":53,"props":2687,"children":2689},{"className":2688},[],[2690],{"type":50,"value":2445},{"type":50,"value":2692}," the latest, reapply your change, include ",{"type":45,"tag":53,"props":2694,"children":2696},{"className":2695},[],[2697],{"type":50,"value":2698},"version",{"type":50,"value":2700},", or set ",{"type":45,"tag":53,"props":2702,"children":2704},{"className":2703},[],[2705],{"type":50,"value":2484},{"type":50,"value":733},{"type":45,"tag":2673,"props":2708,"children":2709},{},[2710,2733,2735,2740,2742,2747],{"type":45,"tag":73,"props":2711,"children":2712},{},[2713,2719,2720,2726,2728],{"type":45,"tag":53,"props":2714,"children":2716},{"className":2715},[],[2717],{"type":50,"value":2718},"200",{"type":50,"value":136},{"type":45,"tag":53,"props":2721,"children":2723},{"className":2722},[],[2724],{"type":50,"value":2725},"500",{"type":50,"value":2727}," on ",{"type":45,"tag":53,"props":2729,"children":2731},{"className":2730},[],[2732],{"type":50,"value":85},{"type":50,"value":2734}," — Datasource-side failure. The Prometheus\u002FLoki\u002FSQL error is embedded in ",{"type":45,"tag":53,"props":2736,"children":2738},{"className":2737},[],[2739],{"type":50,"value":1339},{"type":50,"value":2741},"; ",{"type":45,"tag":53,"props":2743,"children":2745},{"className":2744},[],[2746],{"type":50,"value":1331},{"type":50,"value":2748}," is empty.",{"type":45,"tag":2673,"props":2750,"children":2751},{},[2752,2760],{"type":45,"tag":73,"props":2753,"children":2754},{},[2755],{"type":45,"tag":53,"props":2756,"children":2758},{"className":2757},[],[2759],{"type":50,"value":142},{"type":50,"value":2761}," — Insufficient role. Viewer \u003C Editor \u003C Admin; folder-level permissions also apply.",{"type":45,"tag":46,"props":2763,"children":2764},{},[2765,2770],{"type":45,"tag":53,"props":2766,"children":2768},{"className":2767},[],[2769],{"type":50,"value":134},{"type":50,"value":2771}," → credential not configured for this workspace (report, don't debug). UIDs are case-sensitive\nshort strings, not titles.",{"type":45,"tag":118,"props":2773,"children":2775},{"id":2774},"going-deeper",[2776],{"type":50,"value":2777},"Going deeper",{"type":45,"tag":46,"props":2779,"children":2780},{},[2781,2787],{"type":45,"tag":53,"props":2782,"children":2784},{"className":2783},[],[2785],{"type":50,"value":2786},"references\u002Fapi.md",{"type":50,"value":2788}," has the full endpoint catalog — dashboards, folders, datasources, ds\u002Fquery\nper-datasource shapes, the full unified-alerting surface (alert rules, contact points, notification\npolicies, mute timings, Alertmanager), annotations, snapshots, orgs\u002Fusers\u002Fteams, service accounts,\nand short URLs. Read it when you need an endpoint beyond the ones above.",{"type":45,"tag":2790,"props":2791,"children":2792},"style",{},[2793],{"type":50,"value":2794},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2796,"total":2981},[2797,2818,2832,2844,2863,2876,2897,2917,2931,2944,2952,2965],{"slug":2798,"name":2798,"fn":2799,"description":2800,"org":2801,"tags":2802,"stars":2815,"repoUrl":2816,"updatedAt":2817},"algorithmic-art","create algorithmic art with p5.js","Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2803,2806,2809,2812],{"name":2804,"slug":2805,"type":16},"Creative","creative",{"name":2807,"slug":2808,"type":16},"Design","design",{"name":2810,"slug":2811,"type":16},"Generative Art","generative-art",{"name":2813,"slug":2814,"type":16},"JavaScript","javascript",161831,"https:\u002F\u002Fgithub.com\u002Fanthropics\u002Fskills","2026-04-06T17:56:15.455818",{"slug":2819,"name":2819,"fn":2820,"description":2821,"org":2822,"tags":2823,"stars":2815,"repoUrl":2816,"updatedAt":2831},"brand-guidelines","apply Anthropic brand colors and typography","Applies Anthropic's official brand colors and typography to any sort of artifact that may benefit from having Anthropic's look-and-feel. Use it when brand colors or style guidelines, visual formatting, or company design standards apply.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2824,2827,2828],{"name":2825,"slug":2826,"type":16},"Branding","branding",{"name":2807,"slug":2808,"type":16},{"name":2829,"slug":2830,"type":16},"Typography","typography","2026-04-06T17:56:05.042852",{"slug":2833,"name":2833,"fn":2834,"description":2835,"org":2836,"tags":2837,"stars":2815,"repoUrl":2816,"updatedAt":2843},"canvas-design","create posters and visual art as PNG or PDF","Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2838,2839,2840],{"name":2804,"slug":2805,"type":16},{"name":2807,"slug":2808,"type":16},{"name":2841,"slug":2842,"type":16},"PDF","pdf","2026-04-06T17:56:03.794732",{"slug":2845,"name":2845,"fn":2846,"description":2847,"org":2848,"tags":2849,"stars":2815,"repoUrl":2816,"updatedAt":2862},"claude-api","build apps with the Claude API","Reference for the Claude API \u002F Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration.\nTRIGGER — read BEFORE opening the target file; don't skip because it \"looks like a one-liner\" — whenever: the prompt names Claude\u002FAnthropic in any form (Claude, Anthropic, Fable, Opus, Sonnet, Haiku, `anthropic`, `@anthropic-ai`, `claude-*`, `us.anthropic.*`, `[1m]`); the user asks about an LLM (pricing\u002Fmodel choice\u002Flimits\u002Fcaching) — never answer from memory; OR the task is LLM-shaped with provider unstated (agent\u002FMCP\u002Ftool-definition\u002Fmulti-agent\u002FRAG\u002FLLM-judge\u002Fcomputer-use; generate\u002Fsummarize\u002Fextract\u002Fclassify\u002Frewrite\u002Fconverse over NL; debugging refusals\u002Fcutoffs\u002Fstreaming\u002Ftool-calls\u002Ftokens).\nSKIP only when another provider is being worked on (overrides all triggers): OpenAI\u002FGPT\u002FGemini\u002FLlama\u002FMistral\u002FCohere\u002FOllama named in the query; OR `grep -rE 'openai|langchain_openai|google.generativeai|genai|mistralai|cohere|ollama'` over the project hits (run this grep FIRST if no provider named — don't Read the file).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2850,2853,2854,2857,2859],{"name":2851,"slug":2852,"type":16},"Agents","agents",{"name":9,"slug":8,"type":16},{"name":2855,"slug":2856,"type":16},"Anthropic SDK","anthropic-sdk",{"name":2858,"slug":2845,"type":16},"Claude API",{"name":2860,"slug":2861,"type":16},"LLM","llm","2026-07-28T05:36:08.213335",{"slug":2864,"name":2864,"fn":2865,"description":2866,"org":2867,"tags":2868,"stars":2815,"repoUrl":2816,"updatedAt":2875},"doc-coauthoring","co-author documentation and technical specs","Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2869,2872],{"name":2870,"slug":2871,"type":16},"Documentation","documentation",{"name":2873,"slug":2874,"type":16},"Technical Writing","technical-writing","2026-04-06T17:56:14.18897",{"slug":2877,"name":2877,"fn":2878,"description":2879,"org":2880,"tags":2881,"stars":2815,"repoUrl":2816,"updatedAt":2896},"docx","create and edit Word documents","Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files) or Word templates (.dotx files). Triggers include: any mention of 'Word doc', 'word document', '.docx', '.dotx', or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx or .dotx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a 'report', 'memo', 'letter', 'template', or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2882,2885,2887,2890,2893],{"name":2883,"slug":2884,"type":16},"Documents","documents",{"name":2886,"slug":2877,"type":16},"DOCX",{"name":2888,"slug":2889,"type":16},"Office","office",{"name":2891,"slug":2892,"type":16},"Templates","templates",{"name":2894,"slug":2895,"type":16},"Word","word","2026-07-18T05:16:23.136271",{"slug":2898,"name":2898,"fn":2899,"description":2900,"org":2901,"tags":2902,"stars":2815,"repoUrl":2816,"updatedAt":2916},"frontend-design","design production-grade frontend interfaces","Guidance for distinctive, intentional visual design when building new UI or reshaping an existing one. Helps with aesthetic direction, typography, and making choices that don't read as templated defaults.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2903,2904,2907,2910,2913],{"name":2807,"slug":2808,"type":16},{"name":2905,"slug":2906,"type":16},"Frontend","frontend",{"name":2908,"slug":2909,"type":16},"React","react",{"name":2911,"slug":2912,"type":16},"Tailwind CSS","tailwind-css",{"name":2914,"slug":2915,"type":16},"UI Components","ui-components","2026-04-06T17:56:16.723469",{"slug":2918,"name":2918,"fn":2919,"description":2920,"org":2921,"tags":2922,"stars":2815,"repoUrl":2816,"updatedAt":2930},"internal-comms","write internal company communications","A set of resources to help me write all kinds of internal communications, using the formats that my company likes to use. Claude should use this skill whenever asked to write some sort of internal communications (status reports, leadership updates, 3P updates, company newsletters, FAQs, incident reports, project updates, etc.).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2923,2926,2927],{"name":2924,"slug":2925,"type":16},"Communications","communications",{"name":2891,"slug":2892,"type":16},{"name":2928,"slug":2929,"type":16},"Writing","writing","2026-04-06T17:56:20.695522",{"slug":2932,"name":2932,"fn":2933,"description":2934,"org":2935,"tags":2936,"stars":2815,"repoUrl":2816,"updatedAt":2943},"mcp-builder","build MCP servers","Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when building MCP servers to integrate external APIs or services, whether in Python (FastMCP) or Node\u002FTypeScript (MCP SDK).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2937,2938,2939,2940],{"name":2851,"slug":2852,"type":16},{"name":27,"slug":28,"type":16},{"name":2860,"slug":2861,"type":16},{"name":2941,"slug":2942,"type":16},"MCP","mcp","2026-04-06T17:56:10.357665",{"slug":2842,"name":2842,"fn":2945,"description":2946,"org":2947,"tags":2948,"stars":2815,"repoUrl":2816,"updatedAt":2951},"read edit and manipulate PDF files","Use this skill whenever the user wants to do anything with PDF files. This includes reading or extracting text\u002Ftables from PDFs, combining or merging multiple PDFs into one, splitting PDFs apart, rotating pages, adding watermarks, creating new PDFs, filling PDF forms, encrypting\u002Fdecrypting PDFs, extracting images, and OCR on scanned PDFs to make them searchable. If the user mentions a .pdf file or asks to produce one, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2949,2950],{"name":2883,"slug":2884,"type":16},{"name":2841,"slug":2842,"type":16},"2026-04-06T17:56:02.483316",{"slug":2953,"name":2953,"fn":2954,"description":2955,"org":2956,"tags":2957,"stars":2815,"repoUrl":2816,"updatedAt":2964},"pptx","create and edit PowerPoint presentations","Use this skill any time a .pptx or .potx file is involved in any way — as input, output, or both. This includes: creating slide decks, pitch decks, or presentations; reading, parsing, or extracting text from any .pptx or .potx file (even if the extracted content will be used elsewhere, like in an email or summary); editing, modifying, or updating existing presentations; combining or splitting slide files; working with templates (.potx), layouts, speaker notes, or comments. Trigger whenever the user mentions \"deck,\" \"slides,\" \"presentation,\" or references a .pptx or .potx filename, regardless of what they plan to do with the content afterward. If a .pptx or .potx file needs to be opened, created, or touched, use this skill.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2958,2961],{"name":2959,"slug":2960,"type":16},"PowerPoint","powerpoint",{"name":2962,"slug":2963,"type":16},"Presentations","presentations","2026-07-18T05:16:24.1471",{"slug":2966,"name":2966,"fn":2967,"description":2968,"org":2969,"tags":2970,"stars":2815,"repoUrl":2816,"updatedAt":2980},"skill-creator","create and optimize agent skills","Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2971,2972,2973,2976,2979],{"name":2851,"slug":2852,"type":16},{"name":2870,"slug":2871,"type":16},{"name":2974,"slug":2975,"type":16},"Evals","evals",{"name":2977,"slug":2978,"type":16},"Performance","performance",{"name":2873,"slug":2874,"type":16},"2026-04-19T06:45:40.804",490,{"items":2983,"total":1888},[2984,3000,3019,3034,3048,3061,3075],{"slug":2985,"name":2985,"fn":2986,"description":2987,"org":2988,"tags":2989,"stars":29,"repoUrl":30,"updatedAt":2999},"asana-api","manage Asana tasks and projects","Read and manage Asana tasks, projects, sections, comments, and workspaces. Use this whenever the user wants to list or search tasks, create or update a task, complete a task, comment on a task, move tasks between projects or sections, look up a project or workspace, or ask \"what's on my Asana list\" — even if they don't say \"API\". Also use it for any app.asana.com URL or an Asana task\u002Fproject gid. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[2990,2993,2996],{"name":2991,"slug":2992,"type":16},"Productivity","productivity",{"name":2994,"slug":2995,"type":16},"Project Management","project-management",{"name":2997,"slug":2998,"type":16},"Task Management","task-management","2026-06-24T07:44:51.70496",{"slug":3001,"name":3001,"fn":3002,"description":3003,"org":3004,"tags":3005,"stars":29,"repoUrl":30,"updatedAt":3018},"bigquery-api","run SQL queries against BigQuery","Run SQL against Google BigQuery and browse its catalog — submit queries (sync or async), poll job status, page through results, list datasets\u002Ftables, and read table schemas. Use this whenever the user wants to query a BigQuery table, ask \"what's in this dataset\", check a BigQuery job's status, or mentions bigquery.googleapis.com or a `project.dataset.table` path. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3006,3009,3012,3015],{"name":3007,"slug":3008,"type":16},"Data Analysis","data-analysis",{"name":3010,"slug":3011,"type":16},"Database","database",{"name":3013,"slug":3014,"type":16},"Google Cloud","google-cloud",{"name":3016,"slug":3017,"type":16},"SQL","sql","2026-06-24T07:45:14.797877",{"slug":3020,"name":3020,"fn":3021,"description":3022,"org":3023,"tags":3024,"stars":29,"repoUrl":30,"updatedAt":3033},"config-guide","configure Claude agent settings and scopes","Reference guide for configuring @Claude agents — agents, agent scopes, identity profiles, presets, connections, rules, GitHub repositories, and custom instructions. Explains the inheritance model and configuration best practices.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3025,3026,3027,3030],{"name":2851,"slug":2852,"type":16},{"name":2858,"slug":2845,"type":16},{"name":3028,"slug":3029,"type":16},"Configuration","configuration",{"name":3031,"slug":3032,"type":16},"GitHub","github","2026-06-25T07:41:36.617524",{"slug":3035,"name":3035,"fn":3036,"description":3037,"org":3038,"tags":3039,"stars":29,"repoUrl":30,"updatedAt":3047},"confluence-api","manage Confluence Cloud content","Read, search, and manage Confluence Cloud pages, spaces, blog posts, comments, attachments, and labels. Use this whenever the user wants to find a page, read a doc, search the wiki with CQL, create or update a page, add a comment, list pages in a space, pull an attachment, or ask \"what does the wiki say about X\" — even if they don't say \"API\". Also use it for any *.atlassian.net\u002Fwiki URL, or a CQL string when the context is wiki content rather than tickets. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3040,3043,3044],{"name":3041,"slug":3042,"type":16},"Confluence","confluence",{"name":2870,"slug":2871,"type":16},{"name":3045,"slug":3046,"type":16},"Knowledge Management","knowledge-management","2026-06-25T07:41:43.531982",{"slug":3049,"name":3049,"fn":3050,"description":3051,"org":3052,"tags":3053,"stars":29,"repoUrl":30,"updatedAt":3060},"datadog-api","manage Datadog monitoring and telemetry","Query and manage Datadog monitoring data — logs, metrics, monitors, dashboards, events, SLOs, traces, and incidents. Use this whenever the user wants to search logs, look at a metric, check which monitors are alerting, investigate a trace, pull SLO status, mute an alert, or ask \"what's happening in Datadog\" — even if they don't say \"API\". Also use it for any URL under *.datadoghq.com. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3054,3055,3058,3059],{"name":27,"slug":28,"type":16},{"name":3056,"slug":3057,"type":16},"Datadog","datadog",{"name":24,"slug":25,"type":16},{"name":14,"slug":15,"type":16},"2026-06-24T07:46:42.266372",{"slug":3062,"name":3062,"fn":3063,"description":3064,"org":3065,"tags":3066,"stars":29,"repoUrl":30,"updatedAt":3074},"debug-plugins","diagnose Claude plugin loading failures","Diagnose why a plugin or skill configured in @Claude admin settings isn't loading. Checks mount directories, the Claude Code launch command, and startup logs from inside the running container, then explains what failed and how to fix it.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3067,3068,3071],{"name":2858,"slug":2845,"type":16},{"name":3069,"slug":3070,"type":16},"Debugging","debugging",{"name":3072,"slug":3073,"type":16},"Plugin Development","plugin-development","2026-06-24T07:46:32.792809",{"slug":3076,"name":3076,"fn":3077,"description":3078,"org":3079,"tags":3080,"stars":29,"repoUrl":30,"updatedAt":3087},"enterprise-search","search company enterprise knowledge index","Search the company's enterprise knowledge index. Use this FIRST when starting any task that touches company-specific context - projects, people, policies, internal docs, prior decisions - before searching individual sources like Drive, Slack, or Jira directly. Also use it when the user asks \"do we have a doc about X\", \"what's our policy on Y\", or references internal initiatives by name. Always start from this skill when interacting with this service — its bundled scripts and recipes are the fastest path.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":11},[3081,3083,3084],{"name":3082,"slug":3076,"type":16},"Enterprise Search",{"name":3045,"slug":3046,"type":16},{"name":3085,"slug":3086,"type":16},"Research","research","2026-06-24T07:46:40.641837"]