> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-fix-nav-issues.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Get organization usage costs

> Returns a grand total and a list of daily, per-entity organization usage cost records for the organization in the queried time period (maximum 31 days). All days in both the request and the response are evaluated based on the UTC timezone.



## OpenAPI

````yaml /_specs/cloud-openapi.json get /v1/organizations/{organizationId}/usageCost
openapi: 3.0.1
info:
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
  contact:
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
    email: support@clickhouse.com
servers:
  - url: https://api.clickhouse.cloud
security:
  - basicAuth: []
tags:
  - name: Organization
  - name: User management
  - name: Billing
  - name: Service
  - name: Backup
  - name: OpenAPI
  - name: Prometheus
  - name: ClickPipes
paths:
  /v1/organizations/{organizationId}/usageCost:
    get:
      tags:
        - Billing
      summary: Get organization usage costs
      description: >-
        Returns a grand total and a list of daily, per-entity organization usage
        cost records for the organization in the queried time period (maximum 31
        days). All days in both the request and the response are evaluated based
        on the UTC timezone.
      parameters:
        - in: path
          name: organizationId
          description: ID of the requested organization.
          required: true
          schema:
            type: string
            format: uuid
        - in: query
          name: from_date
          description: Start date for the report, e.g. 2024-12-19.
          schema:
            type: string
            format: date-time
          required: true
        - in: query
          name: to_date
          description: >-
            End date (inclusive) for the report, e.g. 2024-12-20. This date
            cannot be more than 30 days after from_date (for a maximum queried
            period of 31 days).
          schema:
            type: string
            format: date-time
          required: true
      responses:
        '200':
          description: Successful response
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 200
                  requestId:
                    type: string
                    description: Unique id assigned to every request. UUIDv4
                    format: uuid
                  result:
                    $ref: '#/components/schemas/UsageCost'
        '400':
          description: >-
            The server cannot or will not process the request due to something
            that is perceived to be a client error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: number
                    description: HTTP status code.
                    example: 400
                  error:
                    type: string
                    description: Detailed error description.
components:
  schemas:
    UsageCost:
      properties:
        grandTotalCHC:
          description: Grand total cost of usage in ClickHouse Credits (CHCs).
          type: number
        costs:
          $ref: '#/components/schemas/UsageCostRecord'
    UsageCostRecord:
      properties:
        dataWarehouseId:
          description: ID of the dataWarehouse this entity belongs to (or is).
          type: string
          format: uuid
        serviceId:
          description: >-
            ID of the service this entity belongs to (or is). Set to null for
            dataWarehouse entities.
          nullable: true
          type: string
          format: uuid
        date:
          description: Date of the usage. ISO-8601 date, based on the UTC timezone.
          type: string
          format: date
        entityType:
          description: Type of the entity.
          type: string
          enum:
            - datawarehouse
            - service
            - clickpipe
        entityId:
          description: Unique ID of the entity.
          type: string
          format: uuid
        entityName:
          description: Name of the entity.
          type: string
        metrics:
          $ref: '#/components/schemas/UsageCostMetrics'
        totalCHC:
          description: Total cost of usage in ClickHouse Credits (CHCs) for this entity.
          type: number
        locked:
          description: >-
            When true, the record is immutable. Unlocked records are subject to
            change until locked.
          type: boolean
    UsageCostMetrics:
      properties:
        storageCHC:
          description: >-
            Cost of storage in ClickHouse Credits (CHCs). Applies to
            dataWarehouse entities.
          type: number
        backupCHC:
          description: >-
            Cost of backup in ClickHouse Credits (CHCs). Applies to
            dataWarehouse entities.
          type: number
        computeCHC:
          description: >-
            Cost of compute in ClickHouse Credits (CHCs). Applies to service and
            clickpipe entities.
          type: number
        dataTransferCHC:
          description: >-
            Cost of data transfer in ClickHouse Credits (CHCs). Applies to
            clickpipe entities.
          type: number
        initialLoadCHC:
          description: >-
            Cost of initial load and resyncs in ClickHouse Credits (CHCs).
            Applies to clickpipe entities.
          type: number
        publicDataTransferCHC:
          description: >-
            Cost of data transfer in ClickHouse Credits (CHCs). Applies to
            service entities.
          type: number
        interRegionTier1DataTransferCHC:
          description: >-
            Cost of tier1 inter-region data transfer in ClickHouse Credits
            (CHCs). Applies to service entities.
          type: number
        interRegionTier2DataTransferCHC:
          description: >-
            Cost of tier2 inter-region data transfer in ClickHouse Credits
            (CHCs). Applies to service entities.
          type: number
        interRegionTier3DataTransferCHC:
          description: >-
            Cost of tier3 inter-region data transfer in ClickHouse Credits
            (CHCs). Applies to service entities.
          type: number
        interRegionTier4DataTransferCHC:
          description: >-
            Cost of tier4 inter-region data transfer in ClickHouse Credits
            (CHCs). Applies to service entities.
          type: number
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        Use key ID and key secret obtained in ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi

````