mirror of
https://github.com/grafana/grafana.git
synced 2026-08-11 05:34:53 -05:00
Add endpoint with UID for dashboard permissions (#47753)
* Replace sequential IDs with UID for dashboard permossion * Add back endpoint with id * Rename parameter from dashboarUid->uid and add swagger definitions for endpoints * Generate swagger json * Add deprecated to swagger and docs * Add deprecated comment in the api.go * Add model for POST body * Fix model post body for endpoint * Generate spec with enterprise
This commit is contained in:
@@ -101,7 +101,7 @@ import (
|
||||
// 422: unprocessableEntityError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters getDashboardByUID deleteDashboardByUID
|
||||
// swagger:parameters getDashboardByUID deleteDashboardByUID getDashboardPermissionsWithUid postDashboardPermissionsWithUid
|
||||
type UID struct {
|
||||
// in:path
|
||||
// required:true
|
||||
|
||||
@@ -9,6 +9,10 @@ import (
|
||||
//
|
||||
// Gets all existing permissions for the given dashboard.
|
||||
//
|
||||
// Please refer to [updated API](#/dashboard_permissions/getDashboardPermissionsWithUid) instead
|
||||
//
|
||||
// Deprecated: true
|
||||
//
|
||||
// Responses:
|
||||
// 200: getDashboardPermissionsResponse
|
||||
// 401: unauthorisedError
|
||||
@@ -20,6 +24,35 @@ import (
|
||||
//
|
||||
// Updates permissions for a dashboard.
|
||||
//
|
||||
// Please refer to [updated API](#/dashboard_permissions/postDashboardPermissionsWithUid) instead
|
||||
//
|
||||
// This operation will remove existing permissions if they’re not included in the request.
|
||||
//
|
||||
// Deprecated: true
|
||||
//
|
||||
// Responses:
|
||||
// 200: okResponse
|
||||
// 400: badRequestError
|
||||
// 401: unauthorisedError
|
||||
// 403: forbiddenError
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:route GET /dashboards/uid/{uid}/permissions dashboard_permissions getDashboardPermissionsWithUid
|
||||
//
|
||||
// Gets all existing permissions for the given dashboard.
|
||||
//
|
||||
// Responses:
|
||||
// 200: getDashboardPermissionsResponse
|
||||
// 401: unauthorisedError
|
||||
// 403: forbiddenError
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:route POST /dashboards/uid/{uid}/permissions dashboard_permissions postDashboardPermissionsWithUid
|
||||
//
|
||||
// Updates permissions for a dashboard.
|
||||
//
|
||||
// This operation will remove existing permissions if they’re not included in the request.
|
||||
//
|
||||
// Responses:
|
||||
@@ -30,7 +63,7 @@ import (
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters postDashboardPermissions updateFolderPermissions
|
||||
// swagger:parameters postDashboardPermissions updateFolderPermissions postDashboardPermissionsWithUid
|
||||
type PostDashboardPermissionsParam struct {
|
||||
// in:body
|
||||
// required:true
|
||||
|
||||
Reference in New Issue
Block a user