Skip to main content
POST
string
obrigatório
Nome do runbook (um nome de recurso do Kubernetes, ex.: disk-cleanup)
string
padrão:"default"
Namespace onde o runbook será criado
string
Objetivo do runbook
object
obrigatório
Quando o runbook se aplica. Os três campos são obrigatórios no CRD.
object[]
obrigatório
Passos em ordem
integer
padrão:"3"
Número máximo de tentativas de remediação; 0 ou omitido significa 3
object
Labels do Kubernetes para o Runbook
A resposta é 201 Created, com o runbook em spec e os metadados em resourceMeta. name ausente ou JSON malformado retornam 400; uma falha da API do Kubernetes retorna a mensagem do API server com o status correspondente: 409 só quando já existe um runbook com esse nome, 422 quando o API server rejeita o objeto (valor fora dos enums do CRD, campo obrigatório ausente), 403 quando o operator não tem permissão para criá-lo e 500 nos demais casos.

Autorizações

X-API-Key
string
header
obrigatório

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

Corpo

application/json
name
string
obrigatório

Required on create; ignored on update.

Exemplo:

"oom-standard"

namespace
string
padrão: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

Resposta

Runbook created

apiVersion
string
Exemplo:

"v1"

kind
string
Exemplo:

"Runbook"

spec
object
resourceMeta
object