Test a policy file against fixture requests
Decides each fixture request against the environment as it would be after applying the file (every enabled policy the file does not own, plus the file’s policies), using the production decision function. Writes nothing and dispatches nothing. Policy decision only: an action’s own approval floor is not applied.
/api/v2/approval-policies/files/testAuthorizationBearer token (Anlyon API key) · headerrequiredWorkspace API key sent as Authorization: Bearer <key>.
better-auth.session_tokenAPI key · cookierequiredBrowser session used by dashboard-only operations.
X-Request-IdstringOptional caller correlation ID. Unsafe or oversized values are replaced.
application/jsonsourcestringrequiredcasesstring | object[]requiredFixture cases as YAML/JSON text (a list, or an object with cases), or as a list. Each case has name, request { kind, action, input, agent, user, tags } and expect { effect and/or policy (a key in this file, another policy id, or null) }.
Show propertiesHide properties
stringobjectobjectPer-case results.
successbooleanrequiredtruedataPolicyFileTestResultrequiredShow propertiesHide properties
filestringrequiredpassedintegerrequiredfailedintegerrequiredresultsobject[]requiredShow propertiesHide properties
objectnamestringrequiredpassbooleanrequiredpolicystring | nullrequiredThe governing policy: a key in this file, another policy id, or null.
effectstringrequiredrequire_approvalauto_approveauto_denyexplanationstringrequiredBad Request - Invalid input data
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectUnauthorized - Invalid or missing API key
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectAuthenticated credential lacks the required scope or workspace access.
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobjectToo Many Requests - Rate limit exceeded
successbooleanrequiredrequestIdstringrequiredCorrelation ID matching the X-Request-Id response header.
errorobjectrequiredShow propertiesHide properties
codestringmessagestringdetailsobject
