Refactor: Add UID endpoint for get dashboard version (#48600)
* Refactor: Add UID endpoint for get dashboard version * Add initial docs language * Add new endpoint in swagger * Change access control to dashboards * Add parameters to swagger endpoint * Return UID in response; Update docs to reflect this; Implement Ying suggestion * Update docs/sources/http_api/dashboard_versions.md Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> * Update pkg/api/api.go Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> * Update pkg/models/dashboard_version.go Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com> * Rename UID to DashboardUID for clarity; use dashUID in method Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
co-authored by
Sofia Papagiannaki
parent
ce6a5694ff
commit
9a0f2ec449
@@ -101,7 +101,7 @@ import (
|
||||
// 422: unprocessableEntityError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:parameters getDashboardByUID deleteDashboardByUID getDashboardPermissionsWithUid postDashboardPermissionsWithUid
|
||||
// swagger:parameters getDashboardByUID deleteDashboardByUID getDashboardPermissionsWithUid postDashboardPermissionsWithUid getDashboardVersionByUID
|
||||
type UID struct {
|
||||
// in:path
|
||||
// required:true
|
||||
|
||||
@@ -17,6 +17,21 @@ import "github.com/grafana/grafana/pkg/models"
|
||||
//
|
||||
// Get a specific dashboard version.
|
||||
//
|
||||
// Please refer to [updated API](#/dashboard_versions/getDashboardVersionByUID) instead
|
||||
//
|
||||
// Deprecated: true
|
||||
//
|
||||
// Responses:
|
||||
// 200: dashboardVersionResponse
|
||||
// 401: unauthorisedError
|
||||
// 403: forbiddenError
|
||||
// 404: notFoundError
|
||||
// 500: internalServerError
|
||||
|
||||
// swagger:route GET /dashboards/uid/{uid}/versions/{DashboardVersionID} dashboard_versions getDashboardVersionByUID
|
||||
//
|
||||
// Get a specific dashboard version using UID.
|
||||
//
|
||||
// Responses:
|
||||
// 200: dashboardVersionResponse
|
||||
// 401: unauthorisedError
|
||||
@@ -43,7 +58,7 @@ type DashboardIdParam struct {
|
||||
DashboardID int64
|
||||
}
|
||||
|
||||
// swagger:parameters getDashboardVersion
|
||||
// swagger:parameters getDashboardVersion getDashboardVersionByUID
|
||||
type DashboardVersionIdParam struct {
|
||||
// in:path
|
||||
DashboardVersionID int64
|
||||
|
||||
Reference in New Issue
Block a user