Update a registry cleanup policy
PUT
/api/v1/organizations/{orgID}/registry/cleanup-policies/{policyID}
const url = 'https://api.aetherplatform.cloud/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/registry/cleanup-policies/example';const options = { method: 'PUT', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"example","action":"example","conditions":[{"type":"example","op":"example","value":"example"}],"repo_scope":["example"],"schedule":"example","enabled":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://api.aetherplatform.cloud/api/v1/organizations/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/registry/cleanup-policies/example \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "example", "action": "example", "conditions": [ { "type": "example", "op": "example", "value": "example" } ], "repo_scope": [ "example" ], "schedule": "example", "enabled": true }'Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” orgID
required
string format: uuid
Organization UUID.
policyID
required
string
Cleanup policy identifier.
Request Body required
Section titled “Request Body required ” Media type application/json
object
name
required
string
action
string
conditions
Array<object>
object
type
required
One of age, tag_count, tag_name, untagged.
string
op
required
One of gt, lt, matches, not_matches, eq.
string
value
required
The condition value (type depends on the condition).
repo_scope
Array<string>
schedule
string
enabled
boolean | null
Example generated
{ "name": "example", "action": "example", "conditions": [ { "type": "example", "op": "example", "value": "example" } ], "repo_scope": [ "example" ], "schedule": "example", "enabled": true}Responses
Section titled “ Responses ”The updated cleanup policy.
Media type application/json
object
id
required
string
org_id
required
string
name
required
string
action
required
Delete or protect.
string
conditions
required
Array<object>
object
type
required
One of age, tag_count, tag_name, untagged.
string
op
required
One of gt, lt, matches, not_matches, eq.
string
value
required
The condition value (type depends on the condition).
repo_scope
required
Array<string>
schedule
required
Nightly, weekly, or manual.
string
enabled
required
boolean
last_run_at
string | null format: date-time
last_run_deleted
integer | null
last_run_freed_bytes
integer | null format: int64
last_run_message
string
created_at
required
string format: date-time
updated_at
required
string format: date-time
Example generated
{ "id": "example", "org_id": "example", "name": "example", "action": "example", "conditions": [ { "type": "example", "op": "example", "value": "example" } ], "repo_scope": [ "example" ], "schedule": "example", "enabled": true, "last_run_at": "2026-04-15T12:00:00Z", "last_run_deleted": 1, "last_run_freed_bytes": 1, "last_run_message": "example", "created_at": "2026-04-15T12:00:00Z", "updated_at": "2026-04-15T12:00:00Z"}Missing or invalid credentials.
Media type application/json
object
error
required
object
code
required
A stable, machine-readable error code.
string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "code": "example", "message": "example" } ] }}The requested resource was not found.
Media type application/json
object
error
required
object
code
required
A stable, machine-readable error code.
string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "code": "example", "message": "example" } ] }}Request validation failed.
Media type application/json
object
error
required
object
code
required
A stable, machine-readable error code.
string
message
required
string
details
Array<object>
object
field
required
string
code
required
string
message
required
string
Example generated
{ "error": { "code": "example", "message": "example", "details": [ { "field": "example", "code": "example", "message": "example" } ] }}