curl --request POST \
--url https://api.swarmd.ai/relay/v1/policy-groups/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"regoSource": "<string>",
"tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinkAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
'{
"valid": true,
"middlewareConfigs": [
{
"enabledLegs": {
"requestFromSource": true,
"requestToSink": true,
"responseFromSink": true,
"responseToSource": true
},
"entity": {
"type": "BANK_ACCOUNT_NUMBER",
"scoreThreshold": 0.5,
"action": "LOG"
},
"type": "COMMUNICATION_AUDIT"
}
],
"validationErrors": [
"<string>"
],
"evaluationTimeMs": 123
}Security Requirements
| Auth Types | Entities | Permissions | Required Roles |
|---|---|---|---|
| USER | TENANT | WRITE | TENANT:WRITE |
curl --request POST \
--url https://api.swarmd.ai/relay/v1/policy-groups/evaluate \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"regoSource": "<string>",
"tenantId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinkAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"timestamp": "2023-11-07T05:31:56Z"
}
'{
"valid": true,
"middlewareConfigs": [
{
"enabledLegs": {
"requestFromSource": true,
"requestToSink": true,
"responseFromSink": true,
"responseToSource": true
},
"entity": {
"type": "BANK_ACCOUNT_NUMBER",
"scoreThreshold": 0.5,
"action": "LOG"
},
"type": "COMMUNICATION_AUDIT"
}
],
"validationErrors": [
"<string>"
],
"evaluationTimeMs": 123
}JWT token (USER, AGENT, or SERVICE auth)