Official Plugins (Kuzzle v2.x)
Device Manager v0.x
2

mDetach #

Detach multiple devices from multiple tenants.


Query Syntax #

HTTP #

URL: http://kuzzle:7512/_/device-manager/device-manager/devices/_mDetach[?refresh=wait_for][&strict]
Method: PUT
Body:
{
    // Using JSON
    "deviceIds" ["test-id"],
    // Using CSV syntax
    "csv": "deviceId\ntest-id"
}

Other protocols #

{
    "controller": "device-manager/device",
    "action": "mAttachTenant",
    "body": {
        // Using JSON
        "deviceIds" ["test-id"],
        // Using CSV syntax
        "csv": "deviceId\ntest-id"
    }
}

Body properties #

Body properties, must contain at least one of

  • deviceIds: an array of string containing identifiers of a device already attached
  • csv: a csv syntax compatible containing at least one header deviceId with his corresponding values

Optional: #

  • refresh: if set to wait_for, Kuzzle will not respond until the documents are indexed
  • strict: (boolean) if set, makes the process fail preemptively if at least one link cannot be applied (e.g. devices that aren't attached to a tenant, or because of non-existing assets)

Response #

{
    "status": 200,
    "error": null,
    "index": "<index>",
    "controller": "device-manager/device",
    "action": "mDetach",
    "requestId": "<unique request identifier>",
    "result": {
        "errors": [],
        "successes": []
    }
}