Skip to content

server: Implement the /serialization route - #622

Open
thammel wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:feature/491-serialization-endpoint
Open

server: Implement the /serialization route#622
thammel wants to merge 1 commit into
eclipse-basyx:developfrom
rwth-iat:feature/491-serialization-endpoint

Conversation

@thammel

@thammel thammel commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Previously, GET /serialization was not implemented yet.

The route now serves JSON, XML or an AASX package, as requested via the Accept header. The serialization itself is left to the adapters of the basyx-python-sdk, so no rules are duplicated here.

The specification leaves the semantics of the query parameters open in some regards, which are resolved as follows:

  • aasIds and submodelIds are optional filters, so that a plain GET on the route yields a complete export of the repository.
  • The requested objects are returned as they are, i.e. an AAS does not drag in the Submodels it references. Otherwise a client could not request an AAS on its own.
  • includeConceptDescriptions yields all ConceptDescriptions if no filter is given, so that such an export can be read back without losing objects. For a filtered request, only the ones referenced by the semanticIds of the requested objects are added, as unrelated ones would bloat the export.
  • Unknown or mistyped identifiers result in 404 Not Found, as on all other routes taking identifiers.

Since content negotiation happens before the route is matched, the AASX media type has to be accepted on all routes, which respond with JSON instead of 406 Not Acceptable. Error responses stay JSON in either case.

https://app.swaggerhub.com/apis/Plattform_i40/AssetAdministrationShellRepositoryServiceSpecification/V3.0.1_SSP-001#/Serialization%20API/GenerateSerializationByIds

Fixes #491

Previously, `GET /serialization` was not implemented yet.

The route now serves JSON, XML or an AASX package, as requested via the
`Accept` header. The serialization itself is left to the adapters of the
`basyx-python-sdk`, so no rules are duplicated here.

The specification leaves the semantics of the query parameters open in
some regards, which are resolved as follows:

- `aasIds` and `submodelIds` are optional filters, so that a plain `GET`
  on the route yields a complete export of the repository.
- The requested objects are returned as they are, i.e. an AAS does not
  drag in the Submodels it references. Otherwise a client could not
  request an AAS on its own.
- `includeConceptDescriptions` yields all ConceptDescriptions if no
  filter is given, so that such an export can be read back without
  losing objects. For a filtered request, only the ones referenced by
  the semanticIds of the requested objects are added, as unrelated ones
  would bloat the export.
- Unknown or mistyped identifiers result in `404 Not Found`, as on all
  other routes taking identifiers.

Since content negotiation happens before the route is matched, the AASX
media type has to be accepted on all routes, which respond with JSON
instead of `406 Not Acceptable`. Error responses stay JSON in either
case.

Fixes eclipse-basyx#491
@thammel
thammel force-pushed the feature/491-serialization-endpoint branch from a2b0da1 to 48bd058 Compare August 31, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant