Create alert rule
curl --request POST \
--url https://cloud.bytebeam.io/api/v1/alert-rules \
--header 'Content-Type: application/json' \
--header 'x-bytebeam-api-key: <api-key>' \
--header 'x-bytebeam-tenant: <api-key>' \
--data '
{
"activation_threshold_seconds": 123,
"metadata_filters": {},
"name": "<string>",
"stream": "<string>",
"deactivation_threshold_seconds": 123,
"group": "<string>",
"condition": {}
}
'import requests
url = "https://cloud.bytebeam.io/api/v1/alert-rules"
payload = {
"activation_threshold_seconds": 123,
"metadata_filters": {},
"name": "<string>",
"stream": "<string>",
"deactivation_threshold_seconds": 123,
"group": "<string>",
"condition": {}
}
headers = {
"x-bytebeam-api-key": "<api-key>",
"x-bytebeam-tenant": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-bytebeam-api-key': '<api-key>',
'x-bytebeam-tenant': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
activation_threshold_seconds: 123,
metadata_filters: {},
name: '<string>',
stream: '<string>',
deactivation_threshold_seconds: 123,
group: '<string>',
condition: {}
})
};
fetch('https://cloud.bytebeam.io/api/v1/alert-rules', 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://cloud.bytebeam.io/api/v1/alert-rules",
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([
'activation_threshold_seconds' => 123,
'metadata_filters' => [
],
'name' => '<string>',
'stream' => '<string>',
'deactivation_threshold_seconds' => 123,
'group' => '<string>',
'condition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bytebeam-api-key: <api-key>",
"x-bytebeam-tenant: <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 := "https://cloud.bytebeam.io/api/v1/alert-rules"
payload := strings.NewReader("{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bytebeam-api-key", "<api-key>")
req.Header.Add("x-bytebeam-tenant", "<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("https://cloud.bytebeam.io/api/v1/alert-rules")
.header("x-bytebeam-api-key", "<api-key>")
.header("x-bytebeam-tenant", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.bytebeam.io/api/v1/alert-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bytebeam-api-key"] = '<api-key>'
request["x-bytebeam-tenant"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.API Reference
Create alert rule
POST
/
api
/
v1
/
alert-rules
Create alert rule
curl --request POST \
--url https://cloud.bytebeam.io/api/v1/alert-rules \
--header 'Content-Type: application/json' \
--header 'x-bytebeam-api-key: <api-key>' \
--header 'x-bytebeam-tenant: <api-key>' \
--data '
{
"activation_threshold_seconds": 123,
"metadata_filters": {},
"name": "<string>",
"stream": "<string>",
"deactivation_threshold_seconds": 123,
"group": "<string>",
"condition": {}
}
'import requests
url = "https://cloud.bytebeam.io/api/v1/alert-rules"
payload = {
"activation_threshold_seconds": 123,
"metadata_filters": {},
"name": "<string>",
"stream": "<string>",
"deactivation_threshold_seconds": 123,
"group": "<string>",
"condition": {}
}
headers = {
"x-bytebeam-api-key": "<api-key>",
"x-bytebeam-tenant": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'x-bytebeam-api-key': '<api-key>',
'x-bytebeam-tenant': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
activation_threshold_seconds: 123,
metadata_filters: {},
name: '<string>',
stream: '<string>',
deactivation_threshold_seconds: 123,
group: '<string>',
condition: {}
})
};
fetch('https://cloud.bytebeam.io/api/v1/alert-rules', 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://cloud.bytebeam.io/api/v1/alert-rules",
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([
'activation_threshold_seconds' => 123,
'metadata_filters' => [
],
'name' => '<string>',
'stream' => '<string>',
'deactivation_threshold_seconds' => 123,
'group' => '<string>',
'condition' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-bytebeam-api-key: <api-key>",
"x-bytebeam-tenant: <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 := "https://cloud.bytebeam.io/api/v1/alert-rules"
payload := strings.NewReader("{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-bytebeam-api-key", "<api-key>")
req.Header.Add("x-bytebeam-tenant", "<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("https://cloud.bytebeam.io/api/v1/alert-rules")
.header("x-bytebeam-api-key", "<api-key>")
.header("x-bytebeam-tenant", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://cloud.bytebeam.io/api/v1/alert-rules")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-bytebeam-api-key"] = '<api-key>'
request["x-bytebeam-tenant"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"activation_threshold_seconds\": 123,\n \"metadata_filters\": {},\n \"name\": \"<string>\",\n \"stream\": \"<string>\",\n \"deactivation_threshold_seconds\": 123,\n \"group\": \"<string>\",\n \"condition\": {}\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.Authorizations
API key required to authenticate requests.
Tenant(Project) name required to identify the project.
Body
application/jsonapplication/transit+msgpackapplication/transit+jsonapplication/edn
Response
default - undefined
⌘I