Submodel Repository#

GitHub Metamodel API

The BaSyx Go Submodel Repository stores and serves Submodels and their Submodel Elements. A Submodel describes an aspect of an asset, such as its nameplate, technical data, or operating values.

Repository or Registry?#

Use the Repository to create, retrieve, and modify Submodel content. The Submodel Registry stores descriptors containing discovery metadata and service endpoints. Creating a descriptor does not create its Submodel content.

A Submodel can exist independently of an AAS and can be referenced by multiple AASs. The AAS Repository manages those references and supports AAS-scoped Submodel access. The standalone Submodel Repository addresses content directly by Submodel identifier.

For one runtime that combines AAS, Submodel, Registry, and Discovery APIs, see the AAS Environment. Its Repository-to-Registry synchronization still depends on explicit integration settings; co-locating the APIs does not by itself enable synchronization.

Main Capabilities#

  • Create, retrieve, replace, and delete complete Submodels.

  • List Submodels with filters and cursor-based pagination.

  • Create, read, update, and delete individual Submodel Elements.

  • Upload, download, and delete attachments of File Submodel Elements.

  • Read normal, value-only, metadata, reference, and path representations.

  • Update existing values or metadata through the corresponding PATCH operations.

  • Query Submodels with structured conditions through POST /query/submodels.

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

  • Invoke modeled Operations synchronously or asynchronously, including value-only invocation, when they have a configured delegation target; see Operation Invocation and Delegation.

  • Optionally synchronize descriptors through Registry Integration.

  • Expose service self-description and runtime API documentation.

See Using the Submodel Repository for a walkthrough with Properties and a nested collection.

Important Behavior#

Identifiers and Element Paths#

The Submodel identifier in a request path is Base64URL-encoded. A Submodel Element is addressed by its idShortPath, such as Nameplate.SerialNumber. This path is not Base64URL-encoded. List members use zero-based indices. Identifiers in JSON bodies remain unencoded.

Replacement and Partial Updates#

PUT creates or replaces a complete resource, and its body identifier must agree with the path. Include all content that should remain. PATCH updates existing content according to the selected representation. It is not a generic JSON Patch endpoint. Use $value to change values while retaining metadata. See Representations and Partial Updates.

Operation Execution#

A stored Operation describes its variables and other model metadata. It does not contain executable code. To invoke it, configure an invocationDelegation qualifier whose value identifies a trusted, reachable HTTP(S) endpoint. See Operation Invocation and Delegation for synchronous and asynchronous invocation.

Database Schema#

The Repository uses PostgreSQL and validates the shared schema at startup. Initialize it with the BaSyx Configuration Service before starting the Repository. See Setup.

Configuration#

See General Configuration for server, database, and security settings. Registry Integration explains the component-specific integration flag, descriptor updates, and public endpoint generation.

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 Submodel Repository identifies API version V3.2.0 and declares profiles SSP-001, SSP-003, SSP-004, SSP-005, SSP-006, and SSP-007. 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 Submodel Repository exposes GET /serialization, but this operation is not implemented and returns 501 Not Implemented. For environment serialization and import, use the AAS Environment’s /serialization and /upload APIs.