This endpoint erases all devices belonging to a given user. Since this is a bulk operation, the total number of devices erased in one call is capped at 10. In addition if some erase operations fail this will be reflected in the return body. The caller may be required to call this endpoint more than once depending on the result (e.g. to erase 13 devices belonging to a user, two calls to this endpoint are required)

Output format

  • devices: an array of objects detailing the results of erasing each device belonging to the user. Each device object has the following fields:
    • device_id: the identifier of the device being erased
    • status: the result of this erase attempt. 200 for success, 4xx or 5xx for a failure. Failures are generally retryable. 416 status denotes a device outside the capped value of 10.
  • metadata: an object consisting of the following totals:
    • success: the total number of erased devices
    • failure: the total number of failures
    • out_of_scope: the number of devices that were not attempted, due to being outside the cap value of 10
    • total: the number of devices registered to the given user

Return codes

  • 200: All devices belonging to the given user were erased
  • 207: There was a mixture of failure and success while erasing devices
  • 401: Unauthorized
  • 403: Forbidden
  • 422: Unable to erase any devices belonging to the given user