Skip to content

API Endpoints

REST surface of the Variables module, exposed by the Bauhaus Back-Office. All paths are relative to the servlet context path, /api.

Unless stated otherwise, an endpoint requires authentication and the privilege given in the Access column on the module DDI_PHYSICALINSTANCE. Endpoints marked public require no authentication.

MethodPathAccessDescription
GET/ddi/physical-instanceREADAll physical instances, alphabetically by label. HAL, with a self link per entry. Filtered by stamp under the STAMP strategy.
GET/ddi/physical-instance/searchREADAdvanced-search rows: each physical instance joined to its study unit and group, labels resolved. Parent fields are null for an orphan instance. Filtered by stamp under STAMP. Send Cache-Control: no-cache to force a refresh.
GET/ddi/physical-instance/{agency}/{id}READThe physical instance as a DDI 4 document. Code lists and categories are omitted — fetch them separately.
GET/ddi/physical-instance/{agency}/{id}/parentsREADParent study unit and group (agency, id, label) plus the resolved owner stamps.
GET/ddi/physical-instance/{agency}/{id}/codeslistsREADSummaries of the code lists referenced by this instance’s variables.
POST/ddi/physical-instanceCREATE on the target groupCreates a physical instance with its data relationship and logical record. Body: physicalInstanceLabel, dataRelationshipLabel, logicalRecordLabel, groupAgency, groupId, studyUnitAgency, studyUnitId.
PATCH/ddi/physical-instance/{agency}/{id}UPDATEUpdates the labels and the parents of an existing instance. Same body as the creation.
PUT/ddi/physical-instance/{agency}/{id}UPDATEReplaces the whole instance with the DDI 4 document in the body: variables, code lists, categories, sentinel values.

POST checks the privilege against the group identified as groupAgency|groupId, since the instance does not exist yet.

MethodPathAccessDescription
GET/ddi/groupREADGroups as HAL, with a self link per entry. Filtered by stamp under STAMP.
GET/ddi/group/{agency}/{id}READOne group as a DDI 4 document.
GET/ddi/groupsauthenticatedPlain list of all groups. No RBAC check.
POST/ddi/groupsauthenticatedCreates or updates a group from a DDI 4 Group. Returns 201. No RBAC check.
GET/ddi/groups/{agency}/{id}/logical-productsREADLogical products of the group.
GET/ddi/groups/{agency}/{id}/codes-listREADEvery code list of the group, across all its logical products and code list schemes.
GET/ddi/groups/{agency}/{id}/missing-codes-listREADThe group’s sentinel-value code lists.
GET/ddi/groups/{agency}/{id}/missing-values-representationsREADThe group’s reusable ManagedMissingValuesRepresentations, with a preview of their codes.
GET/ddi/groups/{ga}/{gid}/logical-products/{la}/{lid}/code-list-schemeREADCode list schemes of one logical product.
GET/ddi/groups/{ga}/{gid}/logical-products/{la}/{lid}/code-list-scheme/{ca}/{cid}/codes-listREADCode lists of one code list scheme.
MethodPathAccessDescription
GET/ddi/study-unitsREADAll study units.
POST/ddi/study-unitsCREATECreates or updates a study unit from a DDI 4 StudyUnit. Returns 201.
GET/ddi/logical-productREADAll logical products, as HAL.
GET/ddi/code-list-schemeREADAll code list schemes, as HAL.
MethodPathAccessDescription
GET/ddi/mutualized-codes-listREADSummaries of the mutualized code lists. Send Cache-Control: no-cache to force a refresh.
GET/ddi/mutualized-codes-list/{agency}/{id}READOne code list and its categories, as a DDI 4 document. Despite its name the endpoint is generic — it resolves any code list. Returns 200 with an empty body when the list does not exist.
GET/ddi/codes-list/{agency}/{id}/usersREADVariables using this code list, with their physical instance and study unit.
GET/ddi/category/{agency}/{id}/usersREADCode lists whose codes reference this category.
GET/ddi/missing-values-representations/{agency}/{id}/usersREADVariables referencing this sentinel-values representation.
MethodPathAccessDescription
POST/ddi/convert/ddi4-to-ddi3READDDI 4 JSON in, DDI 3.3 XML out (application/xml).
POST/ddi/convert/ddi3-to-ddi4READDDI 3.3 fragments in, DDI 4 JSON out.
GET/ddi/schemaREADThe DDI 4 JSON schema used for validation.
POST/ddi/validatePUBLISHValidates a DDI 4 document. 200 {valid:true}, or 400 {valid:false, errors:[…]}.

No authentication. Every one of them negotiates its format through the Accept header: application/xml yields DDI 3.3 (a multi-fragment <FragmentInstance>), application/json yields DDI 4.

The /ddi/ prefix is required by the API gateway, which routes to Bauhaus only the paths beginning with it.

MethodPathDescription
GET/ddi/public/item/{agency}/{id}One DDI item, latest version.
GET/ddi/public/item/{agency}/{id}/{version}One DDI item, at that version.
GET/ddi/public/codelist/{agency}/{id}A code list with the categories its codes reference.
GET/ddi/public/codelist/{agency}/{id}/{version}Same, at that version.
GET/ddi/public/fichier/{agency}/{id}A physical instance and everything that composes it — its data relationships, and therefore its variables.
GET/ddi/public/fichier/{agency}/{id}/{version}Same, at that version.
GET/ddi/public/operation/{id}/fichiersThe study unit documenting the Bauhaus operation {id}, together with the physical instances it references.

/ddi/public/operation/{id}/fichiers resolves the operation IRI in the publication repository, so only published operations can be matched.

StatusWhen
400Sentinel values saved without their mandatory labels; malformed or schema-invalid DDI 4 on /ddi/validate
403RBAC refusal
404Study unit not found; unknown item, code list or physical instance on a public endpoint
500Colectica unreachable or returning an unexpected response

400 and 404 bodies carry { "message": "…" }.