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:

  1. POST /api/datasources/uid/uyBf2637k/correlations HTTP/1.1
  2. Accept: application/json
  3. Content-Type: application/json
  4. Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
  5. {
  6. "targetUID": "PDDA8E780A17E7EF1",
  7. "label": "My Label",
  8. "description": "Logs to Traces",
  9. }

JSON body schema:

  • targetUID – Target data source uid.
  • label – A label for the correlation.
  • description – A description for the correlation.

Example response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. {
  4. "message": "Correlation created",
  5. "result": {
  6. "description": "Logs to Traces",
  7. "label": "My Label",
  8. "sourceUID": "uyBf2637k",
  9. "targetUID": "PDDA8E780A17E7EF1",
  10. "uid": "50xhMlg9k"
  11. }
  12. }

Status codes:

  • 200 – OK
  • 400 - Errors (invalid JSON, missing or invalid fields)
  • 401 – Unauthorized
  • 403 – Forbidden, source data source is read-only
  • 404 – Not found, either source or target data source could not be found
  • 500 – Internal error

Delete correlations

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

Deletes a correlation.

Example request:

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

Example response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. {
  4. "message": "Correlation deleted"
  5. }

Status codes:

  • 200 – OK
  • 401 – Unauthorized
  • 403 – Forbidden, data source is read-only
  • 404 – Correlation not found
  • 500 – Internal error

Update correlations

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

Updates a correlation.

Example request:

  1. POST /api/datasources/uid/uyBf2637k/correlations/J6gn7d31L HTTP/1.1
  2. Accept: application/json
  3. Content-Type: application/json
  4. Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
  5. {
  6. "label": "My Label",
  7. "description": "Logs to Traces",
  8. }

JSON body schema:

  • label – A label for the correlation.
  • description – A description for the correlation.

Example response:

  1. HTTP/1.1 200
  2. Content-Type: application/json
  3. {
  4. "message": "Correlation updated",
  5. "result": {
  6. "description": "Logs to Traces",
  7. "label": "My Label",
  8. "sourceUID": "uyBf2637k",
  9. "targetUID": "PDDA8E780A17E7EF1",
  10. "uid": "J6gn7d31L"
  11. }
  12. }

Status codes:

  • 200 – OK
  • 401 – Unauthorized
  • 403 – Forbidden, source data source is read-only
  • 404 – Not found, either source or target data source could not be found
  • 500 – Internal error