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

apiKey BearerAuth

Fields
KeyIn
AuthorizationHeader

ListCollectors returns the last-known heartbeat state of all log collectors (Alloy instances) that have polled ConfigService on this cluster.

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

A successful response.

objectobject
collectors15 fieldsarray[object]
default

An unexpected error response.

Response
Copy

GetCollector returns the heartbeat state for a single collector by ID.

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).

default

An unexpected error response.

Response
Copy

sources

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

A successful response.

objectobject
sources6 fieldsarray[object]
default

An unexpected error response.

Response
Copy

sources

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
default

An unexpected error response.

Response
Copy

{name}

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

A successful response.

objectobject
source6 fieldsobject
default

An unexpected error response.

Response
Copy

{name}

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.

default

An unexpected error response.

Response
Copy

{source.name}

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
default

An unexpected error response.

Response
Copy

targets

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

A successful response.

objectobject
targets5 fieldsarray[object]
default

An unexpected error response.

Response
Copy

targets

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
default

An unexpected error response.

Response
Copy

{name}

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

A successful response.

objectobject
target5 fieldsobject
default

An unexpected error response.

Response
Copy

{name}

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.

default

An unexpected error response.

Response
Copy

{target.name}

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
default

An unexpected error response.

Response
Copy

tls-bundles

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

A successful response.

objectobject
bundles4 fieldsarray[object]
default

An unexpected error response.

Response
Copy

tls-bundles

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
default

An unexpected error response.

Response
Copy

{bundle.name}

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
default

An unexpected error response.

Response
Copy

{name}

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

A successful response.

objectobject
bundle4 fieldsobject
default

An unexpected error response.

Response
Copy

{name}

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

A successful response.

objectobject
default

An unexpected error response.

Response
Copy