Receive alert events
curl --request POST \
--url http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Token: <api-key>' \
--data '
{
"eventId": "<string>",
"title": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"deduplicationKey": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"labels": {},
"annotations": {},
"sourceUrl": "<string>"
}
'import requests
url = "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events"
payload = {
"eventId": "<string>",
"title": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"deduplicationKey": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"labels": {},
"annotations": {},
"sourceUrl": "<string>"
}
headers = {
"X-OpenCluster-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-OpenCluster-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
title: '<string>',
startedAt: '2023-11-07T05:31:56Z',
deduplicationKey: '<string>',
resolvedAt: '2023-11-07T05:31:56Z',
labels: {},
annotations: {},
sourceUrl: '<string>'
})
};
fetch('http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventId' => '<string>',
'title' => '<string>',
'startedAt' => '2023-11-07T05:31:56Z',
'deduplicationKey' => '<string>',
'resolvedAt' => '2023-11-07T05:31:56Z',
'labels' => [
],
'annotations' => [
],
'sourceUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Token: <api-key>"
],
]);
$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 := "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events"
payload := strings.NewReader("{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenCluster-Token", "<api-key>")
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.post("http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events")
.header("X-OpenCluster-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-OpenCluster-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"status": "<string>"
}Webhook Intake
Receive alert events
POST
/
webhooks
/
v1
/
integrations
/
{integration}
/
alert-events
Receive alert events
curl --request POST \
--url http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events \
--header 'Content-Type: application/json' \
--header 'X-OpenCluster-Token: <api-key>' \
--data '
{
"eventId": "<string>",
"title": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"deduplicationKey": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"labels": {},
"annotations": {},
"sourceUrl": "<string>"
}
'import requests
url = "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events"
payload = {
"eventId": "<string>",
"title": "<string>",
"startedAt": "2023-11-07T05:31:56Z",
"deduplicationKey": "<string>",
"resolvedAt": "2023-11-07T05:31:56Z",
"labels": {},
"annotations": {},
"sourceUrl": "<string>"
}
headers = {
"X-OpenCluster-Token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-OpenCluster-Token': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventId: '<string>',
title: '<string>',
startedAt: '2023-11-07T05:31:56Z',
deduplicationKey: '<string>',
resolvedAt: '2023-11-07T05:31:56Z',
labels: {},
annotations: {},
sourceUrl: '<string>'
})
};
fetch('http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_PORT => "8080",
CURLOPT_URL => "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventId' => '<string>',
'title' => '<string>',
'startedAt' => '2023-11-07T05:31:56Z',
'deduplicationKey' => '<string>',
'resolvedAt' => '2023-11-07T05:31:56Z',
'labels' => [
],
'annotations' => [
],
'sourceUrl' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-OpenCluster-Token: <api-key>"
],
]);
$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 := "http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events"
payload := strings.NewReader("{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-OpenCluster-Token", "<api-key>")
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.post("http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events")
.header("X-OpenCluster-Token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://localhost:8080/webhooks/v1/integrations/{integration}/alert-events")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["X-OpenCluster-Token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventId\": \"<string>\",\n \"title\": \"<string>\",\n \"startedAt\": \"2023-11-07T05:31:56Z\",\n \"deduplicationKey\": \"<string>\",\n \"resolvedAt\": \"2023-11-07T05:31:56Z\",\n \"labels\": {},\n \"annotations\": {},\n \"sourceUrl\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"status": "<string>"
}{
"error": "the selected Organization is not available to this caller",
"reason": "credential_rejected",
"requires": "<string>"
}{
"status": "<string>"
}Authorizations
Static sender credential. It authenticates the sender and does not sign the body.
Path Parameters
Body
application/json
- Option 1
- Option 2
Required string length:
1 - 256Available options:
firing, resolved Leading and trailing whitespace is removed before enforcing the 512-character limit.
Minimum string length:
1Pattern:
.*\S.*Available options:
info, warning, critical Required string length:
1 - 256Show child attributes
Show child attributes
Show child attributes
Show child attributes
Maximum string length:
2048Pattern:
^https?://Response
Delivery was already accepted.
Maximum string length:
128