checkOrgPolicySimulation
Decide an attempt as a member would meet it in a repo, under the live policies or with a draft file that isn't saved, over the request channel (Api by default; Mcp tests rules on request.channel === "Mcp", and an agent that calls the API with its own token is Api): allowed, forbidden, hidden, or withheld when deciding it read a record you can't read. The verdict is the policies' alone, not whether the write's references hold. A draft with policy_id stands in for that policy alone, as a new version of it would; a draft without one joins the live policies as a new policy. Needs readPolicies and readMembers on the org.
POST
/orgs/{org_id}/policy-simulationsPath parameters
Request body JSON required
Returns
400
InvalidRequest | RequestBodyTooDeep
JSON
One of the following:
- InvalidRequestEncoded
- RequestBodyTooDeepEncoded
403
Forbidden | ForbiddenOrigin | RequiresPersonalSession | RunBranchRequired
JSON
One of the following:
- ForbiddenEncoded
- ForbiddenOriginEncoded
- RequiresPersonalSessionEncoded
- RunBranchRequiredEncoded
404
OrgNotFound | RepoNotFound | PolicyNotFound | MemberNotFound | BranchNotFound | CustomModelNotFound | CustomRecordNotFound | ExtensionNotFound | ExtensionInstallationNotFound | ExtensionToolNotFound | ExtensionWorkflowNotFound
JSON
One of the following:
- OrgNotFoundEncoded
- RepoNotFoundEncoded
- PolicyNotFoundEncoded
- MemberNotFoundEncoded
- BranchNotFoundEncoded
- CustomModelNotFoundEncoded
- CustomRecordNotFoundEncoded
- ExtensionNotFoundEncoded
- ExtensionInstallationNotFoundEncoded
- ExtensionToolNotFoundEncoded
- ExtensionWorkflowNotFoundEncoded
413
RequestBodyTooLarge
422
PolicyInvalid | InvalidCustomRecord | ExtensionScheduleNotDeclared | ExtensionTriggerNotDeclared
JSON
One of the following:
- PolicyInvalidEncoded
- InvalidCustomRecordEncoded
- ExtensionScheduleNotDeclaredEncoded
- ExtensionTriggerNotDeclaredEncoded
500
OrgFailure | RepoFailure
JSON
One of the following:
- OrgFailureEncoded
- RepoFailureEncoded
503
SessionUnavailable | RateLimitUnavailable
JSON
One of the following:
- SessionUnavailableEncoded
- RateLimitUnavailableEncoded