Skip to content

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.dev

Endpoints

Health Check

GET /health

Returns the service health status.

Create / Update Policy

POST /policy

Create 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"
}
FieldTypeRequiredDescription
namestringYesUnique policy name
rulestringYesThe policy rule text
groupstringNoGroup name for organizing policies

Get Policy

GET /policy/:name

Retrieve 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 /policies

List all policies. Optionally filter by group:

GET /policies?group=onboarding

Evaluate Policy by Name

POST /policy/:name/evaluate

Evaluate 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/:name

Remove a policy by name.

Policy Groups

Groups organize related policies. For example:

  • onboarding — age verification, identity check
  • lending — credit check, income verification
  • shipping — address validation, weight limits

Evaluate Group

POST /group/:name/evaluate

Evaluate 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

  1. Create policies via the orchestrator API or dashboard
  2. Organize policies into groups
  3. Evaluate by name or group from your application
  4. Version — policies are automatically versioned on update
  5. Audit — trace every evaluation for compliance