Closed vChavezB closed 1 year ago
I have also tried sending according to my example the key ["assetAdministrationShells"][0]
from the json dictionary and I get the following error:
'{"success":false,
"isException":true,
"messages":[{"messageType":6,
"code":"400",
"text":"MalformedRequestException: Given newValue map has not the correct ModelType"}]}'
The API you linked is the registry API, used to register AssetAdministrationShells and other objects by their identifier and endpoint via Descriptor
objects. This is not equivalent to the usual AssetAdministrationShell
/ Submodel
objects as the descriptor objects don't contain all the data of an AssetAdministrationShell
or Submodel
object.
Descriptor
objects are currently not supported by the basyx-python-sdk, they'll maybe be implemented when the HTTP API component is implemented.
If you want to store the entire AssetAdministrationShell
or Submodel
object via an HTTP API you'll need an application that implements https://app.swaggerhub.com/apis/BaSyx/BaSyx_Registry_API/v1. I'm not familiar with the software currently available for that, so I can't recommend you any.
BTW: The two different interfaces (AAS and Registry) are specified in this document in Chapter 4 and 5 respectively: https://www.plattform-i40.de/IP/Redaktion/EN/Downloads/Publikation/Details_of_the_Asset_Administration_Shell_Part2_V1.html
Thanks for info. I will check the spec. part 2. My use case is that I want to dynamically add assets to the server and remove them if they are not online anymore.
If you want to store the entire AssetAdministrationShell or Submodel object via an HTTP API you'll need an application that implements https://app.swaggerhub.com/apis/BaSyx/BaSyx_Registry_API/v1.
So does this mean that the implementation of the Basyx Registry does not have this option at the moment ... or would that mean I have to implement (for example) the API PutAssetAdministrationShell
(section 4.2.3) and use the swaggerhub API from basyx as backend. Sorry if I am asking something redundant but I am still getting to know the spec.
If you want to store the entire AssetAdministrationShell or Submodel object via an HTTP API you'll need an application that implements https://app.swaggerhub.com/apis/BaSyx/BaSyx_Registry_API/v1.
So does this mean that the implementation of the Basyx Registry does not have this option at the moment ... or would that mean I have to implement (for example) the API
PutAssetAdministrationShell
(section 4.2.3) and use the swaggerhub API from basyx as backend. Sorry if I am asking something redundant but I am still getting to know the spec.
Ah sorry, I linked the wrong spec. I meant to link: https://app.swaggerhub.com/apis/BaSyx/basyx_asset_administration_shell_repository_http_rest_api/v1
Ah sorry, I linked the wrong spec. I meant to link: https://app.swaggerhub.com/apis/BaSyx/basyx_asset_administration_shell_repository_http_rest_api/v1
Are there any plans to implement this REST spec? Or would I have to implement it on my own as the author of this issue currently is?
Ah sorry, I linked the wrong spec. I meant to link: https://app.swaggerhub.com/apis/BaSyx/basyx_asset_administration_shell_repository_http_rest_api/v1
Are there any plans to implement this REST spec? Or would I have to implement it on my own as the author of this issue currently is?
There are no plans to implement the linked API, as it is specific to the BaSyx project. Once https://github.com/eclipse-basyx/basyx-python-sdk/pull/18 is finalized though, we plan to implement https://app.swaggerhub.com/apis/Plattform_i40/Entire-API-Collection/V1.0RC03 in an HTTP server and an HTTP client.
I am testing the Basyx registry component and I am having a problem when creating a new asset, saving it as AASX and sending it to the registry with the HTTP API .
As a test I have created a package from the example located here.
Afterwards I created a script to try to upload the package to the Basyx-registry but I get the following error:
The script I am using to send the asset (.aasx) is the following:
I am not sure if I am doing something wrong as I am still new to the basyx middleware and would be helpful to get any feedback at to where the problem might be located. As additional info, I tested the sample JSON payload in the Swaggerhub API website and that works fine but building the package with basxy-python-sdk and serializing for the HTTP endpoint is not working as expected.
What I have noticed is that the serialized JSON from the basyx-python-sdk API does not have a 'shortId', which I fixed by adding this key to the dictionary.