الحصول على درجة الثقة
curl --request GET \
--url https://api.truthlocks.com/v1/agents/{agentId}/trust-score \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/trust-score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"score": 0.5,
"factors": {},
"deltas": {},
"computed_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}الثقة والشهادة
الحصول على درجة الثقة
استرداد درجة الثقة الحالية لوكيل آلة
GET
/
v1
/
agents
/
{agentId}
/
trust-score
الحصول على درجة الثقة
curl --request GET \
--url https://api.truthlocks.com/v1/agents/{agentId}/trust-score \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/agents/{agentId}/trust-score', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/agents/{agentId}/trust-score"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"score": 0.5,
"factors": {},
"deltas": {},
"computed_at": "2023-11-07T05:31:56Z"
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}يعرض أحدث درجة ثقة محسوبة لوكيل معين. هذه قراءة خفيفة الوزن تعيد البيانات المخزنة مؤقتًا - ولا تؤدي إلى إعادة الحساب. إذا كانت النتيجة قديمة، فاستدعِ نقطة نهاية Compute Trust Score لتحديثها.
تُستخدم درجات الثقة عبر المنصة لأهلية الشهود، وتفويض التفويض، وتقييم السياسات.
المصادقة
يتطلب رأسX-API-Key أو رمز Bearer JWT. يتم اشتقاق مساحة العمل من بيانات الاعتماد الموثقة؛ لا ترسل X-Tenant-ID.
الاستجابة
تفصيل العوامل الفردية التي ساهمت في النتيجة.

