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

# Query Kubernetes pod overviews

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/pods/overview 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/pods/overview:
    post:
      tags:
        - Kubernetes
      summary: Query Kubernetes pod overviews
      operationId: overview
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PodOverviewsQuery'
            example:
              site_id: abc123
              from: '2024-01-01T00:00:00Z'
              to: '2024-01-01T01:00:00Z'
              namespaces:
                - default
              query: nginx
        required: true
      responses:
        '200':
          description: One row per pod, ordered by namespace and pod name.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: '#/components/schemas/PodOverviewRow'
        '400':
          description: Malformed request, or input the server cannot process.
          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).
    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.
    OwnerReference:
      type: object
      description: A Kubernetes owner reference linking a pod to its controller.
      required:
        - name
        - kind
        - namespace
      properties:
        name:
          type: string
          description: Name of the owning resource (e.g. `"my-deployment-abc123"`).
        kind:
          type: string
          description: Kind of the owning resource (e.g. `"ReplicaSet"`, `"DaemonSet"`).
        namespace:
          type: string
          description: Namespace of the owning resource.
    PodOverviewRow:
      type: object
      description: A Kubernetes pod overview with metadata and status information.
      required:
        - timestamp
        - node_name
        - pod_name
        - pod_namespace
        - pod_uuid
        - phase
        - labels
        - owner_references
        - containers
        - state
        - pod_restart_count
        - pod_uptime_seconds
      properties:
        timestamp:
          type: string
          format: date-time
          description: Timestamp of the metrics snapshot.
        node_name:
          type: string
          description: Name of the node this pod is running on.
        pod_name:
          type: string
          description: Name of the pod.
        pod_namespace:
          type: string
          description: Kubernetes namespace the pod belongs to.
        pod_uuid:
          type: string
          description: Unique pod identifier.
        phase:
          $ref: '#/components/schemas/PodPhase'
          description: Current phase of the pod lifecycle.
        labels:
          type: object
          description: Kubernetes labels attached to the pod.
          additionalProperties:
            type: string
          propertyNames:
            type: string
        owner_references:
          type: array
          items:
            $ref: '#/components/schemas/OwnerReference'
          description: Owner references (e.g. Deployment, ReplicaSet) for this pod.
        containers:
          type: array
          items:
            $ref: '#/components/schemas/Container'
          description: Containers running in this pod.
        state:
          $ref: '#/components/schemas/PodState'
          description: Derived pod state based on phase and container statuses.
        pod_restart_count:
          type: integer
          format: u-int32
          description: Total number of container restarts for this pod.
          minimum: 0
        pod_uptime_seconds:
          type: integer
          format: u-int64
          description: Pod uptime in seconds.
          minimum: 0
    PodOverviewsQuery:
      type: object
      description: Query for fetching Kubernetes pod overview data.
      required:
        - site_id
        - from
        - to
      properties:
        site_id:
          type: string
          description: Site identifier to query pod overviews for.
        from:
          type: string
          format: date-time
          description: Start of the time range (inclusive).
        to:
          type: string
          format: date-time
          description: End of the time range (exclusive).
        namespaces:
          type: array
          items:
            type: string
          description: Optional namespace filter. Empty means all namespaces.
        query:
          type: string
          description: Optional substring of the pod name to match. Empty means all pods.
    PodPhase:
      type: string
      description: Kubernetes pod lifecycle phase.
      enum:
        - Running
        - Succeeded
        - Pending
        - Failed
        - Unknown
    PodState:
      type: string
      description: Derived state of a pod, combining phase and container statuses.
      enum:
        - Unknown
        - Pending
        - Running
        - Succeeded
        - Failed
    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.