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

importDevices #

Import devices from a CSV file


Query Syntax #

HTTP #

Copied to clipboard!
URL: http://kuzzle:7512/_/device-manager/devices/_import[?refresh=wait_for]
Method: POST

Other protocols #

Copied to clipboard!
{
  "controller": "device-manager/device",
  "action": "importDevices",
  "body": {
    "csv": "_id,reference,model\nDummyTemp-imported,detached,DummyTemp_imported"
  }
}

Kourou #

Copied to clipboard!
kourou device-manager/device:importDevices --body '{ "csv": "_id,reference,model\nDummyTemp-imported,detached,DummyTemp_imported" }'

Body properties #

  • csv: a csv syntax compatible containing at least this three headers _id,reference,model with their corresponding values

Optional: #

  • refresh: if set to wait_for, Kuzzle will not respond until the documents are indexed

Response #

Copied to clipboard!
{
  "status": 200,
  "error": null,
  "index": "<index>",
  "controller": "device-manager/device",
  "action": "importDevices",
  "requestId": "<unique request identifier>",
  "result": {}
}