跳转到内容
EN

Disconnect a device and revoke its credential

Code Mode: praxis.sandbox.byod.devices.disconnect.create

HTTP: POST /sandbox/v1/byod/devices/{deviceID}/disconnect

Disconnect a paired device: the device’s credential is revoked, its control connection is closed, and it stops appearing in listByodDevices. Use it when the phone is lost, lent or no longer wanted; the same disconnect is offered as one tap on the device itself. The operation is idempotent — disconnecting an already-disconnected device answers the same 200 — so a retry after a lost response is safe. The device is untouched: nothing is erased on the phone, and it can be paired again with a new pairing. Because a revoked device is not listed, a later listByodDevices no longer shows it. An unknown id and another organization’s device both answer 404. Example: POST /sandbox/v1/byod/devices/byd_0123456789abcdefghijklmno/disconnect returns {id:‘byd_0123456789abcdefghijklmno’,object:‘byod_device’,disconnected:true}.

签名

praxis.sandbox.byod.devices.disconnect.create(args:{path:{deviceID:string}}):Promise<{/** Id of the device that was disconnected. */ id:string;/** Resource type; always "byod_device". */ object:"byod_device";/** Always true: the credential is revoked and the connection closed. */ disconnected:true}>;

参数

名称位置类型必填说明
deviceIDpathstring是Device id from the claim or from listByodDevices, `byd_` followed by 26 lowercase hex characters. An unknown id and another organization’s device both answer 404.

响应

状态码内容类型说明
200application/jsonThe device is disconnected; its credential no longer opens a control connection.
401Authentication required: supply an organization API key that carries a tenant.
404NOT_FOUND: no such device for this organization. The device was disconnected, never existed, or belongs to another organization; the three are indistinguishable.
503SERVICE_UNAVAILABLE: BYOD is not bound in this deployment, or the sandbox is not ready. Wait and retry.