Visual Studio 2019 extension for building REST APIs exposing IoT Hub features

Iron Contributor

Hi all,

 

If you need to write REST APIs (.Net Core) to expose or complete IoT Hub APIs or create a facade, this extension will help you to save a few minutes.

 

clipboard_image_0.png

 

It creates a ready to use solution in a few seconds and allows you to focus on important code (business logic, etc).

 

The created API includes other features like:

 - API versioning

 - Automatic OpenAPI generation (versioned according to API versions)

 - separated layers

 - minimalistic solution with required dependencies only

 

The only thing you need to do is to set the IoT Hub connection in the configuration file (appsettings.json).

 

More details here.

3 Replies
Hi @jonmikeli
It seems a good tool indeed.
But why are you creating a REST API to expose IoT Hub?
Do you know the current IoT Hub supported endpoints which already expose either a HTTPS REST API or SDKs to manage, receive and send messages?
PTAL: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-endpoints

Hi @saramonteiro ,

Indeed, Azure IoT Hub already exposes its endpoints but these endpoints are quite "technical".

 

The idea of the proposed API solution template is to build a kind of "facade" allowing to add logic (business logic, technical logic, whatever) on top of the exposed endpoints by default. Most of the IoT projects I have been involved in needed it in a way or another. So, the idea was to make my life easier and by the way, share it with other developers who could face the same need :).

 

In other words, the extension creates a REST API solution template allowing to add logic before calling the technical endpoints exposed by Azure IoT Hub.

 

Let me know if it's clearer :).

Perfect clear!
Thanks for sharing the tool and pointing it out. =)