This code is quite poor. Sorry, I don't have much time working on this feature. However, it should be functional. I've reused the code we created for the Demo with Kasbarian. I've not tested it yet with all corner case. Error handling might be improved for sure, same for logging. This endpoint is not modular. We could easily introduce options to modify its behavior based on some options. YAGNI I've added bearer token authentification, because it's unclear how this micro service would be exposed. It's totally not required if the microservice is not exposed through an Ingress.