Orchestrator API
The orchestrator manages named policies, versioning, and policy groups. It sits between your application and the engine.
Base URL
https://api.policy.keloran.devEndpoints
Health Check
GET /healthReturns the service health status.
Create / Update Policy
POST /policyCreate or update a named policy.
Request Body:
{ "name": "age-verification", "rule": "A **Person** gets approved if __age__ of **Person** is greater than or equal to 18.", "group": "onboarding"}| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Unique policy name |
rule | string | Yes | The policy rule text |
group | string | No | Group name for organizing policies |
Get Policy
GET /policy/:nameRetrieve a policy by name.
Response:
{ "name": "age-verification", "rule": "A **Person** gets approved if __age__ of **Person** is greater than or equal to 18.", "group": "onboarding", "version": 1}List Policies
GET /policiesList all policies. Optionally filter by group:
GET /policies?group=onboardingEvaluate Policy by Name
POST /policy/:name/evaluateEvaluate a named policy against data. The orchestrator fetches the rule and forwards to the engine.
Request Body:
{ "data": { "Person": { "age": 25 } }}Response:
{ "result": true, "policy": "age-verification", "version": 1, "trace": ["..."]}Delete Policy
DELETE /policy/:nameRemove a policy by name.
Policy Groups
Groups organize related policies. For example:
onboarding— age verification, identity checklending— credit check, income verificationshipping— address validation, weight limits
Evaluate Group
POST /group/:name/evaluateEvaluate all policies in a group against the same data:
{ "data": { "Person": { "age": 25 }, "CreditReport": { "score": 750 } }}Response:
{ "group": "onboarding", "results": [ { "policy": "age-verification", "result": true }, { "policy": "identity-check", "result": true } ], "all_passed": true}Workflow
- Create policies via the orchestrator API or dashboard
- Organize policies into groups
- Evaluate by name or group from your application
- Version — policies are automatically versioned on update
- Audit — trace every evaluation for compliance