diff --git a/pkg/services/ngalert/api/api_prometheus.go b/pkg/services/ngalert/api/api_prometheus.go index 0c3f4320c40..f00b1ec0124 100644 --- a/pkg/services/ngalert/api/api_prometheus.go +++ b/pkg/services/ngalert/api/api_prometheus.go @@ -9,17 +9,16 @@ import ( "strings" "time" - apiv1 "github.com/prometheus/client_golang/api/prometheus/v1" - - "github.com/grafana/grafana/pkg/services/ngalert/eval" - ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models" - "github.com/grafana/grafana/pkg/services/ngalert/store" - "github.com/grafana/grafana/pkg/api/response" "github.com/grafana/grafana/pkg/infra/log" "github.com/grafana/grafana/pkg/models" apimodels "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" + "github.com/grafana/grafana/pkg/services/ngalert/eval" + ngmodels "github.com/grafana/grafana/pkg/services/ngalert/models" "github.com/grafana/grafana/pkg/services/ngalert/state" + "github.com/grafana/grafana/pkg/services/ngalert/store" + + apiv1 "github.com/prometheus/client_golang/api/prometheus/v1" ) type PrometheusSrv struct { @@ -28,6 +27,8 @@ type PrometheusSrv struct { store store.RuleStore } +const queryIncludeInternalLabels = "includeInternalLabels" + func (srv PrometheusSrv) RouteGetAlertStatuses(c *models.ReqContext) response.Response { alertResponse := apimodels.AlertResponse{ DiscoveryBase: apimodels.DiscoveryBase{ @@ -37,6 +38,12 @@ func (srv PrometheusSrv) RouteGetAlertStatuses(c *models.ReqContext) response.Re Alerts: []*apimodels.Alert{}, }, } + + var labelOptions []ngmodels.LabelOption + if !c.QueryBoolWithDefault(queryIncludeInternalLabels, false) { + labelOptions = append(labelOptions, ngmodels.WithoutInternalLabels()) + } + for _, alertState := range srv.manager.GetAll(c.OrgId) { startsAt := alertState.StartsAt valString := "" @@ -45,7 +52,7 @@ func (srv PrometheusSrv) RouteGetAlertStatuses(c *models.ReqContext) response.Re } alertResponse.Data.Alerts = append(alertResponse.Data.Alerts, &apimodels.Alert{ - Labels: map[string]string(alertState.Labels), + Labels: alertState.GetLabels(labelOptions...), Annotations: alertState.Annotations, State: alertState.State.String(), ActiveAt: &startsAt, @@ -73,6 +80,11 @@ func (srv PrometheusSrv) RouteGetRuleStatuses(c *models.ReqContext) response.Res }, } + var labelOptions []ngmodels.LabelOption + if !c.QueryBoolWithDefault(queryIncludeInternalLabels, false) { + labelOptions = append(labelOptions, ngmodels.WithoutInternalLabels()) + } + namespaceMap, err := srv.store.GetNamespaces(c.Req.Context(), c.OrgId, c.SignedInUser) if err != nil { return ErrResp(http.StatusInternalServerError, err, "failed to get namespaces visible to the user") @@ -157,7 +169,7 @@ func (srv PrometheusSrv) RouteGetRuleStatuses(c *models.ReqContext) response.Res newRule := apimodels.Rule{ Name: rule.Title, - Labels: rule.Labels, + Labels: rule.GetLabels(labelOptions...), Health: "ok", Type: apiv1.RuleTypeAlerting, LastEvaluation: time.Time{}, @@ -169,8 +181,9 @@ func (srv PrometheusSrv) RouteGetRuleStatuses(c *models.ReqContext) response.Res if alertState.State == eval.Alerting { valString = alertState.LastEvaluationString } + alert := &apimodels.Alert{ - Labels: map[string]string(alertState.Labels), + Labels: alertState.GetLabels(labelOptions...), Annotations: alertState.Annotations, State: alertState.State.String(), ActiveAt: &activeAt, diff --git a/pkg/services/ngalert/api/api_prometheus_test.go b/pkg/services/ngalert/api/api_prometheus_test.go index 2c86b540595..f9e7a548c87 100644 --- a/pkg/services/ngalert/api/api_prometheus_test.go +++ b/pkg/services/ngalert/api/api_prometheus_test.go @@ -21,19 +21,14 @@ import ( ) func TestRouteGetAlertStatuses(t *testing.T) { - fakeStore := store.NewFakeRuleStore(t) - fakeAlertInstanceManager := NewFakeAlertInstanceManager(t) orgID := int64(1) - api := PrometheusSrv{ - log: log.NewNopLogger(), - manager: fakeAlertInstanceManager, - store: fakeStore, - } - - c := &models.ReqContext{SignedInUser: &models.SignedInUser{OrgId: orgID}} - t.Run("with no alerts", func(t *testing.T) { + _, _, api := setupAPI(t) + req, err := http.NewRequest("GET", "/api/v1/alerts", nil) + require.NoError(t, err) + c := &models.ReqContext{Context: &web.Context{Req: req}, SignedInUser: &models.SignedInUser{OrgId: orgID}} + r := api.RouteGetAlertStatuses(c) require.Equal(t, http.StatusOK, r.Status()) require.JSONEq(t, ` @@ -47,7 +42,54 @@ func TestRouteGetAlertStatuses(t *testing.T) { }) t.Run("with two alerts", func(t *testing.T) { - fakeAlertInstanceManager.GenerateAlertInstances(1, util.GenerateShortUID(), 2) + _, fakeAIM, api := setupAPI(t) + fakeAIM.GenerateAlertInstances(1, util.GenerateShortUID(), 2) + req, err := http.NewRequest("GET", "/api/v1/alerts", nil) + require.NoError(t, err) + c := &models.ReqContext{Context: &web.Context{Req: req}, SignedInUser: &models.SignedInUser{OrgId: orgID}} + + r := api.RouteGetAlertStatuses(c) + require.Equal(t, http.StatusOK, r.Status()) + require.JSONEq(t, ` +{ + "status": "success", + "data": { + "alerts": [{ + "labels": { + "alertname": "test_title_0", + "instance_label": "test", + "label": "test" + }, + "annotations": { + "annotation": "test" + }, + "state": "Normal", + "activeAt": "0001-01-01T00:00:00Z", + "value": "" + }, { + "labels": { + "alertname": "test_title_1", + "instance_label": "test", + "label": "test" + }, + "annotations": { + "annotation": "test" + }, + "state": "Normal", + "activeAt": "0001-01-01T00:00:00Z", + "value": "" + }] + } +}`, string(r.Body())) + }) + + t.Run("with the inclusion of internal labels", func(t *testing.T) { + _, fakeAIM, api := setupAPI(t) + fakeAIM.GenerateAlertInstances(orgID, util.GenerateShortUID(), 2) + req, err := http.NewRequest("GET", "/api/v1/alerts?includeInternalLabels=true", nil) + require.NoError(t, err) + c := &models.ReqContext{Context: &web.Context{Req: req}, SignedInUser: &models.SignedInUser{OrgId: orgID}} + r := api.RouteGetAlertStatuses(c) require.Equal(t, http.StatusOK, r.Status()) require.JSONEq(t, ` @@ -138,9 +180,63 @@ func TestRouteGetRuleStatuses(t *testing.T) { "activeAt": "0001-01-01T00:00:00Z", "value": "" }], - "labels": null, + "labels": { + "__a_private_label_on_the_rule__": "a_value" + }, + "health": "ok", + "type": "alerting", + "lastEvaluation": "2022-03-10T14:01:00Z", + "duration": 180, + "evaluationTime": 60 + }], + "interval": 60, + "lastEvaluation": "2022-03-10T14:01:00Z", + "evaluationTime": 0 + }] + } +} +`, string(r.Body())) + }) + + t.Run("with the inclusion of internal Labels", func(t *testing.T) { + fakeStore, fakeAIM, api := setupAPI(t) + generateRuleAndInstanceWithQuery(t, orgID, fakeAIM, fakeStore, withClassicConditionSingleQuery()) + + req, err := http.NewRequest("GET", "/api/v1/rules?includeInternalLabels=true", nil) + require.NoError(t, err) + c := &models.ReqContext{Context: &web.Context{Req: req}, SignedInUser: &models.SignedInUser{OrgId: orgID}} + + r := api.RouteGetRuleStatuses(c) + require.Equal(t, http.StatusOK, r.Status()) + require.JSONEq(t, ` +{ + "status": "success", + "data": { + "groups": [{ + "name": "rule-group", + "file": "namespaceUID", + "rules": [{ + "state": "inactive", + "name": "AlwaysFiring", + "query": "vector(1)", + "alerts": [{ + "labels": { + "job": "prometheus", + "__alert_rule_namespace_uid__": "test_namespace_uid", + "__alert_rule_uid__": "test_alert_rule_uid_0" + }, + "annotations": { + "severity": "critical" + }, + "state": "Normal", + "activeAt": "0001-01-01T00:00:00Z", + "value": "" + }], + "labels": { + "__a_private_label_on_the_rule__": "a_value", + "__alert_rule_uid__": "RuleUID" + }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "2022-03-10T14:01:00Z", "duration": 180, @@ -183,9 +279,10 @@ func TestRouteGetRuleStatuses(t *testing.T) { "activeAt": "0001-01-01T00:00:00Z", "value": "" }], - "labels": null, + "labels": { + "__a_private_label_on_the_rule__": "a_value" + }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "2022-03-10T14:01:00Z", "duration": 180, @@ -219,7 +316,11 @@ func generateRuleAndInstanceWithQuery(t *testing.T, orgID int64, fakeAIM *fakeAl rules := ngmodels.GenerateAlertRules(1, ngmodels.AlertRuleGen(withOrgID(orgID), asFixture(), query)) fakeAIM.GenerateAlertInstances(orgID, rules[0].UID, 1, func(s *state.State) *state.State { - s.Labels = data.Labels{"job": "prometheus"} + s.Labels = data.Labels{ + "job": "prometheus", + ngmodels.NamespaceUIDLabel: "test_namespace_uid", + ngmodels.RuleUIDLabel: "test_alert_rule_uid_0", + } s.Annotations = data.Labels{"severity": "critical"} return s }) @@ -237,7 +338,10 @@ func asFixture() func(r *ngmodels.AlertRule) { r.NamespaceUID = "namespaceUID" r.RuleGroup = "rule-group" r.UID = "RuleUID" - r.Labels = nil + r.Labels = map[string]string{ + "__a_private_label_on_the_rule__": "a_value", + ngmodels.RuleUIDLabel: "RuleUID", + } r.Annotations = nil r.IntervalSeconds = 60 r.For = 180 * time.Second diff --git a/pkg/services/ngalert/api/tooling/definitions/alertmanager.go b/pkg/services/ngalert/api/tooling/definitions/alertmanager.go index 40567675b02..df301280ec2 100644 --- a/pkg/services/ngalert/api/tooling/definitions/alertmanager.go +++ b/pkg/services/ngalert/api/tooling/definitions/alertmanager.go @@ -297,14 +297,6 @@ type GetSilencesParams struct { Filter []string `json:"filter"` } -// swagger:parameters RouteGetRuleStatuses RouteGetGrafanaRuleStatuses -type GetRuleStatusesParams struct { - // in: query - DashboardUID string - // in: query - PanelID int64 -} - // swagger:model type GettableStatus struct { // cluster diff --git a/pkg/services/ngalert/api/tooling/definitions/prom.go b/pkg/services/ngalert/api/tooling/definitions/prom.go index cf65ff3e46b..48fdeec8e7a 100644 --- a/pkg/services/ngalert/api/tooling/definitions/prom.go +++ b/pkg/services/ngalert/api/tooling/definitions/prom.go @@ -115,10 +115,10 @@ type Rule struct { Name string `json:"name"` // required: true Query string `json:"query"` - Labels overrideLabels `json:"labels"` + Labels overrideLabels `json:"labels,omitempty"` // required: true Health string `json:"health"` - LastError string `json:"lastError"` + LastError string `json:"lastError,omitempty"` // required: true Type v1.RuleType `json:"type"` LastEvaluation time.Time `json:"lastEvaluation"` @@ -142,3 +142,31 @@ type Alert struct { // override the labels type with a map for generation. // The custom marshaling for labels.Labels ends up doing this anyways. type overrideLabels map[string]string + +// swagger:parameters RouteGetGrafanaAlertStatuses +type GetGrafanaAlertStatusesParams struct { + // Include Grafana specific labels as part of the response. + // in: query + // required: false + // default: false + IncludeInternalLabels bool `json:"includeInternalLabels"` +} + +// swagger:parameters RouteGetGrafanaRuleStatuses +type GetGrafanaRuleStatusesParams struct { + // Include Grafana specific labels as part of the response. + // in: query + // required: false + // default: false + IncludeInternalLabels bool `json:"includeInternalLabels"` + + // Filter the list of rules to those that belong to the specified dashboard UID. + // in: query + // required: false + DashboardUID string + + // Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified. + // in: query + // required: false + PanelID int64 +} diff --git a/pkg/services/ngalert/api/tooling/post.json b/pkg/services/ngalert/api/tooling/post.json index e4a43aad5c3..2c852fd2faa 100644 --- a/pkg/services/ngalert/api/tooling/post.json +++ b/pkg/services/ngalert/api/tooling/post.json @@ -2803,6 +2803,7 @@ "x-go-package": "github.com/prometheus/alertmanager/timeinterval" }, "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" @@ -2835,9 +2836,9 @@ "$ref": "#/definitions/Userinfo" } }, - "title": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "type": "object", - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "Userinfo": { "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", @@ -3034,6 +3035,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "alertGroup": { + "description": "AlertGroup alert group", "properties": { "alerts": { "description": "alerts", @@ -3055,9 +3057,7 @@ "labels", "receiver" ], - "type": "object", - "x-go-name": "AlertGroup", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + "type": "object" }, "alertGroups": { "items": { @@ -4615,6 +4615,16 @@ "get": { "description": "gets the current alerts", "operationId": "RouteGetGrafanaAlertStatuses", + "parameters": [ + { + "default": false, + "description": "Include Grafana specific labels as part of the response.", + "in": "query", + "name": "includeInternalLabels", + "type": "boolean", + "x-go-name": "IncludeInternalLabels" + } + ], "responses": { "200": { "description": "AlertResponse", @@ -4634,11 +4644,21 @@ "operationId": "RouteGetGrafanaRuleStatuses", "parameters": [ { + "default": false, + "description": "Include Grafana specific labels as part of the response.", + "in": "query", + "name": "includeInternalLabels", + "type": "boolean", + "x-go-name": "IncludeInternalLabels" + }, + { + "description": "Filter the list of rules to those that belong to the specified dashboard UID.", "in": "query", "name": "DashboardUID", "type": "string" }, { + "description": "Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified.", "format": "int64", "in": "query", "name": "PanelID", @@ -4690,17 +4710,6 @@ "description": "gets the evaluation statuses of all rules", "operationId": "RouteGetRuleStatuses", "parameters": [ - { - "in": "query", - "name": "DashboardUID", - "type": "string" - }, - { - "format": "int64", - "in": "query", - "name": "PanelID", - "type": "integer" - }, { "description": "Recipient should be the numeric datasource id", "format": "int64", diff --git a/pkg/services/ngalert/api/tooling/spec.json b/pkg/services/ngalert/api/tooling/spec.json index 1f5bd9ca9b4..481564747b6 100644 --- a/pkg/services/ngalert/api/tooling/spec.json +++ b/pkg/services/ngalert/api/tooling/spec.json @@ -1022,6 +1022,16 @@ "prometheus" ], "operationId": "RouteGetGrafanaAlertStatuses", + "parameters": [ + { + "type": "boolean", + "default": false, + "x-go-name": "IncludeInternalLabels", + "description": "Include Grafana specific labels as part of the response.", + "name": "includeInternalLabels", + "in": "query" + } + ], "responses": { "200": { "description": "AlertResponse", @@ -1040,14 +1050,24 @@ ], "operationId": "RouteGetGrafanaRuleStatuses", "parameters": [ + { + "type": "boolean", + "default": false, + "x-go-name": "IncludeInternalLabels", + "description": "Include Grafana specific labels as part of the response.", + "name": "includeInternalLabels", + "in": "query" + }, { "type": "string", + "description": "Filter the list of rules to those that belong to the specified dashboard UID.", "name": "DashboardUID", "in": "query" }, { "type": "integer", "format": "int64", + "description": "Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified.", "name": "PanelID", "in": "query" } @@ -1097,17 +1117,6 @@ ], "operationId": "RouteGetRuleStatuses", "parameters": [ - { - "type": "string", - "name": "DashboardUID", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "PanelID", - "in": "query" - }, { "type": "integer", "format": "int64", @@ -4555,8 +4564,9 @@ "x-go-package": "github.com/prometheus/alertmanager/timeinterval" }, "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": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "properties": { "ForceQuery": { "type": "boolean" @@ -4589,7 +4599,7 @@ "$ref": "#/definitions/Userinfo" } }, - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "Userinfo": { "description": "The Userinfo type is an immutable encapsulation of username and\npassword details for a URL. An existing Userinfo value is guaranteed\nto have a username set (potentially empty, as allowed by RFC 2396),\nand optionally a password.", @@ -4786,6 +4796,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "alertGroup": { + "description": "AlertGroup alert group", "type": "object", "required": [ "alerts", @@ -4808,8 +4819,6 @@ "$ref": "#/definitions/receiver" } }, - "x-go-name": "AlertGroup", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models", "$ref": "#/definitions/alertGroup" }, "alertGroups": { diff --git a/pkg/services/ngalert/models/alert_rule.go b/pkg/services/ngalert/models/alert_rule.go index 3216961469c..dbf5476f13c 100644 --- a/pkg/services/ngalert/models/alert_rule.go +++ b/pkg/services/ngalert/models/alert_rule.go @@ -18,12 +18,9 @@ var ( // ErrAlertRuleFailedGenerateUniqueUID is an error for failure to generate alert rule UID ErrAlertRuleFailedGenerateUniqueUID = errors.New("failed to generate alert rule UID") // ErrCannotEditNamespace is an error returned if the user does not have permissions to edit the namespace - ErrCannotEditNamespace = errors.New("user does not have permissions to edit the namespace") - // ErrRuleGroupNamespaceNotFound - ErrRuleGroupNamespaceNotFound = errors.New("rule group not found under this namespace") - // ErrAlertRuleFailedValidation - ErrAlertRuleFailedValidation = errors.New("invalid alert rule") - // ErrAlertRuleUniqueConstraintViolation + ErrCannotEditNamespace = errors.New("user does not have permissions to edit the namespace") + ErrRuleGroupNamespaceNotFound = errors.New("rule group not found under this namespace") + ErrAlertRuleFailedValidation = errors.New("invalid alert rule") ErrAlertRuleUniqueConstraintViolation = errors.New("a conflicting alert rule is found: rule title under the same organisation and folder should be unique") ) @@ -77,6 +74,12 @@ const ( OkErrState ExecutionErrorState = "OK" ) +// InternalLabelNameSet are labels that grafana automatically include as part of the labelset. +var InternalLabelNameSet = map[string]struct{}{ + RuleUIDLabel: {}, + NamespaceUIDLabel: {}, +} + const ( RuleUIDLabel = "__alert_rule_uid__" NamespaceUIDLabel = "__alert_rule_namespace_uid__" @@ -110,6 +113,29 @@ type AlertRule struct { Labels map[string]string } +type LabelOption func(map[string]string) + +func WithoutInternalLabels() LabelOption { + return func(labels map[string]string) { + for k := range labels { + if _, ok := InternalLabelNameSet[k]; ok { + delete(labels, k) + } + } + } +} + +// GetLabels returns the labels specified as part of the alert rule. +func (alertRule *AlertRule) GetLabels(opts ...LabelOption) map[string]string { + labels := alertRule.Labels + + for _, opt := range opts { + opt(labels) + } + + return labels +} + // Diff calculates diff between two alert rules. Returns nil if two rules are equal. Otherwise, returns cmputil.DiffReport func (alertRule *AlertRule) Diff(rule *AlertRule, ignore ...string) cmputil.DiffReport { var reporter cmputil.DiffReporter diff --git a/pkg/services/ngalert/state/state.go b/pkg/services/ngalert/state/state.go index 6b06eb1a453..270a029bafa 100644 --- a/pkg/services/ngalert/state/state.go +++ b/pkg/services/ngalert/state/state.go @@ -47,7 +47,7 @@ func NewEvaluationValues(m map[string]eval.NumberValueCapture) map[string]*float return result } -func (a *State) resultNormal(alertRule *ngModels.AlertRule, result eval.Result) { +func (a *State) resultNormal(_ *ngModels.AlertRule, result eval.Result) { a.Error = result.Error // should be nil since state is not error if a.State != eval.Normal { @@ -177,3 +177,13 @@ func (a *State) setEndsAt(alertRule *ngModels.AlertRule, result eval.Result) { a.EndsAt = result.EvaluatedAt.Add(ends * 3) } + +func (a *State) GetLabels(opts ...ngModels.LabelOption) map[string]string { + labels := a.Labels.Copy() + + for _, opt := range opts { + opt(labels) + } + + return labels +} diff --git a/pkg/tests/api/alerting/api_prometheus_test.go b/pkg/tests/api/alerting/api_prometheus_test.go index bce301c230c..8a834a19292 100644 --- a/pkg/tests/api/alerting/api_prometheus_test.go +++ b/pkg/tests/api/alerting/api_prometheus_test.go @@ -245,7 +245,6 @@ func TestPrometheusRules(t *testing.T) { "label1": "val1" }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -253,9 +252,7 @@ func TestPrometheusRules(t *testing.T) { "state": "inactive", "name": "AlwaysFiringButSilenced", "query": "[{\"refId\":\"A\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":18000,\"to\":10800},\"datasourceUid\":\"-100\",\"model\":{\"expression\":\"2 + 3 \\u003e 1\",\"intervalMs\":1000,\"maxDataPoints\":43200,\"type\":\"math\"}}]", - "labels": null, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -300,7 +297,6 @@ func TestPrometheusRules(t *testing.T) { "label1": "val1" }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -308,9 +304,7 @@ func TestPrometheusRules(t *testing.T) { "state": "inactive", "name": "AlwaysFiringButSilenced", "query": "[{\"refId\":\"A\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":18000,\"to\":10800},\"datasourceUid\":\"-100\",\"model\":{\"expression\":\"2 + 3 \\u003e 1\",\"intervalMs\":1000,\"maxDataPoints\":43200,\"type\":\"math\"}}]", - "labels": null, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -446,9 +440,7 @@ func TestPrometheusRulesFilterByDashboard(t *testing.T) { "__dashboardUid__": "%s", "__panelId__": "1" }, - "labels": null, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -456,9 +448,7 @@ func TestPrometheusRulesFilterByDashboard(t *testing.T) { "state": "inactive", "name": "AlwaysFiringButSilenced", "query": "[{\"refId\":\"A\",\"queryType\":\"\",\"relativeTimeRange\":{\"from\":18000,\"to\":10800},\"datasourceUid\":\"-100\",\"model\":{\"expression\":\"2 + 3 \\u003e 1\",\"intervalMs\":1000,\"maxDataPoints\":43200,\"type\":\"math\"}}]", - "labels": null, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -485,9 +475,7 @@ func TestPrometheusRulesFilterByDashboard(t *testing.T) { "__dashboardUid__": "%s", "__panelId__": "1" }, - "labels": null, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -694,7 +682,6 @@ func TestPrometheusRulesPermissions(t *testing.T) { "label1": "val1" }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -718,7 +705,6 @@ func TestPrometheusRulesPermissions(t *testing.T) { "label1": "val1" }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 @@ -767,7 +753,6 @@ func TestPrometheusRulesPermissions(t *testing.T) { "label1": "val1" }, "health": "ok", - "lastError": "", "type": "alerting", "lastEvaluation": "0001-01-01T00:00:00Z", "evaluationTime": 0 diff --git a/public/api-merged.json b/public/api-merged.json index 9a6603027a1..3873ab8603e 100644 --- a/public/api-merged.json +++ b/public/api-merged.json @@ -19,598 +19,6 @@ }, "basePath": "/api", "paths": { - "/access-control/builtin-roles": { - "get": { - "description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get all built-in role assignments.", - "operationId": "listBuiltinRoles", - "responses": { - "200": { - "$ref": "#/responses/listBuiltinRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Create a built-in role assignment.", - "operationId": "addBuiltinRole", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddBuiltInRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": { - "delete": { - "description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to remove a built-in role assignment which allows to do that.", - "tags": ["access_control", "enterprise"], - "summary": "Remove a built-in role assignment.", - "operationId": "removeBuiltinRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "string", - "x-go-name": "RoleUID", - "name": "builtinRole", - "in": "path", - "required": true - }, - { - "type": "boolean", - "x-go-name": "Global", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:list` and scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get all roles.", - "operationId": "getAllRoles", - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:delegate`. `permission:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Create a new custom role.", - "operationId": "createRoleWithPermissions", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserRolesCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}": { - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get a role.", - "operationId": "getRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:delegate`. `permission:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": ["access_control", "enterprise"], - "summary": "Update a custom role.", - "operationId": "updateRoleWithPermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": ["access_control", "enterprise"], - "summary": "Delete a custom role.", - "operationId": "deleteCustomRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": ["access_control", "enterprise"], - "summary": "Get status.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:list` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "Get team roles.", - "operationId": "listTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:delegate` for each.", - "tags": ["access_control", "enterprise"], - "summary": "Update team role.", - "operationId": "setTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Add team role.", - "operationId": "addTeamRole", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Remove team role.", - "operationId": "removeTeamRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{user_id}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "List roles assigned to a user.", - "operationId": "listUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:delegate` for each. `permission:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Set user role assignments.", - "operationId": "setUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Add a user role assignment.", - "operationId": "addUserRole", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddUserRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{user_id}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Remove a user role assignment.", - "operationId": "removeUserRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "boolean", - "x-go-name": "Global", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "tags": ["ldap_debug"], - "summary": "Available to grafana admins.", - "operationId": "getLDAPSyncStatus", - "responses": { - "200": { - "$ref": "#/responses/getLDAPSyncStatusResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/admin/ldap/reload": { "post": { "security": [ @@ -775,24 +183,6 @@ } } }, - "/admin/provisioning/access-control/reload": { - "post": { - "tags": ["access_control_provisioning", "enterprise"], - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, "/admin/provisioning/accesscontrol/reload": { "post": { "security": [ @@ -4377,155 +3767,6 @@ } } }, - "/datasources/{datasource_id}/disable-permissions": { - "post": { - "description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Disable permissions for a data source.", - "operationId": "disablePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/enable-permissions": { - "post": { - "description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Enable permissions for a data source.", - "operationId": "enablePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/permissions": { - "get": { - "description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Get permissions for a data source.", - "operationId": "getPermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPermissionseResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/permissions/{permissionId}": { - "delete": { - "description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Remove permission for a data source.", - "operationId": "deletePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "PermissionID", - "name": "permissionId", - "in": "path", - "required": true - }, - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/ds/query": { "post": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.", @@ -5166,208 +4407,6 @@ } } }, - "/licensing/check": { - "get": { - "tags": ["licensing", "enterprise"], - "summary": "Check license availability.", - "operationId": "getLicenseStatus", - "responses": { - "200": { - "$ref": "#/responses/getLicenseStatusResponse" - } - } - } - }, - "/licensing/custom-permissions": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report.", - "operationId": "getCustomPermissionsReport", - "responses": { - "200": { - "$ref": "#/responses/getCustomPermissionsReportResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": ["text/csv"], - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report in CSV format.", - "operationId": "getCustomPermissionsCSV", - "responses": { - "200": { - "$ref": "#/responses/getCustomPermissionsReportResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Refresh license stats.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get license token.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - } - } - }, - "post": { - "description": "You need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], - "summary": "Create license token.", - "operationId": "postLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - } - } - }, - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": ["licensing", "enterprise"], - "summary": "Remove license from database.", - "operationId": "deleteLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], - "summary": "Manually force license refresh.", - "operationId": "postRenewLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - } - }, - "/login/saml": { - "get": { - "tags": ["saml", "enterprise"], - "summary": "It initiates the login flow by redirecting the user to the IdP.", - "operationId": "getSAMLLogin", - "responses": { - "302": { - "description": "" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/logout/saml": { - "get": { - "tags": ["saml", "enterprise"], - "summary": "GetLogout initiates single logout process.", - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/org": { "get": { "description": "Get current Organization", @@ -6328,6 +5367,16 @@ "description": "gets the current alerts", "tags": ["prometheus"], "operationId": "RouteGetGrafanaAlertStatuses", + "parameters": [ + { + "type": "boolean", + "default": false, + "x-go-name": "IncludeInternalLabels", + "description": "Include Grafana specific labels as part of the response.", + "name": "includeInternalLabels", + "in": "query" + } + ], "responses": { "200": { "description": "AlertResponse", @@ -6344,14 +5393,24 @@ "tags": ["prometheus"], "operationId": "RouteGetGrafanaRuleStatuses", "parameters": [ + { + "type": "boolean", + "default": false, + "x-go-name": "IncludeInternalLabels", + "description": "Include Grafana specific labels as part of the response.", + "name": "includeInternalLabels", + "in": "query" + }, { "type": "string", + "description": "Filter the list of rules to those that belong to the specified dashboard UID.", "name": "DashboardUID", "in": "query" }, { "type": "integer", "format": "int64", + "description": "Filter the list of rules to those that belong to the specified panel ID. Dashboard UID must be specified.", "name": "PanelID", "in": "query" } @@ -6397,17 +5456,6 @@ "tags": ["prometheus"], "operationId": "RouteGetRuleStatuses", "parameters": [ - { - "type": "string", - "name": "DashboardUID", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "name": "PanelID", - "in": "query" - }, { "type": "integer", "format": "int64", @@ -6427,594 +5475,6 @@ } } }, - "/recording-rules": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Get all recording rules.", - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["recording_rules", "enterprise"], - "summary": "Update a recording rule.", - "operationId": "updateRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Create a new recording rule.", - "operationId": "createRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/test": { - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Test a recording rule.", - "operationId": "testCreateRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/writer": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Get the write target.", - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Create a new write target.", - "operationId": "createRecordingRuleWriteTarget", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete the write target.", - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete a recording rule.", - "operationId": "deleteRecordingRule", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "RecordingRuleID", - "name": "recordingRuleID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": ["reports", "enterprise"], - "summary": "List reports.", - "operationId": "getReports", - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": ["reports", "enterprise"], - "summary": "Create a report.", - "operationId": "createReport", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/email": { - "post": { - "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send a report.", - "operationId": "sendReport", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportEmailDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/pdf/{DashboardID}": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], - "summary": "Render report for dashboard.", - "operationId": "renderReportPDF", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "DashboardID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": ["reports", "enterprise"], - "summary": "Get settings.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": ["reports", "enterprise"], - "summary": "Save settings.", - "operationId": "saveReportSettings", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SettingsDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send test report via email.", - "operationId": "sendTestEmail", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/{reportID}": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Get a report.", - "operationId": "getReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Update a report.", - "operationId": "updateReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Delete a report.", - "operationId": "deleteReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/ruler/grafana/api/v1/rules": { "get": { "description": "List rule groups", @@ -7383,77 +5843,6 @@ } } }, - "/saml/acs": { - "post": { - "tags": ["saml", "enterprise"], - "summary": "It performs assertion Consumer Service (ACS).", - "operationId": "postACS", - "parameters": [ - { - "type": "string", - "name": "RelayState", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/metadata": { - "get": { - "produces": ["application/xml;application/samlmetadata+xml"], - "tags": ["saml", "enterprise"], - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "operationId": "getSAMLMetadata", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - } - } - } - }, - "/saml/slo": { - "post": { - "tags": ["saml", "enterprise"], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "postSLO", - "parameters": [ - { - "type": "string", - "name": "SAMLRequest", - "in": "query" - }, - { - "type": "string", - "name": "SAMLResponse", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/search": { "get": { "tags": ["search"], @@ -7805,132 +6194,6 @@ } } }, - "/teams/{teamId}/groups": { - "get": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Get External Groups.", - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Add External Group.", - "operationId": "addTeamGroupApi", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TeamGroupMapping" - } - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{teamId}/groups/{groupId}": { - "delete": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Remove External Group.", - "operationId": "removeTeamGroupApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "GroupID", - "name": "groupId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/teams/{team_id}": { "get": { "tags": ["teams"], @@ -9154,50 +7417,6 @@ "type": "object", "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" }, - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - }, - "nextSync": { - "type": "string", - "format": "date-time", - "x-go-name": "NextSync" - }, - "prevSync": { - "$ref": "#/definitions/SyncResult" - }, - "schedule": { - "type": "string", - "x-go-name": "Schedule" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapdebug" - }, - "ActiveUserStats": { - "type": "object", - "properties": { - "active_admins_and_editors": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveAdminsAndEditors" - }, - "active_users": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveUsers" - }, - "active_viewers": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveViewers" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "AddApiKeyCommand": { "description": "COMMANDS", "type": "object", @@ -9217,26 +7436,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddBuiltInRoleCommand": { - "type": "object", - "properties": { - "builtInRole": { - "type": "string", - "enum": ["Viewer", " Editor", " Admin", " Grafana Admin"], - "x-go-name": "BuiltinRole" - }, - "global": { - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the Built-in role assignments for more information.", - "type": "boolean", - "x-go-name": "Global" - }, - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "AddDataSourceCommand": { "description": "Also acts as api DTO", "type": "object", @@ -9339,29 +7538,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddPermissionDTO": { - "type": "object", - "properties": { - "builtinRole": { - "type": "string", - "x-go-name": "BuiltinRole" - }, - "permission": { - "$ref": "#/definitions/DsPermissionType" - }, - "teamId": { - "type": "integer", - "format": "int64", - "x-go-name": "TeamId" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/dspermissions" - }, "AddTeamMemberCommand": { "type": "object", "properties": { @@ -9373,30 +7549,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddTeamRoleCommand": { - "type": "object", - "properties": { - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, - "AddUserRoleCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "Address": { "type": "object", "properties": { @@ -10143,32 +8295,6 @@ }, "x-go-package": "github.com/prometheus/common/config" }, - "BrandingOptionsDTO": { - "type": "object", - "properties": { - "emailFooterLink": { - "type": "string", - "x-go-name": "EmailFooterLink" - }, - "emailFooterMode": { - "type": "string", - "x-go-name": "EmailFooterMode" - }, - "emailFooterText": { - "type": "string", - "x-go-name": "EmailFooterText" - }, - "emailLogoUrl": { - "type": "string", - "x-go-name": "EmailLogo" - }, - "reportLogoUrl": { - "type": "string", - "x-go-name": "ReportLogo" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CalculateDiffTarget": { "type": "object", "properties": { @@ -10236,89 +8362,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" }, - "ConfigDTO": { - "description": "ConfigDTO is model representation in transfer", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "dashboardId": { - "type": "integer", - "format": "int64", - "x-go-name": "DashboardID" - }, - "dashboardName": { - "type": "string", - "x-go-name": "DashboardName" - }, - "dashboardUid": { - "type": "string", - "x-go-name": "DashboardUID" - }, - "enableCsv": { - "type": "boolean", - "x-go-name": "EnableCSV" - }, - "enableDashboardUrl": { - "type": "boolean", - "x-go-name": "EnableDashboardURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "options": { - "$ref": "#/definitions/ReportOptionsDTO" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "recipients": { - "type": "string", - "x-go-name": "Recipients" - }, - "replyTo": { - "type": "string", - "x-go-name": "ReplyTo" - }, - "schedule": { - "$ref": "#/definitions/ScheduleDTO" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "templateVars": { - "type": "object", - "x-go-name": "TemplateVars" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CreateAlertNotificationCommand": { "type": "object", "properties": { @@ -10452,59 +8495,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements" }, - "CreateOrUpdateConfigCmd": { - "type": "object", - "properties": { - "dashboardId": { - "type": "integer", - "format": "int64", - "x-go-name": "DashboardID" - }, - "dashboardUid": { - "type": "string", - "x-go-name": "DashboardUID" - }, - "enableCsv": { - "type": "boolean", - "x-go-name": "EnableCSV" - }, - "enableDashboardUrl": { - "type": "boolean", - "x-go-name": "EnableDashboardURL" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "options": { - "$ref": "#/definitions/ReportOptionsDTO" - }, - "recipients": { - "type": "string", - "x-go-name": "Recipients" - }, - "replyTo": { - "type": "string", - "x-go-name": "ReplyTo" - }, - "schedule": { - "$ref": "#/definitions/ScheduleDTO" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "templateVars": { - "type": "object", - "x-go-name": "TemplateVars" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CreateOrgCommand": { "type": "object", "properties": { @@ -10515,44 +8505,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "CreateRoleWithPermissionsCommand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "CreateTeamCommand": { "type": "object", "properties": { @@ -10567,67 +8519,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "CustomPermissionsRecordDTO": { - "type": "object", - "properties": { - "customPermissions": { - "type": "string", - "x-go-name": "CustomPermissions" - }, - "granteeName": { - "type": "string", - "x-go-name": "GranteeName" - }, - "granteeType": { - "type": "string", - "x-go-name": "GranteeType" - }, - "granteeUrl": { - "type": "string", - "x-go-name": "GranteeURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "isFolder": { - "type": "boolean", - "x-go-name": "IsFolder" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "orgRole": { - "type": "string", - "x-go-name": "OrgRole" - }, - "slug": { - "type": "string", - "x-go-name": "Slug" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "usersCount": { - "type": "integer", - "format": "int64", - "x-go-name": "UsersCount" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "DashboardAclInfoDTO": { "type": "object", "properties": { @@ -11448,16 +9339,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "DeleteTokenCommand": { - "type": "object", - "properties": { - "instance": { - "type": "string", - "x-go-name": "Instance" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "DiscoveryBase": { "type": "object", "required": ["status"], @@ -11676,19 +9557,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync" - }, "Failure": { "$ref": "#/definitions/ResponseDetails" }, @@ -13589,31 +11457,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "Permission": { - "type": "object", - "title": "Permission is the model for access control permissions.", - "properties": { - "action": { - "type": "string", - "x-go-name": "Action" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "scope": { - "type": "string", - "x-go-name": "Scope" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol" - }, "PermissionDenied": { "type": "object", "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/api/tooling/definitions" @@ -14021,24 +11864,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "PrometheusRemoteWriteTargetJSON": { - "type": "object", - "properties": { - "data_source_uid": { - "type": "string", - "x-go-name": "DatasourceUID" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "remote_write_path": { - "type": "string", - "x-go-name": "WritePath" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api" - }, "PushoverConfig": { "type": "object", "properties": { @@ -14178,65 +12003,6 @@ }, "x-go-package": "github.com/prometheus/alertmanager/config" }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", - "type": "object", - "properties": { - "active": { - "type": "boolean", - "x-go-name": "Active" - }, - "count": { - "type": "boolean", - "x-go-name": "Count" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "dest_data_source_uid": { - "type": "string", - "x-go-name": "DestDataSourceUID" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "interval": { - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "prom_name": { - "type": "string", - "x-go-name": "PromName" - }, - "queries": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "x-go-name": "Queries" - }, - "range": { - "type": "integer", - "format": "int64", - "x-go-name": "Range" - }, - "target_ref_id": { - "type": "string", - "x-go-name": "TargetRefID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api" - }, "Regexp": { "description": "A Regexp is safe for concurrent use by multiple goroutines,\nexcept for configuration methods, such as Longest.", "type": "object", @@ -14256,49 +12022,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/services/ngalert/models" }, - "ReportEmailDTO": { - "type": "object", - "properties": { - "email": { - "type": "string", - "x-go-name": "Email" - }, - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string", - "x-go-name": "Emails" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "string", - "format": "int64", - "x-go-name": "Id" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean", - "x-go-name": "UseEmailsFromReport" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, - "ReportOptionsDTO": { - "type": "object", - "properties": { - "layout": { - "type": "string", - "x-go-name": "Layout" - }, - "orientation": { - "type": "string", - "x-go-name": "Orientation" - }, - "timeRange": { - "$ref": "#/definitions/TimeRangeDTO" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "ResponseDetails": { "type": "object", "properties": { @@ -14329,58 +12052,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "RoleDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "delegatable": { - "type": "boolean", - "x-go-name": "Delegatable" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol" - }, "RoleType": { "type": "string", "x-go-package": "github.com/grafana/grafana/pkg/models" @@ -14696,61 +12367,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "ScheduleDTO": { - "type": "object", - "properties": { - "day": { - "type": "string", - "x-go-name": "Day" - }, - "dayOfMonth": { - "type": "string", - "x-go-name": "DayOfMonth" - }, - "endDate": { - "type": "string", - "format": "date-time", - "x-go-name": "EndDate" - }, - "frequency": { - "type": "string", - "x-go-name": "Frequency" - }, - "hour": { - "type": "integer", - "format": "int64", - "x-go-name": "Hour" - }, - "intervalAmount": { - "type": "integer", - "format": "int64", - "x-go-name": "IntervalAmount" - }, - "intervalFrequency": { - "type": "string", - "x-go-name": "IntervalFrequency" - }, - "minute": { - "type": "integer", - "format": "int64", - "x-go-name": "Minute" - }, - "startDate": { - "type": "string", - "format": "date-time", - "x-go-name": "StartDate" - }, - "timeZone": { - "type": "string", - "x-go-name": "TimeZone" - }, - "workdaysOnly": { - "type": "boolean", - "x-go-name": "WorkdaysOnly" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "SearchTeamQueryResult": { "type": "object", "properties": { @@ -14816,23 +12432,6 @@ "title": "SecretURL is a URL that must not be revealed on marshaling.", "$ref": "#/definitions/URL" }, - "SetUserRolesCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "RoleUIDs" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "SettingsBag": { "type": "object", "additionalProperties": { @@ -14843,30 +12442,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/setting" }, - "SettingsDTO": { - "type": "object", - "properties": { - "branding": { - "$ref": "#/definitions/BrandingOptionsDTO" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "SigV4Config": { "description": "SigV4Config is the configuration for signing remote write requests with\nAWS's SigV4 verification process. Empty values will be retrieved using the\nAWS default credentials chain.", "type": "object", @@ -15077,16 +12652,6 @@ "SmtpNotEnabled": { "$ref": "#/definitions/ResponseDetails" }, - "Status": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "Success": { "$ref": "#/definitions/ResponseDetails" }, @@ -15100,40 +12665,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/docs/definitions" }, - "SyncResult": { - "type": "object", - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "properties": { - "Elapsed": { - "$ref": "#/definitions/Duration" - }, - "FailedUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/FailedUser" - } - }, - "MissingUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "UpdatedUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync" - }, "TLSConfig": { "type": "object", "title": "TLSConfig configures the options for TLS connections.", @@ -15225,36 +12756,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "TeamGroupDTO": { - "type": "object", - "properties": { - "groupId": { - "type": "string", - "x-go-name": "GroupId" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgId" - }, - "teamId": { - "type": "integer", - "format": "int64", - "x-go-name": "TeamId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models" - }, - "TeamGroupMapping": { - "type": "object", - "properties": { - "groupId": { - "type": "string", - "x-go-name": "GroupId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models" - }, "TeamMemberDTO": { "type": "object", "properties": { @@ -15546,136 +13047,6 @@ }, "x-go-package": "github.com/prometheus/alertmanager/timeinterval" }, - "TimeRangeDTO": { - "type": "object", - "properties": { - "from": { - "type": "string", - "x-go-name": "From" - }, - "to": { - "type": "string", - "x-go-name": "To" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, - "Token": { - "type": "object", - "properties": { - "account": { - "type": "string", - "x-go-name": "Account" - }, - "company": { - "type": "string", - "x-go-name": "Company" - }, - "details_url": { - "type": "string", - "x-go-name": "DetailsUrl" - }, - "exp": { - "type": "integer", - "format": "int64", - "x-go-name": "Expires" - }, - "iat": { - "type": "integer", - "format": "int64", - "x-go-name": "Issued" - }, - "included_admins": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedAdmins" - }, - "included_users": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedUsers" - }, - "included_viewers": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedViewers" - }, - "iss": { - "type": "string", - "x-go-name": "Issuer" - }, - "jti": { - "type": "string", - "x-go-name": "Id" - }, - "lexp": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseExpires" - }, - "lic_exp_warn_days": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseExpiresWarnDays" - }, - "lid": { - "type": "string", - "x-go-name": "LicenseId" - }, - "limit_by": { - "type": "string", - "x-go-name": "LimitBy" - }, - "max_concurrent_user_sessions": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxConcurrentUserSessions" - }, - "nbf": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseIssued" - }, - "prod": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Products" - }, - "slug": { - "type": "string", - "x-go-name": "Slug" - }, - "status": { - "$ref": "#/definitions/TokenStatus" - }, - "sub": { - "type": "string", - "x-go-name": "Subject" - }, - "tok_exp_warn_days": { - "type": "integer", - "format": "int64", - "x-go-name": "TokenExpiresWarnDays" - }, - "update_days": { - "type": "integer", - "format": "int64", - "x-go-name": "UpdateDays" - }, - "usage_billing": { - "type": "boolean", - "x-go-name": "UsageBilling" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, - "TokenStatus": { - "type": "integer", - "format": "int64", - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "TrimDashboardCommand": { "type": "object", "properties": { @@ -15701,8 +13072,9 @@ "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, "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": "URL is a custom URL type that allows validation at configuration load time.", + "title": "A URL represents a parsed URL (technically, a URI reference).", "properties": { "ForceQuery": { "type": "boolean" @@ -15735,7 +13107,7 @@ "$ref": "#/definitions/Userinfo" } }, - "x-go-package": "github.com/prometheus/common/config" + "x-go-package": "net/url" }, "UpdateAlertNotificationCommand": { "type": "object", @@ -16062,44 +13434,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "UpdateRoleCommand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "UpdateTeamCommand": { "type": "object", "properties": { @@ -16608,6 +13942,7 @@ "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" }, "alertGroup": { + "description": "AlertGroup alert group", "type": "object", "required": ["alerts", "labels", "receiver"], "properties": { @@ -16625,9 +13960,7 @@ "receiver": { "$ref": "#/definitions/receiver" } - }, - "x-go-name": "AlertGroup", - "x-go-package": "github.com/prometheus/alertmanager/api/v2/models" + } }, "alertGroups": { "type": "array", @@ -17152,16 +14485,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "contentResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, "createAnnotationResponse": { "description": "", "schema": { @@ -17236,12 +14559,6 @@ } } }, - "createReportResponse": { - "description": "", - "schema": { - "type": "object" - } - }, "createSnapshotResponse": { "description": "", "schema": { @@ -17463,12 +14780,6 @@ } } }, - "getAccessControlStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Status" - } - }, "getAlertNotificationChannelResponse": { "description": "", "schema": { @@ -17502,15 +14813,6 @@ } } }, - "getAllRolesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "getAnnotationTagsResponse": { "description": "", "schema": { @@ -17535,15 +14837,6 @@ } } }, - "getCustomPermissionsReportResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CustomPermissionsRecordDTO" - } - } - }, "getDashboardPermissionsResponse": { "description": "", "schema": { @@ -17614,12 +14907,6 @@ } } }, - "getLDAPSyncStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveSyncStatusDTO" - } - }, "getLibraryElementConnectionsResponse": { "description": "", "schema": { @@ -17638,15 +14925,6 @@ "$ref": "#/definitions/LibraryElementSearchResponse" } }, - "getLicenseStatusResponse": { - "description": "" - }, - "getLicenseTokenResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Token" - } - }, "getOrgResponse": { "description": "", "schema": { @@ -17662,12 +14940,6 @@ } } }, - "getPermissionseResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/AddPermissionDTO" - } - }, "getPreferencesResponse": { "description": "", "schema": { @@ -17683,33 +14955,6 @@ } } }, - "getReportResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ConfigDTO" - } - }, - "getReportSettingsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/SettingsDTO" - } - }, - "getReportsResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigDTO" - } - } - }, - "getRoleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "getSettingsResponse": { "description": "", "schema": { @@ -17751,15 +14996,6 @@ "$ref": "#/definitions/AdminStats" } }, - "getTeamGroupsApiResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - } - }, "getTeamMembersResponse": { "description": "", "schema": { @@ -17822,27 +15058,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "listBuiltinRolesResponse": { - "description": "", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "listRecordingRulesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - }, "lookupAlertNotificationChannelsResponse": { "description": "", "schema": { @@ -17972,9 +15187,6 @@ } } }, - "postRenewLicenseTokenResponse": { - "description": "" - }, "preconditionFailedError": { "description": "PreconditionFailedError", "schema": { @@ -17993,24 +15205,6 @@ "$ref": "#/definitions/DataResponse" } }, - "recordingRuleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - }, - "recordingRuleWriteTargetResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - }, - "refreshLicenseStatsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveUserStats" - } - }, "searchOrgResponse": { "description": "", "schema": { diff --git a/public/api-spec.json b/public/api-spec.json index 5b8469bfb29..7338c39b31c 100644 --- a/public/api-spec.json +++ b/public/api-spec.json @@ -19,598 +19,6 @@ }, "basePath": "/api", "paths": { - "/access-control/builtin-roles": { - "get": { - "description": "You need to have a permission with action `roles.builtin:list` with scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get all built-in role assignments.", - "operationId": "listBuiltinRoles", - "responses": { - "200": { - "$ref": "#/responses/listBuiltinRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `roles.builtin:add` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only create built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to create a built-in role assignment which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Create a built-in role assignment.", - "operationId": "addBuiltinRole", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddBuiltInRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/builtin-roles/{builtinRole}/roles/{roleUID}": { - "delete": { - "description": "Deletes a built-in role assignment (for one of Viewer, Editor, Admin, or Grafana Admin) to the role with the provided UID.\n\nYou need to have a permission with action `roles.builtin:remove` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only remove built-in role assignments with the roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to remove a built-in role assignment which allows to do that.", - "tags": ["access_control", "enterprise"], - "summary": "Remove a built-in role assignment.", - "operationId": "removeBuiltinRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "string", - "x-go-name": "RoleUID", - "name": "builtinRole", - "in": "path", - "required": true - }, - { - "type": "boolean", - "x-go-name": "Global", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles": { - "get": { - "description": "Gets all existing roles. The response contains all global and organization local roles, for the organization which user is signed in.\n\nYou need to have a permission with action `roles:list` and scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get all roles.", - "operationId": "getAllRoles", - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Creates a new custom role and maps given permissions to that role. Note that roles with the same prefix as Fixed Roles can’t be created.\n\nYou need to have a permission with action `roles:write` and scope `permissions:delegate`. `permission:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.\nFor example, if a user does not have required permissions for creating users, they won’t be able to create a custom role which allows to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Create a new custom role.", - "operationId": "createRoleWithPermissions", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SetUserRolesCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/roles/{roleUID}": { - "get": { - "description": "Get a role for the given UID.\n\nYou need to have a permission with action `roles:read` and scope `roles:*`.", - "tags": ["access_control", "enterprise"], - "summary": "Get a role.", - "operationId": "getRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `roles:write` and scope `permissions:delegate`. `permission:delegate`` scope ensures that users can only create custom roles with the same, or a subset of permissions which the user has.", - "tags": ["access_control", "enterprise"], - "summary": "Update a custom role.", - "operationId": "updateRoleWithPermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/UpdateRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getRoleResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Delete a role with the given UID, and it’s permissions. If the role is assigned to a built-in role, the deletion operation will fail, unless force query param is set to true, and in that case all assignments will also be deleted.\n\nYou need to have a permission with action `roles:delete` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only delete a custom role with the same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to delete a custom role which allows to do that.", - "tags": ["access_control", "enterprise"], - "summary": "Delete a custom role.", - "operationId": "deleteCustomRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/status": { - "get": { - "description": "Returns an indicator to check if fine-grained access control is enabled or not.\n\nYou need to have a permission with action `status:accesscontrol` and scope `services:accesscontrol`.", - "tags": ["access_control", "enterprise"], - "summary": "Get status.", - "operationId": "getAccessControlStatus", - "responses": { - "200": { - "$ref": "#/responses/getAccessControlStatusResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles": { - "get": { - "description": "You need to have a permission with action `teams.roles:list` and scope `teams:id:\u003cteam ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "Get team roles.", - "operationId": "listTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "You need to have a permission with action `teams.roles:add` and `teams.roles:remove` and scope `permissions:delegate` for each.", - "tags": ["access_control", "enterprise"], - "summary": "Update team role.", - "operationId": "setTeamRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "You need to have a permission with action `teams.roles:add` and scope `permissions:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Add team role.", - "operationId": "addTeamRole", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddTeamRoleCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/teams/{teamId}/roles/{roleUID}": { - "delete": { - "description": "You need to have a permission with action `teams.roles:remove` and scope `permissions:delegate`.", - "tags": ["access_control", "enterprise"], - "summary": "Remove team role.", - "operationId": "removeTeamRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{user_id}/roles": { - "get": { - "description": "Lists the roles that have been directly assigned to a given user. The list does not include built-in roles (Viewer, Editor, Admin or Grafana Admin), and it does not include roles that have been inherited from a team.\n\nYou need to have a permission with action `users.roles:list` and scope `users:id:\u003cuser ID\u003e`.", - "tags": ["access_control", "enterprise"], - "summary": "List roles assigned to a user.", - "operationId": "listUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getAllRolesResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Update the user’s role assignments to match the provided set of UIDs. This will remove any assigned roles that aren’t in the request and add roles that are in the set but are not already assigned to the user.\nIf you want to add or remove a single role, consider using Add a user role assignment or Remove a user role assignment instead.\n\nYou need to have a permission with action `users.roles:add` and `users.roles:remove` and scope `permissions:delegate` for each. `permission:delegate` scope ensures that users can only assign or unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign or unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Set user role assignments.", - "operationId": "setUserRoles", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Assign a role to a specific user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:add` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only assign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to assign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Add a user role assignment.", - "operationId": "addUserRole", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/AddUserRoleCommand" - } - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/access-control/users/{user_id}/roles/{roleUID}": { - "delete": { - "description": "Revoke a role from a user. For bulk updates consider Set user role assignments.\n\nYou need to have a permission with action `users.roles:remove` and scope `permissions:delegate`. `permission:delegate` scope ensures that users can only unassign roles which have same, or a subset of permissions which the user has. For example, if a user does not have required permissions for creating users, they won’t be able to unassign a role which will allow to do that. This is done to prevent escalation of privileges.", - "tags": ["access_control", "enterprise"], - "summary": "Remove a user role assignment.", - "operationId": "removeUserRole", - "parameters": [ - { - "type": "string", - "x-go-name": "RoleUID", - "name": "roleUID", - "in": "path", - "required": true - }, - { - "type": "boolean", - "x-go-name": "Global", - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to remove assignment.", - "name": "global", - "in": "query" - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "UserID", - "name": "user_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/admin/ldap-sync-status": { - "get": { - "description": "You need to have a permission with action `ldap.status:read`.", - "tags": ["ldap_debug"], - "summary": "Available to grafana admins.", - "operationId": "getLDAPSyncStatus", - "responses": { - "200": { - "$ref": "#/responses/getLDAPSyncStatusResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/admin/ldap/reload": { "post": { "security": [ @@ -775,24 +183,6 @@ } } }, - "/admin/provisioning/access-control/reload": { - "post": { - "tags": ["access_control_provisioning", "enterprise"], - "summary": "You need to have a permission with action `provisioning:reload` with scope `provisioners:accesscontrol`.", - "operationId": "adminProvisioningReloadAccessControl", - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - } - } - } - }, "/admin/provisioning/accesscontrol/reload": { "post": { "security": [ @@ -3427,155 +2817,6 @@ } } }, - "/datasources/{datasource_id}/disable-permissions": { - "post": { - "description": "Disables permissions for the data source with the given id. All existing permissions will be removed and anyone will be able to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Disable permissions for a data source.", - "operationId": "disablePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/enable-permissions": { - "post": { - "description": "Enables permissions for the data source with the given id.\nNo one except Org Admins will be able to query the data source until permissions have been added\nwhich permit certain users or teams to query the data source.\n\nYou need to have a permission with action `datasources.permissions:toggle` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Enable permissions for a data source.", - "operationId": "enablePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/createOrUpdateDatasourceResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/permissions": { - "get": { - "description": "Gets all existing permissions for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:read` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Get permissions for a data source.", - "operationId": "getPermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getPermissionseResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/datasources/{datasource_id}/permissions/{permissionId}": { - "delete": { - "description": "Removes the permission with the given permissionId for the data source with the given id.\n\nYou need to have a permission with action `datasources.permissions:delete` and scopes `datasources:*`, `datasources:id:*`, `datasources:id:1` (single data source).", - "tags": ["datasource_permissions", "enterprise"], - "summary": "Remove permission for a data source.", - "operationId": "deletePermissions", - "parameters": [ - { - "type": "string", - "x-go-name": "PermissionID", - "name": "permissionId", - "in": "path", - "required": true - }, - { - "type": "string", - "x-go-name": "DatasourceID", - "name": "datasource_id", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/ds/query": { "post": { "description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:query`.", @@ -4216,208 +3457,6 @@ } } }, - "/licensing/check": { - "get": { - "tags": ["licensing", "enterprise"], - "summary": "Check license availability.", - "operationId": "getLicenseStatus", - "responses": { - "200": { - "$ref": "#/responses/getLicenseStatusResponse" - } - } - } - }, - "/licensing/custom-permissions": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report.", - "operationId": "getCustomPermissionsReport", - "responses": { - "200": { - "$ref": "#/responses/getCustomPermissionsReportResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/custom-permissions-csv": { - "get": { - "description": "You need to have a permission with action `licensing.reports:read`.", - "produces": ["text/csv"], - "tags": ["licensing", "enterprise"], - "summary": "Get custom permissions report in CSV format.", - "operationId": "getCustomPermissionsCSV", - "responses": { - "200": { - "$ref": "#/responses/getCustomPermissionsReportResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/refresh-stats": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Refresh license stats.", - "operationId": "refreshLicenseStats", - "responses": { - "200": { - "$ref": "#/responses/refreshLicenseStatsResponse" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token": { - "get": { - "description": "You need to have a permission with action `licensing:read`.", - "tags": ["licensing", "enterprise"], - "summary": "Get license token.", - "operationId": "getLicenseToken", - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - } - } - }, - "post": { - "description": "You need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], - "summary": "Create license token.", - "operationId": "postLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/getLicenseTokenResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - } - } - }, - "delete": { - "description": "Removes the license stored in the Grafana database. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:delete`.", - "tags": ["licensing", "enterprise"], - "summary": "Remove license from database.", - "operationId": "deleteLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/DeleteTokenCommand" - } - } - ], - "responses": { - "202": { - "$ref": "#/responses/acceptedResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/licensing/token/renew": { - "post": { - "description": "Manually ask license issuer for a new token. Available in Grafana Enterprise v7.4+.\n\nYou need to have a permission with action `licensing:update`.", - "tags": ["licensing", "enterprise"], - "summary": "Manually force license refresh.", - "operationId": "postRenewLicenseToken", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "type": "object" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/postRenewLicenseTokenResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "404": { - "$ref": "#/responses/notFoundError" - } - } - } - }, - "/login/saml": { - "get": { - "tags": ["saml", "enterprise"], - "summary": "It initiates the login flow by redirecting the user to the IdP.", - "operationId": "getSAMLLogin", - "responses": { - "302": { - "description": "" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/logout/saml": { - "get": { - "tags": ["saml", "enterprise"], - "summary": "GetLogout initiates single logout process.", - "operationId": "getSAMLLogout", - "responses": { - "302": { - "description": "" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/org": { "get": { "description": "Get current Organization", @@ -5373,665 +4412,6 @@ } } }, - "/recording-rules": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Get all recording rules.", - "operationId": "listRecordingRules", - "responses": { - "200": { - "$ref": "#/responses/listRecordingRulesResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "tags": ["recording_rules", "enterprise"], - "summary": "Update a recording rule.", - "operationId": "updateRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Create a new recording rule.", - "operationId": "createRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/test": { - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Test a recording rule.", - "operationId": "testCreateRecordingRule", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/writer": { - "get": { - "tags": ["recording_rules", "enterprise"], - "summary": "Get the write target.", - "operationId": "getRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["recording_rules", "enterprise"], - "summary": "Create a new write target.", - "operationId": "createRecordingRuleWriteTarget", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/recordingRuleWriteTargetResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "422": { - "$ref": "#/responses/unprocessableEntityError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete the write target.", - "operationId": "deleteRecordingRuleWriteTarget", - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/recording-rules/{recordingRuleID}": { - "delete": { - "tags": ["recording_rules", "enterprise"], - "summary": "Delete a recording rule.", - "operationId": "deleteRecordingRule", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "RecordingRuleID", - "name": "recordingRuleID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:*`.", - "tags": ["reports", "enterprise"], - "summary": "List reports.", - "operationId": "getReports", - "responses": { - "200": { - "$ref": "#/responses/getReportsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports.admin:create`.", - "tags": ["reports", "enterprise"], - "summary": "Create a report.", - "operationId": "createReport", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/createReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/email": { - "post": { - "description": "Generate and send a report. This API waits for the report to be generated before returning. We recommend that you set the client’s timeout to at least 60 seconds. Available to org admins only and with a valid license.\n\nOnly available in Grafana Enterprise v7.0+.\nThis API endpoint is experimental and may be deprecated in a future release. On deprecation, a migration strategy will be provided and the endpoint will remain functional until the next major release of Grafana.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send a report.", - "operationId": "sendReport", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/ReportEmailDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/render/pdf/{DashboardID}": { - "get": { - "description": "Available to all users and with a valid license.", - "produces": ["application/pdf"], - "tags": ["reports", "enterprise"], - "summary": "Render report for dashboard.", - "operationId": "renderReportPDF", - "parameters": [ - { - "type": "integer", - "format": "int64", - "name": "DashboardID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/settings": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:read`x.", - "tags": ["reports", "enterprise"], - "summary": "Get settings.", - "operationId": "getReportSettings", - "responses": { - "200": { - "$ref": "#/responses/getReportSettingsResponse" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.settings:write`xx.", - "tags": ["reports", "enterprise"], - "summary": "Save settings.", - "operationId": "saveReportSettings", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/SettingsDTO" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/test-email": { - "post": { - "description": "Available to org admins only and with a valid license.\n\nYou need to have a permission with action `reports:send`.", - "tags": ["reports", "enterprise"], - "summary": "Send test report via email.", - "operationId": "sendTestEmail", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/reports/{reportID}": { - "get": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports:read` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Get a report.", - "operationId": "getReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getReportResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "put": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.admin:write` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Update a report.", - "operationId": "updateReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - }, - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/CreateOrUpdateConfigCmd" - } - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "delete": { - "description": "Available to org admins only and with a valid or expired license\n\nYou need to have a permission with action `reports.delete` with scope `reports:id:\u003creport ID\u003e`.", - "tags": ["reports", "enterprise"], - "summary": "Delete a report.", - "operationId": "deleteReport", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "ReportID", - "name": "reportID", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/acs": { - "post": { - "tags": ["saml", "enterprise"], - "summary": "It performs assertion Consumer Service (ACS).", - "operationId": "postACS", - "parameters": [ - { - "type": "string", - "name": "RelayState", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/saml/metadata": { - "get": { - "produces": ["application/xml;application/samlmetadata+xml"], - "tags": ["saml", "enterprise"], - "summary": "It exposes the SP (Grafana's) metadata for the IdP's consumption.", - "operationId": "getSAMLMetadata", - "responses": { - "200": { - "$ref": "#/responses/contentResponse" - } - } - } - }, - "/saml/slo": { - "post": { - "tags": ["saml", "enterprise"], - "summary": "It performs Single Logout (SLO) callback.", - "operationId": "postSLO", - "parameters": [ - { - "type": "string", - "name": "SAMLRequest", - "in": "query" - }, - { - "type": "string", - "name": "SAMLResponse", - "in": "query" - } - ], - "responses": { - "302": { - "description": "" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/search": { "get": { "tags": ["search"], @@ -6383,132 +4763,6 @@ } } }, - "/teams/{teamId}/groups": { - "get": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Get External Groups.", - "operationId": "getTeamGroupsApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/getTeamGroupsApiResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - }, - "post": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Add External Group.", - "operationId": "addTeamGroupApi", - "parameters": [ - { - "x-go-name": "Body", - "name": "body", - "in": "body", - "required": true, - "schema": { - "$ref": "#/definitions/TeamGroupMapping" - } - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, - "/teams/{teamId}/groups/{groupId}": { - "delete": { - "tags": ["sync_team_groups", "enterprise"], - "summary": "Remove External Group.", - "operationId": "removeTeamGroupApi", - "parameters": [ - { - "type": "integer", - "format": "int64", - "x-go-name": "GroupID", - "name": "groupId", - "in": "path", - "required": true - }, - { - "type": "integer", - "format": "int64", - "x-go-name": "TeamID", - "name": "teamId", - "in": "path", - "required": true - } - ], - "responses": { - "200": { - "$ref": "#/responses/okResponse" - }, - "400": { - "$ref": "#/responses/badRequestError" - }, - "401": { - "$ref": "#/responses/unauthorisedError" - }, - "403": { - "$ref": "#/responses/forbiddenError" - }, - "404": { - "$ref": "#/responses/notFoundError" - }, - "500": { - "$ref": "#/responses/internalServerError" - } - } - } - }, "/teams/{team_id}": { "get": { "tags": ["teams"], @@ -7549,50 +5803,6 @@ } }, "definitions": { - "ActiveSyncStatusDTO": { - "description": "ActiveSyncStatusDTO holds the information for LDAP background Sync", - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - }, - "nextSync": { - "type": "string", - "format": "date-time", - "x-go-name": "NextSync" - }, - "prevSync": { - "$ref": "#/definitions/SyncResult" - }, - "schedule": { - "type": "string", - "x-go-name": "Schedule" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapdebug" - }, - "ActiveUserStats": { - "type": "object", - "properties": { - "active_admins_and_editors": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveAdminsAndEditors" - }, - "active_users": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveUsers" - }, - "active_viewers": { - "type": "integer", - "format": "int64", - "x-go-name": "ActiveViewers" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "AddApiKeyCommand": { "description": "COMMANDS", "type": "object", @@ -7612,26 +5822,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddBuiltInRoleCommand": { - "type": "object", - "properties": { - "builtInRole": { - "type": "string", - "enum": ["Viewer", " Editor", " Admin", " Grafana Admin"], - "x-go-name": "BuiltinRole" - }, - "global": { - "description": "A flag indicating if the assignment is global or not. If set to false, the default org ID of the authenticated user will be used from the request to create organization local assignment. Refer to the Built-in role assignments for more information.", - "type": "boolean", - "x-go-name": "Global" - }, - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "AddDataSourceCommand": { "description": "Also acts as api DTO", "type": "object", @@ -7734,29 +5924,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddPermissionDTO": { - "type": "object", - "properties": { - "builtinRole": { - "type": "string", - "x-go-name": "BuiltinRole" - }, - "permission": { - "$ref": "#/definitions/DsPermissionType" - }, - "teamId": { - "type": "integer", - "format": "int64", - "x-go-name": "TeamId" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/dspermissions" - }, "AddTeamMemberCommand": { "type": "object", "properties": { @@ -7768,30 +5935,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "AddTeamRoleCommand": { - "type": "object", - "properties": { - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, - "AddUserRoleCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "roleUid": { - "type": "string", - "x-go-name": "RoleUID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "Address": { "type": "object", "properties": { @@ -8333,32 +6476,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "BrandingOptionsDTO": { - "type": "object", - "properties": { - "emailFooterLink": { - "type": "string", - "x-go-name": "EmailFooterLink" - }, - "emailFooterMode": { - "type": "string", - "x-go-name": "EmailFooterMode" - }, - "emailFooterText": { - "type": "string", - "x-go-name": "EmailFooterText" - }, - "emailLogoUrl": { - "type": "string", - "x-go-name": "EmailLogo" - }, - "reportLogoUrl": { - "type": "string", - "x-go-name": "ReportLogo" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CalculateDiffTarget": { "type": "object", "properties": { @@ -8392,89 +6509,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "ConfigDTO": { - "description": "ConfigDTO is model representation in transfer", - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "dashboardId": { - "type": "integer", - "format": "int64", - "x-go-name": "DashboardID" - }, - "dashboardName": { - "type": "string", - "x-go-name": "DashboardName" - }, - "dashboardUid": { - "type": "string", - "x-go-name": "DashboardUID" - }, - "enableCsv": { - "type": "boolean", - "x-go-name": "EnableCSV" - }, - "enableDashboardUrl": { - "type": "boolean", - "x-go-name": "EnableDashboardURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "options": { - "$ref": "#/definitions/ReportOptionsDTO" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "recipients": { - "type": "string", - "x-go-name": "Recipients" - }, - "replyTo": { - "type": "string", - "x-go-name": "ReplyTo" - }, - "schedule": { - "$ref": "#/definitions/ScheduleDTO" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "templateVars": { - "type": "object", - "x-go-name": "TemplateVars" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CreateAlertNotificationCommand": { "type": "object", "properties": { @@ -8608,59 +6642,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/services/libraryelements" }, - "CreateOrUpdateConfigCmd": { - "type": "object", - "properties": { - "dashboardId": { - "type": "integer", - "format": "int64", - "x-go-name": "DashboardID" - }, - "dashboardUid": { - "type": "string", - "x-go-name": "DashboardUID" - }, - "enableCsv": { - "type": "boolean", - "x-go-name": "EnableCSV" - }, - "enableDashboardUrl": { - "type": "boolean", - "x-go-name": "EnableDashboardURL" - }, - "message": { - "type": "string", - "x-go-name": "Message" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "options": { - "$ref": "#/definitions/ReportOptionsDTO" - }, - "recipients": { - "type": "string", - "x-go-name": "Recipients" - }, - "replyTo": { - "type": "string", - "x-go-name": "ReplyTo" - }, - "schedule": { - "$ref": "#/definitions/ScheduleDTO" - }, - "state": { - "type": "string", - "x-go-name": "State" - }, - "templateVars": { - "type": "object", - "x-go-name": "TemplateVars" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "CreateOrgCommand": { "type": "object", "properties": { @@ -8671,44 +6652,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "CreateRoleWithPermissionsCommand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "CreateTeamCommand": { "type": "object", "properties": { @@ -8723,67 +6666,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "CustomPermissionsRecordDTO": { - "type": "object", - "properties": { - "customPermissions": { - "type": "string", - "x-go-name": "CustomPermissions" - }, - "granteeName": { - "type": "string", - "x-go-name": "GranteeName" - }, - "granteeType": { - "type": "string", - "x-go-name": "GranteeType" - }, - "granteeUrl": { - "type": "string", - "x-go-name": "GranteeURL" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "isFolder": { - "type": "boolean", - "x-go-name": "IsFolder" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "orgRole": { - "type": "string", - "x-go-name": "OrgRole" - }, - "slug": { - "type": "string", - "x-go-name": "Slug" - }, - "title": { - "type": "string", - "x-go-name": "Title" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "url": { - "type": "string", - "x-go-name": "URL" - }, - "usersCount": { - "type": "integer", - "format": "int64", - "x-go-name": "UsersCount" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "DashboardAclInfoDTO": { "type": "object", "properties": { @@ -9583,16 +7465,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "DeleteTokenCommand": { - "type": "object", - "properties": { - "instance": { - "type": "string", - "x-go-name": "Instance" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "DsAccess": { "type": "string", "x-go-package": "github.com/grafana/grafana/pkg/models" @@ -9651,19 +7523,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "FailedUser": { - "description": "FailedUser holds the information of an user that failed", - "type": "object", - "properties": { - "Error": { - "type": "string" - }, - "Login": { - "type": "string" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync" - }, "FindTagsResult": { "type": "object", "title": "FindTagsResult is the result of a tags search.", @@ -10618,31 +8477,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "Permission": { - "type": "object", - "title": "Permission is the model for access control permissions.", - "properties": { - "action": { - "type": "string", - "x-go-name": "Action" - }, - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "scope": { - "type": "string", - "x-go-name": "Scope" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol" - }, "PermissionType": { "type": "integer", "format": "int64", @@ -10734,24 +8568,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "PrometheusRemoteWriteTargetJSON": { - "type": "object", - "properties": { - "data_source_uid": { - "type": "string", - "x-go-name": "DatasourceUID" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "remote_write_path": { - "type": "string", - "x-go-name": "WritePath" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api" - }, "QueryDataResponse": { "description": "It is the return type of a QueryData call.", "type": "object", @@ -10763,108 +8579,6 @@ }, "x-go-package": "github.com/grafana/grafana-plugin-sdk-go/backend" }, - "RecordingRuleJSON": { - "description": "RecordingRuleJSON is the external representation of a recording rule", - "type": "object", - "properties": { - "active": { - "type": "boolean", - "x-go-name": "Active" - }, - "count": { - "type": "boolean", - "x-go-name": "Count" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "dest_data_source_uid": { - "type": "string", - "x-go-name": "DestDataSourceUID" - }, - "id": { - "type": "string", - "x-go-name": "ID" - }, - "interval": { - "type": "integer", - "format": "int64", - "x-go-name": "Interval" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "prom_name": { - "type": "string", - "x-go-name": "PromName" - }, - "queries": { - "type": "array", - "items": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "x-go-name": "Queries" - }, - "range": { - "type": "integer", - "format": "int64", - "x-go-name": "Range" - }, - "target_ref_id": { - "type": "string", - "x-go-name": "TargetRefID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/recordedqueries/api" - }, - "ReportEmailDTO": { - "type": "object", - "properties": { - "email": { - "type": "string", - "x-go-name": "Email" - }, - "emails": { - "description": "Comma-separated list of emails to which to send the report to.", - "type": "string", - "x-go-name": "Emails" - }, - "id": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "string", - "format": "int64", - "x-go-name": "Id" - }, - "useEmailsFromReport": { - "description": "Send the report to the emails specified in the report. Required if emails is not present.", - "type": "boolean", - "x-go-name": "UseEmailsFromReport" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, - "ReportOptionsDTO": { - "type": "object", - "properties": { - "layout": { - "type": "string", - "x-go-name": "Layout" - }, - "orientation": { - "type": "string", - "x-go-name": "Orientation" - }, - "timeRange": { - "$ref": "#/definitions/TimeRangeDTO" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "Responses": { "description": "The QueryData method the QueryDataHandler method will set the RefId\nproperty on the DataRespones' frames based on these RefIDs.", "type": "object", @@ -10885,58 +8599,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "RoleDTO": { - "type": "object", - "properties": { - "created": { - "type": "string", - "format": "date-time", - "x-go-name": "Created" - }, - "delegatable": { - "type": "boolean", - "x-go-name": "Delegatable" - }, - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "uid": { - "type": "string", - "x-go-name": "UID" - }, - "updated": { - "type": "string", - "format": "date-time", - "x-go-name": "Updated" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/services/accesscontrol" - }, "RoleType": { "type": "string", "x-go-package": "github.com/grafana/grafana/pkg/models" @@ -10980,61 +8642,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "ScheduleDTO": { - "type": "object", - "properties": { - "day": { - "type": "string", - "x-go-name": "Day" - }, - "dayOfMonth": { - "type": "string", - "x-go-name": "DayOfMonth" - }, - "endDate": { - "type": "string", - "format": "date-time", - "x-go-name": "EndDate" - }, - "frequency": { - "type": "string", - "x-go-name": "Frequency" - }, - "hour": { - "type": "integer", - "format": "int64", - "x-go-name": "Hour" - }, - "intervalAmount": { - "type": "integer", - "format": "int64", - "x-go-name": "IntervalAmount" - }, - "intervalFrequency": { - "type": "string", - "x-go-name": "IntervalFrequency" - }, - "minute": { - "type": "integer", - "format": "int64", - "x-go-name": "Minute" - }, - "startDate": { - "type": "string", - "format": "date-time", - "x-go-name": "StartDate" - }, - "timeZone": { - "type": "string", - "x-go-name": "TimeZone" - }, - "workdaysOnly": { - "type": "boolean", - "x-go-name": "WorkdaysOnly" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, "SearchTeamQueryResult": { "type": "object", "properties": { @@ -11091,23 +8698,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "SetUserRolesCommand": { - "type": "object", - "properties": { - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "roleUids": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "RoleUIDs" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "SettingsBag": { "type": "object", "additionalProperties": { @@ -11118,40 +8708,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/setting" }, - "SettingsDTO": { - "type": "object", - "properties": { - "branding": { - "$ref": "#/definitions/BrandingOptionsDTO" - }, - "id": { - "type": "integer", - "format": "int64", - "x-go-name": "ID" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgID" - }, - "userId": { - "type": "integer", - "format": "int64", - "x-go-name": "UserID" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, - "Status": { - "type": "object", - "properties": { - "enabled": { - "type": "boolean", - "x-go-name": "Enabled" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "SuccessResponseBody": { "type": "object", "properties": { @@ -11162,40 +8718,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/docs/definitions" }, - "SyncResult": { - "type": "object", - "title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.", - "properties": { - "Elapsed": { - "$ref": "#/definitions/Duration" - }, - "FailedUsers": { - "type": "array", - "items": { - "$ref": "#/definitions/FailedUser" - } - }, - "MissingUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - }, - "Started": { - "type": "string", - "format": "date-time" - }, - "UpdatedUserIds": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/ldapsync" - }, "TagsDTO": { "type": "object", "title": "TagsDTO is the frontend DTO for Tag.", @@ -11255,36 +8777,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "TeamGroupDTO": { - "type": "object", - "properties": { - "groupId": { - "type": "string", - "x-go-name": "GroupId" - }, - "orgId": { - "type": "integer", - "format": "int64", - "x-go-name": "OrgId" - }, - "teamId": { - "type": "integer", - "format": "int64", - "x-go-name": "TeamId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models" - }, - "TeamGroupMapping": { - "type": "object", - "properties": { - "groupId": { - "type": "string", - "x-go-name": "GroupId" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/teamgroupsync/models" - }, "TeamMemberDTO": { "type": "object", "properties": { @@ -11404,136 +8896,6 @@ "type": "string", "x-go-package": "github.com/grafana/grafana/pkg/models" }, - "TimeRangeDTO": { - "type": "object", - "properties": { - "from": { - "type": "string", - "x-go-name": "From" - }, - "to": { - "type": "string", - "x-go-name": "To" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/report" - }, - "Token": { - "type": "object", - "properties": { - "account": { - "type": "string", - "x-go-name": "Account" - }, - "company": { - "type": "string", - "x-go-name": "Company" - }, - "details_url": { - "type": "string", - "x-go-name": "DetailsUrl" - }, - "exp": { - "type": "integer", - "format": "int64", - "x-go-name": "Expires" - }, - "iat": { - "type": "integer", - "format": "int64", - "x-go-name": "Issued" - }, - "included_admins": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedAdmins" - }, - "included_users": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedUsers" - }, - "included_viewers": { - "type": "integer", - "format": "int64", - "x-go-name": "IncludedViewers" - }, - "iss": { - "type": "string", - "x-go-name": "Issuer" - }, - "jti": { - "type": "string", - "x-go-name": "Id" - }, - "lexp": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseExpires" - }, - "lic_exp_warn_days": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseExpiresWarnDays" - }, - "lid": { - "type": "string", - "x-go-name": "LicenseId" - }, - "limit_by": { - "type": "string", - "x-go-name": "LimitBy" - }, - "max_concurrent_user_sessions": { - "type": "integer", - "format": "int64", - "x-go-name": "MaxConcurrentUserSessions" - }, - "nbf": { - "type": "integer", - "format": "int64", - "x-go-name": "LicenseIssued" - }, - "prod": { - "type": "array", - "items": { - "type": "string" - }, - "x-go-name": "Products" - }, - "slug": { - "type": "string", - "x-go-name": "Slug" - }, - "status": { - "$ref": "#/definitions/TokenStatus" - }, - "sub": { - "type": "string", - "x-go-name": "Subject" - }, - "tok_exp_warn_days": { - "type": "integer", - "format": "int64", - "x-go-name": "TokenExpiresWarnDays" - }, - "update_days": { - "type": "integer", - "format": "int64", - "x-go-name": "UpdateDays" - }, - "usage_billing": { - "type": "boolean", - "x-go-name": "UsageBilling" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, - "TokenStatus": { - "type": "integer", - "format": "int64", - "x-go-package": "github.com/grafana/grafana/pkg/extensions/licensing" - }, "TrimDashboardCommand": { "type": "object", "properties": { @@ -11883,44 +9245,6 @@ }, "x-go-package": "github.com/grafana/grafana/pkg/api/dtos" }, - "UpdateRoleCommand": { - "type": "object", - "properties": { - "description": { - "type": "string", - "x-go-name": "Description" - }, - "displayName": { - "type": "string", - "x-go-name": "DisplayName" - }, - "global": { - "type": "boolean", - "x-go-name": "Global" - }, - "group": { - "type": "string", - "x-go-name": "Group" - }, - "name": { - "type": "string", - "x-go-name": "Name" - }, - "permissions": { - "type": "array", - "items": { - "$ref": "#/definitions/Permission" - }, - "x-go-name": "Permissions" - }, - "version": { - "type": "integer", - "format": "int64", - "x-go-name": "Version" - } - }, - "x-go-package": "github.com/grafana/grafana/pkg/extensions/accesscontrol" - }, "UpdateTeamCommand": { "type": "object", "properties": { @@ -12281,16 +9605,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "contentResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "uint8" - } - } - }, "createAnnotationResponse": { "description": "", "schema": { @@ -12365,12 +9679,6 @@ } } }, - "createReportResponse": { - "description": "", - "schema": { - "type": "object" - } - }, "createSnapshotResponse": { "description": "", "schema": { @@ -12592,12 +9900,6 @@ } } }, - "getAccessControlStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Status" - } - }, "getAlertNotificationChannelResponse": { "description": "", "schema": { @@ -12631,15 +9933,6 @@ } } }, - "getAllRolesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - }, "getAnnotationTagsResponse": { "description": "", "schema": { @@ -12664,15 +9957,6 @@ } } }, - "getCustomPermissionsReportResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/CustomPermissionsRecordDTO" - } - } - }, "getDashboardPermissionsResponse": { "description": "", "schema": { @@ -12743,12 +10027,6 @@ } } }, - "getLDAPSyncStatusResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveSyncStatusDTO" - } - }, "getLibraryElementConnectionsResponse": { "description": "", "schema": { @@ -12767,15 +10045,6 @@ "$ref": "#/definitions/LibraryElementSearchResponse" } }, - "getLicenseStatusResponse": { - "description": "" - }, - "getLicenseTokenResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/Token" - } - }, "getOrgResponse": { "description": "", "schema": { @@ -12791,12 +10060,6 @@ } } }, - "getPermissionseResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/AddPermissionDTO" - } - }, "getPreferencesResponse": { "description": "", "schema": { @@ -12812,33 +10075,6 @@ } } }, - "getReportResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ConfigDTO" - } - }, - "getReportSettingsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/SettingsDTO" - } - }, - "getReportsResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/ConfigDTO" - } - } - }, - "getRoleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RoleDTO" - } - }, "getSettingsResponse": { "description": "", "schema": { @@ -12880,15 +10116,6 @@ "$ref": "#/definitions/AdminStats" } }, - "getTeamGroupsApiResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/TeamGroupDTO" - } - } - }, "getTeamMembersResponse": { "description": "", "schema": { @@ -12951,27 +10178,6 @@ "$ref": "#/definitions/ErrorResponseBody" } }, - "listBuiltinRolesResponse": { - "description": "", - "schema": { - "type": "object", - "additionalProperties": { - "type": "array", - "items": { - "$ref": "#/definitions/RoleDTO" - } - } - } - }, - "listRecordingRulesResponse": { - "description": "", - "schema": { - "type": "array", - "items": { - "$ref": "#/definitions/RecordingRuleJSON" - } - } - }, "lookupAlertNotificationChannelsResponse": { "description": "", "schema": { @@ -13101,9 +10307,6 @@ } } }, - "postRenewLicenseTokenResponse": { - "description": "" - }, "preconditionFailedError": { "description": "PreconditionFailedError", "schema": { @@ -13122,24 +10325,6 @@ "$ref": "#/definitions/DataResponse" } }, - "recordingRuleResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/RecordingRuleJSON" - } - }, - "recordingRuleWriteTargetResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/PrometheusRemoteWriteTargetJSON" - } - }, - "refreshLicenseStatsResponse": { - "description": "", - "schema": { - "$ref": "#/definitions/ActiveUserStats" - } - }, "searchOrgResponse": { "description": "", "schema": {