Preview release.These docs are a work in progress. Pages are still being written, links may break, and structure may shift without notice. Treat everything here as a draft and report issues onGitHub.
Query aggregate
const url = 'https://data.example.test/v1/datasets/example/aggregates/example/query?f=json';const options = { method: 'POST', headers: { 'Data-Purpose': 'https://demo.example.gov/purpose/demo-review', Authorization: 'Bearer <token>', 'Content-Type': 'application/json' }, body: '{"filters":{"region":["north","south"]},"format":"json","group_by":["region"],"measures":["household_count"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url 'https://data.example.test/v1/datasets/example/aggregates/example/query?f=json' \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --header 'Data-Purpose: https://demo.example.gov/purpose/demo-review' \ --data '{ "filters": { "region": [ "north", "south" ] }, "format": "json", "group_by": [ "region" ], "measures": [ "household_count" ] }'Runs a dataset-scoped aggregate in social_registry with caller-selected measures, group_by dimensions, and configured filters.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Aggregate identifier
Dataset identifier
Query Parameters
Section titled “Query Parameters”Response format. Use json, csv, or sdmx-json.
Header Parameters
Section titled “Header Parameters”Purpose-of-use IRI or controlled string. When require_purpose_header is set on this entity, the header must be present; a missing value returns 400 auth.purpose_required. The value is always recorded verbatim in the audit trail when present; purpose values are not enforced or validated at the consultation layer. Registry Notary is the purpose-certification layer. Header names are case-insensitive (Data-Purpose and data-purpose are equivalent).
Example
https://demo.example.gov/purpose/demo-reviewRequest Body
Section titled “Request Body”object
object
Deprecated compatibility alias for measures.
Maximum aggregate observations to return. Results that exceed the cap are truncated and marked incomplete.
Measure identifiers to compute. Defaults to the aggregate’s configured measures when omitted.
Date bounds applied to the aggregate temporal_field when configured.
object
Responses
Section titled “Responses”Successful aggregate response.
object
object
object
object
object
object
object
object
object
object
Example
{ "aggregate_id": "households_by_region", "completeness": { "complete": true, "truncated": false }, "dataset_id": "social_registry", "disclosure_control": { "method": [ "k-anonymity" ], "min_cell_size": 2, "query_budget": { "scope": "none", "tracked": false }, "suppressed_observations": 1, "suppression": "omit" }, "freshness": { "as_of": "2026-05-16T07:55:00Z", "computed_at": "2026-05-16T08:00:00Z" }, "links": [], "observations": [ { "household_count": 42, "region": "north" } ], "structure": { "dimensions": [ { "field": "region", "id": "region", "label": "Region" } ], "measures": [ { "aggregation_method": "count", "column": "id", "id": "household_count", "label": "Households", "unit_measure": "households" } ] }}SDMX JSON data message for the aggregate result.
object
Examplegenerated
{}Invalid aggregate query.
RFC 9457 Problem Details, returned for every non-2xx response.
object
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}Missing or invalid bearer credential.
RFC 9457 Problem Details, returned for every non-2xx response.
object
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}Authenticated principal lacks the scope required for this operation.
RFC 9457 Problem Details, returned for every non-2xx response.
object
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}Aggregate definition not found for this dataset.
RFC 9457 Problem Details, returned for every non-2xx response.
object
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}default
Section titled “default”Problem Details error response.
RFC 9457 Problem Details, returned for every non-2xx response.
object
Example
{ "code": "auth.missing_credential", "detail": "no credential provided in Authorization or x-api-key header", "request_id": "01ARZ3NDEKTSV4RRFFQ69G5FAV", "status": 401, "title": "Missing credential", "type": "https://registry-relay.dev/problems/auth/missing_credential"}