Skip to content

Submodel Repository

Kevalkumar edited this page Jan 23, 2026 · 1 revision

Purpose

The Submodel Repository API provides read access to submodels and submodel elements, following the AAS/IDTA patterns. It is the main entry point for clients that want values for a specific submodel.

Main Endpoints

The actual route attributes are defined in the controllers, but conceptually they follow the IDTA standard and look like:

Get Submodel

  • Method: GET
  • Route: /submodels/{submodelId}
  • Route parameters:
    • submodelIdentifier (string, required) – Base64-encoded submodel identifier.
  • Request body: None
  • Responses:
    • 200 OK – Returns a full AAS Submodel with all populated elements.

Get SubmodelElement

  • Method: GET
  • Route: /submodels/{submodelId}/submodel-elements/{idShortPath}
  • Route parameters:
    • submodelIdentifier (string, required) – Base64-encoded submodel identifier.
    • idShortPath (string, required) – idShort-based path of the target SubmodelElement.
  • Request body: None
  • Responses:
    • 200 OK – Returns a single AAS SubmodelElement (e.g. Property, Range, Collection) identified by idShortPath.

These endpoints:

  • Accept IDs compatible with AAS ID formats.
  • Return JSON representations aligned with AAS 3.0 / IDTA models.

Visit this page to see the supported submodel elements and response. - Handling SubmodelElements

Template Requirements (from Template Repository)

For DataEngine to work correctly, the template submodels in the template repository must:

  • Follow the AAS / IDTA representation of submodels.
  • Define semantic IDs for all relevant submodel elements.
  • Provide correct idShort values matching what UI / clients expect.
  • Not contain concrete values – they are templates only.

DataEngine expects at least:

  • A template Submodel with:
    • idShort = logical name (e.g. Nameplate, Reliability, ContactInformation).
    • semanticId = template semantic reference (IDTA template ID).
  • For each submodel element:
    • A valid semanticId which the Plugin understands and can map to data fields.

AAS Template Repository

For submodels, the AAS Template Repository stores submodel templates :

DataEngine never hardcodes templates; instead it always resolves and fetches them from this repository using a templateId.

Mapping Templates by Submodel ID

When a client calls GET /submodels/{submodelId}, DataEngine must efficiently find the right templateId:

  1. It reads mapping rules from configuration (for example appsettings.json).
  2. Each rule links a templateId to one or more regex patterns that match submodel IDs:
[
  {
    "templateId": "nameplateTemplateId",
    "pattern": ["Nameplate$", "DigitalNameplate$"]
  },
  {
    "templateId": "contactInfoTemplateId",
    "pattern": ["ContactInformation$", "MoreContact$"]
  }
]
  1. For an incoming submodelId, DataEngine selects the first rule whose pattern regex matches and uses the corresponding templateId.
  2. With that templateId, it calls the template repository, for example:
    • GET /submodels/{templateId} – to fetch the submodel template JSON.

If no rule matches the provided submodelId, DataEngine throws a NotFound error (for example a NotFoundException) to indicate that no template is configured for that submodel.

When mappings change, the engine must be restarted or the configuration reloaded so that new template rules are applied.

Template Repository Endpoints Used

Conceptually, DataEngine needs endpoints (from template environment) such as:

  • GET /submodels/{templateSubmodelId} – to get the actual template submodel structure.

The exact URLs depend on deployment but are configured via AasEnvironment settings in DataEngine’s configuration.


Clone this wiki locally