Skip to content
This is the staging documentation, where Katara rehearses releases. Live and Test both settle on Avalanche Fuji in test USDC here.

Read how far the organization's closure has come

GET
/katara/v1/orgs/{org_id}/closure
curl --request GET \
--url https://api.staging.katara.com/katara/v1/orgs/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/closure \
--header 'Authorization: Bearer <token>'

Any member. The state is active, closing or closed; while closing, the stage says what cleanup is doing, and the counts say what is left. The audit record shows kinds, counts and times, and is kept for audit_term_days after cleanup completes.

org_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000

Current state.

Media typeapplication/json

An organization’s state and how far its closure has come. Closing reads closed once every execution environment is gone and nothing is kept.

object
operation
object
operation_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
resource_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
completed
required
boolean
org_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
state
required
string
Allowed values: active closing closed
stage
string
Allowed values: fencing cancelling_runs cleaning_environments releasing_checkpoints awaiting_reconciliation awaiting_hold_release removing_templates deleting_namespace complete
requested_at
string format: date-time
requested_by
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
closed_at
string format: date-time
counts
required

What is left, as counts.

object
active_runs
required

Runs that have not ended yet; the closure asked each to cancel.

integer
<= 1000000
awaiting_reconciliation
required

Runs that ended with an effect nobody could confirm, and no resolution yet.

integer
<= 1000000
retained_checkpoints
required

Recovery checkpoints kept because a reconciliation or a hold still needs them.

integer
<= 1000000
active_holds
required

Legal or security holds in force.

integer
<= 1000000
environments_remaining
required

Execution environments still to be removed.

integer
<= 1000000
checkpoints_remaining
required

Checkpoints still stored, kept or not yet deleted.

integer
<= 1000000
templates_remaining
required

Environment templates still to be removed.

integer
<= 1000000
policies_remaining
required

Network policies still to be removed.

integer
<= 1000000
sandboxes

The cleanup of the organization’s execution environments.

object
phase
required
string
Allowed values: runs actors egress checkpoints retaining templates verifying namespace completed
attempts
required
integer
<= 1000000
escalated
required
boolean
retained
required
Array<object>
<= 1000 items
object
environment_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
run_id
required
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
reason
required

What keeps the checkpoint: the run awaits reconciliation, or a hold names it.

string
Allowed values: reconciliation hold
audit
required
Array<object>
<= 200 items

One entry of the cleanup’s audit record: a kind, keyed counts and classes, and when. Never content.

object
kind
required
string
Allowed values: cleanup_started cleanup_retry runs_cancellation_requested runs_drained actor_cleanup_attempted actor_cleanup_completed worker_recycled egress_cleanup_completed checkpoints_retained checkpoint_cleanup_completed template_cleanup_completed namespace_verified_empty namespace_deleted cleanup_completed cleanup_failed
detail
required
object
phase
string
Allowed values: runs actors egress checkpoints retaining templates verifying namespace completed
count
integer
<= 1000000
remaining
integer
<= 1000000
retained
integer
<= 1000000
attempt
integer
<= 1000000
reason
string
>= 1 characters <= 120 characters
error
string
>= 1 characters <= 40 characters
environments
integer
<= 1000000
worker
string
>= 1 characters <= 200 characters
at
required
string format: date-time
audit_term_days
required

How long a completed cleanup’s audit record is kept.

integer
>= 30 <= 3650
Example
{
"state": "active",
"stage": "fencing",
"sandboxes": {
"phase": "runs",
"retained": [
{
"reason": "reconciliation"
}
]
},
"audit": [
{
"kind": "cleanup_started",
"detail": {
"phase": "runs"
}
}
]
}

Request rejected or unavailable.

Media typeapplication/json
object
error
required
object
message
required
string
>= 1 characters <= 500 characters
type
required
string
>= 1 characters <= 100 characters
code
required

Stable; branch on it. Any operation can answer invalid_request, with param naming the refused field when there is one; human_session_required, when an API key, service account or workload calls an operation only a signed-in person may perform; reauthentication_required, when a person’s sign-in is too old for the operation; permission_denied; route_not_found and method_not_allowed, when no operation matches the path or method; and feature_unavailable, when the operation’s service is not enabled on this deployment.

string
>= 1 characters <= 100 characters
param
required

The request field a refusal is about, such as the agent_id or run_id query parameter; null when the refusal is not about one field.

string | null
request_id
required
string
>= 1 characters <= 100 characters
upstream_status
required
integer | null
action
Allowed values: sign_in reauthenticate request_access review fund retry reconcile refresh support
operation_id
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
snapshot_ref
string format: uuid
/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/
Allowed value: 00000000-0000-0000-0000-000000000000
Example
{
"error": {
"action": "sign_in"
}
}