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:
Giordano Ricci
2022-08-03 14:18:51 +01:00
committed by GitHub
parent f61a97a0ab
commit 09c4dbdb9f
9 changed files with 738 additions and 1 deletions

View File

@ -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