Deployments.ai Docs
Governance

Update an organization retention policy

PATCH /v1/organizations/{id}/retention-policy · SDK updateOrganizationRetentionPolicy · CLI deployments governance retention-update

PATCH
/v1/organizations/{id}/retention-policy

Requires governance:write.

Authorization

platformBearer
headerAuthorizationBearer <token>

Platform bearer credential accepted as an opaque API key or JWT.

Path Parameters

id*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$

Header Parameters

x-deployments-organization*string
Match^[0-7][0-9A-HJKMNP-TV-Z]{25}$
idempotency-key*string
Length1 <= length <= 512

Request Body

application/json
  1. body
Properties1 <= properties
artifacts?integer
Range1 <= value <= 3650
audit?integer
Range365 <= value <= 3650
events?integer
Range1 <= value <= 3650
messages?integer
Range1 <= value <= 3650
runs?integer
Range1 <= value <= 3650
threads?integer
Range1 <= value <= 3650

Response Body

OrganizationRetentionPolicyResponse

application/json
  1. response
artifacts*integer
Range1 <= value <= 3650
audit*integer
Range365 <= value <= 3650
events*integer
Range1 <= value <= 3650
messages*integer
Range1 <= value <= 3650
runs*integer
Range1 <= value <= 3650
threads*integer
Range1 <= value <= 3650
createdAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
organizationId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
updatedAt*string
Match^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}\.\d{3}Z$
Formatdate-time
updatedByPrincipalId*string
Match^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$
version*integer
Range0 <= value
curl -X PATCH "https://example.com/v1/organizations/string/retention-policy" \  -H "x-deployments-organization: string" \  -H "idempotency-key: string" \  -H "Content-Type: application/json" \  -d '{}'
{  "artifacts": 1,  "audit": 365,  "events": 1,  "messages": 1,  "runs": 1,  "threads": 1,  "createdAt": "2019-08-24T14:15:22Z",  "organizationId": "string",  "updatedAt": "2019-08-24T14:15:22Z",  "updatedByPrincipalId": "string",  "version": 0}