Docs: update docs to reflect new sharing UI (#90630)

Co-authored-by: Juan Cabanas <juan.cabanas@grafana.com>
Co-authored-by: Jack Baldry <jack.baldry@grafana.com>
This commit is contained in:
Isabel Matwawana
2024-09-25 09:42:58 -04:00
committed by GitHub
parent f80d3d687d
commit dbf0949ca7
23 changed files with 765 additions and 598 deletions

View File

@ -66,7 +66,7 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
- [Other API]({{< relref "other/" >}})
- [Playlists API]({{< relref "playlist/" >}})
- [Preferences API]({{< relref "preferences/" >}})
- [Public dashboard API]({{< relref "dashboard_public/" >}})
- [Shared dashboards API]({{< relref "dashboard_public/" >}})
- [Query history API]({{< relref "query_history/" >}})
- [Service account API]({{< relref "serviceaccount/" >}})
- [Short URL API]({{< relref "short_url/" >}})

View File

@ -2,7 +2,7 @@
aliases:
- ../../http_api/dashboard_public/
canonical: /docs/grafana/latest/developers/http_api/dashboard_public/
description: Grafana Public Dashboard HTTP API
description: Grafana Shared Dashboards HTTP API
keywords:
- grafana
- http
@ -13,7 +13,7 @@ labels:
products:
- enterprise
- oss
title: Public Dashboard HTTP API
title: Shared Dashboards 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/
---
# Public Dashboard API
# Shared Dashboards 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 public dashboard
## Create a shared dashboard
`POST /api/dashboards/uid/:uid/public-dashboards/`
Creates a new public dashboard.
Creates a new shared dashboard.
**Required permissions**
See note in the [introduction](#public-dashboard-api) for an explanation.
See note in the [introduction](#shared-dashboards-api) for an explanation.
| Action | Scope |
| ------------------------- | -------------------------------- |
| `dashboards.public:write` | `dashboards:uid:<dashboard UID>` |
**Example Request for new public dashboard**:
**Example Request for new shared dashboard**:
```http
POST /api/dashboards/uid/xCpsVuc4z/public-dashboards/ HTTP/1.1
@ -64,10 +64,10 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
- **share** Optional. Set the share mode. The default value is `public`.
**Example Response**:
```http
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 78
```
@ -96,7 +96,7 @@ Content-Length: 78
Will update the shared dashboard given the specified unique identifier (uid).
**Required permissions**
See note in the [introduction](#shared-dashboard-api) for an explanation.
| Action | Scope |
@ -115,21 +115,21 @@ Content-Length: 107
JSON Body schema:
- **timeSelectionEnabled** Optional. Set to `true` to enable the time picker in the public dashboard. The default value is `false`.
- **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`.
- **annotationsEnabled** Optional. Set to `true` to show annotations. The default value is `false`.
- **share** Optional. Set the share mode. The default value is `public`.
**Example Response**:
```http
HTTP/1.1 200 OK
HTTP/1.1 200 OK
Content-Type: application/json; charset=UTF-8
Content-Length: 78
```
Status Codes:
Status Codes:
- **200** Updated
- **400** Errors (such as invalid json, missing or invalid fields)
@ -147,8 +147,8 @@ Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
## Get shared dashboard by dashboard uid
`GET /api/dashboards/uid/:uid/public-dashboards/`
`GET /api/dashboards/uid/:uid/public-dashboards/`
Will return the shared dashboard given the dashboard unique identifier (uid).
@ -180,7 +180,7 @@ Status Codes:
Status Codes:
- **200** Found
- **401** Unauthorized
- **401** Unauthorized
- **403** Access denied
- **404** Dashboard not found
@ -196,15 +196,15 @@ Content-Length: 107
| Action | Scope |
| ------------------------- | -------------------------------- |
| `dashboards.public:write` | `dashboards:uid:<dashboard UID>` |
| `dashboards.public:write` | `dashboards:uid:<dashboard UID>` |
**Example Request**:
```http
```http
DELETE /api/dashboards/uid/xCpsVuc4z/public-dashboards/cd56d9fd-f3d4-486d-afba-a21760e2acbe HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
```
Status Codes:
@ -245,17 +245,17 @@ Status Codes:
- **200** Found
- **401** Unauthorized
- **403** Access denied
- **404** Not found
- **404** Dashboard not found
## Delete public dashboard by dashboard uid and public dashboard uid
## Delete shared dashboard by dashboard uid and shared dashboard uid
`DELETE /api/dashboards/uid/:uid/public-dashboards/:publicDashboardUid`
Will delete the public dashboard given the specified unique identifier (uid).
Will delete the shared dashboard given the specified unique identifier (uid).
**Required permissions**
See note in the [introduction](#public-dashboard-api) for an explanation.
See note in the [introduction](#shared-dashboard-api) for an explanation.
| Action | Scope |
| ------------------------- | -------------------------------- |
@ -276,13 +276,13 @@ Status Codes:
- **401** Unauthorized
- **403** Access denied
## Get a list of all public dashboards with pagination
## Get a list of all shared dashboards with pagination
`GET /api/dashboards/public-dashboards`
**Required permissions**
See note in the [introduction](#public-dashboard-api) for an explanation.
See note in the [introduction](#shared-dashboard-api) for an explanation.
| Action | Scope |
| ----------------- | -------------------------------- |