Introduction
IoT Wonderland API
IoT Wonderland exposes its functionality through a well-documented API. Multiple routes are available, organized and listed in a JSON file accessible at: https://www.app.iotwonderland.com/master/api/routes
Listing of all routes:
/version (GET)
/session/active (GET)
/session/cookie (GET)
/session/attributes (GET)
/routes (GET)
/feedback (POST)
/datamodel (GET)
/datamodel/network (GET)
/datamodel/network/type (GET)
/datamodel/network/{uid} (GET)
/datamodel/network/by_type/{uid} (GET)
/datamodel/decoder (GET)
/datamodel/decoder/{decoder_id} (GET)
/datamodel/data/type/all (GET)
/datamodel/data/type/{type_id} (GET)
/datamodel/icon (GET)
/datamodel/device/type (GET)
/user/device/image/{eui} (GET)
/user/device/image/{eui}/{image_hash} (GET)
/user/device/image/{eui}/{image_hash} (DELETE)
/user/device (GET)
/user/device/autocomplete (GET)
/user/device/{eui} (POST)
/user/device/{eui} (DELETE)
/user/device/table/{eui} (GET)
/user/device/data/{eui} (GET)
/user/device/data/type/all (GET)
/user/device/meta/all (GET)
/user/device/meta/{eui} (GET)
/user/device/meta/{eui} (POST)
/user/device/command/{eui} (GET)
/user/device/command/{eui} (POST)
/user/device/result/{eui}/{uid} (GET)
/user/fence (GET)
/user/fence/{uid} (GET)
/user/token (GET)
/user/token (POST)
/user/token (DELETE)
/user (GET)
/user/state (GET)
/user/gateways (GET)
/user/gateways/{network_ref} (GET)
/admin/info (GET)
/auth/check (POST)
/auth/login (POST)
/auth/logout (POST)
/auth/register (POST)
/auth/register (DELETE)
/auth/restore (POST)
/auth/pwdchange (POST)
/auth/echo (GET)
/cache/status (GET)
/cache/status/{eui} (GET)
/cache/invalidate/all (POST)
/cache/invalidate/{eui} (POST)
/test/uplink/{eui} (GET)
.
GET requests
The Wonderland platform's GET endpoints can be accessed using a variety of HTTP clients, including:
- EchoAPI
- Thunder Client
- Postman
- Any other REST API client
Alternatively, you can retrieve data directly from the command line using curl.
Example of using curl for the GET requests
curl --request GET "https://app.iotwonderland.com/master/api/routes"
This request retrieves the list of available routes from the Wonderland platform API.
POST requests
The POST requests can be executed either with an HTTP client or via the command line, as shown in the example below.
Example of using curl for the POST requests
curl -X POST "https://app.iotwonderland.com/master/api/user/token" -H "Content-Type: application/json" -H "token: 44445227d833d5f7a660e71778252476236b95731d1af8aa92c7ccafc4c88c6e" -d '{"type":"API"}'
This request would generate a new API token.
DELETE requests
The same way of accessing the previous (GET and POST requests) applies to the DELETE request.
Example of using curl for DELETE requests
curl -i -v --request DELETE "https://app.iotwonderland.com/master/api/user/token" -H "Content-Type: application/json" -H "token: 94444227d833d5f7a660e71778252476236b95731d1af8aa92c7ccafc4c05c6f" -d '{"uid":"91"}'