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

# Get kubernetes clusters summary

> Returns aggregated summary statistics for kubernetes clusters for the tenant selected by the X-CostGraph-Tenant-ID header



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/clusters/summary
openapi: 3.0.0
info:
  description: Read and manage your CostGraph organization, spend, alerts, and settings.
  title: CostGraph API
  contact: {}
  version: '1.0'
servers:
  - url: https://api.costgraph.ai
security: []
tags:
  - name: ai
    x-group: AI
  - name: ai-serving
    x-group: AI serving
  - name: anomalies
    x-group: Anomalies
  - name: auth
    x-group: Auth
  - name: billing
    x-group: Billing
  - name: billing-export
    x-group: Billing export
  - name: budgets
    x-group: Budgets
  - name: ci
    x-group: CI
  - name: compute-recommendations
    x-group: Compute recommendations
  - name: config
    x-group: Config
  - name: cost
    x-group: Cost
  - name: gpus
    x-group: GPUs
  - name: graphai
    x-group: Graph AI
  - name: infracost
    x-group: Infracost
  - name: integrations
    x-group: Integrations
  - name: invitations
    x-group: Invitations
  - name: kubernetes-clusters
    x-group: Kubernetes clusters
  - name: marketplace
    x-group: Marketplace
  - name: network-requests
    x-group: Network requests
  - name: notifications
    x-group: Notifications
  - name: oauth
    x-group: OAuth
  - name: oauth-clients
    x-group: OAuth clients
  - name: opencost
    x-group: OpenCost
  - name: organization
    x-group: Audit log
  - name: organizations
    x-group: Organizations
  - name: placement-alternatives
    x-group: Placement alternatives
  - name: reports
    x-group: Reports
  - name: service-map
    x-group: Service map
  - name: settings
    x-group: Settings
  - name: sso
    x-group: Single sign-on
  - name: tenants
    x-group: Tenants
  - name: user
    x-group: Users
  - name: virtual-machines
    x-group: Virtual machines
  - name: virtual-tags
    x-group: Virtual tags
  - name: workflows
    x-group: Workflows
paths:
  /api/v1/tenant/clusters/summary:
    get:
      tags:
        - kubernetes-clusters
      summary: Get kubernetes clusters summary
      description: >-
        Returns aggregated summary statistics for kubernetes clusters for the
        tenant selected by the X-CostGraph-Tenant-ID header
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Filter by cloud provider (repeat param or comma-separated)
          name: providers
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by cluster status (repeat param or comma-separated)
          name: status
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by operator version (repeat param or comma-separated)
          name: operator_versions
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by Kubernetes version (repeat param or comma-separated)
          name: kubernetes_versions
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by region (repeat param or comma-separated)
          name: regions
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: >-
            Cost period (month_to_date, last_7d, last_30d, calendar_month,
            custom)
          name: period
          in: query
          schema:
            type: string
        - description: Calendar month for calendar_month period (YYYY-MM)
          name: month
          in: query
          schema:
            type: string
        - description: Start date for custom period (YYYY-MM-DD)
          name: start
          in: query
          schema:
            type: string
        - description: End date for custom period (YYYY-MM-DD)
          name: end
          in: query
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/k8scluster.SummaryResult'
        '400':
          description: Bad Request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '403':
          description: Forbidden
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
      security:
        - BearerAuth: []
components:
  schemas:
    responses.SuccessResponse:
      type: object
      required:
        - message
        - status
      properties:
        data: {}
        message:
          type: string
          example: some message
        status:
          type: string
          example: success
    k8scluster.SummaryResult:
      type: object
      required:
        - cluster_count
        - clusters_cost
        - clusters_efficiency
        - currency
        - observed_hours
        - overprovisioned_containers
        - possible_savings
      properties:
        cluster_count:
          description: Number of clusters matching the request's filters.
          type: integer
        clusters_cost:
          description: |-
            Combined spend across matching clusters in the selected period, in
            Currency.
          type: number
          x-semantic: costAmount
        clusters_efficiency:
          description: >-
            Spend efficiency across matching clusters, as a percentage (0-100)
            of

            recommended spend (after applying rightsizing recommendations)
            against

            current spend. Not a resource utilisation ratio.
          type: number
          x-semantic: percentage
        cpu_cost:
          description: >-
            Portion of ClustersCost attributable to CPU, in Currency. Null when
            the

            cost breakdown by resource is unavailable.
          type: number
          x-semantic: costAmount
          nullable: true
        currency:
          description: Billing currency the cost figures are expressed in.
          type: string
          x-semantic: currencyCode
        gpu_cost:
          type: number
          x-semantic: costAmount
          nullable: true
        memory_cost:
          description: >-
            Portion of ClustersCost attributable to memory, in Currency. Null
            under

            the same condition as CPUCost.
          type: number
          x-semantic: costAmount
          nullable: true
        observed_hours:
          description: |-
            Hours of usage data actually observed within the selected period,
            summed across matching clusters.
          type: number
        overprovisioned_containers:
          description: |-
            Number of containers across all of the tenant's clusters requesting
            more CPU or memory than they use. Tenant-wide; ignores the request's
            cluster filters, unlike the other fields in this response.
          type: integer
        percent_change_in_clusters_cost:
          description: |-
            Signed percent change of ClustersCost against PreviousClustersCost.
            Null under the same condition as PreviousClustersCost.
          type: number
          x-semantic: percentage
          nullable: true
        possible_savings:
          description: |-
            Combined monthly savings available by applying rightsizing
            recommendations across matching clusters, in Currency.
          type: number
          x-semantic: costAmount
        previous_clusters_cost:
          description: |-
            Combined spend across matching clusters in the comparable previous
            period, in Currency. Null when the previous period has no comparable
            cost data.
          type: number
          x-semantic: costAmount
          nullable: true
        projected_clusters_cost:
          description: >-
            Projected spend for the remainder of the current billing cycle at
            the

            current daily rate, in Currency. Always present; zero when there is

            not enough data in the current period to project from.
          type: number
          x-semantic: costAmount
          nullable: true
        storage_cost:
          description: |-
            Portion of ClustersCost attributable to storage, in Currency. Null
            under the same condition as CPUCost.
          type: number
          x-semantic: costAmount
          nullable: true
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
  securitySchemes:
    BearerAuth:
      description: Enter "Bearer {token}"
      type: apiKey
      name: Authorization
      in: header

````

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