|
@@ -11,7 +11,7 @@ parent = "http_api"
|
|
|
|
|
|
|
|
# Dashboard Permissions API
|
|
# Dashboard Permissions API
|
|
|
|
|
|
|
|
-This API can be used to update/get the permissions for a dashboard or a folder.
|
|
|
|
|
|
|
+This API can be used to update/get the permissions for a dashboard.
|
|
|
|
|
|
|
|
Permissions with `dashboardId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything.
|
|
Permissions with `dashboardId=-1` are the default permissions for users with the Viewer and Editor roles. Permissions can be set for a user, a team or a role (Viewer or Editor). Permissions cannot be set for Admins - they always have access to everything.
|
|
|
|
|
|
|
@@ -21,16 +21,16 @@ The permission levels for the permission field:
|
|
|
- 2 = Edit
|
|
- 2 = Edit
|
|
|
- 4 = Admin
|
|
- 4 = Admin
|
|
|
|
|
|
|
|
-## Get permissions for a dashboard or folder
|
|
|
|
|
|
|
+## Get permissions for a dashboard
|
|
|
|
|
|
|
|
-`GET /api/dashboards/id/:dashboardId/acl`
|
|
|
|
|
|
|
+`GET /api/dashboards/id/:dashboardId/permissions`
|
|
|
|
|
|
|
|
-Gets all existing permissions for the dashboard or folder with the given `dashboardId`.
|
|
|
|
|
|
|
+Gets all existing permissions for the dashboard with the given `dashboardId`.
|
|
|
|
|
|
|
|
**Example request**:
|
|
**Example request**:
|
|
|
|
|
|
|
|
```http
|
|
```http
|
|
|
-GET /api/dashboards/id/1/acl HTTP/1.1
|
|
|
|
|
|
|
+GET /api/dashboards/id/1/permissions HTTP/1.1
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
@@ -90,18 +90,18 @@ Status Codes:
|
|
|
- **200** - Ok
|
|
- **200** - Ok
|
|
|
- **401** - Unauthorized
|
|
- **401** - Unauthorized
|
|
|
- **403** - Access denied
|
|
- **403** - Access denied
|
|
|
-- **404** - Dashboard/folder not found
|
|
|
|
|
|
|
+- **404** - Dashboard not found
|
|
|
|
|
|
|
|
-## Update permissions for a dashboard or folder
|
|
|
|
|
|
|
+## Update permissions for a dashboard
|
|
|
|
|
|
|
|
-`POST /api/dashboards/id/:dashboardId/acl`
|
|
|
|
|
|
|
+`POST /api/dashboards/id/:dashboardId/permissions`
|
|
|
|
|
|
|
|
-Updates permissions for a dashboard or folder. This operation will remove existing permissions if they're not included in the request.
|
|
|
|
|
|
|
+Updates permissions for a dashboard. This operation will remove existing permissions if they're not included in the request.
|
|
|
|
|
|
|
|
**Example request**:
|
|
**Example request**:
|
|
|
|
|
|
|
|
```http
|
|
```http
|
|
|
-POST /api/dashboards/id/1/acl
|
|
|
|
|
|
|
+POST /api/dashboards/id/1/permissions
|
|
|
Accept: application/json
|
|
Accept: application/json
|
|
|
Content-Type: application/json
|
|
Content-Type: application/json
|
|
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
|
@@ -138,7 +138,7 @@ HTTP/1.1 200 OK
|
|
|
Content-Type: application/json; charset=UTF-8
|
|
Content-Type: application/json; charset=UTF-8
|
|
|
Content-Length: 35
|
|
Content-Length: 35
|
|
|
|
|
|
|
|
-{"message":"Dashboard acl updated"}
|
|
|
|
|
|
|
+{"message":"Dashboard permissions updated"}
|
|
|
```
|
|
```
|
|
|
|
|
|
|
|
Status Codes:
|
|
Status Codes:
|