Add GetAssetAdministrationShellVersionByIdAndDate and GetSubmodelVersionByIdAndDate#540
Conversation
aaronzi
left a comment
There was a problem hiding this comment.
The OpenAPI yaml files look good to me. But on the documentation side, I'm missing the following two things:
- Which field in the AAS (or underlying database) is used to find an AAS/Submodel by date? Is it
createdAtorupdatedAtfrom the new administrative-information in the metamodel or is this just a field that exists on the server but not in the AAS itself? - What happens if an AAS/Submodel is not found based on the given date? Is the most recent version from before that given date returned or a 404?
And a general remark here. Is it expected that when a new AAS/Submodel is created or updated that the server sets the createdAt and updatedAt fields on it's own or is just the user input used no matter if the given dates make actual sense? Should access rules be used here to only allow setting the createdAt during AAS/Submodel creation and updatedAt when the AAS/Submodel are updated?
| h|Name h|Description h|Mand. h|Type h|Card. | ||
| 5+h|Input Parameter | ||
| |id |The Submodel’s unique ID |yes |link:https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1/spec-metamodel/datatypes.html#Identifier[Identifier] |1 | ||
| |date |The point in time at which the Submodel version is requested |no |link:https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.2/spec-metamodel/datatypes.html#DateTimeUtc[DateTimeUtc] |1 |
There was a problem hiding this comment.
in the explanation you write: "if not date is provided" but here date is mandatory. Change to 0..1 or change explanation
There was a problem hiding this comment.
True, makes no sense. I tend to make it mandatory on Operation level, but optional on HTTP endpoint level, GetSubmodelVersionByIdAndDate without the date parameter is exactly the GetSubmodelVersionById endpoint. Does this make sense?
| |=== | ||
|
|
||
|
|
||
| ==== Operation GetSubmodelVersionByIdAndDate |
There was a problem hiding this comment.
#346 should be supported as well, see #346 (comment) for possible solution
There was a problem hiding this comment.
depends on whether it will be realized by the same http endpoint operation
| h|Operation Name 4+e|[[GetAssetAdministrationShell]]GetAssetAdministrationShell | ||
| h|Explanation 4+a|Returns the Asset Administration Shell | ||
| h|semanticId 4+|`\https://admin-shell.io/aas/API/GetAssetAdministrationShell/3/2` | ||
| h|semanticId 4+|`\https://admin-shell.io/aas/API/GetAssetAdministrationShell/3/1` |
There was a problem hiding this comment.
why did you change to /3/1, it is /3/2 here
There was a problem hiding this comment.
Most likely a copy-paste issue...
| h|Name h|Description h|Mand. h|Type h|Card. | ||
| 5+h|Input Parameter | ||
| |id |The Asset Administration Shell’s unique ID |yes |link:https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.1/spec-metamodel/datatypes.html#Identifier[Identifier] |1 | ||
| |date |The point in time at which the Asset Administration Shell version is requested |no |link:https://industrialdigitaltwin.io/aas-specifications/IDTA-01001/v3.2/spec-metamodel/datatypes.html#DateTimeUtc[DateTimeUtc] | 1 |
There was a problem hiding this comment.
see above, same comment as for GetSubmodelVersionByIdAnddate: either date is optional with defulat "latest" or it is mandatory, then update explanation with "If no date is provided, the latest version is returned."
| [%autowidth,width="100%",cols="40%,15%,45%",options="header",] | ||
| |=== | ||
| h|Operation h|Kind of Change h|Comment | ||
| | a| GetAssetAdministrationShellVersionByIdAndDate | New a| new API-Operation for AAS Repository interface to retrieve a specific version of an AAS from a given point in time. |
There was a problem hiding this comment.
probably wrong formatting?change | a| to |
| This endpoint will return the related profile string. | ||
| It is sufficient to only expose the latest service specification identifier in case a server supports different minor versions of a service specification at the same time. | ||
| For instance, if both "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002" and "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002" are supported, the server may only include "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002" in its profiles list. | ||
| For instance, if both "https://admin-shell.io/aas/API/3/1/SubmodelRegistryServiceSpecification/SSP-002" and "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002" are supported, the server may only include "https://admin-shell.io/aas/API/3/2/SubmodelRegistryServiceSpecification/SSP-002" in its profiles list. |
BirgitBoss
left a comment
There was a problem hiding this comment.
- see comments with respect to also support also #346
- versioning of operation IDs etc: should be /3/2, not /3/1
- Same operation as for repository also needed for AAS and SubmodelDescriptors
This is intentionally, because nobody right now knows what are business data attributes and what shall be seen as technical timestamps. If you would ask me as a developer, I'd use my DB-internal createdAt and changedAt timestamps. But of course not every underlying DB schema has them.
|
Good question... I can imagine the following cases:
|
Perhaps we need to defined that in case of the creation of a new AAs/Submodel |
I think it should be |
No description provided.