Star: Add uid in the endpoint (#54340)

* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* udpate swagger file

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* remove useless code for star dashboard

* add new uid endpoing for star

* add store pool into service

* fix the endpoint caller

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* Update pkg/api/stars.go

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>

* solve linter

Co-authored-by: Sofia Papagiannaki <1632407+papagian@users.noreply.github.com>
This commit is contained in:
ying-jeanne 2022-10-06 04:32:49 +08:00 committed by GitHub
parent 8df830557a
commit d9cc292066
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 591 additions and 366 deletions

View File

@ -205,9 +205,14 @@ func (hs *HTTPServer) registerRoutes() {
userRoute.Get("/teams", routing.Wrap(hs.GetSignedInUserTeamList))
userRoute.Get("/stars", routing.Wrap(hs.GetStars))
// Deprecated: use /stars/dashboard/uid/:uid API instead.
userRoute.Post("/stars/dashboard/:id", routing.Wrap(hs.StarDashboard))
// Deprecated: use /stars/dashboard/uid/:uid API instead.
userRoute.Delete("/stars/dashboard/:id", routing.Wrap(hs.UnstarDashboard))
userRoute.Post("/stars/dashboard/uid/:uid", routing.Wrap(hs.StarDashboardByUID))
userRoute.Delete("/stars/dashboard/uid/:uid", routing.Wrap(hs.UnstarDashboardByUID))
userRoute.Put("/password", routing.Wrap(hs.ChangeUserPassword))
userRoute.Get("/quotas", routing.Wrap(hs.GetUserQuotas))
userRoute.Put("/helpflags/:id", routing.Wrap(hs.SetHelpFlag))

View File

@ -42,6 +42,8 @@ func (hs *HTTPServer) GetStars(c *models.ReqContext) response.Response {
//
// Stars the given Dashboard for the actual user.
//
// Deprecated: true
//
// Responses:
// 200: okResponse
// 400: badRequestError
@ -51,16 +53,48 @@ func (hs *HTTPServer) GetStars(c *models.ReqContext) response.Response {
func (hs *HTTPServer) StarDashboard(c *models.ReqContext) response.Response {
id, err := strconv.ParseInt(web.Params(c.Req)[":id"], 10, 64)
if err != nil {
return response.Error(http.StatusBadRequest, "id is invalid", err)
return response.Error(http.StatusBadRequest, "Invalid dashboard ID", nil)
}
cmd := star.StarDashboardCommand{UserID: c.UserID, DashboardID: id}
cmd := star.StarDashboardCommand{UserID: c.UserID, DashboardID: id}
if cmd.DashboardID <= 0 {
return response.Error(400, "Missing dashboard id", nil)
}
if err := hs.starService.Add(c.Req.Context(), &cmd); err != nil {
return response.Error(500, "Failed to star dashboard", err)
return response.Error(http.StatusInternalServerError, "Failed to star dashboard", err)
}
return response.Success("Dashboard starred!")
}
// swagger:route POST /user/stars/dashboard/uid/{dashboard_uid} signed_in_user starDashboardByUID
//
// Star a dashboard.
//
// Stars the given Dashboard for the actual user.
//
// Responses:
// 200: okResponse
// 400: badRequestError
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (hs *HTTPServer) StarDashboardByUID(c *models.ReqContext) response.Response {
uid := web.Params(c.Req)[":uid"]
if uid == "" {
return response.Error(http.StatusBadRequest, "Invalid dashboard UID", nil)
}
dash, rsp := hs.getDashboardHelper(c.Req.Context(), c.OrgID, 0, uid)
if rsp != nil {
return rsp
}
cmd := star.StarDashboardCommand{UserID: c.UserID, DashboardID: dash.Id}
if err := hs.starService.Add(c.Req.Context(), &cmd); err != nil {
return response.Error(http.StatusInternalServerError, "Failed to star dashboard", err)
}
return response.Success("Dashboard starred!")
@ -72,6 +106,10 @@ func (hs *HTTPServer) StarDashboard(c *models.ReqContext) response.Response {
//
// Deletes the starring of the given Dashboard for the actual user.
//
// Deprecated: true
//
// Please refer to the [new](#/signed_in_user/unstarDashboardByUID) API instead
//
// Responses:
// 200: okResponse
// 400: badRequestError
@ -81,16 +119,47 @@ func (hs *HTTPServer) StarDashboard(c *models.ReqContext) response.Response {
func (hs *HTTPServer) UnstarDashboard(c *models.ReqContext) response.Response {
id, err := strconv.ParseInt(web.Params(c.Req)[":id"], 10, 64)
if err != nil {
return response.Error(http.StatusBadRequest, "id is invalid", err)
return response.Error(http.StatusBadRequest, "Invalid dashboard ID", nil)
}
cmd := star.UnstarDashboardCommand{UserID: c.UserID, DashboardID: id}
cmd := star.UnstarDashboardCommand{UserID: c.UserID, DashboardID: id}
if cmd.DashboardID <= 0 {
return response.Error(400, "Missing dashboard id", nil)
}
if err := hs.starService.Delete(c.Req.Context(), &cmd); err != nil {
return response.Error(500, "Failed to unstar dashboard", err)
return response.Error(http.StatusInternalServerError, "Failed to unstar dashboard", err)
}
return response.Success("Dashboard unstarred")
}
// swagger:route DELETE /user/stars/dashboard/uid/{dashboard_uid} signed_in_user unstarDashboardByUID
//
// Unstar a dashboard.
//
// Deletes the starring of the given Dashboard for the actual user.
//
// Responses:
// 200: okResponse
// 400: badRequestError
// 401: unauthorisedError
// 403: forbiddenError
// 500: internalServerError
func (hs *HTTPServer) UnstarDashboardByUID(c *models.ReqContext) response.Response {
uid := web.Params(c.Req)[":uid"]
if uid == "" {
return response.Error(http.StatusBadRequest, "Invalid dashboard UID", nil)
}
dash, rsp := hs.getDashboardHelper(c.Req.Context(), c.OrgID, 0, uid)
if rsp != nil {
return rsp
}
cmd := star.UnstarDashboardCommand{UserID: c.UserID, DashboardID: dash.Id}
if err := hs.starService.Delete(c.Req.Context(), &cmd); err != nil {
return response.Error(http.StatusInternalServerError, "Failed to unstar dashboard", err)
}
return response.Success("Dashboard unstarred")
@ -103,9 +172,23 @@ type StarDashboardParams struct {
DashboardID string `json:"dashboard_id"`
}
// swagger:parameters starDashboardByUID
type StarDashboardByUIDParams struct {
// in:path
// required:true
DashboardUID string `json:"dashboard_uid"`
}
// swagger:parameters unstarDashboard
type UnstarDashboardParams struct {
// in:path
// required:true
DashboardID string `json:"dashboard_id"`
}
// swagger:parameters unstarDashboardByUID
type UnstarDashboardByUIDParams struct {
// in:path
// required:true
DashboardUID string `json:"dashboard_uid"`
}

View File

@ -8524,7 +8524,7 @@
"tags": [
"service_accounts"
],
"summary": "# Create service account",
"summary": "Create service account",
"operationId": "createServiceAccount",
"parameters": [
{
@ -8560,7 +8560,7 @@
"tags": [
"service_accounts"
],
"summary": "# Search service accounts with paging",
"summary": "Search service accounts with paging",
"operationId": "searchOrgServiceAccountsWithPaging",
"parameters": [
{
@ -8616,7 +8616,7 @@
"tags": [
"service_accounts"
],
"summary": "# Get single serviceaccount by Id",
"summary": "Get single serviceaccount by Id",
"operationId": "retrieveServiceAccount",
"parameters": [
{
@ -8653,7 +8653,7 @@
"tags": [
"service_accounts"
],
"summary": "# Delete service account",
"summary": "Delete service account",
"operationId": "deleteServiceAccount",
"parameters": [
{
@ -8687,7 +8687,7 @@
"tags": [
"service_accounts"
],
"summary": "# Update service account",
"summary": "Update service account",
"operationId": "updateServiceAccount",
"parameters": [
{
@ -8733,7 +8733,7 @@
"tags": [
"service_accounts"
],
"summary": "# Get service account tokens",
"summary": "Get service account tokens",
"operationId": "listTokens",
"parameters": [
{
@ -8767,7 +8767,7 @@
"tags": [
"service_accounts"
],
"summary": "# CreateNewToken adds a token to a service account",
"summary": "CreateNewToken adds a token to a service account",
"operationId": "createToken",
"parameters": [
{
@ -8816,7 +8816,7 @@
"tags": [
"service_accounts"
],
"summary": "# DeleteToken deletes service account tokens",
"summary": "DeleteToken deletes service account tokens",
"operationId": "deleteToken",
"parameters": [
{
@ -9908,6 +9908,74 @@
}
}
},
"/user/stars/dashboard/uid/{dashboard_uid}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
"tags": [
"signed_in_user"
],
"summary": "Star a dashboard.",
"operationId": "starDashboardByUID",
"parameters": [
{
"type": "string",
"name": "dashboard_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",
"tags": [
"signed_in_user"
],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboardByUID",
"parameters": [
{
"type": "string",
"name": "dashboard_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/stars/dashboard/{dashboard_id}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
@ -9916,6 +9984,7 @@
],
"summary": "Star a dashboard.",
"operationId": "starDashboard",
"deprecated": true,
"parameters": [
{
"type": "string",
@ -9949,6 +10018,7 @@
],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboard",
"deprecated": true,
"parameters": [
{
"type": "string",
@ -11170,7 +11240,7 @@
"type": "string"
},
"for": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"labels": {
"type": "object",
@ -11417,6 +11487,7 @@
"type": "object",
"required": [
"field",
"type",
"target"
],
"properties": {
@ -11425,12 +11496,17 @@
"type": "string"
},
"target": {
"$ref": "#/definitions/CorrelationConfigTarget"
"description": "Target data query",
"type": "object",
"additionalProperties": false
},
"type": {
"$ref": "#/definitions/CorrelationConfigType"
}
}
},
"CorrelationConfigTarget": {
"description": "CorrelationConfigTarget is the target data query specific to target data source (Correlation.TargetUID)"
"CorrelationConfigType": {
"type": "string"
},
"CreateAlertNotificationCommand": {
"type": "object",
@ -11978,9 +12054,6 @@
"isFolder": {
"type": "boolean"
},
"isHome": {
"type": "boolean"
},
"isSnapshot": {
"type": "boolean"
},
@ -12476,25 +12549,6 @@
"type": "string",
"title": "DataTopic is used to identify which topic the frame should be assigned to."
},
"DateTime": {
"description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.",
"type": "string",
"format": "date-time"
},
"DayOfMonthRange": {
"type": "object",
"title": "A DayOfMonthRange is an inclusive range that may have negative Beginning/End values that represent distance from the End of the month Beginning at -1.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
}
},
"DeleteCorrelationResponseBody": {
"type": "object",
"properties": {
@ -13219,7 +13273,7 @@
"type": "string"
},
"for": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"grafana_alert": {
"$ref": "#/definitions/GettableGrafanaRule"
@ -13520,6 +13574,10 @@
"description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.",
"type": "string"
},
"enable_http2": {
"description": "EnableHTTP2 specifies whether the client should configure HTTP2.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean"
},
"follow_redirects": {
"description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean"
@ -13713,20 +13771,6 @@
}
}
},
"InclusiveRange": {
"type": "object",
"title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
}
},
"InhibitRule": {
"description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.",
"type": "object",
@ -14284,17 +14328,29 @@
}
}
},
"MonthRange": {
"Model": {
"description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
"type": "object",
"title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.",
"title": "Model is the Go representation of a playlist.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"End": {
"type": "integer",
"format": "int64"
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"type": "array",
"items": {
"$ref": "#/definitions/PlaylistItem"
}
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
}
},
@ -14469,6 +14525,9 @@
"type": "string"
}
},
"proxy_url": {
"$ref": "#/definitions/URL"
},
"scopes": {
"type": "array",
"items": {
@ -14903,35 +14962,6 @@
}
}
},
"PlaylistDTO": {
"type": "object",
"properties": {
"id": {
"description": "Unique playlist identifier for internal use, set by Grafana.",
"type": "integer",
"format": "int64"
},
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"type": "array",
"items": {
"$ref": "#/definitions/PlaylistItem"
}
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
}
},
"PlaylistDashboard": {
"type": "object",
"properties": {
@ -14968,30 +14998,15 @@
"type": "object",
"title": "PlaylistItem is the Go representation of a playlist.Item.",
"properties": {
"id": {
"description": "FIXME: The prefixDropper removes playlist from playlist_id, that doesn't work for us since it'll mean we'll have Id twice.\nID of the playlist item for internal use by Grafana. Deprecated.",
"type": "integer",
"format": "int64"
},
"order": {
"description": "Order is the position in the list for the item. Deprecated.",
"type": "integer",
"format": "int64"
},
"playlistid": {
"description": "ID for the playlist containing the item. Deprecated.",
"type": "integer",
"format": "int64"
},
"title": {
"description": "Title is the human-readable identifier for the playlist item.",
"description": "Title is an unused property -- it will be removed in the future",
"type": "string"
},
"type": {
"$ref": "#/definitions/PlaylistItemType"
},
"value": {
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future.\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.",
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
"type": "string"
}
}
@ -15203,7 +15218,7 @@
"type": "string"
},
"for": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"grafana_alert": {
"$ref": "#/definitions/PostableGrafanaRule"
@ -15536,7 +15551,7 @@
"type": "object",
"properties": {
"expire": {
"$ref": "#/definitions/duration"
"type": "string"
},
"html": {
"type": "boolean"
@ -15551,7 +15566,7 @@
"type": "string"
},
"retry": {
"$ref": "#/definitions/duration"
"type": "string"
},
"send_resolved": {
"type": "boolean"
@ -16081,10 +16096,10 @@
}
},
"group_interval": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"group_wait": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"match": {
"description": "Deprecated. Remove before v1.0 release.",
@ -16115,7 +16130,7 @@
"type": "string"
},
"repeat_interval": {
"$ref": "#/definitions/Duration"
"type": "string"
},
"routes": {
"type": "array",
@ -16900,12 +16915,19 @@
"description": "The client key file for the targets.",
"type": "string"
},
"min_version": {
"$ref": "#/definitions/TLSVersion"
},
"server_name": {
"description": "Used to verify the hostname for the targets.",
"type": "string"
}
}
},
"TLSVersion": {
"type": "integer",
"format": "uint16"
},
"TagsDTO": {
"type": "object",
"title": "TagsDTO is the frontend DTO for Tag.",
@ -17248,13 +17270,13 @@
"days_of_month": {
"type": "array",
"items": {
"$ref": "#/definitions/DayOfMonthRange"
"type": "string"
}
},
"months": {
"type": "array",
"items": {
"$ref": "#/definitions/MonthRange"
"type": "string"
}
},
"times": {
@ -17266,13 +17288,13 @@
"weekdays": {
"type": "array",
"items": {
"$ref": "#/definitions/WeekdayRange"
"type": "string"
}
},
"years": {
"type": "array",
"items": {
"$ref": "#/definitions/YearRange"
"type": "string"
}
}
}
@ -17462,9 +17484,8 @@
"type": "string"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"type": "object",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -17475,6 +17496,9 @@
"Host": {
"type": "string"
},
"OmitHost": {
"type": "boolean"
},
"Opaque": {
"type": "string"
},
@ -18278,34 +18302,6 @@
}
}
},
"WeekdayRange": {
"type": "object",
"title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
}
},
"YearRange": {
"type": "object",
"title": "A YearRange is a positive inclusive range.",
"properties": {
"Begin": {
"type": "integer",
"format": "int64"
},
"End": {
"type": "integer",
"format": "int64"
}
}
},
"alert": {
"description": "Alert alert",
"type": "object",
@ -18348,6 +18344,7 @@
}
},
"alertGroups": {
"description": "AlertGroups alert groups",
"type": "array",
"items": {
"$ref": "#/definitions/alertGroup"
@ -18451,10 +18448,8 @@
}
}
},
"duration": {
"$ref": "#/definitions/Duration"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",
@ -18517,6 +18512,7 @@
}
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
@ -18565,11 +18561,42 @@
}
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
}
},
"integration": {
"type": "object",
"required": [
"name",
"sendResolved"
],
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
"type": "string",
"format": "date-time"
},
"lastNotifyAttemptDuration": {
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
"type": "string"
},
"lastNotifyAttemptError": {
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
"type": "string"
},
"name": {
"description": "name",
"type": "string"
},
"sendResolved": {
"description": "send resolved",
"type": "boolean"
}
}
},
"labelSet": {
"description": "LabelSet label set",
"type": "object",
@ -18675,6 +18702,7 @@
}
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": [
"comment",
@ -18712,12 +18740,24 @@
}
},
"receiver": {
"description": "Receiver receiver",
"type": "object",
"required": [
"active",
"integrations",
"name"
],
"properties": {
"active": {
"description": "active",
"type": "boolean"
},
"integrations": {
"description": "integrations",
"type": "array",
"items": {
"$ref": "#/definitions/integration"
}
},
"name": {
"description": "name",
"type": "string"
@ -19490,7 +19530,7 @@
"getPlaylistResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/PlaylistDTO"
"$ref": "#/definitions/Model"
}
},
"getPreferencesResponse": {
@ -20003,7 +20043,7 @@
"updatePlaylistResponse": {
"description": "(empty)",
"schema": {
"$ref": "#/definitions/PlaylistDTO"
"$ref": "#/definitions/Model"
}
},
"updateServiceAccountResponse": {

View File

@ -7877,7 +7877,7 @@
"tags": [
"service_accounts"
],
"summary": "# Create service account",
"summary": "Create service account",
"operationId": "createServiceAccount",
"parameters": [
{
@ -7913,7 +7913,7 @@
"tags": [
"service_accounts"
],
"summary": "# Search service accounts with paging",
"summary": "Search service accounts with paging",
"operationId": "searchOrgServiceAccountsWithPaging",
"parameters": [
{
@ -7969,7 +7969,7 @@
"tags": [
"service_accounts"
],
"summary": "# Get single serviceaccount by Id",
"summary": "Get single serviceaccount by Id",
"operationId": "retrieveServiceAccount",
"parameters": [
{
@ -8006,7 +8006,7 @@
"tags": [
"service_accounts"
],
"summary": "# Delete service account",
"summary": "Delete service account",
"operationId": "deleteServiceAccount",
"parameters": [
{
@ -8040,7 +8040,7 @@
"tags": [
"service_accounts"
],
"summary": "# Update service account",
"summary": "Update service account",
"operationId": "updateServiceAccount",
"parameters": [
{
@ -8086,7 +8086,7 @@
"tags": [
"service_accounts"
],
"summary": "# Get service account tokens",
"summary": "Get service account tokens",
"operationId": "listTokens",
"parameters": [
{
@ -8120,7 +8120,7 @@
"tags": [
"service_accounts"
],
"summary": "# CreateNewToken adds a token to a service account",
"summary": "CreateNewToken adds a token to a service account",
"operationId": "createToken",
"parameters": [
{
@ -8169,7 +8169,7 @@
"tags": [
"service_accounts"
],
"summary": "# DeleteToken deletes service account tokens",
"summary": "DeleteToken deletes service account tokens",
"operationId": "deleteToken",
"parameters": [
{
@ -9261,6 +9261,74 @@
}
}
},
"/user/stars/dashboard/uid/{dashboard_uid}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
"tags": [
"signed_in_user"
],
"summary": "Star a dashboard.",
"operationId": "starDashboardByUID",
"parameters": [
{
"type": "string",
"name": "dashboard_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",
"tags": [
"signed_in_user"
],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboardByUID",
"parameters": [
{
"type": "string",
"name": "dashboard_uid",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"$ref": "#/responses/okResponse"
},
"400": {
"$ref": "#/responses/badRequestError"
},
"401": {
"$ref": "#/responses/unauthorisedError"
},
"403": {
"$ref": "#/responses/forbiddenError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/user/stars/dashboard/{dashboard_id}": {
"post": {
"description": "Stars the given Dashboard for the actual user.",
@ -9269,6 +9337,7 @@
],
"summary": "Star a dashboard.",
"operationId": "starDashboard",
"deprecated": true,
"parameters": [
{
"type": "string",
@ -9302,6 +9371,7 @@
],
"summary": "Unstar a dashboard.",
"operationId": "unstarDashboard",
"deprecated": true,
"parameters": [
{
"type": "string",
@ -10437,6 +10507,7 @@
"type": "object",
"required": [
"field",
"type",
"target"
],
"properties": {
@ -10445,12 +10516,17 @@
"type": "string"
},
"target": {
"$ref": "#/definitions/CorrelationConfigTarget"
"description": "Target data query",
"type": "object",
"additionalProperties": {}
},
"type": {
"$ref": "#/definitions/CorrelationConfigType"
}
}
},
"CorrelationConfigTarget": {
"description": "CorrelationConfigTarget is the target data query specific to target data source (Correlation.TargetUID)"
"CorrelationConfigType": {
"type": "string"
},
"CreateAlertNotificationCommand": {
"type": "object",
@ -10998,9 +11074,6 @@
"isFolder": {
"type": "boolean"
},
"isHome": {
"type": "boolean"
},
"isSnapshot": {
"type": "boolean"
},
@ -12466,6 +12539,32 @@
}
}
},
"Model": {
"description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
"type": "object",
"title": "Model is the Go representation of a playlist.",
"properties": {
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"type": "array",
"items": {
"$ref": "#/definitions/PlaylistItem"
}
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
}
},
"NavLink": {
"type": "object",
"properties": {
@ -12820,35 +12919,6 @@
}
}
},
"PlaylistDTO": {
"type": "object",
"properties": {
"id": {
"description": "Unique playlist identifier for internal use, set by Grafana.",
"type": "integer",
"format": "int64"
},
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"type": "array",
"items": {
"$ref": "#/definitions/PlaylistItem"
}
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
}
},
"PlaylistDashboard": {
"type": "object",
"properties": {
@ -12885,30 +12955,15 @@
"type": "object",
"title": "PlaylistItem is the Go representation of a playlist.Item.",
"properties": {
"id": {
"description": "FIXME: The prefixDropper removes playlist from playlist_id, that doesn't work for us since it'll mean we'll have Id twice.\nID of the playlist item for internal use by Grafana. Deprecated.",
"type": "integer",
"format": "int64"
},
"order": {
"description": "Order is the position in the list for the item. Deprecated.",
"type": "integer",
"format": "int64"
},
"playlistid": {
"description": "ID for the playlist containing the item. Deprecated.",
"type": "integer",
"format": "int64"
},
"title": {
"description": "Title is the human-readable identifier for the playlist item.",
"description": "Title is an unused property -- it will be removed in the future",
"type": "string"
},
"type": {
"$ref": "#/definitions/PlaylistItemType"
},
"value": {
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future.\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.",
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
"type": "string"
}
}
@ -15515,7 +15570,7 @@
"getPlaylistResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/PlaylistDTO"
"$ref": "#/definitions/Model"
}
},
"getPreferencesResponse": {
@ -16028,7 +16083,7 @@
"updatePlaylistResponse": {
"description": "",
"schema": {
"$ref": "#/definitions/PlaylistDTO"
"$ref": "#/definitions/Model"
}
},
"updateServiceAccountResponse": {

View File

@ -954,7 +954,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlaylistDTO"
"$ref": "#/components/schemas/Model"
}
}
},
@ -1691,7 +1691,7 @@
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PlaylistDTO"
"$ref": "#/components/schemas/Model"
}
}
},
@ -2612,7 +2612,7 @@
"type": "string"
},
"for": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"labels": {
"additionalProperties": {
@ -2863,17 +2863,23 @@
"type": "string"
},
"target": {
"$ref": "#/components/schemas/CorrelationConfigTarget"
"additionalProperties": false,
"description": "Target data query",
"type": "object"
},
"type": {
"$ref": "#/components/schemas/CorrelationConfigType"
}
},
"required": [
"field",
"type",
"target"
],
"type": "object"
},
"CorrelationConfigTarget": {
"description": "CorrelationConfigTarget is the target data query specific to target data source (Correlation.TargetUID)"
"CorrelationConfigType": {
"type": "string"
},
"CreateAlertNotificationCommand": {
"properties": {
@ -3420,9 +3426,6 @@
"isFolder": {
"type": "boolean"
},
"isHome": {
"type": "boolean"
},
"isSnapshot": {
"type": "boolean"
},
@ -3919,25 +3922,6 @@
"title": "DataTopic is used to identify which topic the frame should be assigned to.",
"type": "string"
},
"DateTime": {
"description": "DateTime is a time but it serializes to ISO8601 format with millis\nIt knows how to read 3 different variations of a RFC3339 date time.\nMost APIs we encounter want either millisecond or second precision times.\nThis just tries to make it worry-free.",
"format": "date-time",
"type": "string"
},
"DayOfMonthRange": {
"properties": {
"Begin": {
"format": "int64",
"type": "integer"
},
"End": {
"format": "int64",
"type": "integer"
}
},
"title": "A DayOfMonthRange is an inclusive range that may have negative Beginning/End values that represent distance from the End of the month Beginning at -1.",
"type": "object"
},
"DeleteCorrelationResponseBody": {
"properties": {
"message": {
@ -4661,7 +4645,7 @@
"type": "string"
},
"for": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"grafana_alert": {
"$ref": "#/components/schemas/GettableGrafanaRule"
@ -4961,6 +4945,10 @@
"description": "The bearer token file for the targets. Deprecated in favour of\nAuthorization.CredentialsFile.",
"type": "string"
},
"enable_http2": {
"description": "EnableHTTP2 specifies whether the client should configure HTTP2.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean"
},
"follow_redirects": {
"description": "FollowRedirects specifies whether the client should follow HTTP 3xx redirects.\nThe omitempty flag is not set, because it would be hidden from the\nmarshalled configuration when set to false.",
"type": "boolean"
@ -5156,20 +5144,6 @@
"title": "ImportDashboardResponse response object returned when importing a dashboard.",
"type": "object"
},
"InclusiveRange": {
"properties": {
"Begin": {
"format": "int64",
"type": "integer"
},
"End": {
"format": "int64",
"type": "integer"
}
},
"title": "InclusiveRange is used to hold the Beginning and End values of many time interval components.",
"type": "object"
},
"InhibitRule": {
"description": "InhibitRule defines an inhibition rule that mutes alerts that match the\ntarget labels if an alert matching the source labels exists.\nBoth alerts have to have a set of labels being equal.",
"properties": {
@ -5727,18 +5701,30 @@
},
"type": "object"
},
"MonthRange": {
"Model": {
"description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
"properties": {
"Begin": {
"format": "int64",
"type": "integer"
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"End": {
"format": "int64",
"type": "integer"
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"items": {
"$ref": "#/components/schemas/PlaylistItem"
},
"type": "array"
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
},
"title": "A MonthRange is an inclusive range between [1, 12] where 1 = January.",
"title": "Model is the Go representation of a playlist.",
"type": "object"
},
"MultiStatus": {
@ -5910,6 +5896,9 @@
},
"type": "object"
},
"proxy_url": {
"$ref": "#/components/schemas/URL"
},
"scopes": {
"items": {
"type": "string"
@ -6345,35 +6334,6 @@
},
"type": "object"
},
"PlaylistDTO": {
"properties": {
"id": {
"description": "Unique playlist identifier for internal use, set by Grafana.",
"format": "int64",
"type": "integer"
},
"interval": {
"description": "Interval sets the time between switching views in a playlist.\nFIXME: Is this based on a standardized format or what options are available? Can datemath be used?",
"type": "string"
},
"items": {
"description": "The ordered list of items that the playlist will iterate over.",
"items": {
"$ref": "#/components/schemas/PlaylistItem"
},
"type": "array"
},
"name": {
"description": "Name of the playlist.",
"type": "string"
},
"uid": {
"description": "Unique playlist identifier. Generated on creation, either by the\ncreator of the playlist of by the application.",
"type": "string"
}
},
"type": "object"
},
"PlaylistDashboard": {
"properties": {
"id": {
@ -6408,30 +6368,15 @@
"PlaylistItem": {
"description": "THIS TYPE IS INTENDED FOR INTERNAL USE BY THE GRAFANA BACKEND, AND IS SUBJECT TO BREAKING CHANGES.\nEquivalent Go types at stable import paths are provided in https://github.com/grafana/grok.",
"properties": {
"id": {
"description": "FIXME: The prefixDropper removes playlist from playlist_id, that doesn't work for us since it'll mean we'll have Id twice.\nID of the playlist item for internal use by Grafana. Deprecated.",
"format": "int64",
"type": "integer"
},
"order": {
"description": "Order is the position in the list for the item. Deprecated.",
"format": "int64",
"type": "integer"
},
"playlistid": {
"description": "ID for the playlist containing the item. Deprecated.",
"format": "int64",
"type": "integer"
},
"title": {
"description": "Title is the human-readable identifier for the playlist item.",
"description": "Title is an unused property -- it will be removed in the future",
"type": "string"
},
"type": {
"$ref": "#/components/schemas/PlaylistItemType"
},
"value": {
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future.\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.",
"description": "Value depends on type and describes the playlist item.\n\ndashboard_by_id: The value is an internal numerical identifier set by Grafana. This\nis not portable as the numerical identifier is non-deterministic between different instances.\nWill be replaced by dashboard_by_uid in the future. (deprecated)\ndashboard_by_tag: The value is a tag which is set on any number of dashboards. All\ndashboards behind the tag will be added to the playlist.\ndashboard_by_uid: The value is the dashboard UID",
"type": "string"
}
},
@ -6644,7 +6589,7 @@
"type": "string"
},
"for": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"grafana_alert": {
"$ref": "#/components/schemas/PostableGrafanaRule"
@ -6977,7 +6922,7 @@
"PushoverConfig": {
"properties": {
"expire": {
"$ref": "#/components/schemas/duration"
"type": "string"
},
"html": {
"type": "boolean"
@ -6992,7 +6937,7 @@
"type": "string"
},
"retry": {
"$ref": "#/components/schemas/duration"
"type": "string"
},
"send_resolved": {
"type": "boolean"
@ -7522,10 +7467,10 @@
"type": "array"
},
"group_interval": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"group_wait": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"match": {
"additionalProperties": {
@ -7556,7 +7501,7 @@
"type": "string"
},
"repeat_interval": {
"$ref": "#/components/schemas/Duration"
"type": "string"
},
"routes": {
"items": {
@ -8339,6 +8284,9 @@
"description": "The client key file for the targets.",
"type": "string"
},
"min_version": {
"$ref": "#/components/schemas/TLSVersion"
},
"server_name": {
"description": "Used to verify the hostname for the targets.",
"type": "string"
@ -8347,6 +8295,10 @@
"title": "TLSConfig configures the options for TLS connections.",
"type": "object"
},
"TLSVersion": {
"format": "uint16",
"type": "integer"
},
"TagsDTO": {
"properties": {
"count": {
@ -8687,13 +8639,13 @@
"properties": {
"days_of_month": {
"items": {
"$ref": "#/components/schemas/DayOfMonthRange"
"type": "string"
},
"type": "array"
},
"months": {
"items": {
"$ref": "#/components/schemas/MonthRange"
"type": "string"
},
"type": "array"
},
@ -8705,13 +8657,13 @@
},
"weekdays": {
"items": {
"$ref": "#/components/schemas/WeekdayRange"
"type": "string"
},
"type": "array"
},
"years": {
"items": {
"$ref": "#/components/schemas/YearRange"
"type": "string"
},
"type": "array"
}
@ -8903,7 +8855,6 @@
"type": "string"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -8914,6 +8865,9 @@
"Host": {
"type": "string"
},
"OmitHost": {
"type": "boolean"
},
"Opaque": {
"type": "string"
},
@ -8936,7 +8890,7 @@
"$ref": "#/components/schemas/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"UpdateAlertNotificationCommand": {
@ -9719,34 +9673,6 @@
"title": "WechatConfig configures notifications via Wechat.",
"type": "object"
},
"WeekdayRange": {
"properties": {
"Begin": {
"format": "int64",
"type": "integer"
},
"End": {
"format": "int64",
"type": "integer"
}
},
"title": "A WeekdayRange is an inclusive range between [0, 6] where 0 = Sunday.",
"type": "object"
},
"YearRange": {
"properties": {
"Begin": {
"format": "int64",
"type": "integer"
},
"End": {
"format": "int64",
"type": "integer"
}
},
"title": "A YearRange is a positive inclusive range.",
"type": "object"
},
"alert": {
"description": "Alert alert",
"properties": {
@ -9789,6 +9715,7 @@
"type": "object"
},
"alertGroups": {
"description": "AlertGroups alert groups",
"items": {
"$ref": "#/components/schemas/alertGroup"
},
@ -9892,10 +9819,8 @@
],
"type": "object"
},
"duration": {
"$ref": "#/components/schemas/Duration"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/components/schemas/labelSet"
@ -9958,6 +9883,7 @@
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
@ -10006,11 +9932,42 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/components/schemas/gettableSilence"
},
"type": "array"
},
"integration": {
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
"format": "date-time",
"type": "string"
},
"lastNotifyAttemptDuration": {
"description": "Duration of the last attempt to deliver a notification in humanized format (`1s` or `15ms`, etc).",
"type": "string"
},
"lastNotifyAttemptError": {
"description": "Error string for the last attempt to deliver a notification. Empty if the last attempt was successful.",
"type": "string"
},
"name": {
"description": "name",
"type": "string"
},
"sendResolved": {
"description": "send resolved",
"type": "boolean"
}
},
"required": [
"name",
"sendResolved"
],
"type": "object"
},
"labelSet": {
"additionalProperties": {
"type": "string"
@ -10116,6 +10073,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@ -10153,14 +10111,26 @@
"type": "object"
},
"receiver": {
"description": "Receiver receiver",
"properties": {
"active": {
"description": "active",
"type": "boolean"
},
"integrations": {
"description": "integrations",
"items": {
"$ref": "#/components/schemas/integration"
},
"type": "array"
},
"name": {
"description": "name",
"type": "string"
}
},
"required": [
"active",
"integrations",
"name"
],
"type": "object"
@ -19491,7 +19461,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Create service account",
"summary": "Create service account",
"tags": [
"service_accounts"
]
@ -19557,7 +19527,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Search service accounts with paging",
"summary": "Search service accounts with paging",
"tags": [
"service_accounts"
]
@ -19595,7 +19565,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Delete service account",
"summary": "Delete service account",
"tags": [
"service_accounts"
]
@ -19634,7 +19604,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Get single serviceaccount by Id",
"summary": "Get single serviceaccount by Id",
"tags": [
"service_accounts"
]
@ -19683,7 +19653,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Update service account",
"summary": "Update service account",
"tags": [
"service_accounts"
]
@ -19721,7 +19691,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# Get service account tokens",
"summary": "Get service account tokens",
"tags": [
"service_accounts"
]
@ -19773,7 +19743,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# CreateNewToken adds a token to a service account",
"summary": "CreateNewToken adds a token to a service account",
"tags": [
"service_accounts"
]
@ -19823,7 +19793,7 @@
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "# DeleteToken deletes service account tokens",
"summary": "DeleteToken deletes service account tokens",
"tags": [
"service_accounts"
]
@ -20949,6 +20919,78 @@
]
}
},
"/user/stars/dashboard/uid/{dashboard_uid}": {
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",
"operationId": "unstarDashboardByUID",
"parameters": [
{
"in": "path",
"name": "dashboard_uid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/okResponse"
},
"400": {
"$ref": "#/components/responses/badRequestError"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Unstar a dashboard.",
"tags": [
"signed_in_user"
]
},
"post": {
"description": "Stars the given Dashboard for the actual user.",
"operationId": "starDashboardByUID",
"parameters": [
{
"in": "path",
"name": "dashboard_uid",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/okResponse"
},
"400": {
"$ref": "#/components/responses/badRequestError"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Star a dashboard.",
"tags": [
"signed_in_user"
]
}
},
"/user/stars/dashboard/{dashboard_id}": {
"delete": {
"description": "Deletes the starring of the given Dashboard for the actual user.",