---
title: "Assign device to edge (assignDeviceToEdge)"
method: POST
path: "/api/edge/{edgeId}/device/{deviceId}"
tags: ["device-controller"]
---

# Assign device to edge (assignDeviceToEdge)

`POST /api/edge/{edgeId}/device/{deviceId}`

Creates assignment of an existing device to an instance of The Edge. Assignment works in async way - first, notification event pushed to edge service queue on platform. Second, remote edge service will receive a copy of assignment device (Edge will receive this instantly, if it's currently connected, or once it's going to be connected to platform). Third, once device will be delivered to edge service, it's going to be available for usage on remote edge instance.

Available for users with 'TENANT_ADMIN' authority.

## Path parameters

- `edgeId` string, required
- `deviceId` string, required

## Response `200`

OK

- Device
  - `id` DeviceId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'DEVICE', required — string
  - `createdTime` integer — Timestamp of the device creation, in milliseconds
  - `tenantId` TenantId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'TENANT', required — string
  - `customerId` CustomerId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'CUSTOMER', required — string
  - `name` string, required — Unique Device Name in scope of Tenant
  - `type` string — Device Profile Name
  - `label` string — Label that may be used in widgets
  - `deviceProfileId` DeviceProfileId, required
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'DEVICE_PROFILE', required — string
  - `firmwareId` OtaPackageId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'OTA_PACKAGE', required — string
  - `softwareId` OtaPackageId
    - `id` string, uuid, required — ID of the entity, time-based UUID v1
    - `entityType` 'OTA_PACKAGE', required — string
  - `version` integer
  - `additionalInfo` unknown
  - `deviceData` DeviceData
    - `configuration` DefaultDeviceConfiguration
      - `type` string, required
    - `transportConfiguration` union — Device transport configuration used to connect the device
      - CoapDeviceTransportConfiguration
        - `type` string, required
        - `powerMode` 'PSM' | 'DRX' | 'E_DRX'
        - `psmActivityTimer` integer
        - `edrxCycle` integer
        - `pagingTransmissionWindow` integer
      - DefaultDeviceTransportConfiguration
        - `type` string, required
      - Lwm2mDeviceTransportConfiguration
        - `type` string, required
        - `powerMode` 'PSM' | 'DRX' | 'E_DRX'
        - `psmActivityTimer` integer
        - `edrxCycle` integer
        - `pagingTransmissionWindow` integer
      - MqttDeviceTransportConfiguration
        - `type` string, required
      - SnmpDeviceTransportConfiguration
        - `type` string, required
        - `host` string
        - `port` integer
        - `protocolVersion` 'V1' | 'V2C' | 'V3'
        - `community` string
        - `username` string
        - `securityName` string
        - `contextName` string
        - `authenticationProtocol` 'SHA_1' | 'SHA_224' | 'SHA_256' | 'SHA_384' | 'SHA_512' | 'MD5'
        - `authenticationPassphrase` string
        - `privacyProtocol` 'DES' | 'AES_128' | 'AES_192' | 'AES_256'
        - `privacyPassphrase` string
        - `engineId` string

---

[API](https://skmtc.net/thingsboard/apis/thingsboard-rest-api.md) · [All operations](https://skmtc.net/thingsboard/apis/thingsboard-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/thingsboard/thingsboard-rest-api/revisions/40169ccdec5c/schema)
