API for managing log collection targets, sources, and TLS bundles.

apiKey BearerAuth

Fields
KeyIn
AuthorizationHeader

Observability Service

List log collectors.

Return the last-known heartbeat and pipeline health state of all log collectors (Alloy instances). Note that log streaming is a tech preview.

Auth
GET /api/v2/logs/collectors
Copy
Responses application/json
200

A successful response.

objectobject
collectors15 fieldsarray[object]
401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Get log collector.

Return the last-known heartbeat and pipeline health state for a single log collector (Alloy instance). Note that log streaming is a tech preview.

Auth
Path Params
idstring
GET /api/v2/logs/collectors/{id}
Copy
Responses application/json
200

A successful response.

objectobject
collector15 fieldsobject

CollectorStatus is the composite health view for one log collector (Alloy instance).

401

Unauthorized: authentication failed.

403

Permission denied.

404

A log collector with the provided ID has not been seen on this cluster.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

List log sources.

Return all configured log collection sources. Note that log streaming is a tech preview.

Auth
GET /api/v2/logs/sources
Copy
Responses application/json
200

A successful response.

objectobject
sources6 fieldsarray[object]
401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Create log source.

Register a new log collection point. A source can be a systemd journal unit (journald) or a set of file paths. The log_format field determines how raw log lines are parsed before forwarding; for well-known service names a default format is applied automatically if log_format is omitted. Note that log streaming is a tech preview.

Auth
Request Body application/json
objectobject
namestring
enabledboolean
logFormatstring

Enum: LOG_FORMAT_UNSPECIFIED,ZAP_JSON,LOGFMT,DUROSLIGHT_TEXT,GFTL_TEXT,UNSTRUCTURED

Default: LOG_FORMAT_UNSPECIFIED

minLevelstring

Enum: UNSPECIFIED,DEBUG,INFO,WARN,ERROR

Default: UNSPECIFIED

journaldobject
syslogIdentifierstring
file2 fieldsobject
POST /api/v2/logs/sources
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
400

An invalid argument was provided: source.name is missing, no journald or file config was supplied, or log_format is unknown and no default is registered for this source.

401

Unauthorized: authentication failed.

403

Permission denied.

409

A log source with the provided name already exists.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Get log source.

Retrieve the configuration of a log source by name. Note that log streaming is a tech preview.

Auth
Path Params
namestring
GET /api/v2/logs/sources/{name}
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
401

Unauthorized: authentication failed.

403

Permission denied.

404

A log source with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Delete log source.

Remove a log source by name. If the source does not exist the call succeeds and the response field deleted is false. Note that log streaming is a tech preview.

Auth
Path Params
namestring
DELETE /api/v2/logs/sources/{name}
Copy
Responses application/json
200

A successful response.

objectobject
deletedboolean

True if the source existed and was removed; false if it was already absent.

401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Update log source.

Modify an existing log source. All fields provided in the request replace the existing values for those fields. Note that log streaming is a tech preview.

Auth
Path Params
source.namestring
Request Body application/json
objectobject
enabledboolean
logFormatstring

Enum: LOG_FORMAT_UNSPECIFIED,ZAP_JSON,LOGFMT,DUROSLIGHT_TEXT,GFTL_TEXT,UNSTRUCTURED

Default: LOG_FORMAT_UNSPECIFIED

minLevelstring

Enum: UNSPECIFIED,DEBUG,INFO,WARN,ERROR

Default: UNSPECIFIED

journaldobject
syslogIdentifierstring
file2 fieldsobject
PUT /api/v2/logs/sources/{source.name}
Copy
Responses application/json
200

A successful response.

objectobject
source6 fieldsobject
400

An invalid argument was provided: source.name is missing, no journald or file config was supplied, or log_format is unknown.

401

Unauthorized: authentication failed.

403

Permission denied.

404

A log source with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

List log forwarding targets.

Return all configured log forwarding targets. Note that log streaming is a tech preview.

Auth
GET /api/v2/logs/targets
Copy
Responses application/json
200

A successful response.

objectobject
targets5 fieldsarray[object]
401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Create log forwarding target.

Register a new log forwarding destination. A target can be a Loki endpoint or an rsyslog receiver. Once created, enable it and create log sources to start forwarding. Note that log streaming is a tech preview.

Auth
Request Body application/json
objectobject
namestring
typestring

Enum: TYPE_UNSPECIFIED,LOKI,RSYSLOG

Default: TYPE_UNSPECIFIED

enabledboolean
loki4 fieldsobject
rsyslog5 fieldsobject
POST /api/v2/logs/targets
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
400

An invalid argument was provided: target.name is missing, target.type is unspecified, the rsyslog timeout is not a valid duration, or the referenced TLS bundle does not exist.

401

Unauthorized: authentication failed.

403

Permission denied.

409

A log forwarding target with the provided name already exists.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Get log forwarding target.

Retrieve the configuration of a log forwarding target by name. Note that log streaming is a tech preview.

Auth
Path Params
namestring
GET /api/v2/logs/targets/{name}
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
401

Unauthorized: authentication failed.

403

Permission denied.

404

A log forwarding target with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Delete log forwarding target.

Remove a log forwarding target by name. If the target does not exist the call succeeds and the response field deleted is false. Note that log streaming is a tech preview.

Auth
Path Params
namestring
DELETE /api/v2/logs/targets/{name}
Copy
Responses application/json
200

A successful response.

objectobject
deletedboolean

True if the target existed and was removed; false if it was already absent.

401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Update log forwarding target.

Modify an existing log forwarding target. All fields provided in the request replace the existing values for those fields. Note that log streaming is a tech preview.

Auth
Path Params
target.namestring
Request Body application/json
objectobject
typestring

Enum: TYPE_UNSPECIFIED,LOKI,RSYSLOG

Default: TYPE_UNSPECIFIED

enabledboolean
loki4 fieldsobject
rsyslog5 fieldsobject
PUT /api/v2/logs/targets/{target.name}
Copy
Responses application/json
200

A successful response.

objectobject
target5 fieldsobject
400

An invalid argument was provided: target.name is missing, target.type is unspecified, the rsyslog timeout is not a valid duration, or the referenced TLS bundle does not exist.

401

Unauthorized: authentication failed.

403

Permission denied.

404

A log forwarding target with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

List TLS bundles.

Return all stored TLS bundles. The key_pem field is redacted in list responses (shown as "" when a key is present); use GetTLSBundle to retrieve the full key material. Note that log streaming is a tech preview.

Auth
GET /api/v2/logs/tls-bundles
Copy
Responses application/json
200

A successful response.

objectobject
bundles4 fieldsarray[object]
401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Create TLS bundle.

Store a named set of PEM-encoded certificate material (CA, optional client cert/key) used by log forwarding targets to authenticate TLS connections. When TLS_BUNDLE_KEY is configured on api-service, key_pem is AES-256-GCM encrypted before being written to etcd. Note that log streaming is a tech preview.

Auth
Request Body application/json
objectobject
namestring

Stable name used as the etcd key and referenced from target configs.

caPemstring

PEM-encoded CA certificate (required). Used to verify the remote server.

certPemstring

PEM-encoded client certificate (optional). Present = mTLS mode.

keyPemstring

PEM-encoded client private key (optional). Present = mTLS mode. Stored AES-256-GCM encrypted in etcd when TLS_BUNDLE_KEY is configured.

POST /api/v2/logs/tls-bundles
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
400

An invalid argument was provided: bundle.name or bundle.ca_pem is missing.

401

Unauthorized: authentication failed.

403

Permission denied.

409

A TLS bundle with the provided name already exists.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Update TLS bundle.

Replace the certificate material of an existing TLS bundle. The bundle must already exist; use CreateTLSBundle to add a new one. All PEM fields (ca_pem, cert_pem, key_pem) are fully replaced by the values provided in this request. Note that log streaming is a tech preview.

Auth
Path Params
bundle.namestring

Stable name used as the etcd key and referenced from target configs.

Request Body application/json
objectobject
caPemstring

PEM-encoded CA certificate (required). Used to verify the remote server.

certPemstring

PEM-encoded client certificate (optional). Present = mTLS mode.

keyPemstring

PEM-encoded client private key (optional). Present = mTLS mode. Stored AES-256-GCM encrypted in etcd when TLS_BUNDLE_KEY is configured.

PUT /api/v2/logs/tls-bundles/{bundle.name}
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
400

An invalid argument was provided: bundle.name or bundle.ca_pem is missing.

401

Unauthorized: authentication failed.

403

Permission denied.

404

A TLS bundle with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Get TLS bundle.

Retrieve a TLS bundle by name, including the decrypted key_pem if one was stored. Use ListTLSBundles to enumerate all bundles (key_pem is redacted in list responses). Note that log streaming is a tech preview.

Auth
Path Params
namestring
GET /api/v2/logs/tls-bundles/{name}
Copy
Responses application/json
200

A successful response.

objectobject
bundle4 fieldsobject
401

Unauthorized: authentication failed.

403

Permission denied.

404

A TLS bundle with the provided name does not exist.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy

Delete TLS bundle.

Remove a TLS bundle by name. Deletion is refused if any log forwarding target still references the bundle; remove or update those targets first. Note that log streaming is a tech preview.

Auth
Path Params
namestring
DELETE /api/v2/logs/tls-bundles/{name}
Copy
Responses application/json
200

A successful response.

objectobject
400

The TLS bundle is still referenced by one or more log forwarding targets.

401

Unauthorized: authentication failed.

403

Permission denied.

500

Internal Lightbits error.

default

An unexpected error response.

Response
Copy