Update devices

patch/devices/v1beta1/devices

Update devices by passing one or more device IDs. The API currently supports:

  • Assigning and unassigning devices to and from a service.
  • Applying and removing subscriptions to and from devices.
To remove an application, set the id under application to null and 'region' to null. Set an empty array to the attribute subscription to remove a subscription.

Only one operation is supported in a single API call. For example, you cannot assign devices to an application and assign subscriptions to devices in a single API invocation. You can achieve this with two API calls.

This API provides an asynchronous response and returns 202 Accepted if basic input validations are successful. The location header in the response provides the URI to be invoked for fetching the progress of the device update task. For details about the status fetch URL, refer to the API Get progress or status of async operations in devices.

NOTE: You need edit permissions for the Devices and Subscription service to invoke this API.

Rate limits are enforced on this API. Five requests per minute is supported per workspace. API will result in 429 if this threshold is breached.

SecurityBearer
Request
query Parameters
id
required
Array of strings unique

Array of device resource IDs. Maximum five devices per request.

Example: id=05fc0c47-e517-5709-976e-c0b726977477&id=08a42d07-b144-5602-9a82-7927d6e44616
Request Body schema: application/merge-patch+json
required
object (RequestApplication)
region
string

The region of the application the device is provisioned in.

Array of objects (RequestSubscription)
Responses
202

Request accepted

400

Bad request

401

Unauthorized request

403

The operation is forbidden

422

Validation error

429

Too many requests

500

Internal server error

Request samples
application/merge-patch+json
{
  • "subscription": [
    ],
  • "application": {
    },
  • "region": "string"
}
Response samples
application/json
{
  • "code": 0,
  • "status": "100 CONTINUE",
  • "transactionId": "string"
}