Policies
Evaluate policy.
Changed onEvaluates an operation against policies without actually performing the operation. Use this endpoint to check if an operation would be allowed before attempting it.
post/v2/policies/evaluate
Request
- Base URL: https://api.openfort.io
- URL: https://api.openfort.io/v2/policies/evaluate
- Auth: one of:
- HTTP bearer
- HTTP bearer
- HTTP bearer
Request body
Example request
{
"operation": "signEvmTransaction",
"accountId": "acc_48eeba57-2cd5-4159-a2cb-057a23a35e65",
"payload": {
"chainId": 1,
"to": "0x742d35Cc6634C0532925a3b844Bc9e7595f0aB12",
"value": "1000000000000000000",
"data": "0xa9059cbb...",
"primaryType": "Permit",
"network": "mainnet-beta",
"solValue": "1000000000"
}
}Response
Successful response.
Example response
{
"object": "policy_evaluation",
"allowed": true,
"reason": "Allowed by policy rule",
"operation": "signEvmTransaction",
"accountId": "acc_48eeba57-2cd5-4159-a2cb-057a23a35e65",
"matchedPolicyId": "ply_48eeba57-2cd5-4159-a2cb-057a23a35e65",
"matchedRuleId": "plr_48eeba57-2cd5-4159-a2cb-057a23a35e65"
}Changes
- info
the security scope
policies:writewas added to the endpoint's security schemesk
- info
- info
endpoint added
- info