Policy
Cedana API for policies
Policy deleted successfully
Invalid request body
Policy not found
Failed to delete policy from policy table
Client error
Server error
DELETE /v1/policy/delete HTTP/1.1
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"id": "123e4567-e89b-12d3-a456-426614174000"
}textNumber of results per page (default 50, max 100)
Offset for pagination (default 0)
Filter to show only policies with this status (e.g., "active", "creating", "disabled"). If not provided, defaults to excluding "disabled" policies.
Filter by resource type (e.g., "namespace", "pods", "jobs")
Include automatic restore policies (jobs/pods with CEDANA_CHECKPOINT env var)
Policies retrieved successfully
Invalid request body
Failed to retrieve policies from policy table
Client error
Server error
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
}Request to create a policy using the pipeline format
Policy created successfully
Invalid request body
Failed to create policy
Client error
Server error
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"
}
}
}textNumber of results per page (default 50, max 100)
Offset for pagination (default 0)
Filter to show only policies with this status (e.g., "active", "creating", "disabled"). If not provided, defaults to excluding "disabled" policies.
Filter by resource type (e.g., "namespace", "pods", "jobs")
Include automatic restore policies (jobs/pods with CEDANA_CHECKPOINT env var)
Policies retrieved successfully
Failed to retrieve policies
Client error
Server error
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
}Policy UUID
Policy retrieved successfully
Response for pipeline-based policies
Policy not found
Failed to retrieve policy
Client error
Server error
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
}Policy ID to get activity for
Policy checkpoint activity
Policy not found
Internal server error
Client error
Server error
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
}Policy ID to get status for
Job policy status
Policy not found
Internal server error
Client error
Server error
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"
]
}Policy ID to get affected jobs for
Jobs affected by the policy
Policy not found or not a job policy
Internal server error
Client error
Server error
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"
}For namespace/pods policies, returns pods directly tracked by the policy. For job policies, returns pods belonging to the jobs tracked by the policy.
Policy UUID
Returns pods currently monitored by the policy
Invalid policy_id format
Policy not found
Failed to connect/fetch from database
Client error
Server error
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?