* manually replce all shared relrefs
* relref replace - previous grafana versions
* update test
* prettier
(cherry picked from commit 3f07134896)
Signed-off-by: Jack Baldry <jack.baldry@grafana.com>
Co-authored-by: Robby Milo <robbymilo@fastmail.com>
This commit is contained in:
co-authored by
Robby Milo
parent
0e1acbaf3e
commit
bb19e14a97
@@ -49,43 +49,43 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
## HTTP APIs
|
||||
|
||||
- [Admin API]({{< relref "admin/" >}})
|
||||
- [Admin API](admin/)
|
||||
- [Alerting API (unstable)](https://editor.swagger.io/?url=https://raw.githubusercontent.com/grafana/grafana/main/pkg/services/ngalert/api/tooling/post.json)
|
||||
- [Alerting provisioning API]({{< relref "alerting_provisioning/" >}})
|
||||
- [Annotations API]({{< relref "annotations/" >}})
|
||||
- [Correlations API]({{< relref "correlations/" >}})
|
||||
- [Dashboard API]({{< relref "dashboard/" >}})
|
||||
- [Dashboard permissions API]({{< relref "dashboard_permissions/" >}})
|
||||
- [Dashboard versions API]({{< relref "dashboard_versions/" >}})
|
||||
- [Data source API]({{< relref "data_source/" >}})
|
||||
- [Folder API]({{< relref "folder/" >}})
|
||||
- [Folder permissions API]({{< relref "folder_permissions/" >}})
|
||||
- [Folder/Dashboard search API]({{< relref "folder_dashboard_search/" >}})
|
||||
- [Library element API]({{< relref "library_element/" >}})
|
||||
- [Organization API]({{< relref "org/" >}})
|
||||
- [Other API]({{< relref "other/" >}})
|
||||
- [Playlists API]({{< relref "playlist/" >}})
|
||||
- [Preferences API]({{< relref "preferences/" >}})
|
||||
- [Public dashboard API]({{< relref "dashboard_public/" >}})
|
||||
- [Query history API]({{< relref "query_history/" >}})
|
||||
- [Service account API]({{< relref "serviceaccount/" >}})
|
||||
- [Short URL API]({{< relref "short_url/" >}})
|
||||
- [Snapshot API]({{< relref "snapshot/" >}})
|
||||
- [SSO settings API]({{< relref "sso-settings/" >}})
|
||||
- [Team API]({{< relref "team/" >}})
|
||||
- [User API]({{< relref "user/" >}})
|
||||
- [Alerting provisioning API](alerting_provisioning/)
|
||||
- [Annotations API](annotations/)
|
||||
- [Correlations API](correlations/)
|
||||
- [Dashboard API](dashboard/)
|
||||
- [Dashboard permissions API](dashboard_permissions/)
|
||||
- [Dashboard versions API](dashboard_versions/)
|
||||
- [Data source API](data_source/)
|
||||
- [Folder API](folder/)
|
||||
- [Folder permissions API](folder_permissions/)
|
||||
- [Folder/Dashboard search API](folder_dashboard_search/)
|
||||
- [Library element API](library_element/)
|
||||
- [Organization API](org/)
|
||||
- [Other API](other/)
|
||||
- [Playlists API](playlist/)
|
||||
- [Preferences API](preferences/)
|
||||
- [Public dashboard API](dashboard_public/)
|
||||
- [Query history API](query_history/)
|
||||
- [Service account API](serviceaccount/)
|
||||
- [Short URL API](short_url/)
|
||||
- [Snapshot API](snapshot/)
|
||||
- [SSO settings API](sso-settings/)
|
||||
- [Team API](team/)
|
||||
- [User API](user/)
|
||||
|
||||
## Deprecated HTTP APIs
|
||||
|
||||
- [Authentication API]({{< relref "auth/" >}})
|
||||
- [Authentication API](auth/)
|
||||
|
||||
## Grafana Enterprise HTTP APIs
|
||||
|
||||
Grafana Enterprise includes all of the Grafana OSS APIs as well as the following APIs:
|
||||
|
||||
- [Data source permissions API]({{< relref "datasource_permissions/" >}})
|
||||
- [License API]({{< relref "licensing/" >}})
|
||||
- [Query and resource caching API]({{< relref "query_and_resource_caching/" >}})
|
||||
- [Reporting API]({{< relref "reporting/" >}})
|
||||
- [Role-based access control API]({{< relref "access_control/" >}})
|
||||
- [Team sync API]({{< relref "team_sync/" >}})
|
||||
- [Data source permissions API](datasource_permissions/)
|
||||
- [License API](licensing/)
|
||||
- [Query and resource caching API](query_and_resource_caching/)
|
||||
- [Reporting API](reporting/)
|
||||
- [Role-based access control API](access_control/)
|
||||
- [Team sync API](team_sync/)
|
||||
|
||||
@@ -21,7 +21,7 @@ title: RBAC HTTP API
|
||||
|
||||
# RBAC API
|
||||
|
||||
> Role-based access control API is only available in Grafana Cloud or Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
> Role-based access control API is only available in Grafana Cloud or Grafana Enterprise. Read more about [Grafana Enterprise](/docs/grafana/latest/introduction/grafana-enterprise/).
|
||||
|
||||
The API can be used to create, update, delete, get, and list roles.
|
||||
|
||||
@@ -226,7 +226,7 @@ Content-Type: application/json; charset=UTF-8
|
||||
|
||||
`POST /api/access-control/roles`
|
||||
|
||||
Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as [Fixed roles]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control#fixed-roles" >}}) can't be created.
|
||||
Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as [Fixed roles](/docs/grafana/latest/administration/roles-and-permissions/access-control/#fixed-roles) can't be created.
|
||||
|
||||
#### Required permissions
|
||||
|
||||
@@ -264,24 +264,24 @@ Content-Type: application/json
|
||||
|
||||
#### JSON body schema
|
||||
|
||||
| Field Name | Date Type | Required | Description |
|
||||
| ----------- | ---------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| uid | string | No | UID of the role. If not present, the UID will be automatically created for you and returned in response. Refer to the [Custom roles]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control#custom-roles" >}}) for more information. |
|
||||
| global | boolean | No | A flag indicating if the role is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request. |
|
||||
| version | number | No | Version of the role. If not present, version 0 will be assigned to the role and returned in the response. Refer to the [Custom roles]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/#custom-roles" >}}) for more information. |
|
||||
| name | string | Yes | Name of the role. Refer to [Custom roles]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control#custom-roles" >}}) for more information. |
|
||||
| description | string | No | Description of the role. |
|
||||
| displayName | string | No | Display name of the role, visible in the UI. |
|
||||
| group | string | No | The group name the role belongs to. |
|
||||
| hidden | boolean | No | Specify whether the role is hidden or not. If set to `true`, then the role does not show in the role picker. It will not be listed by API endpoints unless explicitly specified. |
|
||||
| permissions | Permission | No | If not present, the role will be created without any permissions. |
|
||||
| Field Name | Date Type | Required | Description |
|
||||
| ----------- | ---------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| uid | string | No | UID of the role. If not present, the UID will be automatically created for you and returned in response. Refer to the [Custom roles](/docs/grafana/latest/administration/roles-and-permissions/access-control/#custom-roles) for more information. |
|
||||
| global | boolean | No | A flag indicating if the role is global or not. If set to `false`, the default org ID of the authenticated user will be used from the request. |
|
||||
| version | number | No | Version of the role. If not present, version 0 will be assigned to the role and returned in the response. Refer to the [Custom roles](/docs/grafana/latest/administration/roles-and-permissions/access-control/#custom-roles) for more information. |
|
||||
| name | string | Yes | Name of the role. Refer to [Custom roles](/docs/grafana/latest/administration/roles-and-permissions/access-control/#custom-roles) for more information. |
|
||||
| description | string | No | Description of the role. |
|
||||
| displayName | string | No | Display name of the role, visible in the UI. |
|
||||
| group | string | No | The group name the role belongs to. |
|
||||
| hidden | boolean | No | Specify whether the role is hidden or not. If set to `true`, then the role does not show in the role picker. It will not be listed by API endpoints unless explicitly specified. |
|
||||
| permissions | Permission | No | If not present, the role will be created without any permissions. |
|
||||
|
||||
**Permission**
|
||||
|
||||
| Field Name | Data Type | Required | Description |
|
||||
| ---------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| action | string | Yes | Refer to [Custom role actions and scopes]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for full list of available actions. |
|
||||
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Custom role actions and scopes]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for full list of available scopes. |
|
||||
| Field Name | Data Type | Required | Description |
|
||||
| ---------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| action | string | Yes | Refer to [Custom role actions and scopes](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for full list of available actions. |
|
||||
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Custom role actions and scopes](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for full list of available scopes. |
|
||||
|
||||
#### Example response
|
||||
|
||||
@@ -449,10 +449,10 @@ Content-Type: application/json
|
||||
|
||||
**Permission**
|
||||
|
||||
| Field Name | Data Type | Required | Description |
|
||||
| ---------- | --------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| action | string | Yes | Refer to [Custom role actions and scopes]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for full list of available actions. |
|
||||
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Custom role actions and scopes]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for full list of available scopes. |
|
||||
| Field Name | Data Type | Required | Description |
|
||||
| ---------- | --------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| action | string | Yes | Refer to [Custom role actions and scopes](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for full list of available actions. |
|
||||
| scope | string | No | If not present, no scope will be mapped to the permission. Refer to [Custom role actions and scopes](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for full list of available scopes. |
|
||||
|
||||
#### Example response
|
||||
|
||||
@@ -530,10 +530,10 @@ Accept: application/json
|
||||
|
||||
#### Query parameters
|
||||
|
||||
| Param | Type | Required | Description |
|
||||
| ------ | ------- | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| force | boolean | No | When set to `true`, the role will be deleted with all its assignments. |
|
||||
| global | boolean | No | A flag indicating if the role is global or not. If set to false, the default org ID of the authenticated user will be used from the request. Refer to the [About RBAC]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control" >}}) for more information. |
|
||||
| Param | Type | Required | Description |
|
||||
| ------ | ------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| force | boolean | No | When set to `true`, the role will be deleted with all its assignments. |
|
||||
| global | boolean | No | A flag indicating if the role is global or not. If set to false, the default org ID of the authenticated user will be used from the request. Refer to the [About RBAC](/docs/grafana/latest/administration/roles-and-permissions/access-control/) for more information. |
|
||||
|
||||
#### Example response
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ To use these API endpoints you have to use Basic authentication and the Grafana
|
||||
The `admin` user that Grafana is provisioned with by default has permissions to use these API endpoints.
|
||||
{{< /admonition >}}
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](../../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Fetch settings
|
||||
|
||||
@@ -371,7 +371,7 @@ Content-Type: application/json
|
||||
}
|
||||
```
|
||||
|
||||
Note that `OrgId` is an optional parameter that can be used to assign a new user to a different organization when [auto_assign_org]({{< relref "../../setup-grafana/configure-grafana/#auto-assign-org" >}}) is set to `true`.
|
||||
Note that `OrgId` is an optional parameter that can be used to assign a new user to a different organization when [auto_assign_org](../../../setup-grafana/configure-grafana/#auto-assign-org) is set to `true`.
|
||||
|
||||
**Example Response**:
|
||||
|
||||
@@ -694,7 +694,7 @@ Content-Type: application/json
|
||||
|
||||
`POST /api/admin/encryption/rotate-data-keys`
|
||||
|
||||
[Rotates]({{< relref "../../setup-grafana/configure-security/configure-database-encryption/#rotate-data-keys" >}}) data encryption keys.
|
||||
[Rotates](../../../setup-grafana/configure-security/configure-database-encryption/#rotate-data-keys) data encryption keys.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -715,7 +715,7 @@ Content-Type: application/json
|
||||
|
||||
`POST /api/admin/encryption/reencrypt-data-keys`
|
||||
|
||||
[Re-encrypts]({{< relref "../../setup-grafana/configure-security/configure-database-encryption/#re-encrypt-data-keys" >}}) data encryption keys.
|
||||
[Re-encrypts](../../../setup-grafana/configure-security/configure-database-encryption/#re-encrypt-data-keys) data encryption keys.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -736,7 +736,7 @@ Content-Type: application/json
|
||||
|
||||
`POST /api/admin/encryption/reencrypt-secrets`
|
||||
|
||||
[Re-encrypts]({{< relref "../../setup-grafana/configure-security/configure-database-encryption/#re-encrypt-secrets" >}}) secrets.
|
||||
[Re-encrypts](../../../setup-grafana/configure-security/configure-database-encryption/#re-encrypt-secrets) secrets.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
@@ -757,7 +757,7 @@ Content-Type: application/json
|
||||
|
||||
`POST /api/admin/encryption/rollback-secrets`
|
||||
|
||||
[Rolls back]({{< relref "../../setup-grafana/configure-security/configure-database-encryption/#roll-back-secrets" >}}) secrets.
|
||||
[Rolls back](../../../setup-grafana/configure-security/configure-database-encryption/#roll-back-secrets) secrets.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ title: Annotations HTTP API
|
||||
|
||||
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.
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Find Annotations
|
||||
|
||||
|
||||
@@ -22,10 +22,10 @@ title: 'Authentication HTTP API '
|
||||
The Authentication HTTP API is used to manage API keys.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service account API reference]({{< relref "./serviceaccount/" >}}).
|
||||
If you use Grafana v9.1 or newer, use service accounts instead of API keys. For more information, refer to [Grafana service account API reference](../serviceaccount/).
|
||||
{{% /admonition %}}
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you would need to have relevant permissions. Refer to [Role-based access control permissions]({{< relref "../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you would need to have relevant permissions. Refer to [Role-based access control permissions](../../../administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## List API keys
|
||||
|
||||
@@ -85,7 +85,7 @@ This endpoint has been made obsolete in Grafana 11.3.0.
|
||||
|
||||
{{% /admonition %}}
|
||||
|
||||
Endpoint is obsolete and has been moved to [Grafana service account API]({{< relref "./serviceaccount/" >}}). For more information, refer to [Migrate to Grafana service account API](/docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/).
|
||||
Endpoint is obsolete and has been moved to [Grafana service account API](../serviceaccount/). For more information, refer to [Migrate to Grafana service account API](/docs/grafana/<GRAFANA_VERSION>/administration/service-accounts/migrate-api-keys/).
|
||||
|
||||
`POST /api/auth/keys`
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ title: Dashboard HTTP API
|
||||
|
||||
# Dashboard API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Identifier (id) vs unique identifier (uid)
|
||||
|
||||
@@ -26,7 +26,7 @@ The identifier (id) of a dashboard is an auto-incrementing numeric value and is
|
||||
|
||||
The unique identifier (uid) of a dashboard can be used for uniquely identify a dashboard between multiple Grafana installs.
|
||||
It's automatically generated if not provided when creating a dashboard. The uid allows having consistent URLs for accessing
|
||||
dashboards and when syncing dashboards between multiple Grafana installs, see [dashboard provisioning]({{< relref "/docs/grafana/latest/administration/provisioning#dashboards" >}})
|
||||
dashboards and when syncing dashboards between multiple Grafana installs, see [dashboard provisioning](/docs/grafana/latest/administration/provisioning/#dashboards)
|
||||
for more information. This means that changing the title of a dashboard will not break any bookmarked links to that dashboard.
|
||||
|
||||
The uid can have a maximum length of 40 characters.
|
||||
@@ -80,7 +80,7 @@ JSON Body schema:
|
||||
- **dashboard** – The complete dashboard model.
|
||||
- **dashboard.id** – id = null to create a new dashboard.
|
||||
- **dashboard.uid** – Optional unique identifier when creating a dashboard. uid = null will generate a new uid.
|
||||
- **dashboard.refresh** - Set the dashboard refresh interval. If this is lower than [the minimum refresh interval]({{< relref "/docs/grafana/latest/setup-grafana/configure-grafana#min_refresh_interval" >}}), then Grafana will ignore it and will enforce the minimum refresh interval.
|
||||
- **dashboard.refresh** - Set the dashboard refresh interval. If this is lower than [the minimum refresh interval](/docs/grafana/latest/setup-grafana/configure-grafana/#min_refresh_interval), then Grafana will ignore it and will enforce the minimum refresh interval.
|
||||
- **folderId** – The id of the folder to save the dashboard in.
|
||||
- **folderUid** – The UID of the folder to save the dashboard in. Overrides the `folderId`.
|
||||
- **overwrite** – Set to true if you want to overwrite existing dashboard with newer version, same dashboard title in folder or same dashboard uid.
|
||||
@@ -453,4 +453,4 @@ Content-Type: application/json
|
||||
|
||||
## Dashboard Search
|
||||
|
||||
See [Folder/Dashboard Search API]({{< relref "folder_dashboard_search/" >}}).
|
||||
See [Folder/Dashboard Search API](../folder_dashboard_search/).
|
||||
|
||||
@@ -32,7 +32,7 @@ The permission levels for the permission field:
|
||||
- 2 = Edit
|
||||
- 4 = Admin
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Get permissions for a dashboard
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ title: Data source HTTP API
|
||||
|
||||
# Data source API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Get all data sources
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ title: Datasource Permissions HTTP API
|
||||
|
||||
# Data Source Permissions API
|
||||
|
||||
> The Data Source Permissions is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
> The Data Source Permissions is only available in Grafana Enterprise. Read more about [Grafana Enterprise](/docs/grafana/latest/introduction/grafana-enterprise/).
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
This API can be used to list, add and remove permissions for a data source.
|
||||
|
||||
|
||||
@@ -52,13 +52,13 @@ The task is to create a new organization and then add a Token that can be used b
|
||||
curl -X POST http://admin:admin@localhost:3000/api/user/using/<id of new org>
|
||||
```
|
||||
|
||||
1. [Create a Service Account]({{< relref "./serviceaccount/#create-service-account" >}}):
|
||||
1. [Create a Service Account](./serviceaccount/#create-service-account):
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"name":"test", "role": "Admin"}' http://admin:admin@localhost:3000/api/serviceaccounts
|
||||
```
|
||||
|
||||
1. [Create a Service Account token]({{< relref "./serviceaccount/#create-service-account-tokens" >}}) for the service account created in the previous step:
|
||||
1. [Create a Service Account token](./serviceaccount/#create-service-account-tokens) for the service account created in the previous step:
|
||||
|
||||
```bash
|
||||
curl -X POST -H "Content-Type: application/json" -d '{"name":"test-token"}' http://admin:admin@localhost:3000/api/serviceaccounts/<service account id>/tokens
|
||||
|
||||
@@ -27,16 +27,16 @@ The most basic example for a dashboard for which there is no authentication. You
|
||||
curl http://localhost:3000/api/search
|
||||
```
|
||||
|
||||
Here's a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication]({{< relref "/docs/grafana/latest/setup-grafana/configure-security/configure-authentication#basic-auth" >}}) enabled using the default admin credentials:
|
||||
Here's a cURL command that works for getting the home dashboard when you are running Grafana locally with [basic authentication](/docs/grafana/latest/setup-grafana/configure-security/configure-authentication/#basic-auth) enabled using the default admin credentials:
|
||||
|
||||
```
|
||||
curl http://admin:admin@localhost:3000/api/search
|
||||
```
|
||||
|
||||
To pass a username and password with [HTTP basic authorization]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/manage-rbac-roles" >}}), encode them as base64.
|
||||
To pass a username and password with [HTTP basic authorization](/docs/grafana/latest/administration/roles-and-permissions/access-control/manage-rbac-roles/), encode them as base64.
|
||||
You can't use authorization tokens in the request.
|
||||
|
||||
For example, to [list permissions associated with roles]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/manage-rbac-roles" >}}) given a username of `user` and password of `password`, use:
|
||||
For example, to [list permissions associated with roles](/docs/grafana/latest/administration/roles-and-permissions/access-control/manage-rbac-roles/) given a username of `user` and password of `password`, use:
|
||||
|
||||
```
|
||||
curl --location '<grafana_url>/api/access-control/builtin-roles' --user 'user:password'
|
||||
|
||||
@@ -18,7 +18,7 @@ title: Folder HTTP API
|
||||
|
||||
# Folder API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Identifier (id) vs unique identifier (uid)
|
||||
|
||||
@@ -302,7 +302,7 @@ Content-Length: 97
|
||||
|
||||
Deletes an existing folder identified by UID along with all dashboards (and their alerts) stored in the folder. This operation cannot be reverted.
|
||||
|
||||
If [Grafana Alerting]({{< relref "/docs/grafana/latest/alerting" >}}) is enabled, you can set an optional query parameter `forceDeleteRules=false` so that requests will fail with 400 (Bad Request) error if the folder contains any Grafana alerts. However, if this parameter is set to `true` then it will delete any Grafana alerts under this folder.
|
||||
If [Grafana Alerting](/docs/grafana/latest/alerting/) is enabled, you can set an optional query parameter `forceDeleteRules=false` so that requests will fail with 400 (Bad Request) error if the folder contains any Grafana alerts. However, if this parameter is set to `true` then it will delete any Grafana alerts under this folder.
|
||||
|
||||
**Required permissions**
|
||||
|
||||
@@ -422,7 +422,7 @@ If moving the folder under root:
|
||||
|
||||
JSON body schema:
|
||||
|
||||
- **parentUid** – Optional [unique identifier]({{< relref "#identifier-id-vs-unique-identifier-uid" >}}) of the new parent folder. If this is empty, then the folder is moved under the root.
|
||||
- **parentUid** – Optional [unique identifier](#identifier-id-vs-unique-identifier-uid) of the new parent folder. If this is empty, then the folder is moved under the root.
|
||||
|
||||
**Example Request**:
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ title: Folder/Dashboard Search HTTP API
|
||||
|
||||
`GET /api/search/`
|
||||
|
||||
> Note: When using [Role-based access control]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control" >}}), search results will contain only dashboards and folders which you have access to.
|
||||
> Note: When using [Role-based access control](/docs/grafana/latest/administration/roles-and-permissions/access-control/), search results will contain only dashboards and folders which you have access to.
|
||||
|
||||
Query parameters:
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ The permission levels for the permission field:
|
||||
- 2 = Edit
|
||||
- 4 = Admin
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Get permissions for a folder
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ title: Licensing HTTP API
|
||||
|
||||
# Enterprise License API
|
||||
|
||||
Licensing is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
Licensing is only available in Grafana Enterprise. Read more about [Grafana Enterprise](/docs/grafana/latest/introduction/grafana-enterprise/).
|
||||
|
||||
{{< admonition type="caution" >}}
|
||||
You can't authenticate to the Licensing HTTP API with service account tokens.
|
||||
@@ -31,7 +31,7 @@ To use these API endpoints you have to use Basic authentication and the Grafana
|
||||
The `admin` user that Grafana is provisioned with by default has permissions to use these API endpoints.
|
||||
{{< /admonition >}}
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Check license availability
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ The Organization HTTP API is divided in two resources, `/api/org` (current organ
|
||||
and `/api/orgs` (admin organizations). One big difference between these are that
|
||||
the admin of all organizations API only works with basic authentication, see [Admin Organizations API](#admin-organizations-api) for more information.
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Current Organization API
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ title: Query and Resource Caching HTTP API
|
||||
# Query and resource caching API
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
{{% /admonition %}}
|
||||
|
||||
## Enable caching for a data source
|
||||
|
||||
@@ -17,13 +17,13 @@ title: Reporting API
|
||||
|
||||
# Reporting API
|
||||
|
||||
This API allows you to interact programmatically with the [Reporting]({{< relref "/docs/grafana/latest/dashboards/create-reports" >}}) feature.
|
||||
This API allows you to interact programmatically with the [Reporting](/docs/grafana/latest/dashboards/create-reports/) feature.
|
||||
|
||||
> The Reporting API is not stabilized yet, it is still in active development and may change without prior notice.
|
||||
|
||||
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
> Reporting is only available in Grafana Enterprise. Read more about [Grafana Enterprise](/docs/grafana/latest/introduction/grafana-enterprise/).
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## List all reports
|
||||
|
||||
@@ -31,7 +31,7 @@ This API allows you to interact programmatically with the [Reporting]({{< relref
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< relref "#reporting-api" >}}) for an explanation.
|
||||
See note in the [introduction](#reporting-api) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | --------------------------- |
|
||||
@@ -103,7 +103,7 @@ Content-Length: 1840
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
|
||||
## Get a report
|
||||
@@ -112,7 +112,7 @@ Content-Length: 1840
|
||||
|
||||
#### Required permissions
|
||||
|
||||
See note in the [introduction]({{< relref "#reporting-api" >}}) for an explanation.
|
||||
See note in the [introduction](#reporting-api) for an explanation.
|
||||
|
||||
| Action | Scope |
|
||||
| ------------ | ---------------------------------------------------------- |
|
||||
@@ -187,7 +187,7 @@ Content-Length: 940
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid report ID).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **403** – Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** – Not found (such report does not exist).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
@@ -381,7 +381,7 @@ Content-Length: 28
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **403** – Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** – Not found (such report does not exist).
|
||||
- **500** – Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
@@ -423,7 +423,7 @@ Content-Length: 39
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid report ID).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **404** - Not found (report with this ID does not exist).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
@@ -477,7 +477,7 @@ Content-Length: 29
|
||||
|
||||
- **200** – Report was sent.
|
||||
- **400** – Bad request (invalid json, missing content-type, missing or invalid fields, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **404** - Report not found.
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details.
|
||||
@@ -529,7 +529,7 @@ Content-Length: 181
|
||||
### Status Codes
|
||||
|
||||
- **200** – OK
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Save reports branding settings
|
||||
@@ -591,7 +591,7 @@ Content-Length: 35
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more detail
|
||||
|
||||
## Send a test email
|
||||
@@ -674,6 +674,6 @@ Content-Length: 29
|
||||
|
||||
- **200** – OK
|
||||
- **400** – Bad request (invalid json, missing or invalid fields values, etc.).
|
||||
- **401** - Authentication failed, refer to [Authentication API]({{< relref "/docs/grafana/latest/developers/http_api/auth" >}}).
|
||||
- **401** - Authentication failed, refer to [Authentication API](/docs/grafana/latest/developers/http_api/auth/).
|
||||
- **403** - Forbidden (access denied to a report or a dashboard used in the report).
|
||||
- **500** - Unexpected error or server misconfiguration. Refer to server logs for more details
|
||||
|
||||
@@ -18,7 +18,7 @@ title: Service account HTTP API
|
||||
|
||||
# Service account API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
> For Grafana Cloud instances, please use a Bearer token to authenticate. The examples within this section reference Basic authentication which is for On-Prem Grafana instances.
|
||||
|
||||
## Search service accounts with Paging
|
||||
|
||||
@@ -41,7 +41,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
|
||||
JSON body schema:
|
||||
|
||||
- **path** – The path to shorten, relative to the Grafana [root_url]({{< relref "/docs/grafana/latest/setup-grafana/configure-grafana#root_url" >}}).
|
||||
- **path** – The path to shorten, relative to the Grafana [root_url](/docs/grafana/latest/setup-grafana/configure-grafana/#root_url).
|
||||
|
||||
**Example response:**
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ title: SSO Settings API
|
||||
|
||||
# SSO Settings API
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
{{% admonition type="note" %}}
|
||||
Available since Grafana 11. SAML support is in public preview behind the `ssoSettingsSAML` feature flag.
|
||||
@@ -29,7 +29,7 @@ Available since Grafana 11. SAML support is in public preview behind the `ssoSet
|
||||
The API can be used to create, update, delete, get, and list SSO Settings for OAuth2 and SAML.
|
||||
|
||||
The settings managed by this API are stored in the database and override
|
||||
[settings from other sources]({{< relref "../../setup-grafana/configure-security/configure-authentication" >}})
|
||||
[settings from other sources](../../../setup-grafana/configure-security/configure-authentication/)
|
||||
(arguments, environment variables, settings file, etc).
|
||||
Therefore, every time settings for a specific provider are removed or reset to the default settings at runtime,
|
||||
the settings are inherited from the other sources in the reverse order of precedence
|
||||
|
||||
@@ -29,7 +29,7 @@ Access to these API endpoints is restricted as follows:
|
||||
- If you enable `editors_can_admin` configuration flag, then Organization Editors can create teams and manage teams where they are Admin.
|
||||
- If you enable `editors_can_admin` configuration flag, Editors can find out whether a team that they are not members of exists by trying to create a team with the same name.
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Team Search With Paging
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ title: Team Sync HTTP API
|
||||
|
||||
# Team Sync API
|
||||
|
||||
> Team Sync is only available in Grafana Enterprise. Read more about [Grafana Enterprise]({{< relref "/docs/grafana/latest/introduction/grafana-enterprise" >}}).
|
||||
> Team Sync is only available in Grafana Enterprise. Read more about [Grafana Enterprise](/docs/grafana/latest/introduction/grafana-enterprise/).
|
||||
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions]({{< relref "/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes" >}}) for more information.
|
||||
> If you are running Grafana Enterprise, for some endpoints you'll need to have specific permissions. Refer to [Role-based access control permissions](/docs/grafana/latest/administration/roles-and-permissions/access-control/custom-role-actions-scopes/) for more information.
|
||||
|
||||
## Get External Groups
|
||||
|
||||
|
||||
Reference in New Issue
Block a user