Skip to main content
POST
string
required
Runbook name (a Kubernetes resource name, e.g., disk-cleanup)
string
default:"default"
Namespace to create the runbook in
string
Purpose of the runbook
object
required
When the runbook applies. All three fields are required by the CRD.
object[]
required
Ordered steps
integer
default:"3"
Maximum number of remediation attempts; 0 or omitted means 3
object
Kubernetes labels for the Runbook
The response is 201 Created with the runbook in spec and its metadata in resourceMeta. A missing name or malformed JSON returns 400; a Kubernetes API failure returns the API server’s message with a status that matches it: 409 only when a runbook with that name already exists, 422 when the API server rejects the object (a value outside the CRD enums, a missing required field), 403 when the operator may not create it, and 500 otherwise.

Authorizations

X-API-Key
string
header
required

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).

Body

application/json
name
string
required

Required on create; ignored on update.

Example:

"oom-standard"

namespace
string
default:default

Create only; ignored on update.

description
string
trigger
object
steps
object[]
maxAttempts
integer

Defaults to 3 on create; on update only values > 0 are applied.

labels
object

Response

Runbook created

apiVersion
string
Example:

"v1"

kind
string
Example:

"Runbook"

spec
object
resourceMeta
object