Iot Hub Resource - Export Devices

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.

POST https://management.azure.com/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.Devices/IotHubs/{resourceName}/exportDevices?api-version=2018-04-01

URI Parameters

Name In Required Type Description
resourceGroupName
path True

string

The name of the resource group that contains the IoT hub.

resourceName
path True

string

The name of the IoT hub.

subscriptionId
path True

string

The subscription identifier.

api-version
query True

string

The version of the API.

Request Body

Name Required Type Description
excludeKeys True

boolean

The value indicating whether keys should be excluded during export.

exportBlobContainerUri True

string

The export blob container URI.

Responses

Name Type Description
200 OK

JobResponse

OK

Other Status Codes

ErrorDetails

DefaultErrorResponse

Security

azure_auth

Azure Active Directory OAuth2 Flow

Type: oauth2
Flow: implicit
Authorization URL: https://login.microsoftonline.com/common/oauth2/authorize

Scopes

Name Description
user_impersonation impersonate your user account

Examples

IotHubResource_ExportDevices

Sample Request

POST https://management.azure.com/subscriptions/91d12660-3dec-467a-be2a-213b5544ddc0/resourceGroups/myResourceGroup/providers/Microsoft.Devices/IotHubs/testHub/exportDevices?api-version=2018-04-01

{
  "exportBlobContainerUri": "testBlob",
  "excludeKeys": true
}

Sample Response

{
  "jobId": "test",
  "startTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
  "endTimeUtc": "Thu, 15 Jun 2017 19:20:58 GMT",
  "type": "unknown",
  "status": "unknown"
}

Definitions

Name Description
ErrorDetails

Error details.

ExportDevicesRequest

Use to provide parameters when requesting an export of all devices in the IoT hub.

JobResponse

The properties of the Job Response object.

JobStatus

The status of the job.

JobType

The type of the job.

ErrorDetails

Error details.

Name Type Description
code

string

The error code.

details

string

The error details.

httpStatusCode

string

The HTTP status code.

message

string

The error message.

ExportDevicesRequest

Use to provide parameters when requesting an export of all devices in the IoT hub.

Name Type Description
excludeKeys

boolean

The value indicating whether keys should be excluded during export.

exportBlobContainerUri

string

The export blob container URI.

JobResponse

The properties of the Job Response object.

Name Type Description
endTimeUtc

string

The time the job stopped processing.

failureReason

string

If status == failed, this string containing the reason for the failure.

jobId

string

The job identifier.

parentJobId

string

The job identifier of the parent job, if any.

startTimeUtc

string

The start time of the job.

status

JobStatus

The status of the job.

statusMessage

string

The status message for the job.

type

JobType

The type of the job.

JobStatus

The status of the job.

Name Type Description
cancelled

string

completed

string

enqueued

string

failed

string

running

string

unknown

string

JobType

The type of the job.

Name Type Description
backup

string

export

string

factoryResetDevice

string

firmwareUpdate

string

import

string

readDeviceProperties

string

rebootDevice

string

unknown

string

updateDeviceConfiguration

string

writeDeviceProperties

string