AAS Repository#

GitHub Metamodel API

The BaSyx Go AAS Repository stores and serves Asset Administration Shells (AASs). An AAS identifies an asset, contains asset information, and references the Submodels that describe aspects of that asset.

Repository or Registry?#

Use the Repository to create, retrieve, and modify AAS content. The AAS Registry stores descriptors that advertise where clients can access that content. Registering a descriptor does not create an AAS.

An AAS contains Submodel references, not inline Submodel content. This Go component also exposes AAS-scoped Submodel routes backed by Submodel storage in the same database. Adding a reference alone does not create that content or fetch it from another service. See Using the AAS Repository for both workflows.

Main Capabilities#

  • Create, retrieve, replace, and delete AASs.

  • List AASs with filters and cursor-based pagination.

  • Retrieve and replace asset information independently of the complete AAS.

  • Manage Submodel references and access Submodel content through an AAS.

  • Invoke modeled Submodel Operations synchronously or asynchronously through AAS-scoped Submodel routes, including value-only invocation.

  • Query AAS-level fields through POST /query/shells.

  • Emit experimental CloudEvents through the REST Event Feed or broker transports. See Eventing.

  • Optionally synchronize AAS Descriptors through Registry Integration.

  • Expose service self-description and runtime API documentation.

Important Behavior#

Identifiers and Updates#

The AAS identifier in the request path is Base64URL-encoded. Identifiers in JSON request bodies remain unencoded. PUT creates the AAS if it does not exist or replaces the existing AAS. The identifier in the request body must match the decoded path identifier. The request body must contain the complete AAS, including all references and metadata that should be retained.

Shared Submodel Content#

Submodel content is stored once per Submodel ID. AAS-scoped routes do not create a private copy for each AAS. Multiple AASs can reference the same Submodel ID. Updating it through one AAS therefore changes the content seen through every AAS that references that ID.

Warning

Submodel content is shared by Submodel ID, even when it is accessed through an AAS-scoped endpoint.

  • DELETE /shells/{aasIdentifier}/submodels/{submodelIdentifier} deletes the shared Submodel content and removes the reference from the addressed AAS. References from other AASs are not removed and may therefore point to a Submodel that no longer exists.

  • DELETE /shells/{aasIdentifier}/submodel-refs/{submodelIdentifier} removes only the reference from the addressed AAS. The Submodel content remains stored.

  • DELETE /shells/{aasIdentifier} deletes the AAS and its references. Referenced Submodel content remains stored.

See Resource Lifecycle before replacing or deleting shared resources.

Structured Query Scope#

The standalone Repository supports POST /query/shells for structured queries over AAS data. Queries that traverse into Submodels or Submodel Elements using $sm or $sme are not supported by the standalone service and return 400 Bad Request. Use the AAS Environment for hierarchy-spanning queries.

Database Schema#

The Repository uses PostgreSQL. The BaSyx Configuration Service must initialize the shared schema before startup. The Repository validates it and does not initialize it itself. See Setup.

Configuration#

See General Configuration for shared server, database, and other configuration options. See Shared Runtime Features for common runtime capabilities. Registry Integration explains AAS Registry synchronization and the generation of public descriptor endpoints.

API Documentation and Availability#

Use the following API documentation depending on whether you need the behavior of a running BaSyx component or the standardized API definition:

The OpenAPI document shipped with the current BaSyx Go AAS Repository identifies API version V3.2.0 and declares profiles SSP-001, SSP-003, SSP-004, SSP-005, and SSP-006. These declarations describe the shipped specification. Use the running component’s Swagger UI and the availability notes below to determine the installed service’s supported operations.

With the default empty context path, the service exposes:

  • Swagger UI at /swagger;

  • the OpenAPI document at /api-docs/openapi.yaml;

  • service self-description at /description.

When server.contextPath is configured, these locations are served below that context path. Swagger can also be disabled through configuration. See Swagger UI Docs for details.

Availability Notes#

The standalone AAS Repository does not support the /serialization endpoint. For full environment import/export, use the combined AAS Environment, which implements /serialization and /upload. Its Repository-to-Registry synchronization still depends on explicit integration flags. Merely using the combined executable does not make every Repository write synchronize automatically.