Logs

Use these endpoints to manage Logs operations on a Crate Operator host. The reference below includes request attributes, response shapes, and executable request examples.

The Logs object

Systemd journal logs for a specific app environment.

Required attributes

app_id integer<int32>
entries array<LogEntry>
environment_id integer<int32>
service string

Comma-joined service unit names queried for these logs.

team_id string
GET /v1/app/logs

Get logs for a specific app environment

Returns systemd journal logs for the service belonging to a specific app environment and instance.

Parameters

team_id string query required
app_id integer<int32> query required
environment_id integer<int32> query required
instance_id string query required

Instance ID to fetch logs for.

since string query

How far back to fetch logs (e.g. `5m`, `15m`, `1h`, `1d`). Defaults to `5m`.

Responses

200 OK
400 Bad Request
500 Server Error
GET /v1/{service}/logs

Get systemd journal logs for a service

Parameters

service string path required

The systemd service unit to fetch logs for.

since string query

How far back to fetch logs. Accepts a duration like "5m", "1h", "24h".

Responses

200 OK
400 Bad Request — invalid or disallowed service name
500 Server Error