Skip to content

digital-twin-registry/submodel

Step Summary
digital-twin-registry/submodel/delete Delete one submodel from the engine's submodel server.
digital-twin-registry/submodel/upload Upload sample data to the engine's submodel server, under its aspect and its id.

digital-twin-registry/submodel/delete

Delete one submodel from the engine's submodel server.

The teardown half of digital-twin-registry/submodel/upload: it removes the resource that upload's path names, on the server the engine is seeded with (engine.dtr.submodel_base_url). The status the server answered with is published as status_code, so a teardown can assert that the data was really there (200/204) rather than already gone (404) — the same distinction digital-twin-registry/provider/delete_shell_descriptor publishes.

Inputs

Parameter Type Required Default Also accepts Description
headers object no {} — Extra HTTP headers merged into the request.
timeout number no None — Request timeout in seconds; the test's default is used when omitted.
path string yes — — Path of the submodel to delete under the submodel server, relative to it — the 'path' the upload published.

Output — the value assertions and returns: read

What a delete step publishes: the status the server answered it with.

Field Type Description
status_code integer HTTP status the delete was answered with.

digital-twin-registry/submodel/upload

Upload sample data to the engine's submodel server, under its aspect and its id.

The address is the Industry Core one — <server>/<encoded semantic_id>/<submodel_id>, and <server>/<submodel_id> when the payload names no aspect. A test that gives no submodel_id gets a fresh urn:uuid:<uuid4> — exactly like the TCK does — so repeated runs never collide. One that gives an id decides where the data lands, which is what a submodel descriptor written ahead of the upload, or a second run overwriting the first, needs. The address is published in its pieces, because a test needs them apart: source_url is the server an EDC asset is created against, path is what a data plane appends to it, and backend_url is the two joined — the endpoint a submodel descriptor points at. submodel_id comes back beside them rather than only inside the path, so a descriptor, a lookup or a delete can name the submodel without cutting the id back out of a URL, and semantic_id comes back so the descriptor step is wired from this step's outputs rather than from a URN retyped beside them. The server it posts to comes from the engine configuration (engine.dtr.submodel_base_url); an engine without one cannot run this step, and says so rather than posting nowhere.

Inputs

Parameter Type Required Default Also accepts Description
headers object no {} — Extra HTTP headers merged into the request.
timeout number no None — Request timeout in seconds; the test's default is used when omitted.
data any yes — — Payload to upload, sent as JSON. Required: an upload with no payload of its own would store a placeholder the test then asserts against.
semantic_id string no None — URN of the aspect model the payload follows, e.g. 'urn:samm:io.catenax.serial_part:3.0.0#SerialPart'. Percent-encoded into the storage path when given; the submodel is stored directly under the server when omitted.
submodel_id string no None — Id to store the submodel under; a unique 'urn:uuid:' is generated when omitted.

Output — the value assertions and returns: read

Output contract of digital-twin-registry/submodel/upload.

Field Type Description
backend_url string Full backend URL the data was uploaded to — server and path together.
source_url string Base URL of the submodel server the data now lives on, without the path — the data source an EDC asset is created against.
path string Path the data landed on under the server — the percent-encoded aspect URN and the submodel id, or the submodel id alone when no aspect was given.
submodel_id string Id the submodel was stored under, as given or as generated — the 'urn:uuid:' a descriptor and a lookup name it by.
semantic_id string URN of the aspect model the uploaded payload follows — the same URN the submodel descriptor pointing at it must carry; null when none was given.
response any Backend response body, parsed as JSON when it is JSON.