Skip to content

Add GetAssetAdministrationShellVersionByIdAndDate and GetSubmodelVersionByIdAndDate#540

Open
sebbader-sap wants to merge 5 commits intoIDTA-01002-3-2_workingfrom
SeBa/get-aas-and-sm-version-by-id-and-date
Open

Add GetAssetAdministrationShellVersionByIdAndDate and GetSubmodelVersionByIdAndDate#540
sebbader-sap wants to merge 5 commits intoIDTA-01002-3-2_workingfrom
SeBa/get-aas-and-sm-version-by-id-and-date

Conversation

@sebbader-sap
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Feb 27, 2026

CLA assistant check
All committers have signed the CLA.

@sebbader-sap sebbader-sap changed the base branch from main to IDTA-01002-3-2_working February 27, 2026 14:12
@sebbader-sap sebbader-sap added this to the 3.2 milestone Feb 28, 2026
Copy link
Member

@aaronzi aaronzi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The OpenAPI yaml files look good to me. But on the documentation side, I'm missing the following two things:

  1. Which field in the AAS (or underlying database) is used to find an AAS/Submodel by date? Is it createdAt or updatedAt from the new administrative-information in the metamodel or is this just a field that exists on the server but not in the AAS itself?
  2. 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
Copy link
Collaborator

@BirgitBoss BirgitBoss Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in the explanation you write: "if not date is provided" but here date is mandatory. Change to 0..1 or change explanation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I would approve

|===


==== Operation GetSubmodelVersionByIdAndDate
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#346 should be supported as well, see #346 (comment) for possible solution

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#346 goes way beyond the target of feature equivalence to the ReadDPPVersionByProductIdAndDate. If #346 is needed for v3.2, we can discuss about it, but that's then a somehow related but first of all independent feature request.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did you change to /3/1, it is /3/2 here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be /3/2

Copy link
Collaborator

@BirgitBoss BirgitBoss left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • 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

@sebbader-sap
Copy link
Contributor Author

@aaronzi

Which field in the AAS (or underlying database) is used to find an AAS/Submodel by date? Is it createdAt or updatedAt from the new administrative-information in the metamodel or is this just a field that exists on the server but not in the AAS itself?

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.

administrative-information.createdAt and administrative-information.updatedAt are only two points in time. I can't see how the realisation of a proper GetXyzVersionByIdAndDate operation can be implemented. So here the system implementers themselves have to find a solution.

@sebbader-sap
Copy link
Contributor Author

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?

Good question... I can imagine the following cases:

  1. date before AAS_creation_date: 404 seems wrong to me, as the resource itself exists right now. A query parameter should not make a difference between a 200 and a 404. So either an empty response body, or a respective error message ("400: Object did not exist at this date")?
  2. date same_or_after AAS_creation_date: Then the server has to provide the correct AAS version at that given date.
  3. date same_or_after AAS_creation_date AND date before administrative-information.updatedAt: If the server has no memory of that version, the implementation is not correct...

@BirgitBoss
Copy link
Collaborator

@aaronzi

Which field in the AAS (or underlying database) is used to find an AAS/Submodel by date? Is it createdAt or updatedAt from the new administrative-information in the metamodel or is this just a field that exists on the server but not in the AAS itself?

administrative-information.createdAt and administrative-information.updatedAt are only two points in time. I can't see how the realisation of a proper GetXyzVersionByIdAndDate operation can be implemented. So here the system implementers themselves have to find a solution.

Perhaps we need to defined that in case of the creation of a new AAs/Submodel administrative-information.createdAt and administrative-information.updatedAt shall be identical. For this API operation then only the updatedAt attribute is relevant.

@BirgitBoss
Copy link
Collaborator

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?

Good question... I can imagine the following cases:

1. date  _before_  AAS_creation_date: 404 seems wrong to me, as the resource itself exists right now. A query parameter should not make a difference between a 200 and a 404. So either an empty response body, or a respective error message ("400: Object did not exist at this date")?

2. date  _same_or_after_  AAS_creation_date: Then the server has to provide the correct AAS version at that given date.

3. date  _same_or_after_  AAS_creation_date  AND  date  _before_  `administrative-information.updatedAt`:  If the server has no memory of that version, the implementation is not correct...

I think it should be Is the most recent version from before that given date returned, at least for DPP applications: the real question is "Which DPP was valid at this point in time", so you cannot return a newer Version.

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.

5 participants