---
title: "GET /deviceUpdate/{instanceId}/management/deviceClasses"
method: GET
path: "/deviceUpdate/{instanceId}/management/deviceClasses"
tags: ["Device and deployment management"]
---

# GET /deviceUpdate/{instanceId}/management/deviceClasses

`GET /deviceUpdate/{instanceId}/management/deviceClasses`

Gets a list of all device classes (sets of devices compatible with the same
updates based on the model Id and compat properties reported in the Device
Update PnP interface in IoT Hub) for all devices connected to Device Update for
IoT Hub.

## Path parameters

- `instanceId` string, required

## Query parameters

- `api-version` string, required
- `filter` string

## Response `200`

The request has succeeded.

- DeviceClassesList — The list of device classes.
  - `value` DeviceClass[], required — The DeviceClass items on this page
    - `deviceClassId` string, required — The device class identifier. This is generated from the model Id and the compat properties reported by the device update agent in the Device Update PnP interface in IoT Hub. It is a hex-encoded SHA1 hash.
    - `friendlyName` string — The device class friendly name. This can be updated by callers after the device class has been automatically created.
    - `deviceClassProperties` DeviceClassProperties, required — The device class properties that are used to calculate the device class Id
      - `contractModel` ContractModel — The Device Update agent contract model.
        - `id` string, required — The Device Update agent contract model Id of the device class. This is also used to calculate the device class Id.
        - `name` string, required — The Device Update agent contract model name of the device class. Intended to be a more readable form of the contract model Id.
      - `compatProperties` object, required — The compat properties of the device class. This object can be thought of as a set of key-value pairs where the key is the name of the compatibility property and the value is the value of the compatibility property. There will always be at least 1 compat property
    - `bestCompatibleUpdate` UpdateInfo — Update information.
      - `updateId` UpdateId, required — Update identifier.
        - `provider` string, required — Update provider.
        - `name` string, required — Update name.
        - `version` string, required — Update version.
      - `description` string — Update description.
      - `friendlyName` string — Friendly update name.
  - `nextLink` string, uri — The link to the next page of items

## Other responses

- `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)
