ReferenceHTTP APIWorkspace settings

Set how many days authorization decisions are kept (owner only)

POST
/v1/workspaces/{id}/audit-retention

At least 30 days; the default is 90. Rows older than this are deleted by the reconciler. The current value is workspace.settings.audit_retention_days in GET /v1/auth/me.

Auth: cookie session only; no scope. Idempotency-Key: ignored.

Authorization

cookieSession
cookie__Host-werft_session<token>

For the web console: the browser session cookie set by POST /v1/auth/login. It holds the scopes of the user's workspace role (owner: all; admin and member: all but sessions:recover). Requests other than GET must also send X-Requested-With: werft-web.

Path Parameters

id*string

The workspace's id.

Match^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Formatuuid

Header Parameters

X-Requested-With?"werft-web"

Required with a cookie session: the literal werft-web.

Value in"werft-web"

Request Body

application/json
  1. body
audit_retention_days*integer
Range30 <= value <= 3650

Response Body

Success

application/json
  1. response
audit_retention_days*integer
Range30 <= value <= 3650
Example Request
curl -X POST 'https://example.com/v1/workspaces/497f6eca-6276-4993-bfeb-53cbbbba6f08/audit-retention' \  -H 'Content-Type: application/json' \  -d '{  "audit_retention_days": 30}'
Example Response
{  "audit_retention_days": 30}