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

# الحصول على التنسيق

> استرداد نتيجة التنفيذ الكاملة للتنسيق، بما في ذلك تفاصيل مستوى الخطوة وتتبع التكلفة.

يعرض حالة التنفيذ الكاملة للتنسيق، بما في ذلك حالته الحالية، وكل خطوة تم تنفيذها، والمخرجات النهائية، والتكلفة المتراكمة، وإيصال سجل الشفافية بمجرد اكتماله.

استقصاء نقطة النهاية هذه لتتبع تقدم التنسيق. للحصول على تحديثات في الوقت الفعلي، قم بتكوين webhook لأحداث `orchestration.completed` و `orchestration.failed`.

### الاستجابة

**id** `string`

معرف التنسيق.

**agent\_id** `string`

الوكيل الذي نفذ التنسيق.

**workflow\_id** `string`

معرف تعريف سير العمل، إن أمكن.

**status** `string`

الحالة الحالية: `running`، `completed`، `failed`، أو `timeout`.

**steps** `array`

مصفوفة مرتبة لخطوات التنفيذ. تحتوي كل خطوة على: - `step_number`
(عدد صحيح) -- فهرس الخطوة المتسلسل (يبدأ من 1) - `action` (سلسلة نصية) -- الإجراء
تم إجراؤه (مثل `llm_inference`، `tool_call`، `decision`، `guardrail_check`) -
`result` (سلسلة) -- ملخص نتيجة الخطوة - `duration_ms` (عدد صحيح) -- الخطوة
وقت التنفيذ بالمللي ثانية

**output** `object`

الإخراج النهائي للتنسيق. يظهر فقط عندما تكون الحالة `completed`.

**total\_cost\_cents** `number`

التكلفة الإجمالية المتراكمة لجميع استدلالات LLM واستدعاءات الأدوات بالدولار الأمريكي (سنتات).

**receipt\_id** `string`

إيصال سجل الشفافية الذي يرسو التنسيق المكتمل. موجود فقط
عندما تكون الحالة `completed`.

**started\_at** `string`

طابع زمني ISO 8601 عند بدء التنفيذ.

**completed\_at** `string`

طابع زمني ISO 8601 عند انتهاء التنفيذ. يظهر فقط للحالات النهائية.

**error** `object`

تفاصيل الخطأ إذا كانت الحالة `failed`. تحتوي على `code` و `message`.


## OpenAPI

````yaml ar/mint-openapi.yaml GET /v1/orchestrate/executions/{orchestrationId}
openapi: 3.0.3
info:
  title: Truthlocks API
  description: >
    Truthlocks هي بنية تحتية عالمية للتحقق من المستندات وبيانات الاعتماد والأصول
    الرقمية.يحدد هذا المواصفات واجهة برمجة التطبيقات (API) الأساسية للتفاعل مع
    خدمات Truthlocks.


    ## عناوين URL الأساسية

    - **الإنتاج**: `https://api.truthlocks.com`

    - **البيئة التجريبية (Sandbox)**: `https://sandbox-api.truthlocks.com`


    ## المصادقة

    - **مفاتيح API**: استخدم رأس `X-API-Key` للعمليات من جهاز إلى جهاز

    - **رموز Bearer**: استخدم `Authorization: Bearer <jwt>` للعمليات التي يبدأها
    المستخدم


    ## هوية المستأجر

    في بيئة الإنتاج، تُستمد هوية المستأجر من السياق المصادق عليه (مفتاح API أو
    JWT).

    يتم تجاهل رأس `X-Tenant-ID` في بيئة الإنتاج لمنع الانتحال.
  version: 1.0.0
  contact:
    name: Truthlocks Support
    url: https://truthlocks.com/support
    email: support@truthlocks.com
servers:
  - url: https://api.truthlocks.com
    description: واجهة برمجة تطبيقات الإنتاج
  - url: https://sandbox-api.truthlocks.com
    description: بيئة اختبار (Sandbox)
security:
  - APIKey: []
  - BearerAuth: []
tags:
  - name: Authentication
    description: إدارة مفاتيح ورموز API
  - name: Issuers
    description: تسجيل المصدر وإدارة الثقة
  - name: Keys
    description: إدارة المفاتيح التشفيرية لجهات الإصدار
  - name: Attestations
    description: دورة حياة الإشهاد (السك، الإلغاء، الاستبدال)
  - name: Verification
    description: حزم التحقق والإثبات للإشهاد
  - name: Governance
    description: سير عمل حوكمة المصدر (للمسؤول فقط)
  - name: Identity
    description: إدارة المنظمة والمستخدمين والأدوار
  - name: Audit
    description: استعلامات أحداث التدقيق
  - name: Tenant Console
    description: ملف تعريف المستأجر ونقاط نهاية دورة الحياة
  - name: Health
    description: نقاط نهاية صحة الخدمة وجاهزيتها
  - name: Risk
    description: استيعاب إشارة المخاطر واكتشاف الاحتيال
  - name: Risk Enforcement
    description: إجراءات إنفاذ المخاطر — الحظر والتحدي والحجر والتكوين
  - name: Billing
    description: إدارة الفوترة والاشتراكات والإضافات
  - name: Machine Identity
    description: >-
      بروتوكول هوية وكيل الآلة (MAIP) — تسجيل الوكيل، الجلسات، الثقة، الشهادة،
      الامتثال، التنسيق، والمراقبة
externalDocs:
  description: واجهة برمجة تطبيقات الشفافية للقراءة فقط (مواصفات خدمة منفصلة)
  url: >-
    https://github.com/truthlocks/truthlock/blob/main/docs/transparency/openapi.yaml
paths:
  /v1/orchestrate/executions/{orchestrationId}:
    get:
      tags:
        - Machine Identity
      summary: الحصول على التنسيق
      description: يعرض سجل التنسيق الكامل بما في ذلك الخطوات والنتائج والإيصالات.
      operationId: maip.orchestrations.get
      parameters:
        - name: orchestrationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: معرف التنسيق
      responses:
        '200':
          description: تفاصيل التنسيق
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MaipOrchestration'
        '401':
          description: المصادقة مطلوبة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '404':
          description: لم يتم العثور على التنسيق
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
        '429':
          description: تجاوز حد المعدل
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - APIKey: []
components:
  schemas:
    MaipOrchestration:
      type: object
      properties:
        orchestration_id:
          type: string
          format: uuid
        workflow_id:
          type: string
          format: uuid
        agents:
          type: array
          items:
            type: string
            format: uuid
        parameters:
          type: object
          additionalProperties: true
        status:
          type: string
          enum:
            - pending
            - running
            - completed
            - failed
            - cancelled
        steps:
          type: array
          items:
            type: object
            properties:
              step_id:
                type: string
              agent_id:
                type: string
                format: uuid
              action:
                type: string
              status:
                type: string
              result:
                type: object
                additionalProperties: true
              started_at:
                type: string
                format: date-time
              completed_at:
                type: string
                format: date-time
        results:
          type: object
          additionalProperties: true
        receipts:
          type: array
          items:
            type: string
            format: uuid
        created_at:
          type: string
          format: date-time
    ErrorEnvelope:
      type: object
      required:
        - code
        - message
        - http_status
      properties:
        code:
          type: string
          description: رمز خطأ قابل للقراءة آليًا
          enum:
            - AUTH_REQUIRED
            - AUTH_INVALID
            - PERMISSION_DENIED
            - TENANT_IDENTITY_UNVERIFIED
            - NOT_FOUND
            - VALIDATION_ERROR
            - CONFLICT
            - PAYLOAD_TOO_LARGE
            - RATE_LIMIT_EXCEEDED
            - QUOTA_EXCEEDED
            - SERVICE_UNAVAILABLE
            - INTERNAL_ERROR
        message:
          type: string
          description: رسالة خطأ مقروءة بشريًا
        http_status:
          type: integer
          description: رمز حالة HTTP
        retry_after_ms:
          type: integer
          description: عدد المللي ثانية للانتظار قبل إعادة المحاولة (لحدود المعدل)
        details:
          type: object
          description: سياق خطأ إضافي
      example:
        code: AUTH_REQUIRED
        message: Authentication required
        http_status: 401
  securitySchemes:
    APIKey:
      type: apiKey
      in: header
      name: X-API-Key
      description: مفتاح API للمصادقة من جهاز إلى جهاز
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: JWT للعمليات التي يبدأها المستخدم

````

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