c0c0n3 / kitt4sme.live

On a mission to bring AI to the shop floor: https://kitt4sme.eu/
MIT License
1 stars 27 forks source link

[Platform Configuration] Integration with Datasheets #393

Closed kostasgrevenitis closed 8 months ago

vcutrona commented 8 months ago

Today @karikolehmainen mentioned an API request to fetch the datasheets to be exploited in PC. However, by checking the Datasheets repository (here: https://github.com/Advanced-Dataspaces-VTT/KITT4SME-Digital-Datasheets/tree/search_fix_kari/backend) I can't see the relevant request. There is a request to search for datasheets (by inputting some text), but we need a request to fetch all the available datasheets, possibly filtered by their availability in RAMP.

Postman collections available in the repo seems to be not updated.

karikolehmainen commented 8 months ago

Hi @vcutrona,

the relevant backend endpoint is /datasheets with GET method and validation defined in query. There is currently tested implmentation in development branch. I also documented the API using Swagger (or OpenAPI), but online execution didn't work on my localhost even if the actual CURL command did... But we will deploy this in the cloud in datasheets-dev project so it won't interfere with current deployment of the tool and move it to production once it has been tested.

karikolehmainen commented 8 months ago

Dasheets backend version 1.0.2 addresses this issue

vcutrona commented 8 months ago

Platform configurator v0.7.0 is online. This version relies on Datasheets API, removing the dependency from the datasheets database in postgres. I tested the PC by completing a questionnaire in AQ (my sid is e142b0c1-f0da-4818-b8c1-7c7b0ff10fee); at the end, I've been redirected to PC, and then to RAMP with service request=33cf9dab-9937-468b-a40c-bfbb3d6785e5 (now waiting for Service Negotiations) I also tested PC manually from swagger (request /kits using the same sid as above). Here the curl to test it yourself:

curl -X 'GET' \
  'https://kitt4sme.collab-cloud.eu/platform-configurator/kits?sid=e142b0c1-f0da-4818-b8c1-7c7b0ff10fee' \
  -H 'accept: application/json' | python3 -m json.tool