الحصول على استخدام الفواتير
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/usage"
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/billing/usage"
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))
}{
"period": "<string>",
"usage": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}الفوترة
الحصول على الاستخدام
يعرض عدادات استخدام دورة الفوترة الحالية للمستأجر المصادق عليه.
GET
/
v1
/
billing
/
usage
الحصول على استخدام الفواتير
curl --request GET \
--url https://api.truthlocks.com/v1/billing/usage \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/billing/usage', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/billing/usage"
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/billing/usage"
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))
}{
"period": "<string>",
"usage": {}
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}GET /v1/billing/usage
الاستجابة
يعرض مصفوفة من كائنات عداد الاستخدام.معرف مقياس الاستخدام (على سبيل المثال،
attestations.mint، verifications_monthly، storage_bytes).الحد الأقصى المسموح به لهذا المقياس بموجب خطتك. تشير القيمة
-1 إلى عدم وجود حصة مكوّنة لهذا المقياس؛ لا تزال حدود الخدمة والمعدل سارية.ما إذا كان المستأجر مسموحًا له حاليًا باستهلاك المزيد من هذا المقياس. يُرجع
false عند الوصول إلى الحد الأقصى. يتم تضمينه فقط عند الاقتضاء.التغيير في الاستخدام منذ الاستعلام الأخير. يتم تضمينه فقط عندما يتتبع الخادم التحديثات التزايدية.
المقاييس المتتبعة
تُرجع نقطة نهاية الاستخدام ما يصل إلى 16 مقياسًا منظمة حسب مجموعة المنتج. تعتمد المقاييس التي تظهر على خطتك والميزات النشطة.أساسي
| المقياس | الوصف | الوحدة |
|---|---|---|
attestations.mint | الشهادات التي تم إنشاؤها | count |
verifications_monthly | التحققات التي تم إجراؤها | count |
storage_bytes | إجمالي التخزين المستهلك | bytes |
proof_bundles | حزم الإثبات التي تم إنشاؤها | count |
webhook_endpoints | نقاط نهاية webhook النشطة | count |
webhook_deliveries | عمليات تسليم Webhook المرسلة | count |
seats | مقاعد أعضاء الفريق | count |
MAIP (هوية الجهاز)
| المقياس | الوصف | الوحدة |
|---|---|---|
maip.agents | وكلاء الجهاز المسجلون | count |
maip.sessions | جلسات الوكيل التي تم إنشاؤها | count |
maip.trust_computes | حسابات درجة الثقة | count |
maip.compliance_checks | طلبات التحقق من الامتثال | count |
الذكاء الاصطناعي
| المقياس | الوصف | الوحدة |
|---|---|---|
ai.dataset_attestations | مجموعات البيانات المصدقة للنسب | count |
ai.model_attestations | النماذج المصدقة للأصل | count |
مكافحة الاحتيال
| المقياس | الوصف | الوحدة |
|---|---|---|
antifraud.risk_signals | إشارات المخاطر المستوعبة أو المولدة | count |
antifraud.deepfake_scans | طلبات فحص التزييف العميق | count |
antifraud.velocity_records | سجلات تسجيل السرعة | count |
للتحقق مما إذا كانت عملية معينة مسموح بها قبل إجرائها، استخدم نقطة نهاية الاستحقاقات للتحقق من حصصك.

