curl --request PUT \
--url https://api.example.com/api/v1/score/{index}/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
"<string>"
]
}
'import requests
url = "https://api.example.com/api/v1/score/{index}/{uid}"
payload = { "tags": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tags: ['<string>']})
};
fetch('https://api.example.com/api/v1/score/{index}/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/score/{index}/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/score/{index}/{uid}"
payload := strings.NewReader("{\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/v1/score/{index}/{uid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/score/{index}/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"index": "<string>",
"timestamp": 123,
"i": 123,
"type": "<string>",
"organisationId": 123,
"licenseId": 123,
"licenseInstanceId": 123,
"tenantId": 123,
"projectId": 123,
"contractId": 123,
"txHash": "<string>",
"detectorSchemaName": "<string>",
"alertId": "<string>",
"monitorId": "<string>",
"alertName": "<string>",
"alertMessage": "<string>",
"numericSeverity": 123,
"severity": "<string>",
"tags": [
"<string>"
],
"meta": {},
"scoreGroup": "<string>",
"score": 123,
"scoreChange": 123,
"key": "<string>",
"value": 123
}Update score change
Update score change
curl --request PUT \
--url https://api.example.com/api/v1/score/{index}/{uid} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tags": [
"<string>"
]
}
'import requests
url = "https://api.example.com/api/v1/score/{index}/{uid}"
payload = { "tags": ["<string>"] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({tags: ['<string>']})
};
fetch('https://api.example.com/api/v1/score/{index}/{uid}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/api/v1/score/{index}/{uid}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'tags' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/score/{index}/{uid}"
payload := strings.NewReader("{\n \"tags\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.example.com/api/v1/score/{index}/{uid}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tags\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/score/{index}/{uid}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"tags\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"uid": "<string>",
"index": "<string>",
"timestamp": 123,
"i": 123,
"type": "<string>",
"organisationId": 123,
"licenseId": 123,
"licenseInstanceId": 123,
"tenantId": 123,
"projectId": 123,
"contractId": 123,
"txHash": "<string>",
"detectorSchemaName": "<string>",
"alertId": "<string>",
"monitorId": "<string>",
"alertName": "<string>",
"alertMessage": "<string>",
"numericSeverity": 123,
"severity": "<string>",
"tags": [
"<string>"
],
"meta": {},
"scoreGroup": "<string>",
"score": 123,
"scoreChange": 123,
"key": "<string>",
"value": 123
}Authorizations
Authentication
Query Parameters
If 'true', OpenSearch refreshes the affected shards to make this operation visible to search, if 'wait_for' then wait for a refresh to make this operation visible to search, if 'false' do nothing with refreshes.
WaitFor, True, False Body
Tag list of the alert, could be viewed or empty. Values: viewed
Response
OK
UID of the document
Index of the document
Event timestamp
Index of the document
Type of the events with same timestamp
Id of the organisation that provided the license
Id of the license that provided score formula
Id of the license instance that provided score formula
Id of the tenant that provided alert
Id of the project that provided alert
Id of the contract that provided alert
Hash of the transaction, that produced this event
Detector schema name of the score change
Id of the alert that triggered this score change
Monitor id for deduplication of this score change
Name of the alert that triggered this score change
Message of the alert that triggered this score change
Numeric severity of the alert that triggered this score change
Severity of the alert that triggered this score change
Tag list of the alert, could be viewed or empty
Metadata of the alert, that produced this score change
Show child attributes
Show child attributes
Score group of the score
Total score
Change of the score compared with previous event
Key of the score data
Value of the score data