Bundles
Upload, inspect, replay and activate bundles.
GET /v1/bundles
Section titled “GET /v1/bundles”Every stored bundle, newest upload first. sefra_viewer and above.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
before |
query | Digest | No | Continue after this bundle of the previous page. Pattern: ^sha256:[0-9a-f]{64}$. |
limit |
query | integer | No | Default: 50. Minimum: 1. Maximum: 200. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
A page of bundles; next_before on a full page. |
object |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
Body of 200
| Field | Type | Required | Description |
|---|---|---|---|
bundles |
array of Bundle | Yes | |
next_before |
Digest | No | Pattern: ^sha256:[0-9a-f]{64}$. |
POST /v1/bundles
Section titled “POST /v1/bundles”Upload a gzip-compressed tar of a bundle directory; validated and stored, not activated.
Request body
Content type application/gzip, schema string.
Responses
| Status | Description | Body |
|---|---|---|
200 |
Stored or stored already. | object |
201 |
Stored or stored already. | object |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
413 |
A problem. | Problem (application/problem+json) |
422 |
The bundle is invalid and was not stored. | Problem or object (application/problem+json) |
Body of 200
| Field | Type | Required | Description |
|---|---|---|---|
digest |
Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
warnings |
array of object | Yes |
Body of 201
| Field | Type | Required | Description |
|---|---|---|---|
digest |
Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
warnings |
array of object | Yes |
GET /v1/bundles/activations
Section titled “GET /v1/bundles/activations”The bundle.activated events, newest first. sefra_viewer and above.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
before_seq |
query | integer | No | Continue after this event of the previous page. Minimum: 1. |
limit |
query | integer | No | Default: 50. Minimum: 1. Maximum: 200. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
A page of activations; next_before_seq on a full page. |
object |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
Body of 200
| Field | Type | Required | Description |
|---|---|---|---|
activations |
array of BundleActivation | Yes | |
next_before_seq |
integer | No |
GET /v1/bundles/active
Section titled “GET /v1/bundles/active”The active digest, and whether this process has it loaded. sefra_viewer and above.
Responses
| Status | Description | Body |
|---|---|---|
200 |
The active bundle. | object |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
Body of 200
| Field | Type | Required | Description |
|---|---|---|---|
digest |
Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
loaded |
boolean | Yes |
GET /v1/bundles/{digest}
Section titled “GET /v1/bundles/{digest}”One stored bundle, its files with their hashes and its catalogue. sefra_viewer and above.
files are in path order, at most 1,000 (files_truncated beyond); the bundle’s digest is computed over their paths and hashes. Content that does not have the digest is 409 and not shown; a read that runs out of time is 503 and says nothing about the bundle. The catalogue is bounded (500 intents, 500 grants, 50 subjects per intent, 100 types per grant), each with a *_truncated flag. It is parsed by the registry’s loader; a stored bundle that no longer loads has catalogue: null and catalogue_error. Connectors name their secret, never its value.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
digest |
path | Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The bundle. | BundleDetail |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
409 |
A problem. | Problem (application/problem+json) |
503 |
A problem. | Problem (application/problem+json) |
POST /v1/bundles/{digest}/activate
Section titled “POST /v1/bundles/{digest}/activate”Make a stored bundle the active one; also the roll-back to an earlier digest. sefra_admin.
The console’s form requires a note; the API does not. A digest already active answers activated: false and writes nothing. A digest that was never active on this deployment is checked against the licence: 403 with code LICENSE_EXPIRED when the licence or the evaluation period has lapsed, and LICENSE_LIMIT when the bundle’s connectors name more systems of record than the licence allows. Each refusal is recorded as bundle.activation_refused. A digest that was active before is always activated.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
digest |
path | Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
Request body
Empty, or a note.
Content type application/json, schema object.
| Field | Type | Required | Description |
|---|---|---|---|
note |
string | Yes | At most, in characters: 2000. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
Active. | object |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
Body of 200
| Field | Type | Required | Description |
|---|---|---|---|
activated |
boolean | Yes | False if it was active already. |
digest |
string | Yes |
GET /v1/bundles/{digest}/files/{path}
Section titled “GET /v1/bundles/{digest}/files/{path}”One file of a stored bundle, as text when it may be shown. sefra_viewer and above.
path is the file’s path in the bundle, slashes included (intents/procurement.get_budget.yaml). text is the content for kind: text (valid UTF-8 without NUL, at most 1 MiB) and null for binary and too_large, which the console lists by hash.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
digest |
path | Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
path |
path | string | Yes |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The file. | BundleFile or object |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
409 |
A problem. | Problem (application/problem+json) |
503 |
A problem. | Problem (application/problem+json) |
GET /v1/bundles/{digest}/intents/{type}
Section titled “GET /v1/bundles/{digest}/intents/{type}”The intent page of one intent type of a stored bundle. sefra_viewer and above.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
digest |
path | Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
type |
path | string | Yes | Pattern: ^[a-z0-9_]+\.[a-z0-9_]+$. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The intent as the manifest writes it, templates and all. | BundleIntent |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
409 |
A problem. | Problem (application/problem+json) |
503 |
A problem. | Problem (application/problem+json) |
POST /v1/replays
Section titled “POST /v1/replays”The recorded decisions of a period whose effect a stored candidate would change. sefra_viewer and above.
Reads one read-only snapshot, verifies the audit chain and re-evaluates the recorded inputs under the candidate. It writes no event and no row. The period defaults to the 7 days before to, and to to now. A period over 31 days keeps its newest 31 days, and more than 5,000 decisions the newest 5,000; cut says which applied. The answer holds effects and rule names only, never a policy’s output, messages or error text, which can quote a value a viewer may not read. A rule name that is not a string literal of the policy that produced it is shown as (computed), since a computed name can quote a value too. A decision whose input is erased or past its retention is listed in not_replayed.
Request body
Content type application/json, schema object.
| Field | Type | Required | Description |
|---|---|---|---|
digest |
Digest | Yes | Pattern: ^sha256:[0-9a-f]{64}$. |
from |
string | No | Format: date-time. |
to |
string | No | Format: date-time. |
Responses
| Status | Description | Body |
|---|---|---|
200 |
The replay. | Replay |
400 |
A problem. | Problem (application/problem+json) |
401 |
No valid token (with WWW-Authenticate). |
Problem (application/problem+json) |
403 |
The principal is not human or lacks the role. | Problem (application/problem+json) |
404 |
A problem. | Problem (application/problem+json) |
409 |
The candidate no longer loads, or the audit trail does not verify. Nothing was replayed. | Problem (application/problem+json) |
503 |
Two replays are already running, the caller’s previous replay is still running, or this one did not finish within 30 seconds. No partial list. | Problem (application/problem+json) |