JavaScript
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
await client.team.defaultChecks.update();import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
client.team.default_checks.update()curl --request PUT \
--url https://brainbase-monorepo-api.onrender.com/api/team/default-checks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"latencyEnabled": true,
"latencyThreshold": 123,
"apiEnabled": true,
"apiThreshold": 123,
"aiEnabled": true,
"aiThreshold": 123,
"alertEmails": [
"<string>"
],
"sampleRate": 123
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/team/default-checks",
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([
'latencyEnabled' => true,
'latencyThreshold' => 123,
'apiEnabled' => true,
'apiThreshold' => 123,
'aiEnabled' => true,
'aiThreshold' => 123,
'alertEmails' => [
'<string>'
],
'sampleRate' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://brainbase-monorepo-api.onrender.com/api/team/default-checks"
payload := strings.NewReader("{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://brainbase-monorepo-api.onrender.com/api/team/default-checks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/team/default-checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}"
response = http.request(request)
puts response.read_bodyDefault Checks
Create or update team default checks configuration
PUT
/
api
/
team
/
default-checks
JavaScript
import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
await client.team.defaultChecks.update();import os
from brainbase_labs import BrainbaseLabs
client = BrainbaseLabs(
api_key=os.environ.get("BRAINBASE_LABS_API_KEY"), # This is the default and can be omitted
)
client.team.default_checks.update()curl --request PUT \
--url https://brainbase-monorepo-api.onrender.com/api/team/default-checks \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"latencyEnabled": true,
"latencyThreshold": 123,
"apiEnabled": true,
"apiThreshold": 123,
"aiEnabled": true,
"aiThreshold": 123,
"alertEmails": [
"<string>"
],
"sampleRate": 123
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://brainbase-monorepo-api.onrender.com/api/team/default-checks",
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([
'latencyEnabled' => true,
'latencyThreshold' => 123,
'apiEnabled' => true,
'apiThreshold' => 123,
'aiEnabled' => true,
'aiThreshold' => 123,
'alertEmails' => [
'<string>'
],
'sampleRate' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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://brainbase-monorepo-api.onrender.com/api/team/default-checks"
payload := strings.NewReader("{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.put("https://brainbase-monorepo-api.onrender.com/api/team/default-checks")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://brainbase-monorepo-api.onrender.com/api/team/default-checks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"latencyEnabled\": true,\n \"latencyThreshold\": 123,\n \"apiEnabled\": true,\n \"apiThreshold\": 123,\n \"aiEnabled\": true,\n \"aiThreshold\": 123,\n \"alertEmails\": [\n \"<string>\"\n ],\n \"sampleRate\": 123\n}"
response = http.request(request)
puts response.read_body⌘I
