Looking for REST calls to send telemetry data to Azure IoT Hub without using Azure IoT SDK - azure-iot-hub

I am working with a device that cannot include Azure IoT SDK. It can only send HTTO calls.
Is there any guide explain the simplest REST calls that allow my device send telemetry data to Azure IoT Hub?

Azure IoT Hub also offer the REST API to Send a device-to-cloud message.
The REST APIs for IoT Hub offer programmatic access to the device, messaging, and job services, as well as the resource provider, in IoT Hub. You can access messaging services from within an IoT service running in Azure, or directly over the Internet from any application that can send an HTTPS request and receive an HTTPS response.
You can use the Send Device Event for sending device-to-cloud message.
POST https://fully-qualified-iothubname.azure-devices.net/devices/{id}/messages/events?api-version=2020-03-13
You can go through the below documentations for more details.
Azure IoT Hub Device Rest API Operations and Azure IoT Hub REST API

Related

How do you Authenticate a NestJS API to a Azure Industrial IoT Plattform?

My companys Services are a little bit complicated. Thats why my company demands that i write an NestJS API that requests the Data from the Azure Industrial IoT Services(those are APIs or hubs i dont realy know) for a particular job.
My problem now is, that i dont know how to authenticate nestjs to azure. So that i can request from those Azure Services the Data.
The structure of this project looks like this:
AZURE - Services are behind<--------->NestJS-Api + Postgres<---------->AngularApp
The nestJS-Api should have authorisation to request data 24/7(the whole time)
If you want to manage Azure services such as create/delete an Azure IOT hub service, you will need to get an access token by passport.js and call Azure management API.
But if you already have an Azure IOT hub service, you want to use this service by API, and you are facing the authentication issue, you can just refer to this official guide.

Data stream between stream analytics services and WebApp service (.NET core 3.1)

I and my team are trying to build an app for data visualization and analysis in WebApp the data source is from Stream Analytics Services,
can we connect to Stream Analytics from .NET core web app, if there is any way please provide reference resources.
what is the best practice or service to use for data stream if I am using WebApp?
Or can we connect to IOTHub from WebApp, which is a better option compared with the above one?
Thank you, Ranjith
Unfortunately, Azure Stream Analytics cannot stream data directly into a .Net core web app.
Option1: You can visualize data from your Azure IoT Hub in a web application.
Option2: If you want to use Azure Stream Analytics, you need to send the data into supported outputs and then connect to the Web app.
Reference:
Visualize real-time sensor data from your Azure IoT hub in a web application
Creating a simple IoT application using a RaspberryPi+ NET Core and Azure

Is there a JAVA sdk for Iot Hub Resource?

I'm looking for CRUD Java APIs for IoT Hub. I'm specifically looking for the java equivalent for this REST API (https://learn.microsoft.com/en-us/rest/api/iothub/iothubresource).
I was able to find APIs to create/register devices and send/receive messages but wasn't able find APIs to CRUD Azure IoT hub.
The Azure IoT Hub provided different endpoints for manipulate it. These endpoints can be classified as device, service, resource provider, etc(More detail about endpoints of Azure IoT Hub, please refer Azure IoT Hub endpoints).
And Microsoft provide the SDK in different lanuages for Azure IoT hub based on the different endpoints. For example, Microsoft provides C# SDK for Azure IoT Hub for the device and service endpoints named client library(refer here). And Microsoft also provides the C# SDK for the resource provider as Management.
However there is no JAVA SDK for the resource provider for Azure IoT Hub(refer here). You can use the REST in Java for resource provider endpoint of Azure IoT hub. The REST of CRUD Azure IoT Hub, you can refer the links below:
Create Or Update
Delete
Get
In-addition, if you also want Microsoft to provide the Azure IoT resource provider Java SDK, you can vote the feedback from link below:
Azure IoT Hub management SDK for Java

Subscribing Tags in Google Cloud messaging

I'm working with Windows Azure Notification Hub and Android, testing the notifications push service through GCM. I'm using tags, pushing notifications from a Web application (back-end) integrated with Windows Azure.
The issue is: I don't know how to subscribe from an Android App to listen to those tags.
Create a Custom API with Azure Mobile Apps Server SDK. This should take the device registration Id and then do the registration with Notification Hubs. Azure Mobile Apps Server SDK wraps the Notification Hubs SDK for this purpose.
In your client, you can follow the appropriate Client SDK tutorial on push (Android is here), but use InvokeApi to invoke your custom API to do the registration instead of calling client.getPush().register().
Another good reference is the Android Client HOWTO Docs.

Javascript Client for Windows Azure Service Bus Relay service?

Is it possible to consume a WCF service via a Windows Azure Service Bus Relay in a JavaScript client?
You can setup a WebHttpRelay service that can be accessed via GET calls in JavaScript if you are using Node.
EDIT: This gives a good overview on how to setup a WCF service to support CORS. You need to enable it on your service to allow calls from a different host.