eclipse-basyx / basyx-databridge

Eclipse Public License 2.0
9 stars 13 forks source link

Custom URI for the DataBridge #271

Open ParvisSchirinov opened 7 months ago

ParvisSchirinov commented 7 months ago

Hello everyone, is there a way to set a custom endpoint for the BaSyx DataBridge?

We are currently trying to use the DataBridge without AAS to write data to a database after the transformation. When configuring via aasserver.json, the path is always extended by "/submodelElements/". We want to prevent this.

The following link for the target address is created from the configuration of the aasserver.json file below

Configuration of aasserver.json :

[

{

"uniqueId": "TemperatureSubmodel",

"submodelEndpoint": "http://host.docker.internal:3000/mypath",

"idShortPath": ""

}

]

Endpoint link created by the DataBridge:

[main] INFO org.eclipse.digitaltwin.basyx.components.databridge.aas.AASEndpoint - Proxy URL: http://host.docker.internal:3000/mypath/submodelElements/

The endpoint link we are trying to get:

http://host.docker.internal:3000/mypath

I would be very grateful for any kind of help.

FrankSchnicke commented 7 months ago

Hi, to a make sure that I understand your use case correctly: You would like to read a datasource, transform the data and write it to an arbitrary HTTP address unrelated to the AAS? While this is not the primary use case of the DataBridge, it should be possible after https://github.com/eclipse-basyx/basyx-databridge/pull/270 is merged.

ParvisSchirinov commented 6 months ago

Thank you for your reply and the reference to the ongoing development of the feature.

You have understood us correctly, a way to write data to a database via HTTP would be practical. In addition to an individual address, you would also need a header for such an an application, e.g. to supply an authorization token. Is this also being considered in the current development?

FrankSchnicke commented 6 months ago

We have supplying an authorization token on our radar but there is no concrete timeline as of today. However, after the PR is merged, feel free to extend the configuration and contribute this change. I will gladly merge your contribution.

ParvisSchirinov commented 5 months ago

Thanks for the helpful reply and the offer to contribute, but for now I will just familiarise myself with the existing functions of the DataBridge and test them. I have successfully used the branch you mentioned above for initial testing.