Schemas
The shapes the operations read and return, as the document declares them. A property whose type is another schema links to it rather than repeating it, because it is one shape and not several.
AnswerRequest
Section titled “AnswerRequest”(object, no other properties)
| Property | |
|---|---|
as_of | (string, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
entity_profile | (string) |
filters | (object, no other properties) |
filters.eids | (array of string) |
filters.entity_profile | (string) |
filters.entity_types | (array of string) |
filters.exclude_jurisdictions | (array of string) |
filters.exclude_regimes | (array of string) |
filters.jurisdictions | (array of string) |
filters.languages | (array of string) |
filters.regimes | (array of string) |
matches | (integer, minimum 1) |
mode | (string) |
query | (string, required, at least 1 character) |
release | (string) |
AnswerResponse
Section titled “AnswerResponse”(object)
| Property | |
|---|---|
applicability | (object, required) |
applicability.as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
applicability.atoms | (array of object, required) |
applicability.atoms[].applicable | (boolean or null, required) |
applicability.atoms[].atom | (string, required) |
applicability.atoms[].basis | (string, required) |
applicability.atoms[].citation | (object, required) |
applicability.atoms[].citation.as_of | (string, required) |
applicability.atoms[].citation.atom | (string or null) |
applicability.atoms[].citation.eid | (string or null) |
applicability.atoms[].citation.expression_iri | (string or null) |
applicability.atoms[].citation.node | (string or null) |
applicability.atoms[].citation.release | (string, required) |
applicability.atoms[].citation.valid_from | (string or null) |
applicability.atoms[].citation.valid_to | (string or null) |
applicability.atoms[].citation.work_iri | (string or null) |
applicability.atoms[].derogation | (any) |
applicability.atoms[].note | (string, required) |
applicability.atoms[].retrieved | (boolean, required) |
applicability.atoms[].unit_eid | (string, required) |
applicability.binds | (array of string, required) |
applicability.decided | (boolean, required) |
applicability.disapplied | (array of string, required) |
applicability.entity_profile | (string or null, required) |
applicability.entity_type | (string or null, required) |
applicability.release | (string, required) |
as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
blocks | (array of object, required) |
blocks[].attached_to | (string or null) |
blocks[].citation | (object, required) |
blocks[].citation.as_of | (string, required) |
blocks[].citation.atom | (string or null) |
blocks[].citation.eid | (string or null) |
blocks[].citation.expression_iri | (string or null) |
blocks[].citation.node | (string or null) |
blocks[].citation.release | (string, required) |
blocks[].citation.valid_from | (string or null) |
blocks[].citation.valid_to | (string or null) |
blocks[].citation.work_iri | (string or null) |
blocks[].detail | (object) |
blocks[].id | (string, required) |
blocks[].role | (string, required) |
blocks[].text | (string, required) |
corpus | (object, required) |
corpus.commit | (string, required) |
corpus.first_in_force | (string, required) |
corpus.last_in_force | (string or null, required) |
corpus.regime | (string, required) |
corpus.release | (string, required) |
corpus.release_as_of | (string, required) |
corpus.release_meta_sha256 | sha256 of this release’s release-meta.yaml, over the file’s own bytes — lowercase hex, no algorithm prefix. That manifest declares a digest for every artifact in the release and the server held the bytes to those declarations before answering, so this one value names every byte the answer was read out of. release and commit say which release these words came from; this says that they are that release’s words. openregs verify takes an answer and checks it. (string, required, matching ^[0-9a-f]{64}$) |
corpus.schema_version | (string, required) |
corpus.tag | (string, required) |
corpus.units | (integer, required) |
disclaimer | (Disclaimer, required) |
in_force | (boolean, required) |
notes | (array of string, required) |
out_of_scope | Instruments the query named that this release does not hold, as the query named them. Empty for a question wholly inside the corpus; the whole question where status is out-of-scope; the foreign half for a question that reaches both — so ‘I answered part of this’ is a fact of the payload rather than something a reader has to infer from the notes. (array of string, required) |
query | (string, required) |
release | (string, required) |
request | (object, required) |
request.as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
request.as_of_defaulted | (boolean, required) |
request.filters | (object, required) |
request.filters.eids | (any, required) |
request.filters.entity_profile | (string or null, required) |
request.filters.entity_types | (any, required) |
request.filters.exclude_jurisdictions | (array of string, required) |
request.filters.exclude_regimes | (array of string, required) |
request.filters.jurisdictions | (any, required) |
request.filters.languages | (any, required) |
request.filters.regimes | (any, required) |
request.matches | (integer, required) |
request.mode | (string, required) |
request.query | (string, required) |
request.release | (string, required) |
request.release_defaulted | (boolean, required) |
retrieval | (object, required) |
retrieval.admitted | (integer, required) |
retrieval.considered | (integer, required) |
retrieval.matches | (integer, required) |
retrieval.mode | (string, required) |
retrieval.requested | (integer, required) |
sections | (object, required) |
sections.amended | (array of string, required) |
sections.amendment | (array of string, required) |
sections.ancestor | (array of string, required) |
sections.definition | (array of string, required) |
sections.derogation | (array of string, required) |
sections.match | (array of string, required) |
sections.obligation | (array of string, required) |
status | (string, required) |
verification | (Verification, required) |
AtomRequest
Section titled “AtomRequest”(object, no other properties)
| Property | |
|---|---|
as_of | (string, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
atom_id | (string, required, at least 1 character) |
release | (string) |
AtomResponse
Section titled “AtomResponse”(object)
| Property | |
|---|---|
as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
atom | (object, required) |
atom.action | (string, required) |
atom.actor | (string, required) |
atom.applies_to | (array of string) |
atom.citation | (object, required) |
atom.citation.as_of | (string, required) |
atom.citation.char_end | (integer, required) |
atom.citation.char_start | (integer, required) |
atom.citation.executable | (string or null) |
atom.citation.quoted_text | (string, required) |
atom.citation.release | (string, required) |
atom.citation.source | (string) |
atom.citation.unit_eid | (string, required) |
atom.effective | (string) |
atom.executable_name | (string or null) |
atom.executable_unit | (string or null) |
atom.executable_value | The atom’s executable constant — a number where the provision states a quantity, a string where it states an enumerated term, null where the duty has no machine-actionable value. Never a boolean: whether a duty exists is its modality. executable_name names it for generated code and executable_unit gives its unit. (number or string or null) |
atom.expires | (string or null) |
atom.id | (string, required) |
atom.modality | (string, required) |
atom.quoted_text | (string) |
atom.source | (string) |
atom.status | (string, required) |
atom.unit_eid | (string, required) |
disclaimer | (Disclaimer, required) |
notes | (array of string) |
release | (string, required) |
unit | (any, required) |
verification | (Verification, required) |
Disclaimer
Section titled “Disclaimer”Both fields name the release rather than the instance, which is what lets a hosted deployment and an air-gapped one answer one question with identical bytes.
(object)
| Property | |
|---|---|
release | The corpus release tag the statement is scoped to. (string, required) |
text | The project’s informational-not-legal-advice statement, read from DISCLAIMER.md at startup. The serving layer holds no copy of it. (string, required) |
The one error shape, on every failure path. The stamp is present on a refusal the application made and absent on one the gateway made before a release was loaded — there is nothing truthful to scope it to yet.
(object)
| Property | |
|---|---|
disclaimer | (Disclaimer) |
error | (object, required) |
error.code | (string, required, one of internal, invalid_request, method_not_allowed, not_found, not_ready, payload_too_large, rate_limited, release_mismatch, unauthorized, unknown_profile) |
error.message | What went wrong, in words a caller can act on. (string, required) |
error.request_id | The id on the X-Request-Id header of this response, and in the server’s log record for it. (string, required) |
verification | (Verification) |
Liveness
Section titled “Liveness”The stamp is present once a release is loaded and absent before then: a probe answered before there is a release has no release to scope a statement to.
(object)
| Property | |
|---|---|
alive | True: the socket answered. (boolean, required) |
disclaimer | (Disclaimer) |
draining | Whether a shutdown has begun refusing new work. (boolean, required) |
ready | Whether a release is loaded. (boolean, required) |
verification | (Verification) |
ObligationsRequest
Section titled “ObligationsRequest”(object, no other properties)
| Property | |
|---|---|
as_of | (string, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
entity_profile | (string, required, at least 1 character) |
release | (string) |
ObligationsResponse
Section titled “ObligationsResponse”(object)
| Property | |
|---|---|
as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
binds | (array of string, required) |
counts | (object, required) |
counts.applicable | (integer, required) |
counts.excluded | (integer, required) |
disclaimer | (Disclaimer, required) |
entity_profile | (string, required) |
entity_type | (string, required) |
excluded | (array of object, required) |
excluded[].action | (string) |
excluded[].actor | (string) |
excluded[].applicable | (boolean, required) |
excluded[].applies_to | (array of string) |
excluded[].basis | (string, required) |
excluded[].citation | (object, required) |
excluded[].citation.as_of | (string, required) |
excluded[].citation.char_end | (integer, required) |
excluded[].citation.char_start | (integer, required) |
excluded[].citation.executable | (string or null) |
excluded[].citation.quoted_text | (string, required) |
excluded[].citation.release | (string, required) |
excluded[].citation.source | (string) |
excluded[].citation.unit_eid | (string, required) |
excluded[].derogation | (any) |
excluded[].effective | (string) |
excluded[].executable_name | (string or null) |
excluded[].executable_unit | (string or null) |
excluded[].executable_value | The atom’s executable constant — a number where the provision states a quantity, a string where it states an enumerated term, null where the duty has no machine-actionable value. Never a boolean: whether a duty exists is its modality. executable_name names it for generated code and executable_unit gives its unit. (number or string or null) |
excluded[].expires | (string or null) |
excluded[].id | (string, required) |
excluded[].modality | (string) |
excluded[].note | (string, required) |
excluded[].quoted_text | (string) |
excluded[].unit_eid | (string, required) |
notes | (array of string, required) |
obligations | (array of object, required) |
obligations[].action | (string) |
obligations[].actor | (string) |
obligations[].applicable | (boolean, required) |
obligations[].applies_to | (array of string) |
obligations[].basis | (string, required) |
obligations[].citation | (object, required) |
obligations[].citation.as_of | (string, required) |
obligations[].citation.char_end | (integer, required) |
obligations[].citation.char_start | (integer, required) |
obligations[].citation.executable | (string or null) |
obligations[].citation.quoted_text | (string, required) |
obligations[].citation.release | (string, required) |
obligations[].citation.source | (string) |
obligations[].citation.unit_eid | (string, required) |
obligations[].derogation | (any) |
obligations[].effective | (string) |
obligations[].executable_name | (string or null) |
obligations[].executable_unit | (string or null) |
obligations[].executable_value | The atom’s executable constant — a number where the provision states a quantity, a string where it states an enumerated term, null where the duty has no machine-actionable value. Never a boolean: whether a duty exists is its modality. executable_name names it for generated code and executable_unit gives its unit. (number or string or null) |
obligations[].expires | (string or null) |
obligations[].id | (string, required) |
obligations[].modality | (string) |
obligations[].note | (string, required) |
obligations[].quoted_text | (string) |
obligations[].unit_eid | (string, required) |
release | (string, required) |
verification | (Verification, required) |
PrometheusExposition
Section titled “PrometheusExposition”The metric registry in the Prometheus text exposition format: one HELP line, one TYPE line and the samples, per metric.
(string)
Readiness
Section titled “Readiness”(object)
| Property | |
|---|---|
commit | The canon commit that release was built from. (string, required) |
disclaimer | (Disclaimer, required) |
ready | (boolean, required) |
release | The release tag this instance answers from. (string, required) |
units | How many units of text it holds. (integer, required) |
verification | (Verification, required) |
UnitRequest
Section titled “UnitRequest”(object, no other properties)
| Property | |
|---|---|
as_of | (string, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
eid | (string, required, at least 1 character) |
release | (string) |
work_iri | (string) |
UnitResponse
Section titled “UnitResponse”(object)
| Property | |
|---|---|
as_of | (string, required, matching ^[0-9]{4}-[0-9]{2}-[0-9]{2}$) |
atoms | (array of object, required) |
atoms[].action | (string, required) |
atoms[].actor | (string, required) |
atoms[].applies_to | (array of string) |
atoms[].citation | (object, required) |
atoms[].citation.as_of | (string, required) |
atoms[].citation.char_end | (integer, required) |
atoms[].citation.char_start | (integer, required) |
atoms[].citation.executable | (string or null) |
atoms[].citation.quoted_text | (string, required) |
atoms[].citation.release | (string, required) |
atoms[].citation.source | (string) |
atoms[].citation.unit_eid | (string, required) |
atoms[].effective | (string) |
atoms[].executable_name | (string or null) |
atoms[].executable_unit | (string or null) |
atoms[].executable_value | The atom’s executable constant — a number where the provision states a quantity, a string where it states an enumerated term, null where the duty has no machine-actionable value. Never a boolean: whether a duty exists is its modality. executable_name names it for generated code and executable_unit gives its unit. (number or string or null) |
atoms[].expires | (string or null) |
atoms[].id | (string, required) |
atoms[].modality | (string, required) |
atoms[].quoted_text | (string) |
atoms[].source | (string) |
atoms[].status | (string, required) |
atoms[].unit_eid | (string, required) |
disclaimer | (Disclaimer, required) |
eid | (string, required) |
in_force | (boolean, required) |
notes | (array of string, required) |
release | (string, required) |
unit | (any, required) |
verification | (Verification, required) |
versions | (array of object, required) |
versions[].in_force | (boolean, required) |
versions[].node | (string, required) |
versions[].valid_from | (string, required) |
versions[].valid_to | (string or null, required) |
Verification
Section titled “Verification”What was checked before this release was served. verified — the release carried an attestation and all five checks passed. digests — the release is the serving checkout’s own unsigned build, so its digests and its own provenance were checked and the signature chain was not. skipped — the operator passed —insecure-skip-verify and nothing was checked at all.
(string, one of verified, digests, skipped)
Rendered from openregs/openregs@f3a2d10:docs/reference/openapi.json