{ "swagger": "2.0", "info": { "version": "2016-02-03", "title": "iotHubClient", "description": "Use this API to manage the IoT hubs in your Azure subscription." }, "host": "management.azure.com", "schemes": [ "https" ], "paths": { "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}": { "get": { "tags": [ "GET" ], "summary": "Get the non-security related metadata of an IoT hub.", "description": "Get the non-security related metadata of an IoT hub.", "operationId": "IotHubResource_Get", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "The body contains all the non-security properties of the IoT hub. Security-related properties are set to null.", "schema": { "$ref": "#/definitions/IotHubDescription" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false }, "put": { "tags": [ "PUT" ], "summary": "Create or update the metadata of an IoT hub.", "description": "Create or update the metadata of an Iot hub. The usual pattern to modify a property is to retrieve the IoT hub metadata and security metadata, and then combine them with the modified values in a new body to update the IoT hub. If certain properties are missing in the JSON, updating IoT Hub may cause these values to fallback to default, which may lead to unexpected behavior.", "operationId": "IotHubResource_CreateOrUpdate", "x-ms-long-running-operation": true, "consumes": [ "application/json", "text/json" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains the IoT hub.", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub to create or update.", "required": true, "type": "string" }, { "name": "iotHubDescription", "in": "body", "description": "The IoT hub metadata and security metadata.", "required": true, "schema": { "$ref": "#/definitions/IotHubDescription" } } ], "responses": { "201": { "description": "This is a long running operation. The operation returns a 201 if the validation is complete. The response includes an Azure-AsyncOperation header that contains a status URL. Clients are expected to poll the status URL for the status of the operation. If successful, the operation returns HTTP status code of 201 (OK).", "schema": { "$ref": "#/definitions/IotHubDescription" } }, "200": { "description": "This is returned as a response to the status polling request for the create or update operation. The body contains the resource representation that indicates a transitional provisioning state.", "schema": { "$ref": "#/definitions/IotHubDescription" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false }, "delete": { "tags": [ "DELETE" ], "summary": "Delete an IoT hub.", "description": "Delete an IoT hub.", "operationId": "IotHubResource_Delete", "x-ms-long-running-operation": true, "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub to delete.", "required": true, "type": "string" } ], "responses": { "202": { "description": "The Iot Hub resource provider always returns a 202 Accepted status code with valid Location and Retry-After headers. The resource provider also sets the Azure-AsyncOperation header with a URL that points to the operation resource for this operation. Subsequent GET attempts on the resource after a DELETE operation return a resource representation that indicates a transitional provisioning state (such as Terminating). To retrieve the status of the operation, a client can either poll the URL returned in the Location header after the Retry-After interval, get the IoT Hub service status directly, or query the operation resource.", "schema": { "$ref": "#/definitions/IotHubDescription" } }, "200": { "description": "This is returned as a response to the status polling request for the delete operation. The body contains the resource representation that indicates a transitional provisioning state.", "schema": { "$ref": "#/definitions/IotHubDescription" } }, "204": { "description": "Once the long running delete operation completes successfully, a 204 No Content status code is returned when the status polling request finds the Iot hub metadata in the service and the status of the delete operation is set to a completed state." }, "404": { "description": "After the long running delete operation completes successfully, a 404 Not Found is returned when the status polling request no longer finds the Iot hub metadata in the service.", "schema": { "$ref": "#/definitions/ErrorDetails" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/IotHubs": { "get": { "tags": [ "GET" ], "summary": "Get all the IoT hubs in a subscription.", "description": "Get all the IoT hubs in a subscription.", "operationId": "IotHubResource_ListBySubscription", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the subscription.", "schema": { "$ref": "#/definitions/IotHubDescriptionListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs": { "get": { "tags": [ "GET" ], "summary": "Get all the IoT hubs in a resource group.", "description": "Get all the IoT hubs in a resource group.", "operationId": "IotHubResource_ListByResourceGroup", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "in": "path", "description": "The name of the resource group that contains the IoT hubs.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized array of the metadata from all the IoT hubs in the resource group.", "schema": { "$ref": "#/definitions/IotHubDescriptionListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubStats": { "get": { "tags": [ "GET" ], "summary": "Get the statistics from an IoT hub.", "description": "Get the statistics from an IoT hub.", "operationId": "IotHubResource_GetStats", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains JSON-serialized statistics from the identity registry in the IoT hub.", "schema": { "$ref": "#/definitions/RegistryStatistics" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/skus": { "get": { "tags": [ "GET" ], "summary": "Get the list of valid SKUs for an IoT hub.", "description": "Get the list of valid SKUs for an IoT hub.", "operationId": "IotHubResource_GetValidSkus", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized array of the valid SKUs for this IoT hub.", "schema": { "$ref": "#/definitions/IotHubSkuDescriptionListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups": { "get": { "tags": [ "GET" ], "summary": "Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.", "description": "Get a list of the consumer groups in the Event Hub-compatible device-to-cloud endpoint in an IoT hub.", "operationId": "IotHubResource_ListEventHubConsumerGroups", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "eventHubEndpointName", "in": "path", "description": "The name of the Event Hub-compatible endpoint.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized list of the consumer groups in the Event Hub-compatible endpoint in this IoT hub", "schema": { "$ref": "#/definitions/EventHubConsumerGroupsListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/eventHubEndpoints/{eventHubEndpointName}/ConsumerGroups/{name}": { "get": { "tags": [ "GET" ], "summary": "Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.", "description": "Get a consumer group from the Event Hub-compatible device-to-cloud endpoint for an IoT hub.", "operationId": "IotHubResource_GetEventHubConsumerGroup", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "eventHubEndpointName", "in": "path", "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", "required": true, "type": "string" }, { "name": "name", "in": "path", "description": "The name of the consumer group to retrieve.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized consumer group.", "schema": { "$ref": "#/definitions/EventHubConsumerGroupInfo" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false }, "put": { "tags": [ "PUT" ], "summary": "Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.", "description": "Add a consumer group to an Event Hub-compatible endpoint in an IoT hub.", "operationId": "IotHubResource_CreateEventHubConsumerGroup", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "eventHubEndpointName", "in": "path", "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", "required": true, "type": "string" }, { "name": "name", "in": "path", "description": "The name of the consumer group to add.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation.", "schema": { "$ref": "#/definitions/EventHubConsumerGroupInfo" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false }, "delete": { "tags": [ "DELETE" ], "summary": "Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.", "description": "Delete a consumer group from an Event Hub-compatible endpoint in an IoT hub.", "operationId": "IotHubResource_DeleteEventHubConsumerGroup", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "eventHubEndpointName", "in": "path", "description": "The name of the Event Hub-compatible endpoint in the IoT hub.", "required": true, "type": "string" }, { "name": "name", "in": "path", "description": "The name of the consumer group to delete.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation." }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs": { "get": { "tags": [ "GET" ], "summary": "Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", "description": "Get a list of all the jobs in an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", "operationId": "IotHubResource_ListJobs", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The response contains a JSON-serialized array of all the jobs in the IoT hub.", "schema": { "$ref": "#/definitions/JobResponseListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/jobs/{jobId}": { "get": { "tags": [ "GET" ], "summary": "Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", "description": "Get the details of a job from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry.", "operationId": "IotHubResource_GetJob", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "jobId", "in": "path", "description": "The job identifier.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The response contains a JSON-serialized description of the job in the IoT hub.", "schema": { "$ref": "#/definitions/JobResponse" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/quotaMetrics": { "get": { "tags": [ "GET" ], "summary": "Get the quota metrics for an IoT hub.", "description": "Get the quota metrics for an IoT hub.", "operationId": "IotHubResource_GetQuotaMetrics", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The response contains a JSON-serialized array of the quota metrics for the IoT hub.", "schema": { "$ref": "#/definitions/IotHubQuotaMetricInfoListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/providers/Microsoft.Devices/checkNameAvailability": { "post": { "tags": [ "POST" ], "summary": "Check if an IoT hub name is available.", "description": "Check if an IoT hub name is available.", "operationId": "IotHubResource_CheckNameAvailability", "consumes": [ "application/json", "text/json" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "operationInputs", "in": "body", "description": "Set the name parameter in the OperationInputs structure to the name of the IoT hub to check.", "required": true, "schema": { "$ref": "#/definitions/OperationInputs" } } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized response that specifies whether the IoT hub name is available. If the name is not available, the body contains the reason.", "schema": { "$ref": "#/definitions/IotHubNameAvailabilityInfo" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/listkeys": { "post": { "tags": [ "POST" ], "summary": "Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", "description": "Get the security metadata for an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", "operationId": "IotHubResource_ListKeys", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized array of shared access policies, including keys, that you can use to access the IoT hub endpoints.", "schema": { "$ref": "#/definitions/SharedAccessSignatureAuthorizationRuleListResult" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false, "x-ms-pageable": { "nextLinkName": "nextLink" } } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/IotHubKeys/{keyName}/listkeys": { "post": { "tags": [ "POST" ], "summary": "Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", "description": "Get a shared access policy by name from an IoT hub. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-security.", "operationId": "IotHubResource_GetKeysForKeyName", "consumes": [], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "keyName", "in": "path", "description": "The name of the shared access policy.", "required": true, "type": "string" } ], "responses": { "200": { "description": "This is a synchronous operation. The body contains a JSON-serialized shared access policy, including keys, that you can use to access one or more IoT hub endpoints.", "schema": { "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices": { "post": { "tags": [ "POST" ], "summary": "Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", "description": "Exports all the device identities in the IoT hub identity registry to an Azure Storage blob container. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", "operationId": "IotHubResource_ExportDevices", "consumes": [ "application/json", "text/json" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "exportDevicesParameters", "in": "body", "description": "The parameters that specify the export devices operation.", "required": true, "schema": { "$ref": "#/definitions/ExportDevicesRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/JobResponse" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } }, "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/importDevices": { "post": { "tags": [ "POST" ], "summary": "Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", "description": "Import, update, or delete device identities in the IoT hub identity registry from a blob. For more information, see: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-identity-registry#import-and-export-device-identities.", "operationId": "IotHubResource_ImportDevices", "consumes": [ "application/json", "text/json" ], "produces": [ "application/json", "text/json" ], "parameters": [ { "$ref": "#/parameters/api-version" }, { "$ref": "#/parameters/subscriptionId" }, { "name": "resourceGroupName", "description": "The name of the resource group that contains the IoT hub.", "in": "path", "required": true, "type": "string" }, { "name": "resourceName", "in": "path", "description": "The name of the IoT hub.", "required": true, "type": "string" }, { "name": "importDevicesParameters", "in": "body", "description": "The parameters that specify the import devices operation.", "required": true, "schema": { "$ref": "#/definitions/ImportDevicesRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/JobResponse" } }, "default": { "description": "DefaultErrorResponse", "schema": { "$ref": "#/definitions/ErrorDetails" } } }, "deprecated": false } } }, "definitions": { "SharedAccessSignatureAuthorizationRule": { "description": "The properties of an IoT hub shared access policy.", "type": "object", "properties": { "keyName": { "description": "The name of the shared access policy.", "type": "string" }, "primaryKey": { "description": "The primary key.", "type": "string" }, "secondaryKey": { "description": "The secondary key.", "type": "string" }, "rights": { "description": "The permissions assigned to the shared access policy.", "enum": [ "RegistryRead", "RegistryWrite", "ServiceConnect", "DeviceConnect", "RegistryRead, RegistryWrite", "RegistryRead, ServiceConnect", "RegistryRead, DeviceConnect", "RegistryWrite, ServiceConnect", "RegistryWrite, DeviceConnect", "ServiceConnect, DeviceConnect", "RegistryRead, RegistryWrite, ServiceConnect", "RegistryRead, RegistryWrite, DeviceConnect", "RegistryRead, ServiceConnect, DeviceConnect", "RegistryWrite, ServiceConnect, DeviceConnect", "RegistryRead, RegistryWrite, ServiceConnect, DeviceConnect" ], "type": "string", "x-ms-enum": { "name": "AccessRights", "modelAsString": false } } }, "required": [ "keyName", "rights" ] }, "IotHubProperties": { "description": "The properties of an IoT hub.", "type": "object", "properties": { "authorizationPolicies": { "description": "The shared access policies you can use to secure a connection to the IoT hub.", "type": "array", "items": { "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" } }, "ipFilterRules": { "description": "The IP filter rules.", "type": "array", "items": { "$ref": "#/definitions/IpFilterRule" } }, "provisioningState": { "description": "The provisioning state.", "type": "string", "readOnly": true }, "hostName": { "description": "The name of the host.", "type": "string", "readOnly": true }, "eventHubEndpoints": { "description": "The Event Hub-compatible endpoint properties. The possible keys to this dictionary are events and operationsMonitoringEvents. Both of these keys have to be present in the dictionary while making create or update calls for the IoT hub.", "type": "object", "additionalProperties": { "$ref": "#/definitions/EventHubProperties" } }, "storageEndpoints": { "description": "The list of Azure Storage endpoints where you can upload files. Currently you can configure only one Azure Storage account and that MUST have its key as $default. Specifying more than one storage account causes an error to be thrown. Not specifying a value for this property when the enableFileUploadNotifications property is set to True, causes an error to be thrown.", "type": "object", "additionalProperties": { "$ref": "#/definitions/StorageEndpointProperties" } }, "messagingEndpoints": { "description": "The messaging endpoint properties for the file upload notification queue.", "type": "object", "additionalProperties": { "$ref": "#/definitions/MessagingEndpointProperties" } }, "enableFileUploadNotifications": { "description": "If True, file upload notifications are enabled.", "type": "boolean" }, "cloudToDevice": { "$ref": "#/definitions/CloudToDeviceProperties" }, "comments": { "description": "Comments.", "type": "string" }, "operationsMonitoringProperties": { "$ref": "#/definitions/OperationsMonitoringProperties" }, "features": { "description": "The capabilities and features enabled for the IoT hub.", "enum": [ "None", "DeviceManagement" ], "type": "string", "x-ms-enum": { "name": "Capabilities", "modelAsString": true } } } }, "IotHubSkuInfo": { "description": "Information about the SKU of the IoT hub.", "type": "object", "properties": { "name": { "description": "The name of the SKU.", "enum": [ "F1", "S1", "S2", "S3" ], "type": "string", "x-ms-enum": { "name": "IotHubSku", "modelAsString": true } }, "tier": { "description": "The billing tier for the IoT hub.", "enum": [ "Free", "Standard" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "IotHubSkuTier", "modelAsString": false } }, "capacity": { "format": "int64", "description": "The number of provisioned IoT Hub units. See: https://docs.microsoft.com/azure/azure-subscription-service-limits#iot-hub-limits.", "type": "integer" } }, "required": [ "name", "capacity" ] }, "EventHubProperties": { "description": "The properties of the provisioned Event Hub-compatible endpoint used by the IoT hub.", "type": "object", "properties": { "retentionTimeInDays": { "format": "int64", "description": "The retention time for device-to-cloud messages in days. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages", "type": "integer" }, "partitionCount": { "format": "int32", "description": "The number of partitions for receiving device-to-cloud messages in the Event Hub-compatible endpoint. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#device-to-cloud-messages.", "type": "integer" }, "partitionIds": { "description": "The partition ids in the Event Hub-compatible endpoint.", "readOnly": true, "type": "array", "items": { "type": "string" } }, "path": { "description": "The Event Hub-compatible name.", "type": "string", "readOnly": true }, "endpoint": { "description": "The Event Hub-compatible endpoint.", "type": "string", "readOnly": true } } }, "StorageEndpointProperties": { "description": "The properties of the Azure Storage endpoint for file upload.", "type": "object", "properties": { "sasTtlAsIso8601": { "description": "The period of time for which the SAS URI generated by IoT Hub for file upload is valid. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-file-upload#file-upload-notification-configuration-options.", "type": "string", "format": "duration" }, "connectionString": { "description": "The connection string for the Azure Storage account to which files are uploaded.", "type": "string" }, "containerName": { "description": "The name of the root container where you upload files. The container need not exist but should be creatable using the connectionString specified.", "type": "string" } }, "required": [ "connectionString", "containerName" ] }, "MessagingEndpointProperties": { "description": "The properties of the messaging endpoints used by this IoT hub.", "type": "object", "properties": { "lockDurationAsIso8601": { "description": "The lock duration. See: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-file-upload.", "type": "string", "format": "duration" }, "ttlAsIso8601": { "description": "The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-file-upload.", "type": "string", "format": "duration" }, "maxDeliveryCount": { "description": "The number of times the IoT hub attempts to deliver a message. See: https://docs.microsoft.com/en-us/azure/iot-hub/iot-hub-devguide-file-upload.", "format": "int32", "type": "integer", "minimum": 1, "maximum": 100 } } }, "CloudToDeviceProperties": { "description": "The IoT hub cloud-to-device messaging properties.", "type": "object", "properties": { "maxDeliveryCount": { "description": "The max delivery count for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", "format": "int32", "type": "integer", "minimum": 1, "maximum": 100 }, "defaultTtlAsIso8601": { "description": "The default time to live for cloud-to-device messages in the device queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", "type": "string", "format": "duration" }, "feedback": { "$ref": "#/definitions/FeedbackProperties" } } }, "OperationsMonitoringProperties": { "description": "The operations monitoring properties for the IoT hub. The possible keys to the dictionary are Connections, DeviceTelemetry, C2DCommands, DeviceIdentityOperations, FileUploadOperations.", "type": "object", "properties": { "events": { "type": "object", "additionalProperties": { "enum": [ "None", "Error", "Information", "Error, Information" ], "description": "The operations monitoring level.", "type": "string", "x-ms-enum": { "name": "OperationMonitoringLevel", "modelAsString": true } } } } }, "IpFilterRule": { "description": "The IP filter rules for the IoT hub.", "type": "object", "properties": { "filterName": { "description": "The name of the IP filter rule.", "type": "string" }, "action": { "description": "The desired action for requests captured by this rule.", "enum": [ "Accept", "Reject" ], "type": "string", "x-ms-enum": { "name": "IpFilterActionType", "modelAsString": false } }, "ipMask": { "description": "A string that contains the IP address range in CIDR notation for the rule.", "type": "string" } }, "required": [ "filterName", "action", "ipMask" ] }, "FeedbackProperties": { "description": "The properties of the feedback queue for cloud-to-device messages.", "type": "object", "properties": { "lockDurationAsIso8601": { "description": "The lock duration for the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", "type": "string", "format": "duration" }, "ttlAsIso8601": { "description": "The period of time for which a message is available to consume before it is expired by the IoT hub. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", "type": "string", "format": "duration" }, "maxDeliveryCount": { "description": "The number of times the IoT hub attempts to deliver a message on the feedback queue. See: https://docs.microsoft.com/azure/iot-hub/iot-hub-devguide-messaging#cloud-to-device-messages.", "format": "int32", "type": "integer", "minimum": 1, "maximum": 100 } } }, "IotHubDescription": { "description": "The description of the IoT hub.", "type": "object", "properties": { "subscriptionid": { "description": "The subscription identifier.", "type": "string" }, "resourcegroup": { "description": "The name of the resource group that contains the IoT hub. A resource group name uniquely identifies the resource group within the subscription.", "type": "string" }, "etag": { "description": "The Etag field is *not* required. If it is provided in the response body, it must also be provided as a header per the normal ETag convention.", "type": "string" }, "properties": { "$ref": "#/definitions/IotHubProperties" }, "sku": { "$ref": "#/definitions/IotHubSkuInfo" } }, "allOf": [ { "$ref": "#/definitions/Resource" } ], "required": [ "subscriptionid", "resourcegroup", "sku" ] }, "Resource": { "description": "The common properties of an Azure resource.", "properties": { "id": { "readOnly": true, "type": "string", "description": "The resource identifier." }, "name": { "readOnly": true, "type": "string", "description": "The resource name.", "pattern": "^(?![0-9]+$)(?!-)[a-zA-Z0-9-]{2,49}[a-zA-Z0-9]$" }, "type": { "readOnly": true, "type": "string", "description": "The resource type." }, "location": { "type": "string", "description": "The resource location." }, "tags": { "type": "object", "additionalProperties": { "type": "string" }, "description": "The resource tags." } }, "x-ms-azure-resource": true, "required": [ "location" ] }, "SharedAccessSignatureAuthorizationRuleListResult": { "description": "The list of shared access policies with a next link.", "type": "object", "properties": { "value": { "description": "The list of shared access policies.", "type": "array", "items": { "$ref": "#/definitions/SharedAccessSignatureAuthorizationRule" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "ErrorDetails": { "description": "Error details.", "type": "object", "properties": { "Code": { "description": "The error code.", "type": "string", "readOnly": true }, "HttpStatusCode": { "description": "The HTTP status code.", "type": "string", "readOnly": true }, "Message": { "description": "The error message.", "type": "string", "readOnly": true }, "Details": { "description": "The error details.", "type": "string", "readOnly": true } } }, "IotHubQuotaMetricInfoListResult": { "description": "The JSON-serialized array of IotHubQuotaMetricInfo objects with a next link.", "type": "object", "properties": { "value": { "description": "The array of quota metrics objects.", "type": "array", "items": { "$ref": "#/definitions/IotHubQuotaMetricInfo" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "RegistryStatistics": { "description": "Identity registry statistics.", "type": "object", "properties": { "totalDeviceCount": { "format": "int64", "description": "The total count of devices in the identity registry.", "type": "integer", "readOnly": true }, "enabledDeviceCount": { "format": "int64", "description": "The count of enabled devices in the identity registry.", "type": "integer", "readOnly": true }, "disabledDeviceCount": { "format": "int64", "description": "The count of disabled devices in the identity registry.", "type": "integer", "readOnly": true } } }, "JobResponseListResult": { "description": "The JSON-serialized array of JobResponse objects with a next link.", "type": "object", "properties": { "value": { "description": "The array of JobResponse objects.", "type": "array", "items": { "$ref": "#/definitions/JobResponse" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "IotHubSkuDescription": { "description": "SKU properties.", "type": "object", "properties": { "resourceType": { "description": "The type of the resource.", "type": "string", "readOnly": true }, "sku": { "$ref": "#/definitions/IotHubSkuInfo" }, "capacity": { "$ref": "#/definitions/IotHubCapacity" } }, "required": [ "sku", "capacity" ] }, "IotHubCapacity": { "description": "IoT Hub capacity information.", "type": "object", "properties": { "minimum": { "format": "int64", "description": "The minimum number of units.", "type": "integer", "minimum": 1, "maximum": 1, "readOnly": true }, "maximum": { "format": "int64", "description": "The maximum number of units.", "type": "integer", "readOnly": true }, "default": { "format": "int64", "description": "The default number of units.", "type": "integer", "readOnly": true }, "scaleType": { "description": "The type of the scaling enabled.", "enum": [ "Automatic", "Manual", "None" ], "readOnly": true, "type": "string", "x-ms-enum": { "name": "IotHubScaleType", "modelAsString": false } } } }, "EventHubConsumerGroupsListResult": { "description": "The JSON-serialized array of Event Hub-compatible consumer group names with a next link.", "type": "object", "properties": { "value": { "description": "The array of Event Hub-compatible consumer group names.", "type": "array", "items": { "type": "string" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "EventHubConsumerGroupInfo": { "description": "The properties of the EventHubConsumerGroupInfo object.", "type": "object", "properties": { "tags": { "description": "The tags.", "type": "object", "additionalProperties": { "type": "string" } }, "id": { "description": "The Event Hub-compatible consumer group identifier.", "type": "string" }, "name": { "description": "The Event Hub-compatible consumer group name.", "type": "string" } } }, "IotHubSkuDescriptionListResult": { "description": "The JSON-serialized array of IotHubSkuDescription objects with a next link.", "type": "object", "properties": { "value": { "description": "The array of IotHubSkuDescription.", "type": "array", "items": { "$ref": "#/definitions/IotHubSkuDescription" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "JobResponse": { "description": "The properties of the Job Response object.", "type": "object", "properties": { "jobId": { "description": "The job identifier.", "type": "string", "readOnly": true }, "startTimeUtc": { "format": "date-time-rfc1123", "description": "The start time of the job.", "type": "string", "readOnly": true }, "endTimeUtc": { "format": "date-time-rfc1123", "description": "The time the job stopped processing.", "type": "string", "readOnly": true }, "type": { "description": "The type of the job.", "enum": [ "unknown", "export", "import", "backup", "readDeviceProperties", "writeDeviceProperties", "updateDeviceConfiguration", "rebootDevice", "factoryResetDevice", "firmwareUpdate" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "JobType", "modelAsString": true } }, "status": { "description": "The status of the job.", "enum": [ "unknown", "enqueued", "running", "completed", "failed", "cancelled" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "JobStatus", "modelAsString": false } }, "failureReason": { "description": "If status == failed, this string containing the reason for the failure.", "type": "string", "readOnly": true }, "statusMessage": { "description": "The status message for the job.", "type": "string", "readOnly": true }, "parentJobId": { "description": "The job identifier of the parent job, if any.", "type": "string", "readOnly": true } } }, "IotHubDescriptionListResult": { "description": "The JSON-serialized array of IotHubDescription objects with a next link.", "type": "object", "properties": { "value": { "description": "The array of IotHubDescription objects.", "type": "array", "items": { "$ref": "#/definitions/IotHubDescription" } }, "nextLink": { "description": "The next link.", "type": "string", "readOnly": true } } }, "IotHubQuotaMetricInfo": { "description": "Quota metrics properties.", "type": "object", "properties": { "Name": { "description": "The name of the quota metric.", "type": "string", "readOnly": true }, "CurrentValue": { "format": "int64", "description": "The current value for the quota metric.", "type": "integer", "readOnly": true }, "MaxValue": { "format": "int64", "description": "The maximum value of the quota metric.", "type": "integer", "readOnly": true } } }, "OperationInputs": { "description": "Input values.", "type": "object", "properties": { "Name": { "description": "The name of the IoT hub to check.", "type": "string" } }, "required": [ "Name" ] }, "IotHubNameAvailabilityInfo": { "description": "The properties indicating whether a given IoT hub name is available.", "type": "object", "properties": { "nameAvailable": { "description": "The value which indicates whether the provided name is available.", "type": "boolean", "readOnly": true }, "reason": { "description": "The reason for unavailability.", "enum": [ "Invalid", "AlreadyExists" ], "type": "string", "readOnly": true, "x-ms-enum": { "name": "IotHubNameUnavailabilityReason", "modelAsString": false } }, "message": { "description": "The detailed reason message.", "type": "string" } } }, "ExportDevicesRequest": { "description": "Use to provide parameters when requesting an export of all devices in the IoT hub.", "type": "object", "properties": { "ExportBlobContainerUri": { "description": "The export blob container URI.", "type": "string" }, "ExcludeKeys": { "description": "The value indicating whether keys should be excluded during export.", "type": "boolean" } }, "required": [ "ExportBlobContainerUri", "ExcludeKeys" ] }, "ImportDevicesRequest": { "description": "Use to provide parameters when requesting an import of all devices in the hub.", "type": "object", "properties": { "InputBlobContainerUri": { "description": "The input blob container URI.", "type": "string" }, "OutputBlobContainerUri": { "description": "The output blob container URI.", "type": "string" } }, "required": [ "InputBlobContainerUri", "OutputBlobContainerUri" ] } }, "parameters": { "subscriptionId": { "name": "subscriptionId", "in": "path", "description": "The subscription identifier.", "required": true, "type": "string" }, "api-version": { "name": "api-version", "in": "query", "description": "The version of the API.", "required": true, "type": "string" } }, "security": [] }