Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

Policy

Cedana API for policies

Delete policy

delete
Authorizations
Body
idstring · uuidRequired
Responses
200

Policy deleted successfully

text/plain
stringOptional
delete/v1/policy/delete
DELETE /v1/policy/delete HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 45

{
  "id": "123e4567-e89b-12d3-a456-426614174000"
}
text

List policies with pagination

get
Authorizations
Query parameters
limitinteger · nullableOptional

Number of results per page (default 50, max 100)

offsetinteger · nullableOptional

Offset for pagination (default 0)

statusstring · nullableOptional

Filter to show only policies with this status (e.g., "active", "creating", "disabled"). If not provided, defaults to excluding "disabled" policies.

resourcestring · nullableOptional

Filter by resource type (e.g., "namespace", "pods", "jobs")

include_automaticboolean · nullableOptional

Include automatic restore policies (jobs/pods with CEDANA_CHECKPOINT env var)

Responses
200

Policies retrieved successfully

application/json
total_countinteger · int64Required
get/v1/policy/list
GET /v1/policy/list HTTP/1.1
Accept: */*
{
  "automatic_policies": [
    {
      "checkpoint_id": "text",
      "cluster_id": "text",
      "created_at": null,
      "id": "text",
      "name": "text",
      "namespace": "text",
      "pod_count": 1,
      "policy_status": "text",
      "resource_type": "text",
      "status": "text"
    }
  ],
  "policies": [
    {
      "cluster_id": null,
      "end_time": null,
      "id": "text",
      "input": 1,
      "job_count": null,
      "name": null,
      "namespace": null,
      "pod_count": 1,
      "policy_type": "text",
      "resource": "text",
      "resource_list": [
        "text"
      ],
      "start_time": null,
      "status": "text",
      "timestamp": null
    }
  ],
  "total_count": 1
}

Create a policy using the pipeline format (Trigger -> Filter -> Action)

post
Authorizations
Body

Request to create a policy using the pipeline format

namestring · nullableOptional
Responses
200

Policy created successfully

text/plain
stringOptional
post/v1/policy/pipeline/create
POST /v1/policy/pipeline/create HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 265

{
  "name": null,
  "pipeline": {
    "action": {
      "config": {
        "kind": "text",
        "runc_root": null
      },
      "type": "checkpoint"
    },
    "filter": {
      "config": {
        "cluster_id": "text",
        "namespace": "text"
      },
      "type": "namespace"
    },
    "trigger": {
      "config": {
        "interval_seconds": 1,
        "max_checkpoints": null
      },
      "type": "heartbeat"
    }
  }
}
text

List all policies with pipeline definitions (paginated)

get
Authorizations
Query parameters
limitinteger · nullableOptional

Number of results per page (default 50, max 100)

offsetinteger · nullableOptional

Offset for pagination (default 0)

statusstring · nullableOptional

Filter to show only policies with this status (e.g., "active", "creating", "disabled"). If not provided, defaults to excluding "disabled" policies.

resourcestring · nullableOptional

Filter by resource type (e.g., "namespace", "pods", "jobs")

include_automaticboolean · nullableOptional

Include automatic restore policies (jobs/pods with CEDANA_CHECKPOINT env var)

Responses
200

Policies retrieved successfully

application/json
total_countinteger · int64Required
get/v1/policy/pipeline/list
GET /v1/policy/pipeline/list HTTP/1.1
Accept: */*
{
  "policies": [
    {
      "id": "text",
      "job_count": null,
      "name": null,
      "pipeline": null,
      "pod_count": 1,
      "status": "text",
      "timestamp": null
    }
  ],
  "total_count": 1
}

Get a single policy with its pipeline definition

get
Authorizations
Path parameters
policy_idstring · uuidRequired

Policy UUID

Responses
200

Policy retrieved successfully

application/json

Response for pipeline-based policies

idstringRequired
job_countinteger · nullableOptional
namestring · nullableOptional
pod_countinteger · int32Required
statusstringRequired
timestampstring · nullableOptional
get/v1/policy/pipeline/{policy_id}
GET /v1/policy/pipeline/{policy_id} HTTP/1.1
Accept: */*
{
  "id": "text",
  "job_count": null,
  "name": null,
  "pipeline": null,
  "pod_count": 1,
  "status": "text",
  "timestamp": null
}

Sync job policies manually

post
Authorizations
Responses
200

Job policies synced successfully

text/plain
stringOptional
post/v1/policy/sync-jobs
POST /v1/policy/sync-jobs HTTP/1.1
Accept: */*
text

Get checkpoint activity for a policy

get
Authorizations
Path parameters
policy_idstring · uuidRequired

Policy ID to get activity for

Responses
200

Policy checkpoint activity

application/json
failed_checkpointsinteger · int64Required
last_checkpoint_atstring · nullableOptional
policy_idstringRequired
successful_checkpointsinteger · int64Required
total_checkpointsinteger · int64Required
get/v1/policy/{policy_id}/activity
GET /v1/policy/{policy_id}/activity HTTP/1.1
Accept: */*
{
  "failed_checkpoints": 1,
  "last_checkpoint_at": null,
  "policy_id": "text",
  "recent_checkpoints": [
    {
      "action_id": "text",
      "checkpoint_id": "text",
      "completed_at": null,
      "duration_ms": null,
      "namespace": "text",
      "pod_name": "text",
      "size_bytes": null,
      "status": "text"
    }
  ],
  "successful_checkpoints": 1,
  "total_checkpoints": 1
}

Get job policy tracking status

get
Authorizations
Path parameters
policy_idstring · uuidRequired

Policy ID to get status for

Responses
200

Job policy status

application/json
job_idsstring[]Required
job_statusstring · nullableOptional
last_updatedstring · nullableOptional
pod_countinteger · int64Required
policy_idstringRequired
tracked_podsstring[]Required
get/v1/policy/{policy_id}/job-status
GET /v1/policy/{policy_id}/job-status HTTP/1.1
Accept: */*
{
  "job_ids": [
    "text"
  ],
  "job_status": null,
  "last_updated": null,
  "pod_count": 1,
  "policy_id": "text",
  "tracked_pods": [
    "text"
  ]
}

Get jobs affected by a policy

get
Authorizations
Path parameters
policy_idstring · uuidRequired

Policy ID to get affected jobs for

Responses
200

Jobs affected by the policy

application/json
countinteger · int64Required
policy_idstringRequired
get/v1/policy/{policy_id}/jobs
GET /v1/policy/{policy_id}/jobs HTTP/1.1
Accept: */*
{
  "affected_jobs": [
    {
      "id": "text",
      "name": "text",
      "namespace": "text",
      "pod_count": 1,
      "priority": null,
      "status": "text"
    }
  ],
  "count": 1,
  "policy_id": "text"
}

Get pods monitored by a specific policy

get

For namespace/pods policies, returns pods directly tracked by the policy. For job policies, returns pods belonging to the jobs tracked by the policy.

Authorizations
Path parameters
policy_idstring · uuidRequired

Policy UUID

Responses
200

Returns pods currently monitored by the policy

application/json
idstring · uuidRequired
namestringRequired
namespacestringRequired
statusstringRequired
get/v1/policy/{policy_id}/pods
GET /v1/policy/{policy_id}/pods HTTP/1.1
Accept: */*
[
  {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "name": "text",
    "namespace": "text",
    "status": "text"
  }
]

Last updated

Was this helpful?