Policies
Versioned weights and thresholds; the digest of the active version is on every record.
| Method | Path | Scope | Summary |
|---|---|---|---|
GET | /policies | read | List Policies |
POST | /policies | admin | Create Policy |
Try it
curl -sf -H "Authorization: Bearer $VIGIL_KEY" "$VIGIL_URL/policies"
Routes
GET /policies
List Policies. Scope: read.
Every version for the org, newest first. Exactly one is active.
Response 200:
[
{
"id": 0,
"version": 0,
"weights": {
"<key>": 0
},
"thresholds": {
"<key>": 0
},
"detectors": {},
"digest": "string",
"active": true,
"created_by": "string",
"created_at": "string"
}
]
POST /policies
Create Policy. Scope: admin.
Request body:
{
"weights": {
"<key>": 0
},
"thresholds": {
"<key>": 0
},
"detectors": {},
"created_by": "string | null"
}
| Field | Type | Required | Notes |
|---|---|---|---|
weights | Weights | yes | |
thresholds | Thresholds | yes | |
detectors | object | null | no | |
created_by | string | null | no |
Response 200:
{
"id": 0,
"version": 0,
"weights": {
"<key>": 0
},
"thresholds": {
"<key>": 0
},
"detectors": {},
"digest": "string",
"active": true,
"created_by": "string",
"created_at": "string"
}
Generated from openapi.json (VIGIL 0.2.0). Scopes follow the router dependencies in VIGIL_SPEC.md section 4.2.