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

# الحصول على تكاليف استخدام المؤسسة

> يعيد إجماليًا عامًا وقائمة بسجلات تكلفة استخدام المنظمة اليومية لكل كيان داخل المنظمة خلال الفترة الزمنية المطلوبة في الاستعلام (بحد أقصى 31 يومًا). ويُحتسب جميع الأيام في كلٍ من الطلب والاستجابة وفق المنطقة الزمنية UTC.



## OpenAPI

````yaml /ar/_specs/cloud-openapi.json get /v1/organizations/{organizationId}/usageCost
openapi: 3.0.1
info:
  contact:
    email: support@clickhouse.com
    name: ClickHouse Support
    url: >-
      https://clickhouse.com/docs/en/cloud/manage/openapi?referrer=openapi-299828
  title: OpenAPI spec for ClickHouse Cloud
  version: '1.0'
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: الحصول على تكاليف استخدام المؤسسة
      description: >-
        يعيد إجماليًا عامًا وقائمة بسجلات تكلفة استخدام المنظمة اليومية لكل كيان
        داخل المنظمة خلال الفترة الزمنية المطلوبة في الاستعلام (بحد أقصى 31
        يومًا). ويُحتسب جميع الأيام في كلٍ من الطلب والاستجابة وفق المنطقة
        الزمنية UTC.
      parameters:
        - description: معرّف المنظمة المطلوبة.
          in: path
          name: organizationId
          required: true
          schema:
            format: uuid
            type: string
        - description: تاريخ بدء التقرير، مثل 2024-12-19.
          in: query
          name: from_date
          required: true
          schema:
            format: date-time
            type: string
        - description: >-
            تاريخ انتهاء التقرير (شامل)، مثل 2024-12-20. لا يمكن أن يكون هذا
            التاريخ بعد from_date بأكثر من 30 يومًا (بحد أقصى لفترة استعلام
            قدرها 31 يومًا).
          in: query
          name: to_date
          required: true
          schema:
            format: date-time
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  requestId:
                    description: المعرّف الفريد المخصّص لكل طلب. UUIDv4
                    format: uuid
                    type: string
                  result:
                    $ref: '#/components/schemas/UsageCost'
                  status:
                    description: رمز حالة HTTP.
                    example: 200
                    type: number
                type: object
          description: استجابة ناجحة
        '400':
          content:
            application/json:
              schema:
                properties:
                  error:
                    description: وصف مفصل للخطأ.
                    type: string
                  status:
                    description: رمز حالة HTTP.
                    example: 400
                    type: number
                type: object
          description: >-
            يتعذر على الخادم معالجة الطلب أو يرفض معالجته بسبب أمر يُعتبر خطأً
            من جهة العميل.
components:
  schemas:
    UsageCost:
      properties:
        costs:
          $ref: '#/components/schemas/UsageCostRecord'
        grandTotalCHC:
          description: إجمالي تكلفة الاستخدام الكلية بوحدة ClickHouse Credits ‏(CHCs).
          type: number
    UsageCostRecord:
      properties:
        dataWarehouseId:
          description: معرّف dataWarehouse الذي ينتمي إليه هذا الكيان (أو الذي يمثّله).
          format: uuid
          type: string
        date:
          description: تاريخ Usage. تاريخ بتنسيق ISO-8601، ويستند إلى المنطقة الزمنية UTC.
          format: date
          type: string
        entityId:
          description: المعرّف الفريد للكيان.
          format: uuid
          type: string
        entityName:
          description: اسم الكيان.
          type: string
        entityType:
          description: Type الخاص بالكيان.
          enum:
            - datawarehouse
            - service
            - clickpipe
          type: string
        locked:
          description: >-
            عندما تكون القيمة true، يكون السجل غير قابل للتغيير. وتظل السجلات
            غير المقفلة قابلة للتغيير إلى أن يتم قفلها.
          type: boolean
        metrics:
          $ref: '#/components/schemas/UsageCostMetrics'
        serviceId:
          description: >-
            معرّف service الذي ينتمي إليه هذا الكيان (أو الذي يمثّله). تُضبط
            القيمة على null لكيانات dataWarehouse.
          format: uuid
          nullable: true
          type: string
        totalCHC:
          description: إجمالي تكلفة الاستخدام لهذا الكيان بوحدة ClickHouse Credits ‏(CHCs).
          type: number
    UsageCostMetrics:
      properties:
        backupCHC:
          description: >-
            تكلفة النسخ الاحتياطي بوحدة ClickHouse Credits ‏(CHCs). ينطبق ذلك
            على كيانات dataWarehouse.
          type: number
        computeCHC:
          description: >-
            تكلفة compute بوحدة ClickHouse Credits ‏(CHCs). ينطبق ذلك على كيانات
            service وclickpipe.
          type: number
        dataTransferCHC:
          description: >-
            تكلفة نقل البيانات بوحدة ClickHouse Credits ‏(CHCs). ينطبق ذلك على
            كيانات clickpipe.
          type: number
        initialLoadCHC:
          description: >-
            تكلفة initial load وعمليات resync بوحدة ClickHouse Credits ‏(CHCs).
            ينطبق ذلك على كيانات clickpipe.
          type: number
        interRegionTier1DataTransferCHC:
          description: >-
            تكلفة نقل البيانات بين المناطق من tier1 بوحدة ClickHouse Credits
            ‏(CHCs). ينطبق ذلك على كيانات service.
          type: number
        interRegionTier2DataTransferCHC:
          description: >-
            تكلفة نقل البيانات بين المناطق من tier2 بوحدة ClickHouse Credits
            ‏(CHCs). ينطبق ذلك على كيانات service.
          type: number
        interRegionTier3DataTransferCHC:
          description: >-
            تكلفة نقل البيانات بين المناطق من tier3 بوحدة ClickHouse Credits
            ‏(CHCs). ينطبق ذلك على كيانات service.
          type: number
        interRegionTier4DataTransferCHC:
          description: >-
            تكلفة نقل البيانات بين المناطق من tier4 بوحدة ClickHouse Credits
            ‏(CHCs). ينطبق ذلك على كيانات service.
          type: number
        publicDataTransferCHC:
          description: >-
            تكلفة نقل البيانات بوحدة ClickHouse Credits ‏(CHCs). ينطبق ذلك على
            كيانات service.
          type: number
        storageCHC:
          description: >-
            تكلفة Storage بوحدة ClickHouse Credits ‏(CHCs). ينطبق ذلك على كيانات
            dataWarehouse.
          type: number
  securitySchemes:
    basicAuth:
      description: >-
        استخدم معرّف المفتاح والسرّ الخاص به اللذين تم الحصول عليهما من
        ClickHouse Cloud console:
        https://clickhouse.com/docs/cloud/manage/openapi
      scheme: basic
      type: http

````