...
Purpose | HTTP method | URL | parameters | example |
---|
get all devices | GET | http://localhost:7557/devices |
| curl -i 'http://localhost:7557/devices' -X GET |
get Serialnr of specific device | GET | serial number | curl -i 'http://localhost:7557/devices/?query={"_deviceId._SerialNumber":"abcd"}' -X GET |
show tasks like factory reset | GET | http://localhost:7557/tasks |
| wget -qO- http://localhost:7557/tasks |
Delete all tasks |
|
|
|
Code Block |
---|
| for id in $(wget -qO- http://localhost:7557/tasks | grep -o '"_id":"[[:xdigit:]]\+"' | cut -d'"' -f4); do curl -i "http://localhost:7557/tasks/$id" -X DELETE; done |
|
Note: The query string must be encoded. One possibility is to encode it via
Code Block |
---|
language | bash |
---|
title | URL Encoding |
---|
|
php artisan tinker
urlencode('query={"_id":"34E380-PURE-F510-W%2E3120320076"}');
|