Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
Setups
General information
Wirnet™ iBTS information
Wirnet™ iFemtoCell information
Wirnet™ iFemtoCell-evolution information
Wirnet™ iStation information
System management
Network management
LoRa Features
KerOS customization
Support and resources
This is an old revision of the document!
The HTTP REST API service is used for:
The requests and their associated responses are detailed in the KerOS web services documentation.
A RESTful Web services architecture follows basic design principles:
GET, POST, PUT, DELETE, …) and other HTTP standards The API version level is requested by the client using the accept HTTP header, for example here with API v1:
Accept: application/vnd.kerlink.iot-v1+json
For each method, the method name, the URL, the content type and the content of the requests/responses are described. When the expected content is a JSON array, each field of the array is defined at the end of the document.
To send HTTP requests to Wirnet iBTS, first, a login request with both the login and the password is necessary. When the request is successful, gateway sends back a unique token. This token must then be used in each request.
These examples use the command-line program curl to make HTTP requests. It is recommended to read the following examples in parallel with the documentation.
These examples are presented as is. They are not written to cover every possible exception. It is up to the user to adapt them to its needs.
The use of the API is bound to a fresh token. Here is how you can request for a new token:
curl -s '192.168.4.127/application/administration/login' \ -H 'Accept: application/vnd.kerlink.iot-v1+json' \ -X POST \ -d '{"login":"admin","password":"pwd4admin"}' \ -H 'Content-Type: application/vnd.kerlink.iot-v1+json' \ | jq .
Here jq is used to prettify the JSON output so that it is readable and indented:
{ "token_type": "Bearer", "expiration_date": 1538169670, "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzgxNjk2NzB9.0zM4BRqvMrorq916RJy4q_bghlK1HwrCYlZGADCdH1Q" }
curl -s '192.168.4.127/application/administration/lan' \ -H 'Accept: application/vnd.kerlink.iot-v1+json' \ -H 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE1MzgxNjk2NzB9.0zM4BRqvMrorq916RJy4q_bghlK1HwrCYlZGADCdH1Q' \ -X GET \ -H 'Content-Type: application/vnd.kerlink.iot-v1+json' \ | jq .
{ "available": true, "ipv4_gateway": "", "enable": true, "ipv4_address": "", "ipv4_dns": "", "ipv4": "dhcp", "ipv4_netmask": "" }