Azure IoT Central - API Reference
This section provides detailed reference information for the Azure IoT Central APIs, enabling you to programmatically interact with your IoT solutions.
Overview
Azure IoT Central is a fully managed IoT application platform that enables you to easily connect, monitor, and manage your IoT devices. The REST APIs allow for deep integration and automation of your IoT Central applications.
Key API Categories
Application Management
Manage your IoT Central applications, including creation, deletion, and configuration.
/api/applications
: Operations for managing IoT Central applications./api/settings
: Retrieve and update application-level settings.
Device Management
Interact with devices registered in your IoT Central application.
/api/devices
: List, retrieve, create, and delete devices./api/deviceTemplates
: Manage device templates./api/deviceGroups
: Manage device groups.
Data and Telemetry
Access telemetry data and property updates from your devices.
/api/telemetry
: Query historical telemetry data./api/properties
: Access reported properties.
Jobs and Orchestration
Execute actions on devices or groups of devices.
/api/jobs
: Create and manage jobs for device operations.
Rules and Analytics
Manage alerts and access analytical insights.
/api/rules
: Manage alert rules./api/dashboards
: Access dashboard configurations.
/api/applications
Provides endpoints for managing your IoT Central applications.
Endpoints:
GET /api/applications
: Lists all available IoT Central applications for the authenticated user.POST /api/applications
: Creates a new IoT Central application.GET /api/applications/{applicationId}
: Retrieves details of a specific application.DELETE /api/applications/{applicationId}
: Deletes a specific IoT Central application.
Request Body (POST):
{
"displayName": "My New IoT App",
"subdomain": "mynewapp",
"template": "basic_iot_app",
"region": "eastus"
}
/api/devices
Enables management of devices within an IoT Central application.
Endpoints:
GET /api/devices
: Lists all devices in the application. Supports filtering by device template and device group.POST /api/devices
: Creates a new device.GET /api/devices/{deviceId}
: Retrieves details of a specific device.PUT /api/devices/{deviceId}
: Updates properties of a device.DELETE /api/devices/{deviceId}
: Deletes a specific device.
Request Body (POST):
{
"displayName": "Smart Thermostat 001",
"template": "dtmi:yourcompany:thermostat;1",
"simulated": false
}
/api/telemetry
Query historical telemetry data sent by devices.
Endpoints:
GET /api/telemetry/query
: Executes a query to retrieve telemetry data.
Query Parameters:
deviceId
: The ID of the device to query.interfaceId
: The interface ID for the telemetry.name
: The name of the telemetry field.from
: Start timestamp (ISO 8601 format).to
: End timestamp (ISO 8601 format).$filter
: OData filter expression for advanced filtering.$top
: Number of results to return.
Example Query:
GET /api/telemetry/query?deviceId=thermostat001&interfaceId=dtmi:yourcompany:thermostat;1&name=temperature&from=2023-01-01T00:00:00Z&to=2023-01-01T12:00:00Z
/api/jobs
Initiate and manage operations (jobs) to be performed on devices.
Endpoints:
POST /api/jobs
: Creates a new job.GET /api/jobs/{jobId}
: Retrieves the status of a specific job.
Request Body (POST):
{
"name": "Reboot Devices",
"description": "Rebooting all devices in the 'HVAC' group",
"target": {
"type": "deviceGroup",
"deviceGroupId": "hvac-group-id"
},
"action": {
"type": "command",
"command": {
"interfaceId": "dtmi:yourcompany:devicecontrol;1",
"name": "reboot"
}
}
}
For a comprehensive list of all available API endpoints and their detailed specifications, please refer to the official Azure IoT Central REST API documentation.