سرد سياسات MAIP
curl --request GET \
--url https://api.truthlocks.com/v1/maip/policies \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/maip/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/maip/policies"
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/maip/policies"
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))
}[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"category": "scope",
"status": "active",
"priority": 123,
"rules": [
{
"conditions": [
{
"field": "trust_score",
"op": "eq",
"value": "<unknown>"
}
],
"effect": "allow",
"requires_approval": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}سياسات MAIP
سرد سياسات MAIP
سرد جميع سياسات تطبيق الوكيل للمستأجر المصادق عليه
GET
/
v1
/
maip
/
policies
سرد سياسات MAIP
curl --request GET \
--url https://api.truthlocks.com/v1/maip/policies \
--header 'X-API-Key: <api-key>'const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/maip/policies', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/maip/policies"
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/maip/policies"
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))
}[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"tenant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"category": "scope",
"status": "active",
"priority": 123,
"rules": [
{
"conditions": [
{
"field": "trust_score",
"op": "eq",
"value": "<unknown>"
}
],
"effect": "allow",
"requires_approval": true
}
],
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}قائمة سياسات MAIP
GET /v1/maip/policies
يُرجع جميع سياسات وكيل MAIP المكونة للمستأجر المصادق عليه. تُعرّف السياسات قواعد التنفيذ في وقت التشغيل التي تحكم ما يمكن للوكلاء فعله بناءً على درجات الثقة، والنطاقات، وعمق التفويض، ونوع الوكيل.
المصادقة
يتطلب رأسX-API-Key أو رمز Bearer JWT. نطاق المستأجر عبر ملف تعريف الارتباط أو مطالبة JWT.
الاستجابة
يعرض مصفوفة من كائنات السياسة.حالة دورة حياة السياسة. واحدة من:
"active"، "disabled"، "archived". فقط
يتم تقييم سياسات active أثناء فحوصات السياسة.مصفوفة JSON لقواعد السياسة. تحتوي كل قاعدة على شروط وتأثير
(
"allow"، "deny"، "require_approval")، واختياريًا
علامة requires_approval. راجع إنشاء سياسة للحصول على التفاصيل الكاملة
مخطط القاعدة.مثال
curl https://api.truthlocks.com/v1/maip/policies \
-H "X-API-Key: tl_live_..."
const response = await fetch("https://api.truthlocks.com/v1/maip/policies", {
headers: { "X-API-Key": "tl_live_..." },
});
const policies = await response.json();
import requests
response = requests.get(
"https://api.truthlocks.com/v1/maip/policies",
headers={"X-API-Key": "tl_live_..."},
)
policies = response.json()
الاستجابة
مصفوفة من السياسات

