البحث عن تطابقات التجزئة العامة الدقيقة
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/similarity \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/similarity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/similarity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/similarity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_hash": "<string>",
"exact_match": true,
"total": 123,
"matches": [
{
"attestation_id": "<string>",
"title": "<string>",
"category": "<string>",
"similarity_score": 1,
"protected_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}المستهلك (B2C)
فحص تشابه المحتوى
تحقق مما إذا كان تجزئة المحتوى لديها بالفعل حمايات عامة موجودة.
GET
/
v1
/
consumer
/
similarity
البحث عن تطابقات التجزئة العامة الدقيقة
curl --request GET \
--url https://api.truthlocks.com/v1/consumer/similarity \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.truthlocks.com/v1/consumer/similarity', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/consumer/similarity"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/consumer/similarity"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"content_hash": "<string>",
"exact_match": true,
"total": 123,
"matches": [
{
"attestation_id": "<string>",
"title": "<string>",
"category": "<string>",
"similarity_score": 1,
"protected_at": "2023-11-07T05:31:56Z"
}
]
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET
تحقق مما إذا كان تجزئة محتوى SHA-256 لديها بالفعل حمايات عامة. يكتشف هذا التطابق التام للتجزئة العامة؛ ولا يقوم بتحليل التشابه الإدراكي أو الدلالي أو يثبت ملكية حقوق الطبع والنشر.
أرسل جلسة مصادقة باستخدام التفويض الموضح في Try It. يتم استبعاد الحمايات التي تخص مساحة عملك. معلمة الاستعلام المطلوبة /v1/consumer/similarityhash هي ملخص 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 | عدد التطابقات المعادة، وليس إجماليًا غير محدود. |

