curl --request PUT \
--url https://api.swarmd.ai/relay/v1/policy-bindings/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bindingLevel": "TENANT",
"bindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinkAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isLatestGroupVersion": true,
"bindingLevel": "TENANT",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sourceAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sinkAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"priority": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"group": {
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"name": "<string>",
"description": "<string>",
"policies": [
{
"orderIndex": 123,
"policy": {
"policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"enabledLegs": {
"requestFromSource": true,
"requestToSink": true,
"responseFromSink": true,
"responseToSource": true
},
"entity": {
"type": "BANK_ACCOUNT_NUMBER",
"scoreThreshold": 0.5,
"action": "LOG"
},
"type": "COMMUNICATION_AUDIT"
},
"groupCount": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
],
"bindings": "<array>",
"bindingCount": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
]Security Requirements
| Auth Types | Entities | Permissions | Required Roles |
|---|---|---|---|
| USER | TENANT | WRITE | TENANT:WRITE |
curl --request PUT \
--url https://api.swarmd.ai/relay/v1/policy-bindings/reorder \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"bindingLevel": "TENANT",
"bindingIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sourceAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"sinkAgentId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'[
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"isLatestGroupVersion": true,
"bindingLevel": "TENANT",
"agent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sourceAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"sinkAgent": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>"
},
"priority": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"group": {
"groupId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"name": "<string>",
"description": "<string>",
"policies": [
{
"orderIndex": 123,
"policy": {
"policyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": "<string>",
"name": "<string>",
"description": "<string>",
"config": {
"enabledLegs": {
"requestFromSource": true,
"requestToSink": true,
"responseFromSink": true,
"responseToSource": true
},
"entity": {
"type": "BANK_ACCOUNT_NUMBER",
"scoreThreshold": 0.5,
"action": "LOG"
},
"type": "COMMUNICATION_AUDIT"
},
"groupCount": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
],
"bindings": "<array>",
"bindingCount": 123,
"validFrom": "2023-11-07T05:31:56Z",
"validTo": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}
}
]JWT token (USER, AGENT, or SERVICE auth)
OK
TENANT, AGENT, SUBSCRIPTION Show child attributes
Show child attributes
Show child attributes
Show child attributes