Skip to main content
PATCH
Update Log Drain

Authorizations

Authorization
string
header
required

Primary scheme: Authorization: Key <key_id>:<secret>.

Path Parameters

drain_id
string
required

Body

application/json
name
string | null
Required string length: 1 - 100
url
string | null
Required string length: 1 - 8192
format
enum<string> | null

Wire encoding for one log drain endpoint's HTTP posts.

Available options:
ndjson,
otlp
secret
string<password> | null
write-only

Rotates the signing secret. No conditional applies here: the drain may already hold one. Switching format to ndjson on a drain with no stored secret requires supplying one in the same request.

Required string length: 64 - 4096
headers
Headers · object | null
enabled
boolean | null
batch_size
integer | null
Required range: 1 <= x <= 5000

Response

Successful Response

id
string
required
name
string
required
url
string
required
format
enum<string>
required

Wire encoding for one log drain endpoint's HTTP posts.

Available options:
ndjson,
otlp
enabled
boolean
required
batch_size
integer
required
consecutive_failures
integer
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
header_names
string[]
last_success_at
string<date-time> | null
last_failure_at
string<date-time> | null
last_failure_status
integer | null
last_error
ErrorEnvelope · object | null

Why the most recent batch delivery failed, in the same error envelope GET /jobs/{job_id} returns for a failed job: a stable code from the shared error vocabulary, a fixed operator-facing message, and retryable. Null while no batch has failed, and cleared on the next success. Destination URLs, headers, credentials, response bodies, and internal exception text are never included. Nor is your drain URL written to Hedra's own logs, since it may carry authentication in its query string. retryable describes the condition, not what Hedra did: every failed batch is requeued until the drain auto-disables, so it answers whether fixing the destination and re-enabling is likely to help. Drains that last failed before this field became structured report UNKNOWN.

disabled_reason
string | null
updated_by_key_id
string | null