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

# List kubernetes cluster nodes

> Returns nodes for a specific kubernetes cluster for the tenant selected by the X-CostGraph-Tenant-ID header, enriched with CPU and memory utilization from the metrics store



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/clusters/{cluster_id}/nodes
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/{cluster_id}/nodes:
    get:
      tags:
        - kubernetes-clusters
      summary: List kubernetes cluster nodes
      description: >-
        Returns nodes for a specific kubernetes cluster for the tenant selected
        by the X-CostGraph-Tenant-ID header, enriched with CPU and memory
        utilization from the metrics store
      parameters:
        - description: Tenant ID
          name: X-CostGraph-Tenant-ID
          in: header
          required: true
          schema:
            type: string
        - description: Kubernetes cluster ID
          name: cluster_id
          in: path
          required: true
          schema:
            type: string
        - description: Search by node name
          name: search
          in: query
          schema:
            type: string
        - description: Filter by active heartbeat state. Defaults to active nodes only
          name: active
          in: query
          schema:
            type: boolean
        - description: Filter by node status (repeat param or comma-separated)
          name: status
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by instance type (repeat param or comma-separated)
          name: instance_type
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by usage type (repeat param or comma-separated)
          name: usage_type
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: Filter by provider (repeat param or comma-separated)
          name: provider
          in: query
          style: form
          explode: false
          schema:
            type: array
            items:
              type: string
        - description: >-
            Sort field (node, -node, instance_type, -instance_type, pod_count,
            -pod_count, cpu_utilization_percent, -cpu_utilization_percent,
            memory_utilization_percent, -memory_utilization_percent,
            cost_per_hour, -cost_per_hour, savings, -savings)
          name: sort
          in: query
          schema:
            type: string
        - description: Number of rows to return (default 50, max 200)
          name: limit
          in: query
          schema:
            type: integer
        - description: Rows to skip before returning results (default 0)
          name: offset
          in: query
          schema:
            type: integer
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                allOf:
                  - $ref: '#/components/schemas/responses.SuccessResponse'
                  - type: object
                    properties:
                      data:
                        $ref: '#/components/schemas/k8scluster.NodeListResult'
        '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'
        '404':
          description: Not Found
          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.NodeListResult:
      type: object
      required:
        - items
        - limit
        - offset
        - total_count
      properties:
        items:
          type: array
          items:
            $ref: '#/components/schemas/k8scluster.NodeInfo'
        limit:
          type: integer
        offset:
          type: integer
        total_count:
          type: integer
    responses.ErrorResponse:
      type: object
      required:
        - message
        - status
      properties:
        message:
          type: string
          example: some message
        status:
          type: string
          example: error
    k8scluster.NodeInfo:
      type: object
      required:
        - active
        - availability_zone
        - cost_per_hour
        - cpu_utilization_sparkline
        - id
        - instance_type
        - memory_utilization_sparkline
        - node
        - pods
        - provider
        - recommendation_state
        - region
        - usage_type
      properties:
        active:
          type: boolean
        availability_zone:
          type: string
        cost:
          allOf:
            - $ref: '#/components/schemas/costgraph_agent.VirtualMachineCost'
          nullable: true
        cost_per_hour:
          type: number
        cpu_utilization_percent:
          type: number
          nullable: true
        cpu_utilization_sparkline:
          type: array
          items:
            type: number
        id:
          type: string
        instance_type:
          type: string
        memory_utilization_percent:
          type: number
          nullable: true
        memory_utilization_sparkline:
          type: array
          items:
            type: number
        node:
          type: string
        pods:
          type: integer
        provider:
          type: string
        recommendation:
          allOf:
            - $ref: >-
                #/components/schemas/costgraph_agent.VirtualMachineRecommendation
          nullable: true
        recommendation_state:
          type: string
          enum:
            - pending_first_run
            - insufficient_signal
            - right_sized
            - actionable
            - unavailable
        region:
          type: string
        savings:
          description: or null, for no recommendation
          type: number
          nullable: true
        status:
          type: string
        usage_type:
          type: string
    costgraph_agent.VirtualMachineCost:
      type: object
      required:
        - mtd
        - projected_monthly_spend
        - runtime_hours
      properties:
        change_percent:
          description: >-
            Signed percent change of MTD against the same VM's MTD in the

            previous comparable period. Nil when there is no previous-period
            cost

            to compare against.
          type: number
          x-semantic: percentage
          nullable: true
        mtd:
          description: >-
            Spend accrued from the start of the billing month through now, in
            the

            tenant's billing currency.
          type: number
          x-semantic: costAmount
        projected_monthly_spend:
          description: |-
            MTD extrapolated to a full calendar month at the current run rate,
            same currency.
          type: number
          x-semantic: costAmount
        runtime_hours:
          description: Hours the VM has been running within the current billing month.
          type: number
    costgraph_agent.VirtualMachineRecommendation:
      type: object
      required:
        - action
        - generated_at
      properties:
        action:
          description: Rightsizing action the recommendation engine suggests.
          type: string
          enum:
            - UPSIZE
            - DOWNSIZE
            - TERMINATE
        confidence:
          description: |-
            How confident the engine is in this recommendation. Absent when
            confidence was not assessed.
          type: string
          enum:
            - low
            - medium
            - high
        generated_at:
          description: When the recommendation engine last produced this recommendation.
          type: string
        recommended_instance_type:
          description: Instance type SKU to move to. Empty when Action is TERMINATE.
          type: string
        savings_monthly_usd:
          description: |-
            Estimated monthly savings in USD from applying the recommendation.
            Nil when a savings estimate could not be computed.
          type: number
          x-semantic: costAmount
          nullable: true
  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.