-
Notifications
You must be signed in to change notification settings - Fork 0
Devices API
Martin Konopka edited this page Apr 23, 2018
·
2 revisions
GET /api/device/
Returns states for all devices with timestamps of last change.
- Parameters: None.
- Body: None.
- DeviceStateChange[], each object contains:
-
device
: string - device code type, e.g.,ET
for eye tracker. -
state
: DeviceState string - one of the following values:Disconnected
,Connected
,Recording
,Error
. -
lastChange
: DateTime string - last change of the status.
-
$ curl -X GET http://localhost:55555/api/device
[{"device":"ET","state":"Connected","lastChange":"2018-03-08T14:27:29.9616392"},{"device":"EXTEV","state":"Connected","lastChange":"2018-03-08T14:27:28.4030785"},{"device":"KB","state":"Connected","lastChange":"2018-03-08T14:27:28.4367896"},{"device":"ME","state":"Connected","lastChange":"2018-03-08T14:27:28.4367896"},{"device":"SC","state":"Connected","lastChange":"2018-03-08T14:27:29.9616392"},{"device":"WCA","state":"Connected","lastChange":"2018-03-08T14:27:29.1518847"},{"device":"WCV","state":"Connected","lastChange":"2018-03-08T14:27:29.7073150"}]
GET /api/device/{deviceCode}
Returns state of the selected device, specified with the parameter deviceCode
in the URI.
- Parameters:
-
deviceCode
: string (URI) - code of the device which to return status for, e.g.,ET
for eye tracker. See Devices and Recording Data for list of device type codes.
-
- 200 HTTP Status code with DeviceStateChange object (see above) for the selected device, if exists; otherwise,
- 404 Not found, if no device with such code exist.
$ curl -X GET http://localhost:55555/api/device/ET
{"device":"ET","state":"Connected","lastChange":"2018-03-08T14:27:29.9616392"}
- Home
- Usage Examples
- User Manual
- API Reference
- Installation Manual
- Contributing
- Project Documentation