Regenerate OpenAPI spec (#87050)

Issue: https://github.com/grafana/grafana/issues/86453
The endpoints were documented in enterprise Grafana
This commit is contained in:
Julien Duchesne
2024-04-29 16:27:59 +01:00
committed by GitHub
parent 1af2e69625
commit 8d8f19b84f
3 changed files with 847 additions and 4 deletions
+282 -4
View File
@@ -760,6 +760,155 @@
}
}
},
"/datasources/{dataSourceUID}/cache": {
"get": {
"description": "get cache config for a single data source",
"tags": [
"enterprise"
],
"operationId": "getDataSourceCacheConfig",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "set cache config for a single data source",
"tags": [
"enterprise"
],
"operationId": "setDataSourceCacheConfig",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CacheConfigSetter"
}
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"400": {
"$ref": "#/responses/badRequestError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/clean": {
"post": {
"description": "clean cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "cleanDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/disable": {
"post": {
"description": "disable cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "disableDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/enable": {
"post": {
"description": "enable cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "enableDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/licensing/check": {
"get": {
"tags": [
@@ -2502,6 +2651,123 @@
"Value": {}
}
},
"CacheConfig": {
"description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type": "integer",
"format": "int64"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "string",
"format": "date-time"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CacheConfigResponse": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type": "integer",
"format": "int64"
},
"enabled": {
"type": "boolean"
},
"message": {
"type": "string"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "string",
"format": "date-time"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CacheConfigSetter": {
"description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler",
"type": "object",
"properties": {
"dataSourceID": {
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CalculateDiffTarget": {
"type": "object",
"properties": {
@@ -2666,7 +2932,15 @@
"type": "string"
}
},
"Policies": {
"description": "Policies contains all policy identifiers included in the certificate.\nIn Go 1.22, encoding/gob cannot handle and ignores this field.",
"type": "array",
"items": {
"$ref": "#/definitions/OID"
}
},
"PolicyIdentifiers": {
"description": "PolicyIdentifiers contains asn1.ObjectIdentifiers, the components\nof which are limited to int32. If a certificate contains a policy which\ncannot be represented by asn1.ObjectIdentifier, it will not be included in\nPolicyIdentifiers, but will be present in Policies, which contains all parsed\npolicy OIDs.",
"type": "array",
"items": {
"$ref": "#/definitions/ObjectIdentifier"
@@ -4396,7 +4670,7 @@
"type": "string"
},
"IPMask": {
"description": "See type IPNet and func ParseCIDR for details.",
"description": "See type [IPNet] and func [ParseCIDR] for details.",
"type": "array",
"title": "An IPMask is a bitmask that can be used to manipulate\nIP addresses for IP addressing and routing.",
"items": {
@@ -4945,7 +5219,7 @@
}
},
"Name": {
"description": "Name represents an X.509 distinguished name. This only includes the common\nelements of a DN. Note that Name is only an approximation of the X.509\nstructure. If an accurate representation is needed, asn1.Unmarshal the raw\nsubject or issuer as an RDNSequence.",
"description": "Name represents an X.509 distinguished name. This only includes the common\nelements of a DN. Note that Name is only an approximation of the X.509\nstructure. If an accurate representation is needed, asn1.Unmarshal the raw\nsubject or issuer as an [RDNSequence].",
"type": "object",
"properties": {
"Country": {
@@ -5028,6 +5302,10 @@
"format": "int64",
"title": "NoticeSeverity is a type for the Severity property of a Notice."
},
"OID": {
"type": "object",
"title": "An OID represents an ASN.1 OBJECT IDENTIFIER."
},
"ObjectIdentifier": {
"type": "array",
"title": "An ObjectIdentifier represents an ASN.1 OBJECT IDENTIFIER.",
@@ -7081,7 +7359,7 @@
}
},
"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 the EscapedPath method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"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\nThe Host field contains the host and port subcomponents of the URL.\nWhen the port is present, it is separated from the host with a colon.\nWhen the host is an IPv6 address, it must be enclosed in square brackets:\n\"[fe80::1]:80\". The [net.JoinHostPort] function combines a host and port\ninto a string suitable for the Host field, adding square brackets to\nthe host when necessary.\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 the [URL.EscapedPath] method, which preserves\nthe original encoding of Path.\n\nThe RawPath field is an optional field which is only set when the default\nencoding of Path is different from the escaped path. See the EscapedPath method\nfor more details.\n\nURL's String method uses the EscapedPath method to obtain the path.",
"type": "object",
"title": "A URL represents a parsed URL (technically, a URI reference).",
"properties": {
@@ -7693,7 +7971,7 @@
}
},
"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.",
"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.",
"type": "object"
},
"ValueMapping": {
+266
View File
@@ -4303,6 +4303,155 @@
}
}
},
"/datasources/{dataSourceUID}/cache": {
"get": {
"description": "get cache config for a single data source",
"tags": [
"enterprise"
],
"operationId": "getDataSourceCacheConfig",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
},
"post": {
"description": "set cache config for a single data source",
"tags": [
"enterprise"
],
"operationId": "setDataSourceCacheConfig",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
},
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/CacheConfigSetter"
}
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"400": {
"$ref": "#/responses/badRequestError"
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/clean": {
"post": {
"description": "clean cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "cleanDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/disable": {
"post": {
"description": "disable cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "disableDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{dataSourceUID}/cache/enable": {
"post": {
"description": "enable cache for a single data source",
"tags": [
"enterprise"
],
"operationId": "enableDataSourceCache",
"parameters": [
{
"type": "string",
"name": "dataSourceUID",
"in": "path",
"required": true
}
],
"responses": {
"200": {
"description": "CacheConfigResponse",
"schema": {
"$ref": "#/definitions/CacheConfigResponse"
}
},
"500": {
"$ref": "#/responses/internalServerError"
}
}
}
},
"/datasources/{id}": {
"get": {
"description": "If you are running Grafana Enterprise and have Fine-grained access control enabled\nyou need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:id:*` and `datasources:id:1` (single data source).\n\nPlease refer to [updated API](#/datasources/getDataSourceByUID) instead",
@@ -12480,6 +12629,123 @@
}
}
},
"CacheConfig": {
"description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller",
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type": "integer",
"format": "int64"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "string",
"format": "date-time"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CacheConfigResponse": {
"type": "object",
"properties": {
"created": {
"type": "string",
"format": "date-time"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"type": "integer",
"format": "int64"
},
"enabled": {
"type": "boolean"
},
"message": {
"type": "string"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"updated": {
"type": "string",
"format": "date-time"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CacheConfigSetter": {
"description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler",
"type": "object",
"properties": {
"dataSourceID": {
"type": "integer",
"format": "int64"
},
"dataSourceUID": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"type": "integer",
"format": "int64"
},
"ttlResourcesMs": {
"type": "integer",
"format": "int64"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
}
},
"CalculateDiffTarget": {
"type": "object",
"properties": {
+299
View File
@@ -3253,6 +3253,123 @@
"title": "BasicAuth contains basic HTTP authentication credentials.",
"type": "object"
},
"CacheConfig": {
"description": "Config defines the internal representation of a cache configuration, including fields not set by the API caller",
"properties": {
"created": {
"format": "date-time",
"type": "string"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"format": "int64",
"type": "integer"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"format": "int64",
"type": "integer"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"format": "int64",
"type": "integer"
},
"ttlResourcesMs": {
"format": "int64",
"type": "integer"
},
"updated": {
"format": "date-time",
"type": "string"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
},
"type": "object"
},
"CacheConfigResponse": {
"properties": {
"created": {
"format": "date-time",
"type": "string"
},
"dataSourceID": {
"description": "Fields that can be set by the API caller - read/write",
"format": "int64",
"type": "integer"
},
"dataSourceUID": {
"type": "string"
},
"defaultTTLMs": {
"description": "These are returned by the HTTP API, but are managed internally - read-only\nNote: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually",
"format": "int64",
"type": "integer"
},
"enabled": {
"type": "boolean"
},
"message": {
"type": "string"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"format": "int64",
"type": "integer"
},
"ttlResourcesMs": {
"format": "int64",
"type": "integer"
},
"updated": {
"format": "date-time",
"type": "string"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
},
"type": "object"
},
"CacheConfigSetter": {
"description": "ConfigSetter defines the cache parameters that users can configure per datasource\nThis is only intended to be consumed by the SetCache HTTP Handler",
"properties": {
"dataSourceID": {
"format": "int64",
"type": "integer"
},
"dataSourceUID": {
"type": "string"
},
"enabled": {
"type": "boolean"
},
"ttlQueriesMs": {
"description": "TTL MS, or \"time to live\", is how long a cached item will stay in the cache before it is removed (in milliseconds)",
"format": "int64",
"type": "integer"
},
"ttlResourcesMs": {
"format": "int64",
"type": "integer"
},
"useDefaultTTL": {
"description": "If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini",
"type": "boolean"
}
},
"type": "object"
},
"CalculateDiffTarget": {
"properties": {
"dashboardId": {
@@ -16976,6 +17093,188 @@
]
}
},
"/datasources/{dataSourceUID}/cache": {
"get": {
"description": "get cache config for a single data source",
"operationId": "getDataSourceCacheConfig",
"parameters": [
{
"in": "path",
"name": "dataSourceUID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigResponse"
}
}
},
"description": "CacheConfigResponse"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"tags": [
"enterprise"
]
},
"post": {
"description": "set cache config for a single data source",
"operationId": "setDataSourceCacheConfig",
"parameters": [
{
"in": "path",
"name": "dataSourceUID",
"required": true,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigSetter"
}
}
},
"required": true,
"x-originalParamName": "body"
},
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigResponse"
}
}
},
"description": "CacheConfigResponse"
},
"400": {
"$ref": "#/components/responses/badRequestError"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"tags": [
"enterprise"
]
}
},
"/datasources/{dataSourceUID}/cache/clean": {
"post": {
"description": "clean cache for a single data source",
"operationId": "cleanDataSourceCache",
"parameters": [
{
"in": "path",
"name": "dataSourceUID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigResponse"
}
}
},
"description": "CacheConfigResponse"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"tags": [
"enterprise"
]
}
},
"/datasources/{dataSourceUID}/cache/disable": {
"post": {
"description": "disable cache for a single data source",
"operationId": "disableDataSourceCache",
"parameters": [
{
"in": "path",
"name": "dataSourceUID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigResponse"
}
}
},
"description": "CacheConfigResponse"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"tags": [
"enterprise"
]
}
},
"/datasources/{dataSourceUID}/cache/enable": {
"post": {
"description": "enable cache for a single data source",
"operationId": "enableDataSourceCache",
"parameters": [
{
"in": "path",
"name": "dataSourceUID",
"required": true,
"schema": {
"type": "string"
}
}
],
"responses": {
"200": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CacheConfigResponse"
}
}
},
"description": "CacheConfigResponse"
},
"500": {
"$ref": "#/components/responses/internalServerError"
}
},
"tags": [
"enterprise"
]
}
},
"/datasources/{id}": {
"delete": {
"deprecated": true,