Revert Sharing documentation changes (#94585)

Fix Sharing page aliases (#94118)"
This commit is contained in:
Jack Baldry
2024-10-11 14:58:36 +01:00
committed by GitHub
parent 2a7d8279a2
commit 50de92f873
27 changed files with 612 additions and 785 deletions
@@ -2,7 +2,7 @@
aliases:
- ../../http_api/dashboard_public/
canonical: /docs/grafana/latest/developers/http_api/dashboard_public/
description: Grafana Shared Dashboards HTTP API
description: Grafana Public Dashboard HTTP API
keywords:
- grafana
- http
@@ -13,7 +13,7 @@ labels:
products:
- enterprise
- oss
title: Shared Dashboards HTTP API
title: Public Dashboard HTTP API
refs:
role-based-access-control-permissions:
- pattern: /docs/grafana/
@@ -22,7 +22,7 @@ refs:
destination: /docs/grafana/<GRAFANA_VERSION>/administration/roles-and-permissions/access-control/custom-role-actions-scopes/
---
# Shared Dashboards API
# Public Dashboard API
{{% admonition type="note" %}}
@@ -30,21 +30,21 @@ If you're running Grafana Enterprise, you'll need to have specific permissions f
{{% /admonition %}}
## Create a shared dashboard
## Create a public dashboard
`POST /api/dashboards/uid/:uid/public-dashboards/`
Creates a new shared dashboard.
Creates a new public dashboard.
**Required permissions**
See note in the [introduction](#shared-dashboards-api) for an explanation.
See note in the [introduction](#public-dashboard-api) for an explanation.
| Action | Scope |
| ------------------------- | -------------------------------- |
| `dashboards.public:write` | `dashboards:uid:<dashboard UID>` |
**Example Request for new shared dashboard**:
**Example Request for new public dashboard**:
```http
POST /api/dashboards/uid/xCpsVuc4z/public-dashboards/ HTTP/1.1
@@ -64,10 +64,10 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
JSON Body schema:
- **uid** – Optional. Unique identifier when creating a shared dashboard. If it's null, it will generate a new uid.
- **uid** – Optional. Unique identifier when creating a public dashboard. If it's null, it will generate a new uid.
- **accessToken** – Optional. Unique access token. If it's null, it will generate a new access token.
- **timeSelectionEnabled** – Optional. Set to `true` to enable the time picker in the shared dashboard. The default value is `false`.
- **isEnabled** – Optional. Set to `true` to enable the shared dashboard. The default value is `false`.
- **timeSelectionEnabled** – Optional. Set to `true` to enable the time picker in the public dashboard. The default value is `false`.
- **isEnabled** – Optional. Set to `true` to enable the public dashboard. The default value is `false`.
- **annotationsEnabled** – Optional. Set to `true` to show annotations. The default value is `false`.
- **share** – Optional. Set the share mode. The default value is `public`.
@@ -96,7 +96,7 @@ Content-Length: 78
Status Codes:
- **200** – Created
- **400** – Errors (such as invalid json, missing or invalid fields, or dashboard is shared)
- **400** – Errors (such as invalid json, missing or invalid fields, or dashboard is public)
- **401** – Unauthorized
- **403** – Access denied
- **404** – Dashboard not found
@@ -115,21 +115,21 @@ Content-Length: 107
}
```
## Update a shared dashboard
## Update a public dashboard
`PATCH /api/dashboards/uid/:uid/public-dashboards/:publicDashboardUid`
Will update the shared dashboard given the specified unique identifier (uid).
Will update the public dashboard given the specified unique identifier (uid).
**Required permissions**
See note in the [introduction](#shared-dashboard-api) for an explanation.
See note in the [introduction](#public-dashboard-api) for an explanation.
| Action | Scope |
| ------------------------- | -------------------------------- |
| `dashboards.public:write` | `dashboards:uid:<dashboard UID>` |
**Example Request for updating a shared dashboard**:
**Example Request for updating a public dashboard**:
```http
PATCH /api/dashboards/uid/xCpsVuc4z/public-dashboards/cd56d9fd-f3d4-486d-afba-a21760e2acbe HTTP/1.1
@@ -147,8 +147,8 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
JSON Body schema:
- **timeSelectionEnabled** – Optional. Set to `true` to enable the time picker in the shared dashboard. The default value is `false`.
- **isEnabled** – Optional. Set to `true` to enable the shared dashboard. The default value is `false`.
- **timeSelectionEnabled** – Optional. Set to `true` to enable the time picker in the public dashboard. The default value is `false`.
- **isEnabled** – Optional. Set to `true` to enable the public dashboard. The default value is `false`.
- **annotationsEnabled** – Optional. Set to `true` to show annotations. The default value is `false`.
- **share** – Optional. Set the share mode. The default value is `public`.
@@ -180,7 +180,7 @@ Status Codes:
- **400** – Errors (such as invalid json, missing or invalid fields)
- **401** – Unauthorized
- **403** – Access denied
- **404** – Dashboard not found
- **404** – Public dashboard not found
The error response body will have the following properties:
@@ -196,15 +196,15 @@ Content-Length: 107
}
```
## Get shared dashboard by dashboard uid
## Get public dashboard by dashboard uid
`GET /api/dashboards/uid/:uid/public-dashboards/`
Will return the shared dashboard given the dashboard unique identifier (uid).
Will return the public dashboard given the dashboard unique identifier (uid).
**Required permissions**
See note in the [introduction](#shared-dashboard-api) for an explanation.
See note in the [introduction](#public-dashboard-api) for an explanation.
| Action | Scope |
| ----------------- | -------------------------------- |
@@ -245,17 +245,17 @@ Status Codes:
- **200** – Found
- **401** – Unauthorized
- **403** – Access denied
- **404** – Dashboard not found
- **404** – Not found
## Delete shared dashboard by dashboard uid and shared dashboard uid
## Delete public dashboard by dashboard uid and public dashboard uid
`DELETE /api/dashboards/uid/:uid/public-dashboards/:publicDashboardUid`
Will delete the shared dashboard given the specified unique identifier (uid).
Will delete the public dashboard given the specified unique identifier (uid).
**Required permissions**
See note in the [introduction](#shared-dashboard-api) for an explanation.
See note in the [introduction](#public-dashboard-api) for an explanation.
| Action | Scope |
| ------------------------- | -------------------------------- |
@@ -276,13 +276,13 @@ Status Codes:
- **401** – Unauthorized
- **403** – Access denied
## Get a list of all shared dashboards with pagination
## Get a list of all public dashboards with pagination
`GET /api/dashboards/public-dashboards`
**Required permissions**
See note in the [introduction](#shared-dashboard-api) for an explanation.
See note in the [introduction](#public-dashboard-api) for an explanation.
| Action | Scope |
| ----------------- | -------------------------------- |