Devices

Update a device

Changed on

Use the PUT method to replace a device in its entirety, or the PATCH method to replace a subset of the device properties.

For the PATCH method, hardware IDs and tags can be added or removed with the add_... and remove_... properties respectively, or the entire set of hardware IDs or tags can be replaced by assigning a value to their respective properties.

put/v1/projects/{projectId}/devices/{deviceId}

Request

  • Base URL
    https://api.golioth.io
  • URL
    https://api.golioth.io/v1/projects/{projectId}/devices/{deviceId}
  • Auth
    API key in header x-api-key and API key in header Authorization

Path parameters

projectIdstring required

Project ID

deviceIdstring required

Device ID

Query parameters

updateMaskstring

Field mask specifying which fields to update (only used for PATCH requests)

Request body

addHardwareIdstring[]
addTagIdstring[]
blueprintIdstring
cohortIdstring

Optional Cohort ID to assign the device to. Setting to an empty string removes the device from its cohort without assigning it to a new one.

enabledboolean
hardwareIdsstring[]
namestring
removeHardwareIdstring[]
removeTagIdstring[]
tagIdsstring[]

Response

A successful response.

Changes

    • info

      added the new optional request property

    • info

      added the optional property / to the response with the status

    • warning

      removed the optional property // from the response with the status

    • warning

      removed the optional property // from the response with the status

    • info

      added the optional property / to the response with the status

    • info

      added the optional property // to the response with the status