openapi: 3.2.0 info: description: 'The Grafana backend exposes an HTTP API, the same API is used by the frontend to do everything from saving dashboards, creating users and updating data sources.' title: Grafana HTTP API. Datasources API contact: name: Grafana Labs url: https://grafana.com email: hello@grafana.com version: 0.0.1 servers: - url: /api security: - basic: [] - api_key: [] tags: - description: If you are running Grafana Enterprise and have Fine-grained access control enabled, for some endpoints you would need to have relevant permissions. Refer to specific resources to understand what permissions are required. name: Data Sources paths: /datasources: get: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scope: `datasources:*`.' tags: - Data Sources summary: Get all data sources operationId: getDataSources responses: '200': $ref: '#/components/responses/getDataSourcesResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' post: description: 'By defining `password` and `basicAuthPassword` under secureJsonData property Grafana encrypts them securely as an encrypted blob in the database. The response then lists the encrypted fields under secureJsonFields. If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:create`' tags: - Data Sources summary: Create a data source operationId: addDataSource responses: '200': $ref: '#/components/responses/createOrUpdateDatasourceResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '409': $ref: '#/components/responses/conflictError' '500': $ref: '#/components/responses/internalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/AddDataSourceCommand' required: true /datasources/correlations: get: tags: - Data Sources summary: Gets all correlations operationId: getCorrelations parameters: - description: Limit the maximum number of correlations to return per page name: limit in: query schema: type: integer format: int64 default: 100 maximum: 1000 - description: Page index for starting fetching correlations name: page in: query schema: type: integer format: int64 default: 1 - description: Source datasource UID filter to be applied to correlations name: sourceUID in: query style: form explode: true schema: type: array items: type: string responses: '200': $ref: '#/components/responses/getCorrelationsResponse' '401': $ref: '#/components/responses/unauthorisedError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /datasources/id/{name}: get: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).' tags: - Data Sources summary: Get data source Id by Name. This function will be removed in the future operationId: getDataSourceIdByName deprecated: true parameters: - name: name in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getDataSourceIDResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /datasources/name/{name}: get: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).' tags: - Data Sources summary: Get a single data source by Name. This function will be removed in the future operationId: getDataSourceByName deprecated: true parameters: - name: name in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getDataSourceResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' delete: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:name:*` and `datasources:name:test_datasource` (single data source).' tags: - Data Sources summary: Delete an existing data source by name. operationId: deleteDataSourceByName deprecated: true parameters: - name: name in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/deleteDataSourceByNameResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /datasources/proxy/uid/{uid}/{datasource_proxy_route}: get: description: Proxies all calls to the actual data source. tags: - Data Sources summary: Data source proxy GET calls operationId: datasourceProxyGETByUIDcalls parameters: - name: datasource_proxy_route in: path required: true schema: type: string - name: uid in: path required: true schema: type: string responses: '200': description: (empty) '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' post: description: Proxies all calls to the actual data source. The data source should support POST methods for the specific path and role as defined tags: - Data Sources summary: Data source proxy POST calls operationId: datasourceProxyPOSTByUIDcalls parameters: - name: datasource_proxy_route in: path required: true schema: type: string - name: uid in: path required: true schema: type: string responses: '201': description: (empty) '202': description: (empty) '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' requestBody: content: application/json: schema: {} required: true delete: description: Proxies all calls to the actual data source. tags: - Data Sources summary: Data source proxy DELETE calls operationId: datasourceProxyDELETEByUIDcalls parameters: - name: uid in: path required: true schema: type: string - name: datasource_proxy_route in: path required: true schema: type: string responses: '202': description: (empty) '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' /datasources/uid/{sourceUID}/correlations: get: tags: - Data Sources summary: Gets all correlations originating from the given data source operationId: getCorrelationsBySourceUID parameters: - name: sourceUID in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getCorrelationsBySourceUIDResponse' '401': $ref: '#/components/responses/unauthorisedError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' post: tags: - Data Sources summary: Add correlation operationId: createCorrelation parameters: - name: sourceUID in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/createCorrelationResponse' '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' requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateCorrelationCommand' required: true /datasources/uid/{sourceUID}/correlations/{correlationUID}: get: tags: - Data Sources summary: Gets a correlation operationId: getCorrelation parameters: - name: sourceUID in: path required: true schema: type: string - name: correlationUID in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getCorrelationResponse' '401': $ref: '#/components/responses/unauthorisedError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' patch: tags: - Data Sources summary: Updates a correlation operationId: updateCorrelation parameters: - name: sourceUID in: path required: true schema: type: string - name: correlationUID in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/updateCorrelationResponse' '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' requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateCorrelationCommand' /datasources/uid/{uid}: get: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:read` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).' tags: - Data Sources summary: Get a single data source by UID operationId: getDataSourceByUID parameters: - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/getDataSourceResponse' '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' put: description: 'Similar to creating a data source, `password` and `basicAuthPassword` should be defined under secureJsonData in order to be stored securely as an encrypted blob in the database. Then, the encrypted fields are listed under secureJsonFields section in the response. If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:write` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:1` (single data source).' tags: - Data Sources summary: Update an existing data source operationId: updateDataSourceByUID parameters: - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/createOrUpdateDatasourceResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '409': $ref: '#/components/responses/conflictError' '500': $ref: '#/components/responses/internalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/UpdateDataSourceCommand' required: true delete: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:delete` and scopes: `datasources:*`, `datasources:uid:*` and `datasources:uid:kLtEtcRGk` (single data source).' tags: - Data Sources summary: Delete an existing data source by UID operationId: deleteDataSourceByUID parameters: - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /datasources/uid/{uid}/correlations/{correlationUID}: delete: tags: - Data Sources summary: Delete a correlation operationId: deleteCorrelation parameters: - name: uid in: path required: true schema: type: string - name: correlationUID in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/deleteCorrelationResponse' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /datasources/uid/{uid}/health: get: tags: - Data Sources summary: Sends a health check request to the plugin datasource identified by the UID operationId: checkDatasourceHealthWithUID parameters: - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' /datasources/uid/{uid}/resources/{datasource_proxy_route}: get: tags: - Data Sources summary: Fetch data source resources operationId: callDatasourceResourceWithUID parameters: - name: datasource_proxy_route in: path required: true schema: type: string - name: uid in: path required: true schema: type: string responses: '200': $ref: '#/components/responses/okResponse' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '404': $ref: '#/components/responses/notFoundError' '500': $ref: '#/components/responses/internalServerError' /ds/query: post: description: 'If you are running Grafana Enterprise and have Fine-grained access control enabled you need to have a permission with action: `datasources:query`.' tags: - Data Sources summary: DataSource query metrics with expressions operationId: queryMetricsWithExpressions responses: '200': $ref: '#/components/responses/queryMetricsWithExpressionsRespons' '207': $ref: '#/components/responses/queryMetricsWithExpressionsRespons' '400': $ref: '#/components/responses/badRequestError' '401': $ref: '#/components/responses/unauthorisedError' '403': $ref: '#/components/responses/forbiddenError' '500': $ref: '#/components/responses/internalServerError' requestBody: content: application/json: schema: $ref: '#/components/schemas/MetricRequest' required: true components: schemas: Json: type: object CorrelationConfigUpdateDTO: type: object properties: field: description: Field used to attach the correlation link type: string example: message target: description: Target data query type: object additionalProperties: {} example: prop1: value1 prop2: value transformations: description: Source data transformations type: array items: $ref: '#/components/schemas/Transformation' example: - type: logfmt - expression: (Superman|Batman) type: regex variable: name 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: '#/components/schemas/ExplorePanelsState' query: {} timeRange: $ref: '#/components/schemas/TimeRange' transformations: type: array items: $ref: '#/components/schemas/LinkTransformationConfig' QueryDataResponse: description: It is the return type of a QueryData call. type: object title: QueryDataResponse contains the results from a QueryDataRequest. properties: results: $ref: '#/components/schemas/Responses' VisType: type: string title: VisType is used to indicate how the data should be visualized in explore. CreateCorrelationCommand: description: CreateCorrelationCommand is the command for creating a correlation type: object properties: config: $ref: '#/components/schemas/CorrelationConfig' description: description: Optional description of the correlation type: string example: Logs to Traces label: description: Optional label identifying the correlation type: string example: My label provisioned: description: True if correlation was created with provisioning. This makes it read-only. type: boolean targetUID: description: Target data source UID to which the correlation is created. required if type = query type: string example: PE1C5CBDA0504A6A3 type: $ref: '#/components/schemas/CorrelationType' SupportedTransformationTypes: type: string CorrelationConfig: type: object required: - field - target properties: field: description: Field used to attach the correlation link type: string example: message target: description: Target data query type: object additionalProperties: {} example: prop1: value1 prop2: value transformations: $ref: '#/components/schemas/Transformations' type: $ref: '#/components/schemas/CorrelationType' ErrorResponseBody: type: object required: - message properties: error: description: Error An optional detailed description of the actual error. Only included if running in developer mode. type: string message: description: a human readable version of the error type: string status: description: 'Status An optional status to denote the cause of the error. For example, a 412 Precondition Failed error may include additional information of why that error happened.' type: string ValueMapping: description: ValueMapping allows mapping input values to text and color type: object DsAccess: type: string FieldConfig: type: object title: FieldConfig represents the display properties for a Field. properties: color: description: 'Map values to a display color NOTE: this interface is under development in the frontend... so simple map for now' type: object additionalProperties: {} custom: description: Panel Specific Values type: object additionalProperties: {} decimals: type: integer format: uint16 description: description: Description is human readable field metadata type: string displayName: description: DisplayName overrides Grafana default naming, should not be used from a data source type: string displayNameFromDS: description: DisplayNameFromDS overrides Grafana default naming strategy. type: string filterable: description: Filterable indicates if the Field's data can be filtered by additional calls. type: boolean interval: description: 'Interval indicates the expected regular step between values in the series. When an interval exists, consumers can identify "missing" values when the expected value is not present. The grafana timeseries visualization will render disconnected values when missing values are found it the time field. The interval uses the same units as the values. For time.Time, this is defined in milliseconds.' type: number format: double links: description: The behavior when clicking on a result type: array items: $ref: '#/components/schemas/DataLink' mappings: $ref: '#/components/schemas/ValueMappings' max: $ref: '#/components/schemas/ConfFloat64' min: $ref: '#/components/schemas/ConfFloat64' noValue: description: Alternative to empty string type: string path: description: 'Path is an explicit path to the field in the datasource. When the frame meta includes a path, this will default to `${frame.meta.path}/${field.name} When defined, this value can be used as an identifier within the datasource scope, and may be used as an identifier to update values in a subsequent request' type: string thresholds: $ref: '#/components/schemas/ThresholdsConfig' type: $ref: '#/components/schemas/FieldTypeConfig' unit: description: Numeric Options type: string writeable: description: Writeable indicates that the datasource knows how to update this value type: boolean DataSource: type: object properties: access: $ref: '#/components/schemas/DsAccess' accessControl: $ref: '#/components/schemas/Metadata' basicAuth: type: boolean basicAuthUser: type: string database: type: string id: type: integer format: int64 isDefault: type: boolean jsonData: $ref: '#/components/schemas/Json' name: type: string orgId: type: integer format: int64 readOnly: type: boolean secureJsonFields: type: object additionalProperties: type: boolean type: type: string typeLogoUrl: type: string uid: type: string url: type: string user: type: string version: type: integer format: int64 withCredentials: type: boolean DataSourceListItemDTO: type: object properties: access: $ref: '#/components/schemas/DsAccess' basicAuth: type: boolean database: type: string id: type: integer format: int64 isDefault: type: boolean jsonData: $ref: '#/components/schemas/Json' name: type: string orgId: type: integer format: int64 readOnly: type: boolean type: type: string typeLogoUrl: type: string typeName: type: string uid: type: string url: type: string user: type: string Transformations: type: array items: $ref: '#/components/schemas/Transformation' AddDataSourceCommand: description: Also acts as api DTO type: object properties: access: $ref: '#/components/schemas/DsAccess' basicAuth: type: boolean basicAuthUser: type: string database: type: string isDefault: type: boolean jsonData: $ref: '#/components/schemas/Json' name: type: string secureJsonData: type: object additionalProperties: type: string type: type: string uid: type: string url: type: string user: type: string withCredentials: type: boolean FrameType: description: 'A FrameType string, when present in a frame''s metadata, asserts that the frame''s structure conforms to the FrameType''s specification. This property is currently optional, so FrameType may be FrameTypeUnknown even if the properties of the Frame correspond to a defined FrameType.' type: string Transformation: type: object properties: expression: type: string field: type: string mapValue: type: string type: type: string enum: - regex - logfmt Frames: description: 'It is the main data container within a backend.DataResponse. There should be no `nil` entries in the Frames slice (making them pointers was a mistake).' type: array title: Frames is a slice of Frame pointers. items: $ref: '#/components/schemas/Frame' Correlation: description: Correlation is the model for correlations definitions type: object properties: config: $ref: '#/components/schemas/CorrelationConfig' description: description: Description of the correlation type: string example: Logs to Traces label: description: Label identifying the correlation type: string example: My Label orgId: description: OrgID of the data source the correlation originates from type: integer format: int64 example: 1 provisioned: description: Provisioned True if the correlation was created during provisioning type: boolean sourceUID: description: UID of the data source the correlation originates from type: string example: d0oxYRg4z targetUID: description: UID of the data source the correlation points to type: string example: PE1C5CBDA0504A6A3 type: $ref: '#/components/schemas/CorrelationType' uid: description: Unique identifier of the correlation type: string example: 50xhMlg9k FieldTypeConfig: description: FieldTypeConfig has type specific configs, only one should be active at a time type: object properties: enum: $ref: '#/components/schemas/EnumFieldConfig' MetricRequest: type: object required: - from - to - queries properties: debug: type: boolean from: description: From Start time in epoch timestamps in milliseconds or relative using Grafana time units. type: string example: now-1h queries: description: 'queries.refId – Specifies an identifier of the query. Is optional and default to “A”. queries.datasourceId – Specifies the data source to be queried. Each query in the request must have an unique datasourceId. queries.maxDataPoints - Species maximum amount of data points that dashboard panel can render. Is optional and default to 100. queries.intervalMs - Specifies the time interval in milliseconds of time series. Is optional and defaults to 1000.' type: array items: $ref: '#/components/schemas/Json' example: - datasource: uid: PD8C576611E62080A format: table intervalMs: 86400000 maxDataPoints: 1092 rawSql: SELECT 1 as valueOne, 2 as valueTwo refId: A to: description: To End time in epoch timestamps in milliseconds or relative using Grafana time units. type: string example: now DataTopic: type: string title: DataTopic is used to identify which topic the frame should be assigned to. QueryStat: description: 'The embedded FieldConfig''s display name must be set. It corresponds to the QueryResultMetaStat on the frontend (https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L53).' type: object title: QueryStat is used for storing arbitrary statistics metadata related to a query and its result, e.g. total request time, data processing time. properties: color: description: 'Map values to a display color NOTE: this interface is under development in the frontend... so simple map for now' type: object additionalProperties: {} custom: description: Panel Specific Values type: object additionalProperties: {} decimals: type: integer format: uint16 description: description: Description is human readable field metadata type: string displayName: description: DisplayName overrides Grafana default naming, should not be used from a data source type: string displayNameFromDS: description: DisplayNameFromDS overrides Grafana default naming strategy. type: string filterable: description: Filterable indicates if the Field's data can be filtered by additional calls. type: boolean interval: description: 'Interval indicates the expected regular step between values in the series. When an interval exists, consumers can identify "missing" values when the expected value is not present. The grafana timeseries visualization will render disconnected values when missing values are found it the time field. The interval uses the same units as the values. For time.Time, this is defined in milliseconds.' type: number format: double links: description: The behavior when clicking on a result type: array items: $ref: '#/components/schemas/DataLink' mappings: $ref: '#/components/schemas/ValueMappings' max: $ref: '#/components/schemas/ConfFloat64' min: $ref: '#/components/schemas/ConfFloat64' noValue: description: Alternative to empty string type: string path: description: 'Path is an explicit path to the field in the datasource. When the frame meta includes a path, this will default to `${frame.meta.path}/${field.name} When defined, this value can be used as an identifier within the datasource scope, and may be used as an identifier to update values in a subsequent request' type: string thresholds: $ref: '#/components/schemas/ThresholdsConfig' type: $ref: '#/components/schemas/FieldTypeConfig' unit: description: Numeric Options type: string value: type: number format: double writeable: description: Writeable indicates that the datasource knows how to update this value type: boolean FrameTypeVersion: type: array title: FrameType is a 2 number version (Major / Minor). items: type: integer format: uint64 DataLink: description: DataLink define what type: object properties: internal: $ref: '#/components/schemas/InternalDataLink' targetBlank: type: boolean title: type: string url: type: string Notice: type: object title: Notice provides a structure for presenting notifications in Grafana's user interface. properties: inspect: $ref: '#/components/schemas/InspectType' link: description: 'Link is an optional link for display in the user interface and can be an absolute URL or a path relative to Grafana''s root url.' type: string severity: $ref: '#/components/schemas/NoticeSeverity' text: description: Text is freeform descriptive text for the notice. type: string Source: type: string title: Source type defines the status source. Frame: description: 'Each Field is well typed by its FieldType and supports optional Labels. A Frame is a general data container for Grafana. A Frame can be table data or time series data depending on its content and field types.' type: object title: Frame is a columnar data structure where each column is a Field. properties: Fields: description: 'Fields are the columns of a frame. All Fields must be of the same the length when marshalling the Frame for transmission. There should be no `nil` entries in the Fields slice (making them pointers was a mistake).' type: array items: $ref: '#/components/schemas/Field' Meta: $ref: '#/components/schemas/FrameMeta' Name: description: Name is used in some Grafana visualizations. type: string RefID: description: RefID is a property that can be set to match a Frame to its originating query. type: string UpdateDataSourceCommand: description: Also acts as api DTO type: object properties: access: $ref: '#/components/schemas/DsAccess' basicAuth: type: boolean basicAuthUser: type: string database: type: string isDefault: type: boolean jsonData: $ref: '#/components/schemas/Json' name: type: string secureJsonData: type: object additionalProperties: type: string type: type: string uid: type: string url: type: string user: type: string version: description: The previous version -- used for optimistic locking type: integer format: int64 withCredentials: type: boolean ConfFloat64: description: 'ConfFloat64 is a float64. It Marshals float64 values of NaN of Inf to null.' type: number format: double 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 EnumFieldConfig: description: 'Enum field config Vector values are used as lookup keys into the enum fields' type: object properties: color: description: Color is the color value for a given index (empty is undefined) type: array items: type: string description: description: Description of the enum state type: array items: type: string icon: description: Icon supports setting an icon for a given index value type: array items: type: string text: description: Value is the string display value for a given index type: array items: type: string ThresholdsMode: description: ThresholdsMode absolute or percentage type: string InspectType: type: integer format: int64 title: InspectType is a type for the Inspect property of a Notice. CorrelationType: description: the type of correlation, either query for containing query information, or external for containing an external URL type: string ValueMappings: type: array items: $ref: '#/components/schemas/ValueMapping' CreateCorrelationResponseBody: description: CreateCorrelationResponse is the response struct for CreateCorrelationCommand type: object properties: message: type: string example: Correlation created result: $ref: '#/components/schemas/Correlation' UpdateCorrelationCommand: description: UpdateCorrelationCommand is the command for updating a correlation type: object properties: config: $ref: '#/components/schemas/CorrelationConfigUpdateDTO' description: description: Optional description of the correlation type: string example: Logs to Traces label: description: Optional label identifying the correlation type: string example: My label type: $ref: '#/components/schemas/CorrelationType' Status: type: integer format: int64 Responses: description: 'The QueryData method the QueryDataHandler method will set the RefId property on the DataResponses'' frames based on these RefIDs.' type: object title: Responses is a map of RefIDs (Unique Query ID) to DataResponses. additionalProperties: $ref: '#/components/schemas/DataResponse' FrameLabels: description: Labels are used to add metadata to an object. The JSON will always be sorted keys type: object additionalProperties: type: string ThresholdsConfig: description: ThresholdsConfig setup thresholds type: object properties: mode: $ref: '#/components/schemas/ThresholdsMode' steps: description: Must be sorted by 'value', first value is always -Infinity type: array items: $ref: '#/components/schemas/Threshold' DataSourceList: type: array items: $ref: '#/components/schemas/DataSourceListItemDTO' NoticeSeverity: type: integer format: int64 title: NoticeSeverity is a type for the Severity property of a Notice. DeleteCorrelationResponseBody: type: object properties: message: type: string example: Correlation deleted TimeRange: description: Redefining this to avoid an import cycle type: object properties: from: type: string format: date-time to: type: string format: date-time Threshold: description: Threshold a single step on the threshold list type: object properties: color: type: string state: type: string value: $ref: '#/components/schemas/ConfFloat64' SuccessResponseBody: type: object properties: message: type: string LinkTransformationConfig: type: object properties: expression: type: string field: type: string mapValue: type: string type: $ref: '#/components/schemas/SupportedTransformationTypes' DataResponse: description: 'A map of RefIDs (unique query identifiers) to this type makes up the Responses property of a QueryDataResponse. The Error property is used to allow for partial success responses from the containing QueryDataResponse.' type: object title: DataResponse contains the results from a DataQuery. properties: Error: description: Error is a property to be set if the corresponding DataQuery has an error. type: string ErrorSource: $ref: '#/components/schemas/Source' Frames: $ref: '#/components/schemas/Frames' Status: $ref: '#/components/schemas/Status' FrameMeta: description: 'https://github.com/grafana/grafana/blob/master/packages/grafana-data/src/types/data.ts#L11 NOTE -- in javascript this can accept any `[key: string]: any;` however this interface only exposes the values we want to be exposed' type: object title: 'FrameMeta matches:' properties: channel: description: Channel is the path to a stream in grafana live that has real-time updates for this data. type: string custom: description: Custom datasource specific values. dataTopic: $ref: '#/components/schemas/DataTopic' executedQueryString: description: 'ExecutedQueryString is the raw query sent to the underlying system. All macros and templating have been applied. When metadata contains this value, it will be shown in the query inspector.' type: string notices: description: 'Notices provide additional information about the data in the Frame that Grafana can display to the user in the user interface.' type: array items: $ref: '#/components/schemas/Notice' path: description: Path is a browsable path on the datasource. type: string pathSeparator: description: PathSeparator defines the separator pattern to decode a hierarchy. The default separator is '/'. type: string preferredVisualisationPluginId: description: 'PreferredVisualizationPluginId sets the panel plugin id to use to render the data when using Explore. If the plugin cannot be found will fall back to PreferredVisualization.' type: string preferredVisualisationType: $ref: '#/components/schemas/VisType' stats: description: Stats is an array of query result statistics. type: array items: $ref: '#/components/schemas/QueryStat' type: $ref: '#/components/schemas/FrameType' typeVersion: $ref: '#/components/schemas/FrameTypeVersion' uniqueRowIdFields: description: 'Array of field indices which values create a unique id for each row. Ideally this should be globally unique ID but that isn''t guarantied. Should help with keeping track and deduplicating rows in visualizations, especially with streaming data with frequent updates.' type: array items: type: integer format: int64 example: TraceID in Tempo, table name + primary key in SQL UpdateCorrelationResponseBody: type: object properties: message: type: string example: Correlation updated result: $ref: '#/components/schemas/Correlation' Metadata: description: 'Metadata contains user accesses for a given resource Ex: map[string]bool{"create":true, "delete": true}' type: object additionalProperties: type: boolean Field: description: 'A Field is essentially a slice of various types with extra properties and methods. See NewField() for supported types. The slice data in the Field is a not exported, so methods on the Field are used to to manipulate its data.' type: object title: Field represents a typed column of data within a Frame. properties: config: $ref: '#/components/schemas/FieldConfig' labels: $ref: '#/components/schemas/FrameLabels' name: description: 'Name is default identifier of the field. The name does not have to be unique, but the combination of name and Labels should be unique for proper behavior in all situations.' type: string responses: unauthorisedError: description: UnauthorizedError is returned when the request is not authenticated. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' updateCorrelationResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/UpdateCorrelationResponseBody' createCorrelationResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/CreateCorrelationResponseBody' deleteCorrelationResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/DeleteCorrelationResponseBody' internalServerError: description: InternalServerError is a general error indicating something went wrong internally. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' getDataSourceIDResponse: description: (empty) content: application/json: schema: type: object required: - id properties: id: description: ID Identifier of the data source. type: integer format: int64 example: 65 queryMetricsWithExpressionsRespons: description: (empty) content: application/json: schema: $ref: '#/components/schemas/QueryDataResponse' conflictError: description: ConflictError content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' getDataSourcesResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/DataSourceList' badRequestError: description: BadRequestError is returned when the request is invalid and it cannot be processed. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' getCorrelationResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/Correlation' deleteDataSourceByNameResponse: description: (empty) content: application/json: schema: type: object required: - id - message properties: id: description: ID Identifier of the deleted data source. type: integer format: int64 example: 65 message: description: Message Message of the deleted dashboard. type: string example: Dashboard My Dashboard deleted okResponse: description: An OKResponse is returned if the request was successful. content: application/json: schema: $ref: '#/components/schemas/SuccessResponseBody' forbiddenError: description: ForbiddenError is returned if the user/token has insufficient permissions to access the requested resource. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' getCorrelationsBySourceUIDResponse: description: (empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/Correlation' getDataSourceResponse: description: (empty) content: application/json: schema: $ref: '#/components/schemas/DataSource' createOrUpdateDatasourceResponse: description: (empty) content: application/json: schema: type: object required: - id - name - message - datasource properties: datasource: $ref: '#/components/schemas/DataSource' id: description: ID Identifier of the new data source. type: integer format: int64 example: 65 message: description: Message Message of the deleted dashboard. type: string example: Data source added name: description: Name of the new data source. type: string example: My Data source getCorrelationsResponse: description: (empty) content: application/json: schema: type: array items: $ref: '#/components/schemas/Correlation' notFoundError: description: NotFoundError is returned when the requested resource was not found. content: application/json: schema: $ref: '#/components/schemas/ErrorResponseBody' securitySchemes: api_key: type: apiKey name: Authorization in: header basic: type: http scheme: basic