A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://grafana.com/docs/grafana/latest/developers/http_api/correlations/ below:

Correlations HTTP API | Grafana documentation

Enterprise Open source

Correlations API

This API can be used to define correlations between data sources.

Create correlations

POST /api/datasources/uid/:sourceUID/correlations

Creates a correlation between two data sources - the source data source identified by sourceUID in the path, and the target data source which is specified in the body.

Example request:

POST /api/datasources/uid/uyBf2637k/correlations HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
	"targetUID": "PDDA8E780A17E7EF1",
	"label": "My Label",
	"description": "Logs to Traces",
  "type": "query",
  "config": {
    "field": "message",
    "target": {},
  }
}

JSON body schema:

Example response:

HTTP/1.1 200
Content-Type: application/json
{
  "message": "Correlation created",
  "result": {
    "description": "Logs to Traces",
    "label": "My Label",
    "sourceUID": "uyBf2637k",
    "targetUID": "PDDA8E780A17E7EF1",
    "uid": "50xhMlg9k",
    "type": "query",
    "config": {
      "field": "message",
      "target": {},
    }
  }
}

Status codes:

Delete correlations

DELETE /api/datasources/uid/:sourceUID/correlations/:correlationUID

Deletes a correlation.

Example request:

DELETE /api/datasources/uid/uyBf2637k/correlations/J6gn7d31L HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

Example response:

HTTP/1.1 200
Content-Type: application/json
{
  "message": "Correlation deleted"
}

Status codes:

Update correlations

PATCH /api/datasources/uid/:sourceUID/correlations/:correlationUID

Updates a correlation.

Example request:

POST /api/datasources/uid/uyBf2637k/correlations/J6gn7d31L HTTP/1.1
Accept: application/json
Content-Type: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
{
	"label": "My Label",
	"description": "Logs to Traces",
}

JSON body schema:

Example response:

HTTP/1.1 200
Content-Type: application/json
{
  "message": "Correlation updated",
  "result": {
    "description": "Logs to Traces",
    "label": "My Label",
    "sourceUID": "uyBf2637k",
    "targetUID": "PDDA8E780A17E7EF1",
    "uid": "J6gn7d31L",
    "type": "query",
    "config": {
			"field": "message",
			"target": {}
		}
  }
}

Status codes:

Get single correlation

GET /api/datasources/uid/:sourceUID/correlations/:correlationUID

Gets a single correlation.

Example request:

GET /api/datasources/uid/uyBf2637k/correlations/J6gn7d31L HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

Example response:

HTTP/1.1 200
Content-Type: application/json
{
  "description": "Logs to Traces",
  "label": "My Label",
  "sourceUID": "uyBf2637k",
  "targetUID": "PDDA8E780A17E7EF1",
  "uid": "J6gn7d31L",
  "provisioned": false,
  "type": "query",
  "config": {
    "field": "message",
    "target": {},
  }
}

Status codes:

Get all correlations originating from a given data source

GET /api/datasources/uid/:sourceUID/correlations

Get all correlations originating from the data source identified by the given sourceUID in the path.

Example request:

GET /api/datasources/uid/uyBf2637k/correlations HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

Example response:

HTTP/1.1 200
Content-Type: application/json
[
  {
    "description": "Logs to Traces",
    "label": "My Label",
    "sourceUID": "uyBf2637k",
    "targetUID": "PDDA8E780A17E7EF1",
    "uid": "J6gn7d31L",
    "provisioned": false,
    "type": "query",
    "config": {
      "field": "message",
      "target": {},
    }
  },
  {
    "description": "Logs to Metrics",
    "label": "Another Label",
    "sourceUID": "uyBf2637k",
    "targetUID": "P15396BDD62B2BE29",
    "uid": "uWCpURgVk",
    "provisioned": false,
    "type": "query",
    "config": {
      "field": "message",
      "target": {},
    }
  }
]

Status codes:

Get all correlations

GET /api/datasources/correlations

Get all correlations.

Query parameters:

Example request:

GET /api/datasources/correlations HTTP/1.1
Accept: application/json
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk

Example response:

HTTP/1.1 200
Content-Type: application/json
[
  {
    "description": "Prometheus to Loki",
    "label": "My Label",
    "sourceUID": "uyBf2637k",
    "targetUID": "PDDA8E780A17E7EF1",
    "uid": "J6gn7d31L",
    "provisioned": false,
    "type": "query",
    "config": {
      "field": "message",
      "target": {},
    }
  },
  {
    "description": "Loki to Tempo",
    "label": "Another Label",
    "sourceUID": "PDDA8E780A17E7EF1",
    "targetUID": "P15396BDD62B2BE29",
    "uid": "uWCpURgVk",
    "provisioned": false,
    "type": "query",
    "config": {
      "field": "message",
      "target": {},
    }
  }
]

Status codes:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4