Skip to content
Endpoint ManagementMarkdown

Cut off a lost device

Revoke a lost or stolen device so it can reach nothing, then restore it if it's found or remove it if it isn't.

API

Maya reports her laptop stolen. You want maya-laptop cut off from the realm now, before you know whether it’ll turn up. Revoking it closes its connection everywhere at once, and leaves you free to restore it later or remove it for good. It doesn’t lock or wipe the laptop.

  • You hold MODIFY on the realm’s endpoint settings (RealmOwner has it; see Who can call), with your session in $CVYUH_SESSION (Call the API). It’s all done through the API.
  • You know the device’s name, here maya-laptop.
  1. Find the device. List the realm’s devices and pick the one whose uid is maya-laptop:

    Terminal window
    curl https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1 \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

    Keep its id, the device id. If you don’t know the name: when Maya has approved the laptop for AI governance, her user id is in its users, which holds only the users who approved it, not everyone who signs in.

  2. Revoke it, with a reason you’ll recognize later:

    Terminal window
    curl -X PUT https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/revocation \
    -H "Cookie: x-cvyuh-token=$CVYUH_SESSION" \
    -H "Content-Type: application/json" \
    -d '{"reason": "Reported stolen"}'

    The realm answers 204. Every stream the device holds is closed, and it can open no new one.

  3. Deal with Maya’s own access separately. Revoking the device doesn’t end her sessions elsewhere. If her credentials were on the laptop too, revoke her tokens as well; see the gateway’s Revocation.

Ask whether it’s connected:

Terminal window
curl https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/connected \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

It answers { "connected": false }. Read the record (the same address without /connected): its status is revoked, with you in revokedBy.

If the laptop is found, restore it, and it reconnects on its own:

Terminal window
curl -X DELETE https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id>/revocation \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

If it’s gone for good, remove it instead, so every part of the realm forgets it:

Terminal window
curl -X DELETE https://foobar.cvyuh.com/api/v0/endpoint/ppm/v1/<device id> \
-H "Cookie: x-cvyuh-token=$CVYUH_SESSION"

The realm answers 202; reading the record answers 404 once the removal has finished.