mirror of
https://github.com/grafana/grafana.git
synced 2025-07-28 02:02:05 +08:00
Correlations: Add UpdateCorrelation HTTP API (#52444)
* Correlations: add UpdateCorrelation HTTP API * handle correlation not found * add tests * fix lint errors * add bad request to API spec * change casing * fix casing in docs * fix tests * update spec
This commit is contained in:
@ -101,3 +101,52 @@ Status codes:
|
||||
Content-Type: application/json
|
||||
Authorization: Bearer eyJrIjoiT0tTcG1pUlY2RnVKZTFVaDFsNFZXdE9ZWmNrMkZYbk
|
||||
{
|
||||
```
|
||||
|
||||
JSON body schema:
|
||||
|
||||
- **label** – A label for the correlation.
|
||||
- **description** – A description for the correlation.
|
||||
|
||||
**Example response:**
|
||||
|
||||
```http
|
||||
HTTP/1.1 200
|
||||
Content-Type: application/json
|
||||
{
|
||||
```
|
||||
|
||||
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
|
||||
- **label** – A label for the correlation.
|
||||
- **description** – A description for the correlation.
|
||||
|
||||
**Example response:**
|
||||
|
||||
```http
|
||||
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"
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
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
|
||||
|
Reference in New Issue
Block a user