---
title: "POST /deviceUpdate/{instanceId}/updates:import"
method: POST
path: "/deviceUpdate/{instanceId}/updates:import"
tags: ["Update management"]
---

# POST /deviceUpdate/{instanceId}/updates:import

`POST /deviceUpdate/{instanceId}/updates:import`

Import new update version. This is a long-running-operation; use
Operation-Location response header value to check for operation status.

## Path parameters

- `instanceId` string, required

## Query parameters

- `api-version` string, required

## Request body

- ImportUpdateInputItem[] — Update input data list (array of update items to import).
  - `importManifest` ImportManifestMetadata, required — Metadata describing the import manifest, a document which describes the files and other metadata about an update version.
    - `url` string, required — Azure Blob location from which the import manifest can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours.
    - `sizeInBytes` integer, required — File size in number of bytes.
    - `hashes` object, required — A JSON object containing the hash(es) of the file. At least SHA256 hash is required. This object can be thought of as a set of key-value pairs where the key is the hash algorithm, and the value is the hash of the file calculated using that algorithm.
  - `friendlyName` string — Friendly update name.
  - `files` FileImportMetadata[] — One or more update file properties like filename and source URL.
    - `filename` string, required — Update file name as specified inside import manifest.
    - `url` string, required — Azure Blob location from which the update file can be downloaded by Device Update for IoT Hub. This is typically a read-only SAS-protected blob URL with an expiration set to at least 4 hours.

## Response `200`

The request has succeeded.

- Update — Update metadata.
  - `updateId` UpdateId, required — Update identifier.
    - `provider` string, required — Update provider.
    - `name` string, required — Update name.
    - `version` string, required — Update version.
  - `description` string — Update description specified by creator.
  - `friendlyName` string — Friendly update name specified by importer.
  - `isDeployable` boolean — Whether the update can be deployed to a device on its own.
  - `updateType` string — Update type. Deprecated in latest import manifest schema.
  - `installedCriteria` string — String interpreted by Device Update client to determine if the update is installed on the device. Deprecated in latest import manifest schema.
  - `compatibility` Compatibility[], required — List of update compatibility information.
  - `instructions` Instructions — Update install instructions container.
    - `steps` Step[], required — Collection of installation steps.
      - `type` 'inline' | 'reference' — Step type.
      - `description` string — Step description.
      - `handler` string — Identity of handler that will execute this step. Required if step type is inline.
      - `handlerProperties` object — Parameters to be passed to handler during execution.
      - `files` string[] — Collection of file names to be passed to handler during execution. Required if step type is inline.
      - `updateId` UpdateId — Update identifier.
        - `provider` string, required — Update provider.
        - `name` string, required — Update name.
        - `version` string, required — Update version.
  - `referencedBy` UpdateId[] — List of update identities that reference this update.
    - `provider` string, required — Update provider.
    - `name` string, required — Update name.
    - `version` string, required — Update version.
  - `scanResult` string — Update aggregate scan result (calculated from payload file scan results).
  - `manifestVersion` string, required — Schema version of manifest used to import the update.
  - `importedDateTime` string, date-time, required — Date and time in UTC when the update was imported.
  - `createdDateTime` string, date-time, required — Date and time in UTC when the update was created.
  - `etag` string — Update ETag.

## Other responses

- `202` — The request has been accepted for processing, but processing has not yet completed.
- `default` — An unexpected error response.

---

[API](https://skmtc.net/azure/apis/deviceupdate-microsoft-deviceupdate.md) · [All operations](https://skmtc.net/azure/apis/deviceupdate-microsoft-deviceupdate/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/azure/deviceupdate-microsoft-deviceupdate/revisions/ceb0ecac6c82/schema)
