{
"approver": "oncall-sre",
"reason": "memory increase confirmed"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
Approve Request
Approves an approval request, allowing the remediation to be executed
{
"approver": "oncall-sre",
"reason": "memory increase confirmed"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
approval-payment-service-oom-kill-1773933600-plan-1)400.Pending request, the same way the platform.chatcli.io/approve annotation does: it appends an entry to status.decisions with the approver, the reason and a timestamp. It never sets status.state itself. The ApprovalReconciler then evaluates the decisions against the rule: once the required approvals are in (one for manual, requiredApprovers distinct approvers for quorum) and the change window is open, the request becomes Approved and the RemediationPlan waiting on it moves to Executing. The response is returned right after the decision is recorded, so it usually still shows Pending, with the new entry in decisions and in approvedBy. The item is returned in spec and status alike, plus resourceMeta.
- Approver identity. The approver is stored as
<approver> (api-key: <identity>), where the identity is thenameof the API key entry, else itsdescription, else akey-<hash>fingerprint (dev-modein dev mode). The typed name is trimmed, control characters are dropped, and it is cut at 128 characters. - Quorum counts API keys. Two approvals made with the same key count once, whatever names are typed, and the same key cannot decide twice on a request. A shared key, or dev mode, cannot satisfy
requiredApprovers: 2: give each approver their own key. 409when the request is no longerPending(already approved, rejected or expired), or when the same key already recorded a decision on it.- Change window. An approval recorded outside the rule’s window is kept; the request turns
Approvedwhen the window opens and does not expire while it waits. See Approval Workflow.
{
"approver": "oncall-sre",
"reason": "memory increase confirmed"
}
{
"apiVersion": "v1",
"kind": "ApprovalRequest",
"spec": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"status": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"resource": "payment-service-oom-kill-1773933600",
"action": "AdjustResources",
"reason": "production-changes",
"requestedBy": "chatcli-operator",
"state": "Pending",
"approvedBy": "oncall-sre (api-key: sre-oncall)",
"decisionReason": "memory increase confirmed",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
},
"decisions": [
{
"approver": "oncall-sre (api-key: sre-oncall)",
"decision": "approved",
"reason": "memory increase confirmed",
"timestamp": "2026-03-19T15:24:40Z"
}
]
},
"resourceMeta": {
"name": "approval-payment-service-oom-kill-1773933600-plan-1",
"namespace": "production",
"uid": "1a2b3c4d-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"creationTimestamp": "2026-03-19T15:21:05Z",
"labels": {
"platform.chatcli.io/issue": "payment-service-oom-kill-1773933600",
"platform.chatcli.io/policy": "production-changes",
"platform.chatcli.io/remediation-plan": "payment-service-oom-kill-1773933600-plan-1"
}
}
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Bad Request",
"code": 400,
"message": "approver is required"
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Conflict",
"code": 409,
"message": "approval request is not pending: state is Approved"
}
{
"apiVersion": "v1",
"kind": "Error",
"error": "Not Found",
"code": 404,
"message": "approval not found: approvalrequests \"approval-payment-service-oom-kill-1773933600-plan-9\" not found in any namespace"
}
Authorizations
API key sent in the X-API-Key header. Keys are read from the Secret chatcli-operator-secrets, key api-keys (fallback: ConfigMap chatcli-operator-config, key api-keys) in the operator namespace, as a YAML list of {key, role, name, description} (name is the identity recorded on approval decisions); the operator chart creates it only with apiKeys.create: true. Roles: viewer < operator < admin — any other role string is denied everywhere. Changes are picked up within about 30 seconds; deleting both the Secret and the ConfigMap revokes every key. With no keys configured every /api/ call returns 401, unless CHATCLI_OPERATOR_DEV_MODE=true, which grants admin without a key (development only).
Path Parameters
ApprovalRequest name.
"payment-oom-plan-1-approval"
Query Parameters
Namespace of the object. When omitted, all namespaces are searched and the first object with this name is used.