Use our command-line interface to add a location or a device to an existing location.
Overview
This topic describes how to add a single location or device using the InStore device CLI.
Create one location via the CLI
-
Set up the CLI as described in Initial setup via the CLI.
-
Run a command with a JSON string that contains the required location information:
node index.js create-location '{"location_id":"12345","location_name":"Test Store",...}'
Create one device via the CLI
-
Set up the CLI as described in Initial setup via the CLI.
-
Run a command with a JSON string that contains the required location fields:
name
,type
,description
,status
,brand
,model
,location_id
, andshared
.
node index.js create-device LOCATION_ID '{device info}'
Where
LOCATION_ID
is the identifier for a location that already exists and device info
is modeled in the example.Example
node index.js create-device 44444 '{"name": "Epson TM88VI Printer", "type":"Printer", "description": "Printer 1", "status": "Active", "brand": "Epson", "model": "m1", "shared": true, "proxy_address": "127.0.0.1", "ip_address": "127.0.0.1"}'
You cannot delete a device from a location programmatically using the CLI. In the InStore Center, you can manually delete a device if it is eligible for deletion. See Devices.