Reputation: 138
I want to create a device in the IoT Hub when I add a device in my application.
I'm looking for REST Endpoints available for performing operation. Or any SDK available to do this.
Upvotes: 3
Views: 2715
Reputation: 8265
Have a look at the following docs:
Service - Create Or Update Device
example of the creating DeviceX with auto-generated symmetric keys:
PUT https://myIoTHubName.azure-devices.net/devices/DeviceX?api-version=2018-06-30
headers:
Authorization: sasToken(see the above link)
payload:
{
"deviceId": "DeviceX"
}
Upvotes: 3