# Catalog Protocol
Use the runtime catalog as the source of truth. Generated references are a fast index; command execution details come from the CLI itself.
## Search
Run `grafana search "<intent>" --json` to find candidate commands. Use `--limit` to control result count. Treat search output as candidates only.
## Full Catalog
Run `grafana commands --json` to inspect the generated command catalog. Use `--include-hidden` only when hidden commands are relevant.
Key fields:
- `path`: command path to pass to `commands show` or execute after the CLI name.
- `shortcuts`: root-level commands that execute the same operation with preset flag values.
- `http`: HTTP method and path template.
- `http.default_hostname`: optional source-level host used after `--hostname`, `$GRAFANA_HOST`, and the host selected with `auth use`, and before the single-host fallback from `hosts.yml`.
- `flags`: CLI flags, parameter location, type, required state, defaults, enum values, format, input modes, and help.
- `body`: request body requirement, media type, and optional `runtime_schema` preflight source, including its active-context prerequisites.
- `auth`: `required`, declared `scopes`, and `requirements` — any one entry satisfies the command, every scheme inside an entry is required, `{}` allows anonymous access; execution fails with `not_authenticated` before sending when the stored credential plus header and query parameters satisfy no entry.
- `mutation`: `read`, `write`, or `unknown`. Do not infer write vs read from the HTTP method alone. Treat any value other than `read` as requiring preview when `dry_run.mode` is `http_preview`, or explicit user confirmation when preview is unavailable.
- `dry_run`: preview contract. `http_preview` is declared only when the generated runner can preview; use `--<flag>` and print the resolved HTTP request JSON. `unsupported` means the command has no preview, including all workflow commands. A `--dry-run` flag on a custom command is not a preview contract.
- `examples`: runnable examples with optional body shape, output hints, and follow-up commands.
- `output`: list path, default columns, response media type, pagination, streaming hints, and `binary.flag` for binary downloads; a streaming policy describes collection, terminal outcomes, and optional live projection.
- `output.column_formats`: `kind: count` shows an array length in table output only.
- `flags[].context`: an optional account-scoped default with explicit flag, declared environment, then stored-value precedence.
- `sets_context`: a successful operation persists its declared parameter as the selected host's active context.
- `notes`, `prerequisites`, and `known_errors`: overlay-provided operation context that is not inferred from the API spec.
## Command Detail
Run `grafana commands show <path...> --json` before executing an unfamiliar command. This is the source of truth for flags, body, auth, HTTP path, `mutation`, `dry_run`, and output hints.
## Schema
Run `grafana commands schema --json` to read `catalog_schema_version`, `surfaces`, and `dry_run.result` before parsing catalog JSON with durable tooling. `dry_run.result=http_preview` means a preview prints the resolved HTTP request JSON (`method`, `url`, `hostname`, `host_source`, `headers`, `body`, `auth`, `output`).
## Sensitive Flags
When a flag entry has `input_modes`, prefer safe modes over putting secrets directly in shell arguments.
- `flag`: pass the direct `--<flag>` value; keep this for compatibility or non-secret values.
- `env`: pass `--<flag>-env NAME` to read the value from an environment variable.
- `file`: pass `--<flag>-file path` to read the value from a file.
- `stdin`: pass `--<flag>-stdin` to read the value from stdin.
- Use only one input mode for the same flag.
## Request Bodies
- `--file path`: read a JSON body from a file.
- `--file -`: read a JSON body from stdin.
- `--set key.path=value`: build JSON with type inference for booleans, null, integers, and floats.
- `--set-str key.path=value`: build JSON while forcing the value to remain a string.
JSON `body.schema` validates compiled types, nullable values, nested properties/items, required fields, and resolved `allOf` structure before sending, including during dry-run and workflows. For templates, it validates `body.merge_path`. Enum, format, unions, additional properties, and unresolved references are outside this static preflight. Failures exit 2 and identify the body path without body values.
If `body.runtime_schema` is present, normal execution fetches that JSON Schema and validates the body before the target request. An `http_preview` dry-run does not fetch it.
## Output
Use `-o json` for machine-readable command output. Other supported formats are `table`, `yaml`, and `raw`. For collected streams, choose one mode: JSON or YAML for one document, `--stream` in the default output mode when `output.streaming.policy.live` is present, or raw for wire events.
When `output.binary` is present, success output is raw bytes. Pass `--<output.binary.flag> <new-path>` (it refuses existing paths; choose a path the user approved) or `-` only when piping to another program, never into the conversation. `-o` then affects only error output.
On a non-zero exit with JSON or YAML output, read `error.code`, `error.message`, and `error.hint`; optional `error.http` contains only `status`. A configured pause exits zero and is represented by the field mapping in its stream collection policy.
## Auth
If command detail returns `auth.required=true`, run `grafana auth status -o json` before execution and read `hostname` and `source`. Host resolution order: `--hostname` > `$GRAFANA_HOST` > the selected host (`grafana auth use <host>`) > `http.default_hostname` > the single host in `hosts.yml`. When more than one host is logged in and the host was chosen implicitly, the CLI also prints a `current host: <name>` line on stderr; read provenance from `auth status`, not from that line. If no matching host is logged in, stop and ask the user to authenticate. Map that status to declared schemes: bearer satisfies http bearer, oauth2, and openIdConnect; basic satisfies http basic; apikey satisfies an apiKey header whose name is `param`, or any http scheme when stored for the `Authorization` header; header or query parameters passed to the command can supply apiKey schemes.
## Cloudflare Access
Before Access setup, run `grafana commands --include-hidden --json`. Read `auth.required` for every entry in `commands`.
If no command has `auth.required=true`, report: "This CLI cannot enable Cloudflare Access in this version." Stop here. Do not run the Access login or API login steps below.
Only if at least one command has `auth.required=true`, continue with the following Access setup.
If the host requires Cloudflare Access, replace `api.example` below with its hostname, including any non-default port. Ask the user to complete these steps in order:
1. Install `cloudflared` on `PATH`.
2. Run `cloudflared access login --quiet https://api.example` for the actual HTTPS origin.
3. Run `grafana auth login --hostname api.example --cloudflare-access` and complete normal API login.
Access login does not replace API authentication. Use the same explicit `--hostname` for status and execution. In `auth status -o json`, `hosts[].cloudflare_access` reports only the saved switch, not token validity. Status does not contact the host or invoke `cloudflared`.
A later API login preserves the switch. Use `grafana auth login --hostname api.example --cloudflare-access=false` to disable it. The first real request obtains a token for the exact HTTPS origin and reuses it within the invocation. Lathe does not persist Access tokens or read or write the `cloudflared` cache. Disabled hosts, HTTP dry-runs, help, and verification never obtain Access tokens. The updater does not use host Access configuration.
Access requires HTTPS with certificate verification and conflicts with `--insecure` or a saved insecure setting. Tokens do not apply to subdomains or other ports. Enabled requests refuse redirects to another origin.
A 302 to `*.cloudflareaccess.com` supplies an error hint only. Never enable Access or run a command from that redirect. Lathe does not start Access browser login or automatically replay the request. If Access login expires, ask the user to repeat Access login before another API attempt.
One origin must use one Access application. Different application audiences by path are unsupported. A CLI whose commands all report `auth.required=false` cannot enable Access in this version. There is no separate configuration command. Credentials for an old proxy host are not migrated or deleted.
# Module `grafana_http_api`
## Source
- Backend: `openapi3`
- Default hostname: `localhost:3000`
- Source kind: `git`
- Repository: `https://github.com/grafana/grafana`
- Pinned tag: `d18e58d33aa8741f08fbab4aa73bdaf1f04e3be5`
- Files: `packages/grafana-openapi/src/api/openapi3.json`
- Resolved SHA: `d18e58d33aa8741f08fbab4aa73bdaf1f04e3be5`
- Reproducible: yes
## access_control
- Description: The API can be used to create, update, get and list roles, and create or remove built-in role assignments. To use the API, you would need to enable fine-grained access control. This only available in Grafana Enterprise. The API does not currently work with an API Token. So in order to use these API endpoints you will have to use Basic auth.
### `grafana grafana_http_api access_control add-team-role`
- Summary: Add team role.
- HTTP: `POST /api/access-control/teams/{teamId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required, int64): teamId
### `grafana grafana_http_api access_control add-user-role`
- Summary: Add a user role assignment.
- HTTP: `POST /api/access-control/users/{userId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): userId
### `grafana grafana_http_api access_control create-role`
- Summary: Create a new custom role.
- HTTP: `POST /api/access-control/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api access_control delete-role`
- Summary: Delete a custom role.
- HTTP: `DELETE /api/access-control/roles/{roleUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--force` (query): force
- `--global` (query): global
- `--role-uid` (path, required): roleUID
### `grafana grafana_http_api access_control get-access-control-status`
- Summary: Get status.
- HTTP: `GET /api/access-control/status`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api access_control get-resource-description`
- Summary: Get a description of a resource's access control properties.
- HTTP: `GET /api/access-control/{resource}/description`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--resource` (path, required): resource
### `grafana grafana_http_api access_control get-resource-permissions`
- Summary: Get permissions for a resource.
- HTTP: `GET /api/access-control/{resource}/{resourceID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--resource` (path, required): resource
- `--resource-id` (path, required): resourceID
### `grafana grafana_http_api access_control get-role`
- Summary: Get a role.
- HTTP: `GET /api/access-control/roles/{roleUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--role-uid` (path, required): roleUID
### `grafana grafana_http_api access_control get-role-assignments`
- Summary: Get role assignments.
- HTTP: `GET /api/access-control/roles/{roleUID}/assignments`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--role-uid` (path, required): roleUID
### `grafana grafana_http_api access_control list-roles`
- Summary: Get all roles.
- HTTP: `GET /api/access-control/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--delegatable` (query): delegatable
- `--include-hidden` (query): includeHidden
- `--target-org-id` (query, int64): targetOrgId
### `grafana grafana_http_api access_control list-team-roles`
- Summary: Get team roles.
- HTTP: `GET /api/access-control/teams/{teamId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required, int64): teamId
- `--target-org-id` (query, int64): targetOrgId
### `grafana grafana_http_api access_control list-teams-roles`
- Summary: List roles assigned to multiple teams.
- HTTP: `POST /api/access-control/teams/roles/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api access_control list-user-roles`
- Summary: List roles assigned to a user.
- HTTP: `GET /api/access-control/users/{userId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): userId
- `--include-hidden` (query): includeHidden
- `--target-org-id` (query, int64): targetOrgId
### `grafana grafana_http_api access_control list-users-roles`
- Summary: List roles assigned to multiple users.
- HTTP: `POST /api/access-control/users/roles/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api access_control remove-team-role`
- Summary: Remove team role.
- HTTP: `DELETE /api/access-control/teams/{teamId}/roles/{roleUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--role-uid` (path, required): roleUID
- `--team-id` (path, required, int64): teamId
### `grafana grafana_http_api access_control remove-user-role`
- Summary: Remove a user role assignment.
- HTTP: `DELETE /api/access-control/users/{userId}/roles/{roleUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--global` (query): A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.
- `--role-uid` (path, required): roleUID
- `--user-id` (path, required, int64): userId
### `grafana grafana_http_api access_control set-resource-permissions`
- Summary: Set resource permissions.
- HTTP: `POST /api/access-control/{resource}/{resourceID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--resource` (path, required): resource
- `--resource-id` (path, required): resourceID
### `grafana grafana_http_api access_control set-resource-permissions-for-built-in-role`
- Summary: Set resource permissions for a built-in role.
- HTTP: `POST /api/access-control/{resource}/{resourceID}/builtInRoles/{builtInRole}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--resource` (path, required): resource
- `--resource-id` (path, required): resourceID
- `--built-in-role` (path, required): builtInRole
### `grafana grafana_http_api access_control set-resource-permissions-for-team`
- Summary: Set resource permissions for a team.
- HTTP: `POST /api/access-control/{resource}/{resourceID}/teams/{teamID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--resource` (path, required): resource
- `--resource-id` (path, required): resourceID
- `--team-id` (path, required, int64): teamID
### `grafana grafana_http_api access_control set-resource-permissions-for-user`
- Summary: Set resource permissions for a user.
- HTTP: `POST /api/access-control/{resource}/{resourceID}/users/{userID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--resource` (path, required): resource
- `--resource-id` (path, required): resourceID
- `--user-id` (path, required, int64): userID
### `grafana grafana_http_api access_control set-role-assignments`
- Summary: Set role assignments.
- HTTP: `PUT /api/access-control/roles/{roleUID}/assignments`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--role-uid` (path, required): roleUID
### `grafana grafana_http_api access_control set-team-roles`
- Summary: Update team role.
- HTTP: `PUT /api/access-control/teams/{teamId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required, int64): teamId
- `--target-org-id` (query, int64): targetOrgId
### `grafana grafana_http_api access_control set-user-roles`
- Summary: Set user role assignments.
- HTTP: `PUT /api/access-control/users/{userId}/roles`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): userId
- `--target-org-id` (query, int64): targetOrgId
### `grafana grafana_http_api access_control update-role`
- Summary: Update a custom role.
- HTTP: `PUT /api/access-control/roles/{roleUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--role-uid` (path, required): roleUID
## admin
- Description: The Admin HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission. (The default admin user is called admin and has permission to use this API.)
### `grafana grafana_http_api admin admin-get-settings`
- Summary: Fetch settings.
- HTTP: `GET /api/admin/settings`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin admin-get-stats`
- Summary: Fetch Grafana Stats.
- HTTP: `GET /api/admin/stats`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## admin_ldap
### `grafana grafana_http_api admin_ldap get-ldap-status`
- Summary: Attempts to connect to all the configured LDAP servers and returns information on whenever they're available or not.
- HTTP: `GET /api/admin/ldap/status`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin_ldap get-sync-status`
- Summary: Returns the current state of the LDAP background sync integration.
- HTTP: `GET /api/admin/ldap-sync-status`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin_ldap get-user-from-ldap`
- Summary: Finds an user based on a username in LDAP. This helps illustrate how would the particular user be mapped in Grafana when synced.
- HTTP: `GET /api/admin/ldap/{user_name}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-name` (path, required): user_name
### `grafana grafana_http_api admin_ldap post-sync-user-with-ldap`
- Summary: Enables a single Grafana user to be synchronized against LDAP.
- HTTP: `POST /api/admin/ldap/sync/{user_id}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_ldap reload-ldap-cfg`
- Summary: Reloads the LDAP configuration.
- HTTP: `POST /api/admin/ldap/reload`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
## admin_provisioning
### `grafana grafana_http_api admin_provisioning admin-provisioning-reload-access-control`
- Summary: You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.
- HTTP: `POST /api/admin/provisioning/access-control/reload`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin_provisioning admin-provisioning-reload-dashboards`
- Summary: Reload dashboard provisioning configurations.
- HTTP: `POST /api/admin/provisioning/dashboards/reload`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin_provisioning admin-provisioning-reload-datasources`
- Summary: Reload datasource provisioning configurations.
- HTTP: `POST /api/admin/provisioning/datasources/reload`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
### `grafana grafana_http_api admin_provisioning admin-provisioning-reload-plugins`
- Summary: Reload plugin provisioning configurations.
- HTTP: `POST /api/admin/provisioning/plugins/reload`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
## admin_users
### `grafana grafana_http_api admin_users admin-create-user`
- Summary: Create new user.
- HTTP: `POST /api/admin/users`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api admin_users admin-delete-user`
- Summary: Delete global User.
- HTTP: `DELETE /api/admin/users/{user_id}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-disable-user`
- Summary: Disable user.
- HTTP: `POST /api/admin/users/{user_id}/disable`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-enable-user`
- Summary: Enable user.
- HTTP: `POST /api/admin/users/{user_id}/enable`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-get-user-auth-tokens`
- Summary: Return a list of all auth tokens (devices) that the user currently have logged in from.
- HTTP: `GET /api/admin/users/{user_id}/auth-tokens`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-logout-user`
- Summary: Logout user revokes all auth tokens (devices) for the user. User of issued auth tokens (devices) will no longer be logged in and will be required to authenticate again upon next activity.
- HTTP: `POST /api/admin/users/{user_id}/logout`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-revoke-user-auth-token`
- Summary: Revoke auth token for user.
- HTTP: `POST /api/admin/users/{user_id}/revoke-auth-token`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-update-user-password`
- Summary: Set password for user.
- HTTP: `PUT /api/admin/users/{user_id}/password`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api admin_users admin-update-user-permissions`
- Summary: Set permissions for user.
- HTTP: `PUT /api/admin/users/{user_id}/permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): user_id
## annotations
- Description: Grafana Annotations feature released in Grafana 4.6. Annotations are saved in the Grafana database (sqlite, mysql or postgres). Annotations can be organization annotations that can be shown on any dashboard by configuring an annotation data source - they are filtered by tags. Or they can be tied to a panel on a dashboard and are then only shown on that panel.
### `grafana grafana_http_api annotations delete-annotation-by-id`
- Summary: Delete Annotation By ID.
- HTTP: `DELETE /api/annotations/{annotation_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--annotation-id` (path, required): annotation_id
### `grafana grafana_http_api annotations get-annotation-by-id`
- Summary: Get Annotation by ID.
- HTTP: `GET /api/annotations/{annotation_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--annotation-id` (path, required): annotation_id
### `grafana grafana_http_api annotations get-annotation-tags`
- Summary: Find Annotations Tags.
- HTTP: `GET /api/annotations/tags`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--tag` (query): Tag is a string that you can use to filter tags.
- `--limit` (query, default `100`): Max limit for results returned.
### `grafana grafana_http_api annotations get-annotations`
- Summary: Find Annotations.
- HTTP: `GET /api/annotations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--from` (query, int64): Find annotations created after specific epoch datetime in milliseconds.
- `--to` (query, int64): Find annotations created before specific epoch datetime in milliseconds.
- `--user-id` (query, int64): Limit response to annotations created by specific user.
- `--user-uid` (query): Limit response to annotations created by a specific user, identified by UID.
- `--alert-id` (query, int64): Find annotations for a specified alert rule by its ID.
- `--alert-uid` (query): Find annotations for a specified alert rule by its UID.
- `--dashboard-id` (query, int64): Find annotations that are scoped to a specific dashboard
- `--dashboard-uid` (query): Find annotations that are scoped to a specific dashboard
- `--panel-id` (query, int64): Find annotations that are scoped to a specific panel
- `--limit` (query, int64): Max limit for results returned.
- `--tags` (query): Use this to filter organization annotations. Organization annotations are annotations from an annotation data source that are not connected specifically to a dashboard or panel. You can filter by multiple tags.
- `--type` (query, one of: alert|annotation): Return alerts or user created annotations
- `--match-any` (query): Match any or all tags
### `grafana grafana_http_api annotations mass-delete-annotations`
- Summary: Delete multiple annotations.
- HTTP: `POST /api/annotations/mass-delete`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api annotations patch-annotation`
- Summary: Patch Annotation.
- HTTP: `PATCH /api/annotations/{annotation_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--annotation-id` (path, required): annotation_id
### `grafana grafana_http_api annotations post-annotation`
- Summary: Create Annotation.
- HTTP: `POST /api/annotations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api annotations post-graphite-annotation`
- Summary: Create Annotation in Graphite format.
- HTTP: `POST /api/annotations/graphite`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api annotations update-annotation`
- Summary: Update Annotation.
- HTTP: `PUT /api/annotations/{annotation_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--annotation-id` (path, required): annotation_id
## convert_prometheus
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-delete-namespace`
- Summary: Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.
- HTTP: `DELETE /api/convert/api/prom/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-delete-rule-group`
- Summary: Deletes a specific rule group if it was imported from a Prometheus-compatible source.
- HTTP: `DELETE /api/convert/api/prom/rules/{NamespaceTitle}/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--group` (path, required): Group
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-get-namespace`
- Summary: Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).
- HTTP: `GET /api/convert/api/prom/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-get-rule-group`
- Summary: Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.
- HTTP: `GET /api/convert/api/prom/rules/{NamespaceTitle}/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--group` (path, required): Group
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-get-rules`
- Summary: Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.
- HTTP: `GET /api/convert/api/prom/rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-post-rule-group`
- Summary: Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.
- HTTP: `POST /api/convert/api/prom/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/yaml`
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--x-grafana-alerting-datasource-uid` (header): x-grafana-alerting-datasource-uid
- `--x-grafana-alerting-recording-rules-paused` (header): x-grafana-alerting-recording-rules-paused
- `--x-grafana-alerting-alert-rules-paused` (header): x-grafana-alerting-alert-rules-paused
- `--x-grafana-alerting-target-datasource-uid` (header): x-grafana-alerting-target-datasource-uid
- `--x-grafana-alerting-folder-uid` (header): x-grafana-alerting-folder-uid
- `--x-grafana-alerting-notification-settings` (header): x-grafana-alerting-notification-settings
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-cortex-post-rule-groups`
- Summary: Converts the submitted rule groups into Grafana-Managed Rules.
- HTTP: `POST /api/convert/api/prom/rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-delete-namespace`
- Summary: Deletes all rule groups that were imported from Prometheus-compatible sources within the specified namespace.
- HTTP: `DELETE /api/convert/prometheus/config/v1/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-delete-rule-group`
- Summary: Deletes a specific rule group if it was imported from a Prometheus-compatible source.
- HTTP: `DELETE /api/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--group` (path, required): Group
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-get-namespace`
- Summary: Gets Grafana-managed alert rules that were imported from Prometheus-compatible sources for a specified namespace (folder).
- HTTP: `GET /api/convert/prometheus/config/v1/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-get-rule-group`
- Summary: Gets a single rule group in Prometheus-compatible format if it was imported from a Prometheus-compatible source.
- HTTP: `GET /api/convert/prometheus/config/v1/rules/{NamespaceTitle}/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--group` (path, required): Group
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-get-rules`
- Summary: Gets all Grafana-managed alert rules that were imported from Prometheus-compatible sources, grouped by namespace.
- HTTP: `GET /api/convert/prometheus/config/v1/rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/yaml`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-post-rule-group`
- Summary: Converts a Prometheus rule group into a Grafana rule group and creates or updates it within the specified namespace.
- HTTP: `POST /api/convert/prometheus/config/v1/rules/{NamespaceTitle}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/yaml`
- Flags:
- `--namespace-title` (path, required): NamespaceTitle
- `--x-grafana-alerting-datasource-uid` (header): x-grafana-alerting-datasource-uid
- `--x-grafana-alerting-recording-rules-paused` (header): x-grafana-alerting-recording-rules-paused
- `--x-grafana-alerting-alert-rules-paused` (header): x-grafana-alerting-alert-rules-paused
- `--x-grafana-alerting-target-datasource-uid` (header): x-grafana-alerting-target-datasource-uid
- `--x-grafana-alerting-folder-uid` (header): x-grafana-alerting-folder-uid
- `--x-grafana-alerting-notification-settings` (header): x-grafana-alerting-notification-settings
- Output: response media `application/json`
### `grafana grafana_http_api convert_prometheus route-convert-prometheus-post-rule-groups`
- Summary: Converts the submitted rule groups into Grafana-Managed Rules.
- HTTP: `POST /api/convert/prometheus/config/v1/rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/json`
## dashboards
### `grafana grafana_http_api dashboards create-dashboard-snapshot`
- Summary: When creating a snapshot using the API, you have to provide the full dashboard payload including the snapshot data. This endpoint is designed for the Grafana UI.
- HTTP: `POST /api/snapshots`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api dashboards create-public-dashboard`
- Summary: Create public dashboard for a dashboard
- HTTP: `POST /api/dashboards/uid/{dashboardUid}/public-dashboards`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--dashboard-uid` (path, required): dashboardUid
### `grafana grafana_http_api dashboards delete-dashboard-by-uid`
- Summary: Delete dashboard by uid.
- HTTP: `DELETE /api/dashboards/uid/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards delete-dashboard-snapshot`
- Summary: Delete Snapshot by Key.
- HTTP: `DELETE /api/snapshots/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--key` (path, required): key
### `grafana grafana_http_api dashboards delete-dashboard-snapshot-by-delete-key`
- Summary: Delete Snapshot by deleteKey.
- HTTP: `GET /api/snapshots-delete/{deleteKey}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--delete-key` (path, required): deleteKey
### `grafana grafana_http_api dashboards delete-public-dashboard`
- Summary: Delete public dashboard for a dashboard
- HTTP: `DELETE /api/dashboards/uid/{dashboardUid}/public-dashboards/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboard-uid` (path, required): dashboardUid
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards get-dashboard-by-uid`
- Summary: Get dashboard by uid.
- HTTP: `GET /api/dashboards/uid/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards get-dashboard-permissions-list-by-uid`
- Summary: Gets all existing permissions for the given dashboard.
- HTTP: `GET /api/dashboards/uid/{uid}/permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards get-dashboard-snapshot`
- Summary: Get Snapshot by Key.
- HTTP: `GET /api/snapshots/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--key` (path, required): key
### `grafana grafana_http_api dashboards get-dashboard-tags`
- Summary: Get all dashboards tags of an organization.
- HTTP: `GET /api/dashboards/tags`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api dashboards get-dashboard-version-by-uid`
- Summary: Get a specific dashboard version using UID.
- HTTP: `GET /api/dashboards/uid/{uid}/versions/{DashboardVersionID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboard-version-id` (path, required, int64): DashboardVersionID
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards get-dashboard-versions-by-uid`
- Summary: Gets all existing versions for the dashboard using UID.
- HTTP: `GET /api/dashboards/uid/{uid}/versions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
- `--limit` (query, default `0`, int64): Maximum number of results to return
- `--start` (query, default `0`, int64): Version to start from when returning queries
### `grafana grafana_http_api dashboards get-home-dashboard`
- Summary: NOTE: the home dashboard is configured in preferences. This API will be removed in G13
- HTTP: `GET /api/dashboards/home`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api dashboards get-public-annotations`
- Summary: Get annotations for a public dashboard
- HTTP: `GET /api/public/dashboards/{accessToken}/annotations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--access-token` (path, required): accessToken
### `grafana grafana_http_api dashboards get-public-dashboard`
- Summary: Get public dashboard by dashboardUid
- HTTP: `GET /api/dashboards/uid/{dashboardUid}/public-dashboards`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboard-uid` (path, required): dashboardUid
### `grafana grafana_http_api dashboards import-dashboard`
- Summary: Import dashboard.
- HTTP: `POST /api/dashboards/import`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api dashboards interpolate-dashboard`
- Summary: Interpolate dashboard. This is an experimental endpoint under dashboardLibrary or suggestedDashboards feature flags and is subject to change.
- HTTP: `POST /api/dashboards/interpolate`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api dashboards list-public-dashboards`
- Summary: Get list of public dashboards
- HTTP: `GET /api/dashboards/public-dashboards`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api dashboards post-dashboard`
- Summary: Create / Update dashboard
- HTTP: `POST /api/dashboards/db`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api dashboards query-public-dashboard`
- Summary: Get results for a given panel on a public dashboard
- HTTP: `POST /api/public/dashboards/{accessToken}/panels/{panelId}/query`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--access-token` (path, required): accessToken
- `--panel-id` (path, required, int64): panelId
### `grafana grafana_http_api dashboards restore-dashboard-version-by-uid`
- Summary: Restore a dashboard to a given dashboard version using UID.
- HTTP: `POST /api/dashboards/uid/{uid}/restore`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards search-dashboard-snapshots`
- Summary: List snapshots.
- HTTP: `GET /api/dashboard/snapshots`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query` (query): Search Query
- `--limit` (query, default `1000`, int64): Limit the number of returned results
### `grafana grafana_http_api dashboards update-dashboard-permissions-by-uid`
- Summary: Updates permissions for a dashboard.
- HTTP: `POST /api/dashboards/uid/{uid}/permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards update-public-dashboard`
- Summary: Update public dashboard for a dashboard
- HTTP: `PATCH /api/dashboards/uid/{dashboardUid}/public-dashboards/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--dashboard-uid` (path, required): dashboardUid
- `--uid` (path, required): uid
### `grafana grafana_http_api dashboards view-public-dashboard`
- Summary: Get public dashboard for view
- HTTP: `GET /api/public/dashboards/{accessToken}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--access-token` (path, required): accessToken
## datasources
- Description: If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.
### `grafana grafana_http_api datasources add-data-source`
- Summary: Create a data source.
- HTTP: `POST /api/datasources`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api datasources call-datasource-resource-with-uid`
- Summary: Fetch data source resources.
- HTTP: `GET /api/datasources/uid/{uid}/resources/{datasource_proxy_route}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--datasource-proxy-route` (path, required): datasource_proxy_route
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources check-datasource-health-with-uid`
- Summary: Sends a health check request to the plugin datasource identified by the UID.
- HTTP: `GET /api/datasources/uid/{uid}/health`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources create-correlation`
- Summary: Add correlation.
- HTTP: `POST /api/datasources/uid/{sourceUID}/correlations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--source-uid` (path, required): sourceUID
### `grafana grafana_http_api datasources datasource-proxy-delete-by-ui-dcalls`
- Summary: Data source proxy DELETE calls.
- HTTP: `DELETE /api/datasources/proxy/uid/{uid}/{datasource_proxy_route}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
- `--datasource-proxy-route` (path, required): datasource_proxy_route
### `grafana grafana_http_api datasources datasource-proxy-get-by-ui-dcalls`
- Summary: Data source proxy GET calls.
- HTTP: `GET /api/datasources/proxy/uid/{uid}/{datasource_proxy_route}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--datasource-proxy-route` (path, required): datasource_proxy_route
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources datasource-proxy-post-by-ui-dcalls`
- Summary: Data source proxy POST calls.
- HTTP: `POST /api/datasources/proxy/uid/{uid}/{datasource_proxy_route}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--datasource-proxy-route` (path, required): datasource_proxy_route
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources delete-correlation`
- Summary: Delete a correlation.
- HTTP: `DELETE /api/datasources/uid/{uid}/correlations/{correlationUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
- `--correlation-uid` (path, required): correlationUID
### `grafana grafana_http_api datasources delete-data-source-by-name`
- Summary: Delete an existing data source by name. This function will be removed in the future.
- HTTP: `DELETE /api/datasources/name/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): name
### `grafana grafana_http_api datasources delete-data-source-by-uid`
- Summary: Delete an existing data source by UID.
- HTTP: `DELETE /api/datasources/uid/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources get-correlation`
- Summary: Gets a correlation.
- HTTP: `GET /api/datasources/uid/{sourceUID}/correlations/{correlationUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--source-uid` (path, required): sourceUID
- `--correlation-uid` (path, required): correlationUID
### `grafana grafana_http_api datasources get-correlations`
- Summary: Gets all correlations.
- HTTP: `GET /api/datasources/correlations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--limit` (query, default `100`, int64): Limit the maximum number of correlations to return per page
- `--page` (query, default `1`, int64): Page index for starting fetching correlations
- `--source-uid` (query): Source datasource UID filter to be applied to correlations
### `grafana grafana_http_api datasources get-correlations-by-source-uid`
- Summary: Gets all correlations originating from the given data source.
- HTTP: `GET /api/datasources/uid/{sourceUID}/correlations`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--source-uid` (path, required): sourceUID
### `grafana grafana_http_api datasources get-data-source-by-name`
- Summary: Get a single data source by Name. This function will be removed in the future.
- HTTP: `GET /api/datasources/name/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): name
### `grafana grafana_http_api datasources get-data-source-by-uid`
- Summary: Get a single data source by UID.
- HTTP: `GET /api/datasources/uid/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api datasources get-data-source-id-by-name`
- Summary: Get data source Id by Name. This function will be removed in the future.
- HTTP: `GET /api/datasources/id/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): name
### `grafana grafana_http_api datasources get-data-sources`
- Summary: Get all data sources.
- HTTP: `GET /api/datasources`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api datasources query-metrics-with-expressions`
- Summary: DataSource query metrics with expressions.
- HTTP: `POST /api/ds/query`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api datasources update-correlation`
- Summary: Updates a correlation.
- HTTP: `PATCH /api/datasources/uid/{sourceUID}/correlations/{correlationUID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--source-uid` (path, required): sourceUID
- `--correlation-uid` (path, required): correlationUID
### `grafana grafana_http_api datasources update-data-source-by-uid`
- Summary: Update an existing data source.
- HTTP: `PUT /api/datasources/uid/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--uid` (path, required): uid
## devices
### `grafana grafana_http_api devices list-devices`
- Summary: Lists all devices within the last 30 days
- HTTP: `GET /api/anonymous/devices`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api devices search-devices`
- Summary: Lists all devices within the last 30 days
- HTTP: `GET /api/anonymous/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## enterprise
- Description: These are only available in Grafana Enterprise
### `grafana grafana_http_api enterprise clean-data-source-cache`
- Summary: clean cache for a single data source
- HTTP: `POST /api/datasources/{dataSourceUID}/cache/clean`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--data-source-uid` (path, required): dataSourceUID
- Output: response media `application/json`
### `grafana grafana_http_api enterprise disable-data-source-cache`
- Summary: disable cache for a single data source
- HTTP: `POST /api/datasources/{dataSourceUID}/cache/disable`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--data-source-uid` (path, required): dataSourceUID
- `--data-source-type` (query): dataSourceType
- Output: response media `application/json`
### `grafana grafana_http_api enterprise enable-data-source-cache`
- Summary: enable cache for a single data source
- HTTP: `POST /api/datasources/{dataSourceUID}/cache/enable`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--data-source-uid` (path, required): dataSourceUID
- `--data-source-type` (query): dataSourceType
- Output: response media `application/json`
### `grafana grafana_http_api enterprise get-data-source-cache-config`
- Summary: get cache config for a single data source
- HTTP: `GET /api/datasources/{dataSourceUID}/cache`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--data-source-uid` (path, required): dataSourceUID
- `--data-source-type` (query): dataSourceType
- Output: response media `application/json`
### `grafana grafana_http_api enterprise get-team-lbac-rules-api`
- Summary: Retrieves LBAC rules for a team.
- HTTP: `GET /api/datasources/uid/{uid}/lbac/teams`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api enterprise set-data-source-cache-config`
- Summary: set cache config for a single data source
- HTTP: `POST /api/datasources/{dataSourceUID}/cache`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--data-source-uid` (path, required): dataSourceUID
- `--data-source-type` (query): dataSourceType
- Output: response media `application/json`
### `grafana grafana_http_api enterprise update-team-lbac-rules-api`
- Summary: Updates LBAC rules for a team.
- HTTP: `PUT /api/datasources/uid/{uid}/lbac/teams`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--uid` (path, required): uid
## folders
- Description: Folders are identified by the identifier (id) and the unique identifier (uid). The identifier (id) of a folder is an auto-incrementing numeric value and is only unique per Grafana install. The unique identifier (uid) of a folder can be used for uniquely identify folders between multiple Grafana installs. It’s automatically generated if not provided when creating a folder. The uid allows having consistent URLs for accessing folders and when syncing folders between multiple Grafana installs. This means that changing the title of a folder will not break any bookmarked links to that folder. The uid can have a maximum length of 40 characters.
### `grafana grafana_http_api folders create-folder`
- Summary: Create folder.
- HTTP: `POST /api/folders`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api folders delete-folder`
- Summary: Delete folder.
- HTTP: `DELETE /api/folders/{folder_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): folder_uid
- `--force-delete-rules` (query, default `false`): If `true` any Grafana 8 Alerts under this folder will be deleted.
### `grafana grafana_http_api folders get-folder-by-uid`
- Summary: Get folder by uid.
- HTTP: `GET /api/folders/{folder_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): folder_uid
### `grafana grafana_http_api folders get-folder-descendant-counts`
- Summary: Gets the count of each descendant of a folder by kind. The folder is identified by UID.
- HTTP: `GET /api/folders/{folder_uid}/counts`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): folder_uid
### `grafana grafana_http_api folders get-folder-permission-list`
- Summary: Gets all existing permissions for the folder with the given `uid`.
- HTTP: `GET /api/folders/{folder_uid}/permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): folder_uid
### `grafana grafana_http_api folders get-folders`
- Summary: Get all folders.
- HTTP: `GET /api/folders`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--limit` (query, default `1000`, int64): Limit the maximum number of folders to return
- `--page` (query, default `1`, int64): Page index for starting fetching folders
- `--parent-uid` (query): The parent folder UID
- `--permission` (query, default `View`, one of: Edit|View): Set to `Edit` to return folders that the user can edit
### `grafana grafana_http_api folders move-folder`
- Summary: Move folder.
- HTTP: `POST /api/folders/{folder_uid}/move`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--folder-uid` (path, required): folder_uid
### `grafana grafana_http_api folders update-folder`
- Summary: Update folder.
- HTTP: `PUT /api/folders/{folder_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--folder-uid` (path, required): folder_uid
### `grafana grafana_http_api folders update-folder-permissions`
- Summary: Updates permissions for a folder. This operation will remove existing permissions if they’re not included in the request.
- HTTP: `POST /api/folders/{folder_uid}/permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--folder-uid` (path, required): folder_uid
## health
### `grafana grafana_http_api health get-health`
- Summary: apiHealthHandler will return ok if Grafana's web server is running and it
- HTTP: `GET /api/health`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/json`
## library_elements
- Description: The identifier (ID) of a library element is an auto-incrementing numeric value that is unique per Grafana install. The unique identifier (UID) of a library element uniquely identifies library elements between multiple Grafana installs. It’s automatically generated unless you specify it during library element creation. The UID provides consistent URLs for accessing library elements and when syncing library elements between multiple Grafana installs. The maximum length of a UID is 40 characters.
### `grafana grafana_http_api library_elements create-library-element`
- Summary: Create library element.
- HTTP: `POST /api/library-elements`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api library_elements delete-library-element-by-uid`
- Summary: Delete library element.
- HTTP: `DELETE /api/library-elements/{library_element_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--library-element-uid` (path, required): library_element_uid
### `grafana grafana_http_api library_elements get-library-element-by-name`
- Summary: Get library element by name.
- HTTP: `GET /api/library-elements/name/{library_element_name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--library-element-name` (path, required): library_element_name
### `grafana grafana_http_api library_elements get-library-element-by-uid`
- Summary: Get library element by UID.
- HTTP: `GET /api/library-elements/{library_element_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--library-element-uid` (path, required): library_element_uid
### `grafana grafana_http_api library_elements get-library-element-connections`
- Summary: Get library element connections.
- HTTP: `GET /api/library-elements/{library_element_uid}/connections/`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--library-element-uid` (path, required): library_element_uid
### `grafana grafana_http_api library_elements get-library-elements`
- Summary: Get all library elements.
- HTTP: `GET /api/library-elements`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--search-string` (query): Part of the name or description searched for.
- `--kind` (query, int64, one of: 1): Kind of element to search for.
- `--sort-direction` (query, one of: alpha-asc|alpha-desc): Sort order of elements.
- `--type-filter` (query): A comma separated list of types to filter the elements by
- `--exclude-uid` (query): Element UID to exclude from search results.
- `--folder-filter` (query): A comma separated list of folder ID(s) to filter the elements by.
- `--folder-filter-ui-ds` (query): A comma separated list of folder UID(s) to filter the elements by.
- `--per-page` (query, default `100`, int64): The number of results per page.
- `--page` (query, default `1`, int64): The page for a set of records, given that only perPage records are returned at a time. Numbering starts at 1.
### `grafana grafana_http_api library_elements update-library-element`
- Summary: Update library element.
- HTTP: `PATCH /api/library-elements/{library_element_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--library-element-uid` (path, required): library_element_uid
## licensing
- Description: Licensing is only available in Grafana Enterprise. Read more about Grafana Enterprise. If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.
### `grafana grafana_http_api licensing delete-license-token`
- Summary: Remove license from database.
- HTTP: `DELETE /api/licensing/token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api licensing get-custom-permissions-csv`
- Summary: Get custom permissions report in CSV format.
- HTTP: `GET /api/licensing/custom-permissions-csv`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api licensing get-custom-permissions-report`
- Summary: Get custom permissions report.
- HTTP: `GET /api/licensing/custom-permissions`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api licensing get-license-token`
- Summary: Get license token.
- HTTP: `GET /api/licensing/token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api licensing get-status`
- Summary: Check license availability.
- HTTP: `GET /api/licensing/check`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api licensing post-license-token`
- Summary: Create license token.
- HTTP: `POST /api/licensing/token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api licensing post-renew-license-token`
- Summary: Manually force license refresh.
- HTTP: `POST /api/licensing/token/renew`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api licensing refresh-license-stats`
- Summary: Refresh license stats.
- HTTP: `GET /api/licensing/refresh-stats`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## migrations
### `grafana grafana_http_api migrations cancel-snapshot`
- Summary: Cancel a snapshot, wherever it is in its processing chain.
- HTTP: `POST /api/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/cancel`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): Session UID of a session
- `--snapshot-uid` (path, required): UID of a snapshot
### `grafana grafana_http_api migrations create-cloud-migration-token`
- Summary: Create gcom access token.
- HTTP: `POST /api/cloudmigration/token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api migrations create-session`
- Summary: Create a migration session.
- HTTP: `POST /api/cloudmigration/migration`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api migrations create-snapshot`
- Summary: Trigger the creation of an instance snapshot associated with the provided session.
- HTTP: `POST /api/cloudmigration/migration/{uid}/snapshot`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--uid` (path, required): UID of a session
### `grafana grafana_http_api migrations delete-cloud-migration-token`
- Summary: Deletes a cloud migration token.
- HTTP: `DELETE /api/cloudmigration/token/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): UID of a cloud migration token
### `grafana grafana_http_api migrations delete-session`
- Summary: Delete a migration session by its uid.
- HTTP: `DELETE /api/cloudmigration/migration/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): UID of a migration session
### `grafana grafana_http_api migrations get-cloud-migration-token`
- Summary: Fetch the cloud migration token if it exists.
- HTTP: `GET /api/cloudmigration/token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api migrations get-resource-dependencies`
- Summary: Get the resource dependencies graph for the current set of migratable resources.
- HTTP: `GET /api/cloudmigration/resources/dependencies`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api migrations get-session`
- Summary: Get a cloud migration session by its uid.
- HTTP: `GET /api/cloudmigration/migration/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): UID of a migration session
### `grafana grafana_http_api migrations get-session-list`
- Summary: Get a list of all cloud migration sessions that have been created.
- HTTP: `GET /api/cloudmigration/migration`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api migrations get-shapshot-list`
- Summary: Get a list of snapshots for a session.
- HTTP: `GET /api/cloudmigration/migration/{uid}/snapshots`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--page` (query, default `1`, int64): Page is used for pagination with limit
- `--limit` (query, default `100`, int64): Max limit for results returned.
- `--uid` (path, required): Session UID of a session
- `--sort` (query): Sort with value latest to return results sorted in descending order.
### `grafana grafana_http_api migrations get-snapshot`
- Summary: Get metadata about a snapshot, including where it is in its processing and final results.
- HTTP: `GET /api/cloudmigration/migration/{uid}/snapshot/{snapshotUid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--result-page` (query, default `1`, int64): ResultPage is used for pagination with ResultLimit
- `--result-limit` (query, default `100`, int64): Max limit for snapshot results returned.
- `--result-sort-column` (query, default `default`): ResultSortColumn can be used to override the default system sort. Valid values are "name", "resource_type", and "status".
- `--result-sort-order` (query, default `ASC`): ResultSortOrder is used with ResultSortColumn. Valid values are ASC and DESC.
- `--errors-only` (query, default `false`): ErrorsOnly is used to only return resources with error statuses
- `--uid` (path, required): Session UID of a session
- `--snapshot-uid` (path, required): UID of a snapshot
### `grafana grafana_http_api migrations upload-snapshot`
- Summary: Upload a snapshot to the Grafana Migration Service for processing.
- HTTP: `POST /api/cloudmigration/migration/{uid}/snapshot/{snapshotUid}/upload`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): Session UID of a session
- `--snapshot-uid` (path, required): UID of a snapshot
## org
- Description: If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.
### `grafana grafana_http_api org add-org-invite`
- Summary: Add invite.
- HTTP: `POST /api/org/invites`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org add-org-user-to-current-org`
- Summary: Add a new user to the current organization.
- HTTP: `POST /api/org/users`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org get-current-org`
- Summary: Get current Organization.
- HTTP: `GET /api/org`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api org get-org-preferences`
- Summary: Get Current Org Prefs.
- HTTP: `GET /api/org/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api org get-org-users-for-current-org`
- Summary: Get all users within the current organization.
- HTTP: `GET /api/org/users`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query` (query): query
- `--limit` (query, int64): limit
### `grafana grafana_http_api org get-org-users-for-current-org-lookup`
- Summary: Get all users within the current organization (lookup)
- HTTP: `GET /api/org/users/lookup`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query` (query): query
- `--limit` (query, int64): limit
### `grafana grafana_http_api org get-pending-org-invites`
- Summary: Get pending invites.
- HTTP: `GET /api/org/invites`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api org patch-org-preferences`
- Summary: Patch Current Org Prefs.
- HTTP: `PATCH /api/org/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org remove-org-user-for-current-org`
- Summary: Delete user in current organization.
- HTTP: `DELETE /api/org/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api org revoke-invite`
- Summary: Revoke invite.
- HTTP: `DELETE /api/org/invites/{invitation_code}/revoke`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--invitation-code` (path, required): invitation_code
### `grafana grafana_http_api org update-current-org`
- Summary: Update current Organization.
- HTTP: `PUT /api/org`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org update-current-org-address`
- Summary: Update current Organization's address.
- HTTP: `PUT /api/org/address`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org update-org-preferences`
- Summary: Update Current Org Prefs.
- HTTP: `PUT /api/org/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api org update-org-user-for-current-org`
- Summary: Updates the given user.
- HTTP: `PATCH /api/org/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): user_id
## orgs
- Description: The Admin Organizations HTTP API does not currently work with an API Token. API Tokens are currently only linked to an organization and an organization role. They cannot be given the permission of server admin, only users can be given that permission. So in order to use these API calls you will have to use Basic Auth and the Grafana user must have the Grafana Admin permission (The default admin user is called `admin` and has permission to use this API).
### `grafana grafana_http_api orgs add-org-user`
- Summary: Add a new user to the current organization.
- HTTP: `POST /api/orgs/{org_id}/users`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs create-org`
- Summary: Create Organization.
- HTTP: `POST /api/orgs`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api orgs delete-org-by-id`
- Summary: Delete Organization.
- HTTP: `DELETE /api/orgs/{org_id}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs get-org-by-id`
- Summary: Get Organization by ID.
- HTTP: `GET /api/orgs/{org_id}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs get-org-by-name`
- Summary: Get Organization by Name.
- HTTP: `GET /api/orgs/name/{org_name}`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--org-name` (path, required): org_name
### `grafana grafana_http_api orgs get-org-users`
- Summary: Get Users in Organization.
- HTTP: `GET /api/orgs/{org_id}/users`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs remove-org-user`
- Summary: Delete user in current organization.
- HTTP: `DELETE /api/orgs/{org_id}/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api orgs search-org-users`
- Summary: Search Users in Organization.
- HTTP: `GET /api/orgs/{org_id}/users/search`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs search-orgs`
- Summary: Search all Organizations.
- HTTP: `GET /api/orgs`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--page` (query, default `1`, int64): page
- `--perpage` (query, default `1000`, int64): Number of items per page
- `--name` (query): name
- `--query` (query): If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.
### `grafana grafana_http_api orgs update-org`
- Summary: Update Organization.
- HTTP: `PUT /api/orgs/{org_id}`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs update-org-address`
- Summary: Update Organization's address.
- HTTP: `PUT /api/orgs/{org_id}/address`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api orgs update-org-user`
- Summary: Update Users in Organization.
- HTTP: `PATCH /api/orgs/{org_id}/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--org-id` (path, required, int64): org_id
- `--user-id` (path, required, int64): user_id
## playlists
### `grafana grafana_http_api playlists create-playlist`
- Summary: Create playlist.
- HTTP: `POST /api/playlists`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api playlists delete-playlist`
- Summary: Delete playlist.
- HTTP: `DELETE /api/playlists/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api playlists get-playlist`
- Summary: Get playlist.
- HTTP: `GET /api/playlists/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api playlists get-playlist-items`
- Summary: Get playlist items.
- HTTP: `GET /api/playlists/{uid}/items`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api playlists search-playlists`
- Summary: Get playlists.
- HTTP: `GET /api/playlists`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query` (query): query
- `--limit` (query, int64): in:limit
### `grafana grafana_http_api playlists update-playlist`
- Summary: Update playlist.
- HTTP: `PUT /api/playlists/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--uid` (path, required): uid
## provisioning
### `grafana grafana_http_api provisioning route-delete-alert-rule`
- Summary: Delete a specific alert rule by UID.
- HTTP: `DELETE /api/v1/provisioning/alert-rules/{UID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): Alert rule UID
- `--x-disable-provenance` (header): X-Disable-Provenance
### `grafana grafana_http_api provisioning route-delete-alert-rule-group`
- Summary: Delete rule group
- HTTP: `DELETE /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): FolderUID
- `--group` (path, required): Group
### `grafana grafana_http_api provisioning route-delete-contactpoints`
- Summary: Delete a contact point.
- HTTP: `DELETE /api/v1/provisioning/contact-points/{UID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): UID is the contact point unique identifier
### `grafana grafana_http_api provisioning route-delete-mute-timing`
- Summary: Delete a mute timing.
- HTTP: `DELETE /api/v1/provisioning/mute-timings/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): Mute timing name
- `--version` (query): Version of mute timing to use for optimistic concurrency. Leave empty to disable validation
- `--x-disable-provenance` (header): X-Disable-Provenance
### `grafana grafana_http_api provisioning route-delete-template`
- Summary: Delete a notification template group.
- HTTP: `DELETE /api/v1/provisioning/templates/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): Template group name
- `--version` (query): Version of template to use for optimistic concurrency. Leave empty to disable validation
### `grafana grafana_http_api provisioning route-export-mute-timing`
- Summary: Export a mute timing in provisioning format.
- HTTP: `GET /api/v1/provisioning/mute-timings/{name}/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- `--name` (path, required): Mute timing name
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-export-mute-timings`
- Summary: Export all mute timings in provisioning format.
- HTTP: `GET /api/v1/provisioning/mute-timings/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rule`
- Summary: Get a specific alert rule by UID.
- HTTP: `GET /api/v1/provisioning/alert-rules/{UID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): Alert rule UID
- Output: list path `data`; columns `datasourceUid`, `queryType`, `refId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rule-export`
- Summary: Export an alert rule in provisioning file format.
- HTTP: `GET /api/v1/provisioning/alert-rules/{UID}/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- `--uid` (path, required): Alert rule UID
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rule-group`
- Summary: Get a rule group.
- HTTP: `GET /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--folder-uid` (path, required): FolderUID
- `--group` (path, required): Group
- Output: list path `rules`; columns `id`, `uid`, `condition`, `execErrState`, `folderUID`, `for`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rule-group-export`
- Summary: Export an alert rule group in provisioning file format.
- HTTP: `GET /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- `--folder-uid` (path, required): FolderUID
- `--group` (path, required): Group
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rules`
- Summary: Get all the alert rules.
- HTTP: `GET /api/v1/provisioning/alert-rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: columns `id`, `uid`, `condition`, `execErrState`, `folderUID`, `for`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-alert-rules-export`
- Summary: Export all alert rules in provisioning file format.
- HTTP: `GET /api/v1/provisioning/alert-rules/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- `--folder-uid` (query): UIDs of folders from which to export rules
- `--group` (query): Name of group of rules to export. Must be specified only together with a single folder UID
- `--rule-uid` (query): UID of alert rule to export. If specified, parameters folderUid and group must be empty.
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-contactpoints`
- Summary: Get all the contact points.
- HTTP: `GET /api/v1/provisioning/contact-points`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (query): Filter by name
- Output: columns `name`, `type`, `uid`, `disableResolveMessage`, `provenance`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-contactpoints-export`
- Summary: Export all contact points in provisioning file format.
- HTTP: `GET /api/v1/provisioning/contact-points/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--download` (query, default `false`): Whether to initiate a download of the file or not.
- `--format` (query, default `yaml`, one of: yaml|json|hcl): Format of the downloaded file. Supported yaml, json or hcl. Accept header can also be used, but the query parameter will take precedence.
- `--decrypt` (query, default `false`): Whether any contained secure settings should be decrypted or left redacted. Redacted settings will contain RedactedValue instead. Currently, only org admin can view decrypted secure settings.
- `--name` (query): Filter by name
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-mute-timing`
- Summary: Get a mute timing.
- HTTP: `GET /api/v1/provisioning/mute-timings/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): Mute timing name
- Output: list path `time_intervals`; columns `name`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-mute-timings`
- Summary: Get all the mute timings.
- HTTP: `GET /api/v1/provisioning/mute-timings`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: columns `name`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-policy-tree`
- Summary: Get the notification policy tree.
- HTTP: `GET /api/v1/provisioning/policies`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: list path `active_time_intervals`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-policy-tree-export`
- Summary: Export the notification policy tree in provisioning file format.
- HTTP: `GET /api/v1/provisioning/policies/export`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: list path `contactPoints`; columns `name`, `orgId`; response media `application/json`
### `grafana grafana_http_api provisioning route-get-template`
- Summary: Get a notification template group.
- HTTP: `GET /api/v1/provisioning/templates/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--name` (path, required): Template group name
- Output: response media `application/json`
### `grafana grafana_http_api provisioning route-get-templates`
- Summary: Get all notification template groups.
- HTTP: `GET /api/v1/provisioning/templates`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: columns `name`, `provenance`, `template`, `version`; response media `application/json`
### `grafana grafana_http_api provisioning route-post-alert-rule`
- Summary: Create a new alert rule.
- HTTP: `POST /api/v1/provisioning/alert-rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: list path `data`; columns `datasourceUid`, `queryType`, `refId`; response media `application/json`
### `grafana grafana_http_api provisioning route-post-contactpoints`
- Summary: Create a contact point.
- HTTP: `POST /api/v1/provisioning/contact-points`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: response media `application/json`
### `grafana grafana_http_api provisioning route-post-mute-timing`
- Summary: Create a new mute timing.
- HTTP: `POST /api/v1/provisioning/mute-timings`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: list path `time_intervals`; columns `name`; response media `application/json`
### `grafana grafana_http_api provisioning route-put-alert-rule`
- Summary: Update an existing alert rule.
- HTTP: `PUT /api/v1/provisioning/alert-rules/{UID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--uid` (path, required): Alert rule UID
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: list path `data`; columns `datasourceUid`, `queryType`, `refId`; response media `application/json`
### `grafana grafana_http_api provisioning route-put-alert-rule-group`
- Summary: Create or update alert rule group.
- HTTP: `PUT /api/v1/provisioning/folder/{FolderUID}/rule-groups/{Group}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--x-disable-provenance` (header): X-Disable-Provenance
- `--folder-uid` (path, required): FolderUID
- `--group` (path, required): Group
- Output: list path `rules`; columns `id`, `uid`, `condition`, `execErrState`, `folderUID`, `for`; response media `application/json`
### `grafana grafana_http_api provisioning route-put-contactpoint`
- Summary: Update an existing contact point.
- HTTP: `PUT /api/v1/provisioning/contact-points/{UID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--uid` (path, required): UID is the contact point unique identifier
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: response media `application/json`
### `grafana grafana_http_api provisioning route-put-mute-timing`
- Summary: Replace an existing mute timing.
- HTTP: `PUT /api/v1/provisioning/mute-timings/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--name` (path, required): Mute timing name
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: list path `time_intervals`; columns `name`; response media `application/json`
### `grafana grafana_http_api provisioning route-put-policy-tree`
- Summary: Sets the notification policy tree.
- HTTP: `PUT /api/v1/provisioning/policies`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: response media `application/json`
### `grafana grafana_http_api provisioning route-put-template`
- Summary: Updates an existing notification template group.
- HTTP: `PUT /api/v1/provisioning/templates/{name}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--name` (path, required): Template group name
- `--x-disable-provenance` (header): X-Disable-Provenance
- Output: response media `application/json`
### `grafana grafana_http_api provisioning route-reset-policy-tree`
- Summary: Clears the notification policy tree.
- HTTP: `DELETE /api/v1/provisioning/policies`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
- Output: response media `application/json`
## query_history
- Description: The identifier (ID) of a query in query history is an auto-incrementing numeric value that is unique per Grafana install. The unique identifier (UID) of a query history uniquely identifies queries in query history between multiple Grafana installs. It’s automatically generated. The UID provides consistent URLs for accessing queries in query history.
### `grafana grafana_http_api query_history create-query`
- Summary: Add query to query history.
- HTTP: `POST /api/query-history`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api query_history delete-query`
- Summary: Delete query in query history.
- HTTP: `DELETE /api/query-history/{query_history_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query-history-uid` (path, required): query_history_uid
### `grafana grafana_http_api query_history patch-query-comment`
- Summary: Update comment for query in query history.
- HTTP: `PATCH /api/query-history/{query_history_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--query-history-uid` (path, required): query_history_uid
### `grafana grafana_http_api query_history search-queries`
- Summary: Query history search.
- HTTP: `GET /api/query-history`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--datasource-uid` (query): List of data source UIDs to search for
- `--search-string` (query): Text inside query or comments that is searched for
- `--only-starred` (query): Flag indicating if only starred queries should be returned
- `--sort` (query, default `time-desc`, one of: time-desc|time-asc): Sort method
- `--page` (query, int64): Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size.
- `--limit` (query, int64): Limit the number of returned results
- `--from` (query, int64): From range for the query history search
- `--to` (query, int64): To range for the query history search
### `grafana grafana_http_api query_history star-query`
- Summary: Add star to query in query history.
- HTTP: `POST /api/query-history/star/{query_history_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query-history-uid` (path, required): query_history_uid
### `grafana grafana_http_api query_history unstar-query`
- Summary: Remove star to query in query history.
- HTTP: `DELETE /api/query-history/star/{query_history_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query-history-uid` (path, required): query_history_uid
## quota
### `grafana grafana_http_api quota get-current-org-quota`
- Summary: Fetch Organization quota.
- HTTP: `GET /api/org/quotas`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api quota get-org-quota`
- Summary: Fetch Organization quota.
- HTTP: `GET /api/orgs/{org_id}/quotas`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api quota get-user-quota`
- Summary: Fetch user quota.
- HTTP: `GET /api/admin/users/{user_id}/quotas`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api quota get-user-quotas`
- Summary: Fetch user quota.
- HTTP: `GET /api/user/quotas`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api quota update-org-quota`
- Summary: Update user quota.
- HTTP: `PUT /api/orgs/{org_id}/quotas/{quota_target}`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags:
- `--quota-target` (path, required): quota_target
- `--org-id` (path, required, int64): org_id
### `grafana grafana_http_api quota update-user-quota`
- Summary: Update user quota.
- HTTP: `PUT /api/admin/users/{user_id}/quotas/{quota_target}`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags:
- `--quota-target` (path, required): quota_target
- `--user-id` (path, required, int64): user_id
## recording_rules
### `grafana grafana_http_api recording_rules create-recording-rule`
- Summary: Create a recording rule that is then registered and started.
- HTTP: `POST /api/recording-rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api recording_rules create-recording-rule-write-target`
- Summary: Create a remote write target.
- HTTP: `POST /api/recording-rules/writer`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api recording_rules delete-recording-rule`
- Summary: Delete removes the rule from the registry and stops it.
- HTTP: `DELETE /api/recording-rules/{recordingRuleID}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--recording-rule-id` (path, required, int64): recordingRuleID
### `grafana grafana_http_api recording_rules delete-recording-rule-write-target`
- Summary: Delete the remote write target.
- HTTP: `DELETE /api/recording-rules/writer`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api recording_rules get-recording-rule-write-target`
- Summary: Return the prometheus remote write target.
- HTTP: `GET /api/recording-rules/writer`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api recording_rules list-recording-rules`
- Summary: Lists all rules in the database: active or deleted.
- HTTP: `GET /api/recording-rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api recording_rules test-create-recording-rule`
- Summary: Test a recording rule.
- HTTP: `POST /api/recording-rules/test`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api recording_rules update-recording-rule`
- Summary: Update the active status of a rule.
- HTTP: `PUT /api/recording-rules`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
## reports
- Description: This API allows you to interact programmatically with the Reporting feature. Reporting is only available in Grafana Enterprise. Read more about Grafana Enterprise. If you have Fine-grained access Control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required.
### `grafana grafana_http_api reports create-report`
- Summary: Create a report.
- HTTP: `POST /api/reports`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api reports delete-report`
- Summary: Delete a report.
- HTTP: `DELETE /api/reports/{id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--id` (path, required, int64): id
### `grafana grafana_http_api reports get-report`
- Summary: Get a report.
- HTTP: `GET /api/reports/{id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--id` (path, required, int64): id
### `grafana grafana_http_api reports get-report-settings`
- Summary: Get report settings.
- HTTP: `GET /api/reports/settings`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api reports get-reports`
- Summary: List reports.
- HTTP: `GET /api/reports`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api reports get-reports-by-dashboard-uid`
- Summary: List reports by dashboard uid.
- HTTP: `GET /api/reports/dashboards/{uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--uid` (path, required): uid
### `grafana grafana_http_api reports get-settings-image`
- Summary: Get custom branding report image.
- HTTP: `GET /api/reports/images/:image`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api reports render-report-cs-vs`
- Summary: Download a CSV report.
- HTTP: `GET /api/reports/render/csvs`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboards` (query): dashboards
- `--title` (query): title
### `grafana grafana_http_api reports render-report-pd-fs`
- Summary: Render report for multiple dashboards.
- HTTP: `GET /api/reports/render/pdfs`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboards` (query): dashboards
- `--orientation` (query): orientation
- `--layout` (query): layout
- `--title` (query): title
- `--scale-factor` (query): scaleFactor
- `--include-tables` (query): includeTables
### `grafana grafana_http_api reports save-report-settings`
- Summary: Save settings.
- HTTP: `POST /api/reports/settings`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api reports send-report`
- Summary: Send a report.
- HTTP: `POST /api/reports/email`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api reports send-test-email`
- Summary: Send test report via email.
- HTTP: `POST /api/reports/test-email`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api reports update-report`
- Summary: Update a report.
- HTTP: `PUT /api/reports/{id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--id` (path, required, int64): id
## saml
### `grafana grafana_http_api saml get-metadata`
- Summary: It exposes the SP (Grafana's) metadata for the IdP's consumption.
- HTTP: `GET /api/saml/metadata`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api saml get-saml-logout`
- Summary: GetLogout initiates single logout process.
- HTTP: `GET /api/logout/saml`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api saml get-slo`
- Summary: It performs Single Logout (SLO) callback.
- HTTP: `GET /api/saml/slo`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api saml post-acs`
- Summary: It performs Assertion Consumer Service (ACS).
- HTTP: `POST /api/saml/acs`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--relay-state` (query): RelayState
### `grafana grafana_http_api saml post-slo`
- Summary: It performs Single Logout (SLO) callback.
- HTTP: `POST /api/saml/slo`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--saml-request` (query): SAMLRequest
- `--saml-response` (query): SAMLResponse
## search
### `grafana grafana_http_api search list-sort-options`
- Summary: List search sorting options.
- HTTP: `GET /api/search/sorting`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api search search`
- Summary: search
- HTTP: `GET /api/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--query` (query): Search Query
- `--tag` (query): List of tags to search for
- `--type` (query, one of: dash-folder|dash-db): Type to search for, dash-folder or dash-db
- `--dashboard-ids` (query): List of dashboard id’s to search for
- `--dashboard-ui-ds` (query): List of dashboard uid’s to search for
- `--folder-ids` (query): List of folder id’s to search in for dashboards
- `--folder-ui-ds` (query): List of folder UID’s to search in for dashboards
- `--starred` (query): Flag indicating if only starred Dashboards should be returned
- `--limit` (query, int64): Limit the number of returned results (max 5000)
- `--page` (query, int64): Use this parameter to access hits beyond limit. Numbering starts at 1. limit param acts as page size. Only available in Grafana v6.2+.
- `--permission` (query, default `View`, one of: Edit|View): Set to `Edit` to return dashboards/folders that the user can edit
- `--sort` (query, default `alpha-asc`, one of: alpha-asc|alpha-desc): Sort method; for listing all the possible sort methods use the search sorting endpoint.
- `--deleted` (query): Flag indicating if only soft deleted Dashboards should be returned
## service_accounts
- Description: If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](https://grafana.com/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
### `grafana grafana_http_api service_accounts create-service-account`
- Summary: Create service account
- HTTP: `POST /api/serviceaccounts`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags: none
### `grafana grafana_http_api service_accounts create-token`
- Summary: CreateNewToken adds a token to a service account
- HTTP: `POST /api/serviceaccounts/{serviceAccountId}/tokens`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--service-account-id` (path, required, int64): serviceAccountId
### `grafana grafana_http_api service_accounts delete-service-account`
- Summary: Delete service account
- HTTP: `DELETE /api/serviceaccounts/{serviceAccountId}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--service-account-id` (path, required, int64): serviceAccountId
### `grafana grafana_http_api service_accounts delete-token`
- Summary: DeleteToken deletes service account tokens
- HTTP: `DELETE /api/serviceaccounts/{serviceAccountId}/tokens/{tokenId}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--token-id` (path, required, int64): tokenId
- `--service-account-id` (path, required, int64): serviceAccountId
### `grafana grafana_http_api service_accounts list-tokens`
- Summary: Get service account tokens
- HTTP: `GET /api/serviceaccounts/{serviceAccountId}/tokens`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--service-account-id` (path, required, int64): serviceAccountId
### `grafana grafana_http_api service_accounts retrieve-service-account`
- Summary: Get single serviceaccount by Id
- HTTP: `GET /api/serviceaccounts/{serviceAccountId}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--service-account-id` (path, required, int64): serviceAccountId
### `grafana grafana_http_api service_accounts search-org-service-accounts-with-paging`
- Summary: Search service accounts with paging
- HTTP: `GET /api/serviceaccounts/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--disabled` (query): Disabled
- `--expired-tokens` (query): expiredTokens
- `--query` (query): It will return results where the query value is contained in one of the name.
- `--perpage` (query, int64): The default value is 1000.
- `--page` (query, int64): The default value is 1.
### `grafana grafana_http_api service_accounts update-service-account`
- Summary: Update service account
- HTTP: `PATCH /api/serviceaccounts/{serviceAccountId}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: optional; media type `application/json`
- Flags:
- `--service-account-id` (path, required, int64): serviceAccountId
## signed_in_user
### `grafana grafana_http_api signed_in_user change-user-password`
- Summary: Change Password.
- HTTP: `PUT /api/user/password`
- Auth: required; accepts: `basic (http basic)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api signed_in_user get-signed-in-user`
- Summary: Get (current authenticated user)
- HTTP: `GET /api/user`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api signed_in_user get-signed-in-user-org-list`
- Summary: Organizations of the actual User.
- HTTP: `GET /api/user/orgs`
- Auth: required; accepts: `basic (http basic)`
- Body: none
- Flags: none
### `grafana grafana_http_api signed_in_user get-signed-in-user-team-list`
- Summary: Teams that the actual User is member of.
- HTTP: `GET /api/user/teams`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api signed_in_user get-user-auth-tokens`
- Summary: Auth tokens of the actual User.
- HTTP: `GET /api/user/auth-tokens`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api signed_in_user get-user-preferences`
- Summary: Get user preferences.
- HTTP: `GET /api/user/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api signed_in_user patch-user-preferences`
- Summary: Patch user preferences.
- HTTP: `PATCH /api/user/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api signed_in_user revoke-user-auth-token`
- Summary: Revoke an auth token of the actual User.
- HTTP: `POST /api/user/revoke-auth-token`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api signed_in_user star-dashboard-by-uid`
- Summary: Star a dashboard.
- HTTP: `POST /api/user/stars/dashboard/uid/{dashboard_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboard-uid` (path, required): dashboard_uid
### `grafana grafana_http_api signed_in_user unstar-dashboard-by-uid`
- Summary: Unstar a dashboard.
- HTTP: `DELETE /api/user/stars/dashboard/uid/{dashboard_uid}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--dashboard-uid` (path, required): dashboard_uid
### `grafana grafana_http_api signed_in_user update-signed-in-user`
- Summary: Update signed in User.
- HTTP: `PUT /api/user`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api signed_in_user update-user-preferences`
- Summary: Update user preferences.
- HTTP: `PUT /api/user/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api signed_in_user user-set-using-org`
- Summary: Switch user context for signed in user.
- HTTP: `POST /api/user/using/{org_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--org-id` (path, required, int64): org_id
## signing_keys
### `grafana grafana_http_api signing_keys retrieve-jwks`
- Summary: Get JSON Web Key Set (JWKS) with all the keys that can be used to verify tokens (public keys)
- HTTP: `GET /api/signing-keys/keys`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## snapshots
### `grafana grafana_http_api snapshots get-sharing-options`
- Summary: Get snapshot sharing settings.
- HTTP: `GET /api/snapshot/shared-options`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## sso_settings
### `grafana grafana_http_api sso_settings get-provider-settings`
- Summary: Get an SSO Settings entry by Key
- HTTP: `GET /api/v1/sso-settings/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--key` (path, required): key
### `grafana grafana_http_api sso_settings list-all-providers-settings`
- Summary: List all SSO Settings entries
- HTTP: `GET /api/v1/sso-settings`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api sso_settings patch-provider-settings`
- Summary: Patch SSO Settings
- HTTP: `PATCH /api/v1/sso-settings/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--key` (path, required): key
### `grafana grafana_http_api sso_settings remove-provider-settings`
- Summary: Remove SSO Settings
- HTTP: `DELETE /api/v1/sso-settings/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--key` (path, required): key
### `grafana grafana_http_api sso_settings update-provider-settings`
- Summary: Update SSO Settings
- HTTP: `PUT /api/v1/sso-settings/{key}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--key` (path, required): key
## sync_team_groups
### `grafana grafana_http_api sync_team_groups add-team-group-api`
- Summary: Add External Group.
- HTTP: `POST /api/teams/{teamId}/groups`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): teamId
### `grafana grafana_http_api sync_team_groups get-team-groups-api`
- Summary: Get External Groups.
- HTTP: `GET /api/teams/{teamId}/groups`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): teamId
### `grafana grafana_http_api sync_team_groups remove-team-group-api-query`
- Summary: Remove External Group.
- HTTP: `DELETE /api/teams/{teamId}/groups`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--group-id` (query): groupId
- `--team-id` (path, required): teamId
### `grafana grafana_http_api sync_team_groups search-team-groups`
- Summary: Search for team groups with optional filtering and pagination.
- HTTP: `GET /api/teams/{teamId}/groups/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required, int64): teamId
- `--page` (query, default `1`, int64): page
- `--perpage` (query, default `1000`, int64): Number of items per page
- `--query` (query): If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.
- `--name` (query): Filter by exact name match
## teams
- Description: This API can be used to create/update/delete Teams and to add/remove users to Teams. All actions require that the user has the Admin role for the organization.
### `grafana grafana_http_api teams add-team-member`
- Summary: Add Team Member.
- HTTP: `POST /api/teams/{team_id}/members`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams create-team`
- Summary: Add Team.
- HTTP: `POST /api/teams`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags: none
### `grafana grafana_http_api teams delete-team-by-id`
- Summary: Delete Team By ID.
- HTTP: `DELETE /api/teams/{team_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams get-team-by-id`
- Summary: Get Team By ID.
- HTTP: `GET /api/teams/{team_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): team_id
- `--accesscontrol` (query, default `false`): accesscontrol
### `grafana grafana_http_api teams get-team-members`
- Summary: Get Team Members.
- HTTP: `GET /api/teams/{team_id}/members`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams get-team-preferences`
- Summary: Get Team Preferences.
- HTTP: `GET /api/teams/{team_id}/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams remove-team-member`
- Summary: Remove Member From Team.
- HTTP: `DELETE /api/teams/{team_id}/members/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--team-id` (path, required): team_id
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api teams search-teams`
- Summary: Team Search With Paging.
- HTTP: `GET /api/teams/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--page` (query, default `1`, int64): page
- `--perpage` (query, default `1000`, int64): Number of items per page
- `--name` (query): name
- `--query` (query): If set it will return results where the query value is contained in the name field. Query values with spaces need to be URL encoded.
- `--accesscontrol` (query, default `false`): accesscontrol
- `--sort` (query): sort
### `grafana grafana_http_api teams set-team-memberships`
- Summary: Set team memberships.
- HTTP: `PUT /api/teams/{team_id}/members`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams update-team`
- Summary: Update Team.
- HTTP: `PUT /api/teams/{team_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): team_id
### `grafana grafana_http_api teams update-team-member`
- Summary: Update Team Member.
- HTTP: `PUT /api/teams/{team_id}/members/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): team_id
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api teams update-team-preferences`
- Summary: Update Team Preferences.
- HTTP: `PUT /api/teams/{team_id}/preferences`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--team-id` (path, required): team_id
## user
### `grafana grafana_http_api user update-user-email`
- Summary: Update user email.
- HTTP: `GET /api/user/email/update`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
## users
### `grafana grafana_http_api users get-user-by-id`
- Summary: Get user by id.
- HTTP: `GET /api/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api users get-user-by-login-or-email`
- Summary: Get user by login or email.
- HTTP: `GET /api/users/lookup`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--login-or-email` (query, required): loginOrEmail of the user
### `grafana grafana_http_api users get-user-org-list`
- Summary: Get organizations for user.
- HTTP: `GET /api/users/{user_id}/orgs`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api users get-user-teams`
- Summary: Get teams for user.
- HTTP: `GET /api/users/{user_id}/teams`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--user-id` (path, required, int64): user_id
### `grafana grafana_http_api users search-users`
- Summary: Get users.
- HTTP: `GET /api/users`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags:
- `--perpage` (query, default `1000`, int64): Limit the maximum number of users to return per page
- `--page` (query, default `1`, int64): Page index for starting fetching users
### `grafana grafana_http_api users search-users-with-paging`
- Summary: Get users with paging.
- HTTP: `GET /api/users/search`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: none
- Flags: none
### `grafana grafana_http_api users update-user`
- Summary: Update user.
- HTTP: `PUT /api/users/{user_id}`
- Auth: required; accepts: `basic (http basic)` | `api_key (apiKey header Authorization)`
- Body: required; media type `application/json`
- Flags:
- `--user-id` (path, required, int64): user_id