> ## Documentation Index
> Fetch the complete documentation index at: https://chatcli.edilsonfreitas.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Endpoints de Saude

> Probes de liveness e readiness para o operador AIOps — utilizados pelo Kubernetes para determinar a saude do pod

## Verificação de Liveness

```
GET /healthz
```

Retorna `200 OK` se o processo do operador estiver em execução. Nenhuma autenticação necessaria.

<ResponseExample>
  ```json Response 200 — /healthz theme={"system"}
  {
    "status": "ok",
    "timestamp": "2026-03-19T15:00:00Z"
  }
  ```
</ResponseExample>

## Verificação de Readiness

```
GET /readyz
```

Retorna `200 OK` se o operador conseguir acessar o servidor de API do Kubernetes. Retorna `503` se não estiver pronto.

<ResponseExample>
  ```json Response 200 — /readyz theme={"system"}
  {
    "status": "ready",
    "timestamp": "2026-03-19T15:00:00Z"
  }
  ```
</ResponseExample>

<ResponseExample>
  ```json Response 503 — /readyz theme={"system"}
  {
    "status": "not ready: failed to list namespaces: connection refused",
    "timestamp": "2026-03-19T15:00:00Z"
  }
  ```
</ResponseExample>


## OpenAPI

````yaml GET /healthz
openapi: 3.1.0
info:
  title: ChatCLI AIOps Platform API
  description: >-
    REST API for the ChatCLI AIOps Platform — incidents, SLOs, runbooks,
    approvals, postmortems, analytics, audit, federation and health.


    The playground below uses **editable server variables** so you can point
    requests at your own self-hosted instance. Adjust `host`, `port` and
    `basePath` to match your deployment, then click **Try it**.
  version: 1.0.0
  contact:
    name: ChatCLI
    url: https://github.com/diillson/chatcli
  license:
    name: Apache-2.0
    identifier: Apache-2.0
servers:
  - url: http://{host}:{port}/{basePath}
    description: >-
      Self-hosted ChatCLI AIOps Platform — adjust host, port and basePath to
      match your deployment.
    variables:
      host:
        default: localhost
        description: >-
          Hostname or IP of your ChatCLI operator. For Kubernetes, use the
          Service DNS (e.g. chatcli-api.chatcli-system.svc) or your Ingress
          host.
      port:
        default: '8090'
        description: >-
          Port the API listens on. Default is 8090; configurable via Helm value
          `apiPort` or env var CHATCLI_API_PORT.
      basePath:
        default: api/v1
        description: >-
          API base path. Always `api/v1` unless you have a custom proxy rewrite
          in front of the operator.
security:
  - ApiKeyAuth: []
tags:
  - name: Incidents
    description: >-
      Incident lifecycle: list, fetch, acknowledge, resolve, snooze, timeline
      and remediation views.
  - name: Runbooks
    description: Remediation runbooks (list, create, update, delete).
  - name: SLOs
    description: Service Level Objectives and error budgets.
  - name: Approvals
    description: Approval workflow for risky remediations.
  - name: Postmortems
    description: Auto-generated postmortems with review, feedback and close.
  - name: Remediations
    description: Remediation plans and agentic execution history.
  - name: AI Insights
    description: AI root-cause analysis and recommendations per incident.
  - name: Analytics
    description: 'Operational analytics: MTTD, MTTR, trends, capacity, compliance.'
  - name: Audit
    description: Immutable audit log and exports.
  - name: Federation
    description: 'Multi-cluster federation: clusters, status and cross-cluster correlations.'
  - name: Health
    description: Liveness and readiness probes.
paths:
  /healthz:
    get:
      tags:
        - Health
      summary: Liveness Probe
      description: >-
        Liveness/readiness probe for the AIOps operator. Returns `200 OK` if the
        operator process is running. No authentication required.
      operationId: health
      responses:
        '200':
          description: Operator is alive
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: ok
                  timestamp:
                    type: string
                    format: date-time
              example:
                status: ok
                timestamp: '2026-03-19T15:00:00Z'
        '503':
          description: Operator not ready
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                  timestamp:
                    type: string
                    format: date-time
              example:
                status: 'not ready: failed to list namespaces: connection refused'
                timestamp: '2026-03-19T15:00:00Z'
      security: []
      servers:
        - url: http://{host}:{port}
          variables:
            host:
              default: localhost
            port:
              default: '8090'
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: >-
        Bearer token issued by the operator. Format: `Authorization: Bearer
        <token>`.

````