Change a destination of the audit stream
Replaces the destination's `config` and switches it on or off. The kind cannot change. A `secret` is replaced only
better-auth.session_token<token>Better Auth session cookie. Production uses the __Secure- prefixed name.
sinkId*stringuuidIdempotency-Key?stringMakes retries safe. A repeated key with the same request returns the first result and sets
Idempotent-Replayed: true. The same key with a different request answers 409
idempotency.key_reused, and while the first request is still running 409
idempotency.in_progress. Results are kept for 24 hours. Server errors and refusals for lack
of sign-in or permission are not kept, so a retry runs again.
^[A-Za-z0-9_.:-]+$1 <= length <= 255application/json- body
config*Where the destination is; which fields apply depends on the kind. s3 has bucket, region, accessKeyId and
prefix; gcs has bucket and prefix; azure has account, container and prefix; webhook has url.
It never holds a credential.
secret?stringA new credential. Left out, the saved one is kept.
length <= 8192enabled?booleantrueThe destination.
application/json- response
id*stringuuidkind*AuditStreamSinkKind"s3""gcs""azure""webhook"config*Where the destination is; which fields apply depends on the kind. s3 has bucket, region, accessKeyId and
prefix; gcs has bucket and prefix; azure has account, container and prefix; webhook has url.
It never holds a credential.
enabled*booleanstate*AuditStreamSinkStateactive delivers, failing is retrying after a failure with growing waits, paused failed for a day and sends
nothing until it is saved again or a test reaches it, disabled was switched off.
"active""failing""paused""disabled"secretHint*stringThe last four characters of a webhook's signing secret, to tell two apart; empty for a bucket.
lastDeliveredAt*|date-timelastDeliveredSeq*integerThe highest audit entry the destination was given.
int64failingSince*|When the current run of failures began; null when the last delivery worked.
date-timelastError*stringWhat to tell a person about the last failure; empty when there is none.
pausedAt*|date-timecreatedAt*stringdate-timeupdatedAt*stringdate-timecurl -X PUT 'https://wardn.example.com/api/v1/organization/audit-stream/sinks/497f6eca-6276-4993-bfeb-53cbbbba6f08' \ -H 'Content-Type: application/json' \ -d '{ "config": {}}'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "kind": "s3", "config": { "bucket": "string", "region": "string", "accessKeyId": "string", "account": "string", "container": "string", "prefix": "string", "url": "string" }, "enabled": true, "state": "active", "secretHint": "string", "lastDeliveredAt": "2019-08-24T14:15:22Z", "lastDeliveredSeq": 0, "failingSince": "2019-08-24T14:15:22Z", "lastError": "string", "pausedAt": "2019-08-24T14:15:22Z", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z"}