curl --request POST \
--url https://api.eu.bronto.io/logs \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"log": "http",
"logset": "demo"
}
'import requests
url = "https://api.eu.bronto.io/logs"
payload = {
"log": "http",
"logset": "demo"
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({log: 'http', logset: 'demo'})
};
fetch('https://api.eu.bronto.io/logs', 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.eu.bronto.io/logs",
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([
'log' => 'http',
'logset' => 'demo'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-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://api.eu.bronto.io/logs"
payload := strings.NewReader("{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-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.post("https://api.eu.bronto.io/logs")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}"
response = http.request(request)
puts response.read_body{
"logset": "demo",
"log": "firewall",
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_system_generated": false,
"tags": {
"region": "eu",
"environment": "production"
},
"drop_events": 0,
"level": "trace"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}Create a new log
Create a new Bronto log dataset to receive timestamped events, with a configurable name, parser, retention, and metadata for routing ingested data.
curl --request POST \
--url https://api.eu.bronto.io/logs \
--header 'Content-Type: application/json' \
--header 'X-BRONTO-API-KEY: <api-key>' \
--data '
{
"log": "http",
"logset": "demo"
}
'import requests
url = "https://api.eu.bronto.io/logs"
payload = {
"log": "http",
"logset": "demo"
}
headers = {
"X-BRONTO-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-BRONTO-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({log: 'http', logset: 'demo'})
};
fetch('https://api.eu.bronto.io/logs', 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.eu.bronto.io/logs",
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([
'log' => 'http',
'logset' => 'demo'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-BRONTO-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://api.eu.bronto.io/logs"
payload := strings.NewReader("{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-BRONTO-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.post("https://api.eu.bronto.io/logs")
.header("X-BRONTO-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.eu.bronto.io/logs")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-BRONTO-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"log\": \"http\",\n \"logset\": \"demo\"\n}"
response = http.request(request)
puts response.read_body{
"logset": "demo",
"log": "firewall",
"log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"is_system_generated": false,
"tags": {
"region": "eu",
"environment": "production"
},
"drop_events": 0,
"level": "trace"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}{
"code": 201,
"correlation_id": "<string>",
"message": "<string>"
}Authorizations
Body
Response
Log created successfully
The name of the log set
"demo"
The name of the log
"firewall"
The unique identifier of the log
Whether the log is generated by the system
false
A map of key value pairs associated with this log
Show child attributes
Show child attributes
{
"region": "eu",
"environment": "production"
}
This is the percentage of new incoming data for this log that will be rejected (where 0.0 is no data rejection and 1.0 is all data rejection). Rejected data is not recoverable and will not be indexed or monitored.
0 <= x <= 1This is the log level at which incoming events will be accepted. For example if info is set then debug and trace events will be rejected. Events with no level will be allowed irrespective of the level set. Rejected data is not recoverable and will not be indexed or monitored.
trace, debug, info, warning, error, severe, critical, fatal, notice, alert, emergency 
