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

# Query a lighter summary of Kubernetes allocation

> The same query as /allocation, returning OpenCost's summary allocation shape.



## OpenAPI

````yaml /api-reference/costgraph/openapi.json get /api/v1/tenant/opencost/allocation/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/opencost/allocation/summary:
    get:
      tags:
        - opencost
      summary: Query a lighter summary of Kubernetes allocation
      description: >-
        The same query as /allocation, returning OpenCost's summary allocation
        shape.
      parameters:
        - description: >-
            Duration (7d, 24h), 'today', 'yesterday', or a comma-separated
            RFC3339 pair
          name: window
          in: query
          required: true
          schema:
            type: string
        - description: >-
            Comma-separated list of cluster, node, namespace, controller,
            controllerKind, deployment, statefulset, daemonset, job, cronjob,
            pod, container, label:<key>
          name: aggregate
          in: query
          schema:
            type: string
        - description: Duration of each returned set; defaults to the whole window
          name: step
          in: query
          schema:
            type: string
        - description: Collapse the range into a single set
          name: accumulate
          in: query
          schema:
            type: boolean
        - description: Emit unallocated node cost as its own __idle__ allocation
          name: includeIdle
          in: query
          schema:
            type: boolean
        - description: >-
            Distribute idle across the other allocations instead, weighted by
            consumption
          name: shareIdle
          in: query
          schema:
            type: boolean
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/controllers.summaryEnvelope'
        '400':
          description: Bad Request
          content:
            application/json:
              schema: {}
        '401':
          description: Unauthorized
          content:
            application/json:
              schema: {}
        '500':
          description: Internal Server Error
          content:
            application/json:
              schema: {}
      security:
        - BearerAuth: []
components:
  schemas:
    controllers.summaryEnvelope:
      type: object
      properties:
        code:
          type: integer
        data:
          $ref: '#/components/schemas/opencost.SummaryAllocationSetRange'
    opencost.SummaryAllocationSetRange:
      type: object
      properties:
        sets:
          type: array
          items:
            $ref: '#/components/schemas/opencost.SummaryAllocationSet'
        step:
          $ref: '#/components/schemas/time.Duration'
        window:
          $ref: '#/components/schemas/opencost.Window'
    opencost.SummaryAllocationSet:
      type: object
      properties:
        allocations:
          type: object
          additionalProperties:
            $ref: '#/components/schemas/opencost.SummaryAllocation'
        window:
          $ref: '#/components/schemas/opencost.Window'
    time.Duration:
      type: integer
      format: int64
      enum:
        - -9223372036854776000
        - 9223372036854776000
        - 1
        - 1000
        - 1000000
        - 1000000000
        - 60000000000
        - 3600000000000
      x-enum-varnames:
        - minDuration
        - maxDuration
        - Nanosecond
        - Microsecond
        - Millisecond
        - Second
        - Minute
        - Hour
    opencost.Window:
      type: object
    opencost.SummaryAllocation:
      type: object
      properties:
        cpuCoreLimitAverage:
          type: number
        cpuCoreRequestAverage:
          type: number
        cpuCoreUsageAverage:
          type: number
        cpuCost:
          type: number
        cpuCostIdle:
          type: number
        efficiency:
          type: number
        end:
          type: string
        externalCost:
          type: number
        gpuCost:
          type: number
        gpuCostIdle:
          type: number
        gpuRequestAverage:
          type: number
        gpuUsageAverage:
          type: number
        loadBalancerCost:
          type: number
        name:
          type: string
        networkCost:
          type: number
        pvCost:
          type: number
        ramByteLimitAverage:
          type: number
        ramByteRequestAverage:
          type: number
        ramByteUsageAverage:
          type: number
        ramCost:
          type: number
        ramCostIdle:
          type: number
        sharedCost:
          type: number
        start:
          type: string
  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.