Swagger: Fix and update specifications with the latest changes (#66847)

This commit is contained in:
Sofia Papagiannaki 2023-04-20 17:47:19 +03:00 committed by GitHub
parent b16a8bd6a8
commit 7688ac6712
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 317 additions and 35 deletions

View File

@ -3276,7 +3276,7 @@
},
"/auth/keys": {
"get": {
"description": "Will return auth keys.",
"description": "Will return auth keys.\n\nDeprecated: true.\n\nDeprecated. Please use GET /api/serviceaccounts and GET /api/serviceaccounts/{id}/tokens instead\nsee https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.",
"tags": [
"api_keys"
],
@ -3316,6 +3316,7 @@
],
"summary": "Creates an API key.",
"operationId": "addAPIkey",
"deprecated": true,
"parameters": [
{
"name": "Body",
@ -3350,11 +3351,13 @@
},
"/auth/keys/{id}": {
"delete": {
"description": "Deletes an API key.\nDeprecated. See: https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.",
"tags": [
"api_keys"
],
"summary": "Delete API key.",
"operationId": "deleteAPIkey",
"deprecated": true,
"parameters": [
{
"type": "integer",
@ -9467,6 +9470,48 @@
"$ref": "#/responses/internalServerError"
}
}
},
"delete": {
"tags": [
"sync_team_groups",
"enterprise"
],
"summary": "Remove External Group.",
"operationId": "removeTeamGroupApiQuery",
"parameters": [
{
"type": "string",
"name": "groupId",
"in": "query"
},
{
"type": "integer",
"format": "int64",
"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}": {
@ -9477,6 +9522,7 @@
],
"summary": "Remove External Group.",
"operationId": "removeTeamGroupApi",
"deprecated": true,
"parameters": [
{
"type": "string",
@ -11325,9 +11371,9 @@
"execErrState": {
"type": "string",
"enum": [
"OK",
"Alerting",
"Error",
"OK"
"Error"
]
},
"for": {
@ -12754,6 +12800,9 @@
"description": "DataLink define what",
"type": "object",
"properties": {
"internal": {
"$ref": "#/definitions/InternalDataLink"
},
"targetBlank": {
"type": "boolean"
},
@ -13054,9 +13103,9 @@
"format": "int64"
},
"Duration": {
"description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"type": "integer",
"format": "int64",
"title": "Duration is a type used for marshalling durations."
"format": "int64"
},
"EmailConfig": {
"type": "object",
@ -13278,6 +13327,9 @@
}
},
"EvalQueriesResponse": {},
"ExplorePanelsState": {
"description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties"
},
"ExtendedReceiver": {
"type": "object",
"properties": {
@ -13942,6 +13994,34 @@
}
}
},
"GettableHistoricUserConfig": {
"type": "object",
"properties": {
"alertmanager_config": {
"$ref": "#/definitions/GettableApiAlertingConfig"
},
"id": {
"type": "integer",
"format": "int64"
},
"last_applied": {
"type": "string",
"format": "date-time"
},
"template_file_provenances": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/Provenance"
}
},
"template_files": {
"type": "object",
"additionalProperties": {
"type": "string"
}
}
}
},
"GettableNGalertConfig": {
"type": "object",
"properties": {
@ -14373,6 +14453,31 @@
"format": "int64",
"title": "InspectType is a type for the Inspect property of a Notice."
},
"InternalDataLink": {
"description": "InternalDataLink definition to allow Explore links to be constructed in the backend",
"type": "object",
"properties": {
"datasourceName": {
"type": "string"
},
"datasourceUid": {
"type": "string"
},
"panelsState": {
"$ref": "#/definitions/ExplorePanelsState"
},
"query": {},
"timeRange": {
"$ref": "#/definitions/TimeRange"
},
"transformations": {
"type": "array",
"items": {
"$ref": "#/definitions/LinkTransformationConfig"
}
}
}
},
"Item": {
"type": "object",
"title": "Item defines model for Item.",
@ -14768,6 +14873,23 @@
}
}
},
"LinkTransformationConfig": {
"type": "object",
"properties": {
"expression": {
"type": "string"
},
"field": {
"type": "string"
},
"mapValue": {
"type": "string"
},
"type": {
"$ref": "#/definitions/SupportedTransformationTypes"
}
}
},
"MassDeleteAnnotationsCmd": {
"type": "object",
"properties": {
@ -16065,9 +16187,9 @@
"execErrState": {
"type": "string",
"enum": [
"OK",
"Alerting",
"Error",
"OK"
"Error"
]
},
"folderUID": {
@ -17563,6 +17685,9 @@
}
}
},
"SupportedTransformationTypes": {
"type": "string"
},
"SyncResult": {
"type": "object",
"title": "SyncResult holds the result of a sync with LDAP. This gives us information on which users were updated and how.",
@ -18007,17 +18132,16 @@
}
},
"TimeRange": {
"description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.",
"description": "Redefining this to avoid an import cycle",
"type": "object",
"title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.",
"properties": {
"EndMinute": {
"type": "integer",
"format": "int64"
"from": {
"type": "string",
"format": "date-time"
},
"StartMinute": {
"type": "integer",
"format": "int64"
"to": {
"type": "string",
"format": "date-time"
}
}
},
@ -18218,9 +18342,8 @@
"type": "string"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"type": "object",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -19058,6 +19181,7 @@
}
},
"alertGroup": {
"description": "AlertGroup alert group",
"type": "object",
"required": [
"alerts",
@ -19186,6 +19310,7 @@
}
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"type": "object",
"required": [
"labels",
@ -19241,13 +19366,13 @@
}
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"type": "array",
"items": {
"$ref": "#/definitions/gettableAlert"
}
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"type": "object",
"required": [
"comment",
@ -19296,12 +19421,14 @@
}
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"type": "array",
"items": {
"$ref": "#/definitions/gettableSilence"
}
},
"integration": {
"description": "Integration integration",
"type": "object",
"required": [
"name",
@ -19445,6 +19572,7 @@
}
},
"postableSilence": {
"description": "PostableSilence postable silence",
"type": "object",
"required": [
"comment",
@ -19596,6 +19724,15 @@
}
},
"responses": {
"GettableHistoricUserConfigs": {
"description": "(empty)",
"schema": {
"type": "array",
"items": {
"$ref": "#/definitions/GettableHistoricUserConfig"
}
}
},
"SMTPNotEnabledError": {
"description": "(empty)"
},

View File

@ -1,6 +1,19 @@
{
"components": {
"responses": {
"GettableHistoricUserConfigs": {
"content": {
"application/json": {
"schema": {
"items": {
"$ref": "#/components/schemas/GettableHistoricUserConfig"
},
"type": "array"
}
}
},
"description": "(empty)"
},
"SMTPNotEnabledError": {
"description": "(empty)"
},
@ -2447,9 +2460,9 @@
},
"execErrState": {
"enum": [
"OK",
"Alerting",
"Error",
"OK"
"Error"
],
"type": "string"
},
@ -3878,6 +3891,9 @@
"DataLink": {
"description": "DataLink define what",
"properties": {
"internal": {
"$ref": "#/components/schemas/InternalDataLink"
},
"targetBlank": {
"type": "boolean"
},
@ -4179,8 +4195,8 @@
"type": "integer"
},
"Duration": {
"description": "A Duration represents the elapsed time between two instants\nas an int64 nanosecond count. The representation limits the\nlargest representable duration to approximately 290 years.",
"format": "int64",
"title": "Duration is a type used for marshalling durations.",
"type": "integer"
},
"EmailConfig": {
@ -4403,6 +4419,9 @@
"type": "object"
},
"EvalQueriesResponse": {},
"ExplorePanelsState": {
"description": "This is an object constructed with the keys as the values of the enum VisType and the value being a bag of properties"
},
"ExtendedReceiver": {
"properties": {
"email_configs": {
@ -5067,6 +5086,34 @@
},
"type": "object"
},
"GettableHistoricUserConfig": {
"properties": {
"alertmanager_config": {
"$ref": "#/components/schemas/GettableApiAlertingConfig"
},
"id": {
"format": "int64",
"type": "integer"
},
"last_applied": {
"format": "date-time",
"type": "string"
},
"template_file_provenances": {
"additionalProperties": {
"$ref": "#/components/schemas/Provenance"
},
"type": "object"
},
"template_files": {
"additionalProperties": {
"type": "string"
},
"type": "object"
}
},
"type": "object"
},
"GettableNGalertConfig": {
"properties": {
"alertmanagersChoice": {
@ -5498,6 +5545,31 @@
"title": "InspectType is a type for the Inspect property of a Notice.",
"type": "integer"
},
"InternalDataLink": {
"description": "InternalDataLink definition to allow Explore links to be constructed in the backend",
"properties": {
"datasourceName": {
"type": "string"
},
"datasourceUid": {
"type": "string"
},
"panelsState": {
"$ref": "#/components/schemas/ExplorePanelsState"
},
"query": {},
"timeRange": {
"$ref": "#/components/schemas/TimeRange"
},
"transformations": {
"items": {
"$ref": "#/components/schemas/LinkTransformationConfig"
},
"type": "array"
}
},
"type": "object"
},
"Item": {
"properties": {
"title": {
@ -5893,6 +5965,23 @@
"title": "LibraryElementSearchResult is the search result for entities.",
"type": "object"
},
"LinkTransformationConfig": {
"properties": {
"expression": {
"type": "string"
},
"field": {
"type": "string"
},
"mapValue": {
"type": "string"
},
"type": {
"$ref": "#/components/schemas/SupportedTransformationTypes"
}
},
"type": "object"
},
"MassDeleteAnnotationsCmd": {
"properties": {
"annotationId": {
@ -7176,9 +7265,9 @@
},
"execErrState": {
"enum": [
"OK",
"Alerting",
"Error",
"OK"
"Error"
],
"type": "string"
},
@ -8686,6 +8775,9 @@
},
"type": "object"
},
"SupportedTransformationTypes": {
"type": "string"
},
"SyncResult": {
"properties": {
"Elapsed": {
@ -9130,18 +9222,17 @@
"type": "object"
},
"TimeRange": {
"description": "For example, 4:00PM to End of the day would Begin at 1020 and End at 1440.",
"description": "Redefining this to avoid an import cycle",
"properties": {
"EndMinute": {
"format": "int64",
"type": "integer"
"from": {
"format": "date-time",
"type": "string"
},
"StartMinute": {
"format": "int64",
"type": "integer"
"to": {
"format": "date-time",
"type": "string"
}
},
"title": "TimeRange represents a range of minutes within a 1440 minute day, exclusive of the End minute. A day consists of 1440 minutes.",
"type": "object"
},
"TimeRangeDTO": {
@ -9341,7 +9432,6 @@
"type": "string"
},
"URL": {
"description": "The general form represented is:\n\n[scheme:][//[userinfo@]host][/]path[?query][#fragment]\n\nURLs that do not start with a slash after the scheme are interpreted as:\n\nscheme:opaque[?query][#fragment]\n\nNote that the Path field is stored in decoded form: /%47%6f%2f becomes /Go/.\nA consequence is that it is impossible to tell which slashes in the Path were\nslashes in the raw URL and which were %2f. This distinction is rarely important,\nbut when it is, the code should use RawPath, an optional field which only gets\nset if the default encoding is different from Path.\n\nURL's String method uses the EscapedPath method to obtain the path. See the\nEscapedPath method for more details.",
"properties": {
"ForceQuery": {
"type": "boolean"
@ -9377,7 +9467,7 @@
"$ref": "#/components/schemas/Userinfo"
}
},
"title": "A URL represents a parsed URL (technically, a URI reference).",
"title": "URL is a custom URL type that allows validation at configuration load time.",
"type": "object"
},
"UpdateAlertNotificationCommand": {
@ -10181,6 +10271,7 @@
"type": "object"
},
"alertGroup": {
"description": "AlertGroup alert group",
"properties": {
"alerts": {
"description": "alerts",
@ -10309,6 +10400,7 @@
"type": "object"
},
"gettableAlert": {
"description": "GettableAlert gettable alert",
"properties": {
"annotations": {
"$ref": "#/components/schemas/labelSet"
@ -10364,13 +10456,13 @@
"type": "object"
},
"gettableAlerts": {
"description": "GettableAlerts gettable alerts",
"items": {
"$ref": "#/components/schemas/gettableAlert"
},
"type": "array"
},
"gettableSilence": {
"description": "GettableSilence gettable silence",
"properties": {
"comment": {
"description": "comment",
@ -10419,12 +10511,14 @@
"type": "object"
},
"gettableSilences": {
"description": "GettableSilences gettable silences",
"items": {
"$ref": "#/components/schemas/gettableSilence"
},
"type": "array"
},
"integration": {
"description": "Integration integration",
"properties": {
"lastNotifyAttempt": {
"description": "A timestamp indicating the last attempt to deliver a notification regardless of the outcome.\nFormat: date-time",
@ -10568,6 +10662,7 @@
"type": "array"
},
"postableSilence": {
"description": "PostableSilence postable silence",
"properties": {
"comment": {
"description": "comment",
@ -14352,7 +14447,7 @@
},
"/auth/keys": {
"get": {
"description": "Will return auth keys.",
"description": "Will return auth keys.\n\nDeprecated: true.\n\nDeprecated. Please use GET /api/serviceaccounts and GET /api/serviceaccounts/{id}/tokens instead\nsee https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.",
"operationId": "getAPIkeys",
"parameters": [
{
@ -14388,6 +14483,7 @@
]
},
"post": {
"deprecated": true,
"description": "Will return details of the created API key.",
"operationId": "addAPIkey",
"requestBody": {
@ -14429,6 +14525,8 @@
},
"/auth/keys/{id}": {
"delete": {
"deprecated": true,
"description": "Deletes an API key.\nDeprecated. See: https://grafana.com/docs/grafana/next/administration/api-keys/#migrate-api-keys-to-grafana-service-accounts-using-the-api.",
"operationId": "deleteAPIkey",
"parameters": [
{
@ -20912,6 +21010,52 @@
}
},
"/teams/{teamId}/groups": {
"delete": {
"operationId": "removeTeamGroupApiQuery",
"parameters": [
{
"in": "query",
"name": "groupId",
"schema": {
"type": "string"
}
},
{
"in": "path",
"name": "teamId",
"required": true,
"schema": {
"format": "int64",
"type": "integer"
}
}
],
"responses": {
"200": {
"$ref": "#/components/responses/okResponse"
},
"400": {
"$ref": "#/components/responses/badRequestError"
},
"401": {
"$ref": "#/components/responses/unauthorisedError"
},
"403": {
"$ref": "#/components/responses/forbiddenError"
},
"404": {
"$ref": "#/components/responses/notFoundError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"summary": "Remove External Group.",
"tags": [
"sync_team_groups",
"enterprise"
]
},
"get": {
"operationId": "getTeamGroupsApi",
"parameters": [
@ -21004,6 +21148,7 @@
},
"/teams/{teamId}/groups/{groupId}": {
"delete": {
"deprecated": true,
"operationId": "removeTeamGroupApi",
"parameters": [
{