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

# فحص تشابه المحتوى

> تحقق مما إذا كان تجزئة المحتوى لديها بالفعل حمايات عامة موجودة.

GET
`/v1/consumer/similarity`

تحقق مما إذا كان تجزئة محتوى SHA-256 لديها بالفعل حمايات عامة. يكتشف هذا التطابق التام للتجزئة العامة؛ ولا يقوم بتحليل التشابه الإدراكي أو الدلالي أو يثبت ملكية حقوق الطبع والنشر.

أرسل جلسة مصادقة باستخدام التفويض الموضح في Try It. يتم استبعاد الحمايات التي تخص مساحة عملك. معلمة الاستعلام المطلوبة `hash` هي ملخص SHA-256 الذي تريد مقارنته.

يتم البحث عن الحمايات التي تحتوي على `visibility: "public"` فقط. لا يتم إرجاع الحمايات الخاصة أبدًا.

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

### حقول الاستجابة

| الحقل | النوع | الوصف |
| - | - | - |
| `content_hash` | string | التجزئة التي أرسلتها، يتم إرجاعها للتأكيد. |
| `exact_match` | boolean | `true` إذا كانت هناك حماية عامة واحدة على الأقل موجودة لهذه التجزئة. |
| `matches` | array | ما يصل إلى 10 حمايات مطابقة، مرتبة حسب تاريخ الإنشاء. |
| `matches[].attestation_id` | string | معرف الشهادة للحماية المطابقة. |
| `matches[].title` | string | عنوان الحماية المطابقة. |
| `matches[].category` | string | فئة المحتوى (مثل `photography`، `code`، `design`). |
| `matches[].similarity_score` | number | دائمًا `1.0` لتطابقات التجزئة الدقيقة. |
| `matches[].protected_at` | string | طابع زمني بتنسيق ISO 8601 عندما تم حماية المحتوى. |
| `total` | integer | عدد التطابقات المعادة، وليس إجماليًا غير محدود. |


## OpenAPI

````yaml ar/mint-openapi.yaml GET /v1/consumer/similarity
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/consumer/similarity:
    get:
      tags:
        - Consumer
      summary: البحث عن تطابقات التجزئة العامة الدقيقة
      description: >-
        ابحث عن الحمايات العامة بواسطة تجزئة المحتوى الدقيقة. لا يقوم هذا بإجراء
        تحليل التشابه الدلالي أو الإدراكي، أو تحديد ملكية حقوق الطبع والنشر، أو
        البحث في السجلات الخاصة. يتم استبعاد النتائج التي تنتمي إلى مساحة العمل
        المصادق عليها.
      operationId: consumer.similarity
      parameters:
        - in: query
          name: hash
          required: true
          description: ملخص محتوى SHA-256 للمقارنة، كنص سداسي عشري.
          schema:
            type: string
      responses:
        '200':
          description: ما يصل إلى عشرة سجلات عامة مطابقة، باستثناء مساحة العمل هذه.
          content:
            application/json:
              schema:
                type: object
                properties:
                  content_hash:
                    type: string
                  exact_match:
                    type: boolean
                  total:
                    type: integer
                    description: عدد السجلات المعادة، وليس إجماليًا غير محدود.
                  matches:
                    type: array
                    items:
                      type: object
                      properties:
                        attestation_id:
                          type: string
                        title:
                          type: string
                        category:
                          type: string
                        similarity_score:
                          type: number
                          enum:
                            - 1
                        protected_at:
                          type: string
                          format: date-time
        '400':
          description: تجزئة مطلوبة مفقودة
        '401':
          description: المصادقة مطلوبة
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorEnvelope'
      security:
        - BearerAuth: []
components:
  schemas:
    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.