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

# List Kubernetes cluster summaries

> Returns one summary per Kubernetes site: status, node, pod, and namespace counts, CPU, memory, and disk use, container issues, and restarts in the last 24 hours.

For authentication and the other Kubernetes endpoints, see the [Public API (V2) overview](https://docs.appsignal.com/api/v2/overview.md#kubernetes).

```yaml POST /api/v2/kubernetes/clusters theme={null}
openapi: 3.1.0
info:
  title: AppSignal V2 API
  description: >-
    REST API for metrics, traces, logs, Kubernetes monitoring, and deployment
    tracking.
  license:
    name: ''
  version: 0.1.0
paths:
  /api/v2/kubernetes/clusters:
    post:
      tags:
        - Kubernetes
      summary: List Kubernetes cluster summaries
      operationId: clusters
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ClustersQuery'
        required: true
      responses:
        '200':
          description: >-
            One summary per requested site, ordered by site ID. An empty site
            list returns an empty array.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/ClusterSummary'
        '400':
          description: The number of site IDs exceeds the site_ids schema's maxItems limit.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestResponse'
        '401':
          description: Missing or invalid authentication token.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Route or resource not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: External query concurrency limit exceeded; retry shortly.
          headers:
            Retry-After:
              schema:
                type: integer
              description: Seconds to wait before retrying.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TooManyRequestsResponse'
        '500':
          description: Unhandled server-side failure.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearer_auth: []
        - token_query: []
components:
  schemas:
    BadRequestResponse:
      type: object
      description: >-
        Standard body for HTTP 400 Bad Request responses. Branch on the stable
        `error` slug, display `message` as-is, and read per-error structured
        data from `details`.
      required:
        - error
        - message
      properties:
        error:
          type: string
          description: Stable, machine-readable slug identifying the specific error case.
        message:
          type: string
          description: Human-readable message. Safe to log or display to end users.
        details:
          description: >-
            Per-error structured payload. Shape varies by
            [`error`](Self::error).
    ClusterContainerIssue:
      type: object
      description: A container issue consistent with the pod's derived state.
      required:
        - pod_name
        - pod_namespace
        - container
      properties:
        pod_name:
          type: string
          description: Name of the pod containing this container.
        pod_namespace:
          type: string
          description: Kubernetes namespace of the pod.
        container:
          $ref: '#/components/schemas/Container'
          description: Container status and the agent-reported reason.
    ClusterPodCounts:
      type: object
      description: >-
        Distinct pods in the recent reporting window, grouped by derived pod
        state.
      required:
        - total
        - running
        - pending
        - succeeded
        - failed
        - unknown
      properties:
        total:
          type: integer
          format: u-int64
          description: Number of distinct pod UUIDs.
          minimum: 0
        running:
          type: integer
          format: u-int64
          description: Pods classified as Running.
          minimum: 0
        pending:
          type: integer
          format: u-int64
          description: Pods classified as Pending.
          minimum: 0
        succeeded:
          type: integer
          format: u-int64
          description: Pods classified as Succeeded.
          minimum: 0
        failed:
          type: integer
          format: u-int64
          description: Pods classified as Failed.
          minimum: 0
        unknown:
          type: integer
          format: u-int64
          description: Pods whose state is unknown.
          minimum: 0
    ClusterStatus:
      type: string
      description: Health of the recent cluster view, with stale data taking precedence.
      enum:
        - no_data
        - stopped_reporting
        - containers_not_running
        - pods_failed
        - pods_pending
        - pods_unknown
        - healthy
    ClusterSummary:
      type: object
      description: >-
        Summary of one Kubernetes site; counts remain last-known when reporting
        stops.
      required:
        - site_id
        - status
        - nodes
        - pods
        - namespaces
        - container_issues
      properties:
        site_id:
          type: string
          description: Site identifier, used to link to the cluster.
        status:
          $ref: '#/components/schemas/ClusterStatus'
          description: >-
            Cluster health derived from freshness and the same pod states as the
            pods page.
        nodes:
          type: integer
          format: u-int64
          description: Distinct node names in the recent reporting window.
          minimum: 0
        pods:
          $ref: '#/components/schemas/ClusterPodCounts'
          description: >-
            Pod counts in the recent reporting window, retained for stale
            clusters.
        namespaces:
          type: integer
          format: u-int64
          description: Distinct pod namespaces in the recent reporting window.
          minimum: 0
        container_issues:
          type: array
          items:
            $ref: '#/components/schemas/ClusterContainerIssue'
          description: >-
            Latest container issues from Pending or Failed pods in the recent
            reporting window.
        restarts_24h:
          type:
            - integer
            - 'null'
          format: u-int64
          description: >-
            Observed counter increases across all pods seen over 24 hours.

            Null if stale, no pod rows exist, or any timestamp-ordered counter
            step is negative.
          minimum: 0
        cpu_cores:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Sum of node CPU nanocores divided by 10^9; null if stale or no node
            snapshot exists.
        memory_usage:
          type:
            - integer
            - 'null'
          format: u-int16
          description: >-
            Highest agent-reported node memory_usage; null if stale or no node
            snapshot exists.
          minimum: 0
        disk_usage:
          type:
            - integer
            - 'null'
          format: u-int16
          description: >-
            Highest agent-reported node disk_usage; null if stale or no node
            snapshot exists.
          minimum: 0
        last_data_at:
          type:
            - string
            - 'null'
          format: date-time
          description: >-
            Latest node or pod timestamp in the last-data lookback window, or
            null if unavailable.
    ClustersQuery:
      type: object
      description: Sites whose Kubernetes cluster summaries should be returned.
      required:
        - site_ids
        - to
      properties:
        site_ids:
          type: array
          items:
            type: string
          maxItems: 50
        to:
          type: string
          format: date-time
          description: >-
            As-of cutoff (exclusive), also used to assess freshness and the
            24-hour restart window.
    Container:
      type: object
      description: A container within a Kubernetes pod.
      required:
        - name
        - status
        - exit_code
        - reason
      properties:
        name:
          type: string
          description: Name of the container.
        status:
          $ref: '#/components/schemas/ContainerStatus'
          description: Current status of the container.
        exit_code:
          type: integer
          format: int32
          description: Exit code of the container process (0 means success).
        reason:
          type: string
          description: Human-readable reason for the container's current status.
    ContainerStatus:
      type: string
      description: Status of a container within a pod.
      enum:
        - Running
        - Terminated
        - Waiting
        - Unknown
    ErrorResponse:
      type: object
      description: Error body returned for 401, 404 and 500 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
    TooManyRequestsResponse:
      type: object
      description: Error body returned for 429 responses.
      required:
        - error
      properties:
        error:
          type: string
          description: Human-readable error message.
        suggestion:
          type:
            - string
            - 'null'
          description: >-
            A cheaper way to write the request's filter. Only the trace list

            endpoints set it, and only for a filter with a known indexed
            rewrite.
  securitySchemes:
    bearer_auth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer <token>`'
    token_query:
      type: apiKey
      in: query
      name: token
      description: >-
        Alternative to the Authorization header: pass the token as a
        `?token=<token>` query parameter.
```


## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.appsignal.com/llms.txt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.