Skip to main content
POST
/
logs
Create a new log
curl --request POST \
  --url https://api.eu.bronto.io/logs \
  --header 'Content-Type: application/json' \
  --header 'X-BRONTO-API-KEY: <api-key>' \
  --data '
{
  "collection": "demo",
  "dataset": "http",
  "logset": "demo",
  "log": "http"
}
'
{
  "collection": "demo",
  "dataset": "firewall",
  "log_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "logset": "demo",
  "log": "firewall",
  "is_system_generated": false,
  "tags": {
    "region": "eu",
    "environment": "production"
  },
  "drop_events": 0.25,
  "level": "info",
  "parser_id": "266ea07d-b013-47c1-9c74-635e42b22cbb"
}

Authorizations

X-BRONTO-API-KEY
string
header
required

Body

application/json

Identifies a log source using either the legacy fields (logset, log) or the current fields (collection, dataset).

collection
string
required

The name of the log collection. Replaces the deprecated logset field.

Required string length: 1 - 255
Example:

"demo"

dataset
string

The name of the dataset within the collection. Replaces the deprecated log field.

Required string length: 1 - 255
Example:

"http"

logset
string
deprecated

Deprecated. Use collection instead.

Required string length: 1 - 255
Example:

"demo"

log
string
deprecated

Deprecated. Use dataset instead.

Required string length: 1 - 255
Example:

"http"

Response

Log created successfully

Configuration for a log source. A log can be identified using either the current fields (collection, dataset) or the deprecated legacy fields (logset, log). The log_id must always be provided.

collection
string
required

Name of the log collection. Replaces the deprecated logset field.

Required string length: 1 - 255
Example:

"demo"

dataset
string
required

Name of the dataset within the collection. Replaces the deprecated log field.

Required string length: 1 - 255
Example:

"firewall"

log_id
string<uuid>
required

The unique identifier of the log

logset
string
deprecated

Deprecated. Use collection instead.

Required string length: 1 - 255
Example:

"demo"

log
string
deprecated

Deprecated. Use dataset instead.

Required string length: 1 - 255
Example:

"firewall"

is_system_generated
boolean

Whether the log is generated by the system

Example:

false

tags
object

A map of key value pairs associated with this log

Example:
{
  "region": "eu",
  "environment": "production"
}
drop_events
number
default:0

Percentage (0.0–1.0) of newly ingested events that will be dropped. 0.0 means no events are dropped. 1.0 means all events are dropped. Dropped events are permanently discarded and will not be indexed or monitored.

Required range: 0 <= x <= 1
Example:

0.25

level
enum<string>
default:trace

Minimum accepted log level. Events below this level will be rejected. For example, if set to info, debug and trace events will be rejected. Events without a level are always accepted. Rejected events are permanently discarded and will not be indexed or monitored.

Available options:
trace,
debug,
info,
warning,
error,
severe,
critical,
fatal,
notice,
alert,
emergency
Example:

"info"

parser_id
string<uuid>

Identifier of the parser used to process incoming events for this log.

Example:

"266ea07d-b013-47c1-9c74-635e42b22cbb"