New EasyIoT Cloud REST API V1.0 is released. We added a lot of new functions to access and configure EasyIoT Cloud.

 

1. Token

1.1. New token

This API generates new token. In header use your instance ID visible under Configure->User info->Instance Id. Use this API to get new token, then use token in other API calls which require token.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Token/New
Method: POST
Parameter:
Header: Eiot-Instance - your instance ID
Return: {"Token":"rjC4Rm8J8aAvQW32deB4p4iNcn4qb3Yb2BUSfgM3"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "Eiot-Instance: 56add5bd6206b53a3098399b" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Token/New
Response: {"Token":"rjC4Rm8J8aAvQW32deB4p4iNcn4qb3Yb2BUSfgM3"}


1.2. Token list

This API shows all tokens for instance ID.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Token/List
Method: GET
Parameter:
Header: Eiot-Instance - instance ID
Return: [{"Token":"Y93OeycHkJR5jiJqzcg0goGDmpjeytx7WECznL0L"},{"Token":"UXPgBaT7yFt2U4eu30lzO8S1VTiffTDomUgJZkCM"},{"Token":"Vlqt94mbjS5xjA6WFYLr1xceCFQ9YVVTxZdnRj1a"},{"Token":"rG6MYPElYJEAYUUhJMr3onDN7m9JgTEfguAu1PFw"},{"Token":"AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n"}]

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "Eiot-Instance: 56add5bd6206b53a3098399b" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Token/List
Response: [{"Token":"Y93OeycHkJR5jiJqzcg0goGDmpjeytx7WECznL0L"},{"Token":"UXPgBaT7yFt2U4eu30lzO8S1VTiffTDomUgJZkCM"},{"Token":"Vlqt94mbjS5xjA6WFYLr1xceCFQ9YVVTxZdnRj1a"},{"Token":"rG6MYPElYJEAYUUhJMr3onDN7m9JgTEfguAu1PFw"},{"Token":"AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n"}]

2. Module

2.1 New module

This API call create new module.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/New
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"11"}
Request:
curl -icurl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/New

Response:
{"Id":"11"}

2.2. Module list

This API returns module list.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/List
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: [{"Id":"1"},{"Id":"2"},{"Id":"3"},{"Id":"4"},{"Id":"14"},{"Id":"5"},{"Id":"6"},{"Id":"7"},{"Id":"8"},{"Id":"9"},{"Id":"10"},{"Id":"11"}]

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/List

Response:
[{"Id":"1"},{"Id":"2"},{"Id":"3"},{"Id":"4"},{"Id":"14"},{"Id":"5"},{"Id":"6"},{"Id":"7"},{"Id":"8"},{"Id":"9"},{"Id":"10"},{"Id":"11"}]

2.3. Get module

This API returns module parameters.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"10","Name":"test","ModuleType":"MT_GENERIC","Parameters":[{"Id":"SG26KglswExN0P2j","Name":"Sensor.Parameter1"},{"Id":"U8wcHRmHQ84Pysk2","Name":"Settings.Icon1"}]
Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '{"Id": "10"}' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10

Response:
{"Id":"10","Name":"test","ModuleType":"MT_GENERIC","Parameters":[{"Id":"SG26KglswExN0P2j","Name":"Sensor.Parameter1"},{"Id":"U8wcHRmHQ84Pysk2","Name":"Settings.Icon1"}]

2.4. Set module type

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]/Type/[Module_type]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10/Type/MT_GENERIC

Response:
{"Response":"0"}

2.5. Set module name

With this API call you can set module name.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]/Name/[name]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10/Name/mymodule

Response:
{"Response":"0"}

3. Parameter

3.1. Create new parameter

Use this API to create new parameter.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]/NewParameter or  http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]//RestApi/v1.0/Module/[id]/NewParameter/[name]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"5EqMm4xlVTiClcSX"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10/NewParameter
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10/NewParameter/Sensor.Paramxxx

Response:
{"Id":"5EqMm4xlVTiClcSX"}

 

3.2. Get module parameter by name

API returns module parameter by name.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/[id]/ParameterByName/[name]
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"SG26KglswExN0P2j"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Module/10/ParameterByName/Sensor.Parameter1
Response:
{"Id":"SG26KglswExN0P2j"}

3.3 Parameter list

API returns parameter list.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/List
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: [{"Id":"WcSOVG3RSm8gmZzh"},{"Id":"7WstRHPIqcUIQJPY"},{"Id":"LeeYQ8bMy849Umqk"},{"Id":"WjVH5bQ95g5SNQyD"},{"Id":"OOt4cXQJnuXM29do"},{"Id":"kdjGbiSSt39ibSNx"},{"Id":"uBbBZp4rlKz3qjUE"},{"Id":"usPL9MOq6bLiYrrU"},{"Id":"zBAd38Sdv3DxWQbM"},{"Id":"ikwPBgCEZfPsZq0z"},{"Id":"xiJcVzAeM3TNbr5N"},{"Id":"zcg0goGDmpjeytx7"},{"Id":"yFt2U4eu30lzO8S1"},{"Id":"Vlqt94mbjS5xjA6W"},{"Id":"xZdnRj1arG6MYPEl"},{"Id":"7m9JgTEfguAu1PFw"},{"Id":"DsPvQ5EEFieoUjq3"},{"Id":"86rIAUgFlhJtzQJf"},{"Id":"45pX1h3wYxXeoMxb"},{"Id":"SDy3lvnsqNiRahkk"},{"Id":"iPMkX40l4liwHLuX"},{"Id":"r5sKV9M3vwYhaTGQ"},{"Id":"DWFMckB3ir2mhb3o"},{"Id":"SG26KglswExN0P2j"},{"Id":"U8wcHRmHQ84Pysk2"},{"Id":"D29ggoX1W9DEJFBK"},{"Id":"B1eiITcg3cVzqdev"}]

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/List
Response:
[{"Id":"WcSOVG3RSm8gmZzh"},{"Id":"7WstRHPIqcUIQJPY"},{"Id":"LeeYQ8bMy849Umqk"},{"Id":"WjVH5bQ95g5SNQyD"},{"Id":"OOt4cXQJnuXM29do"},{"Id":"kdjGbiSSt39ibSNx"},{"Id":"uBbBZp4rlKz3qjUE"},{"Id":"usPL9MOq6bLiYrrU"},{"Id":"zBAd38Sdv3DxWQbM"},{"Id":"ikwPBgCEZfPsZq0z"},{"Id":"xiJcVzAeM3TNbr5N"},{"Id":"zcg0goGDmpjeytx7"},{"Id":"yFt2U4eu30lzO8S1"},{"Id":"Vlqt94mbjS5xjA6W"},{"Id":"xZdnRj1arG6MYPEl"},{"Id":"7m9JgTEfguAu1PFw"},{"Id":"DsPvQ5EEFieoUjq3"},{"Id":"86rIAUgFlhJtzQJf"},{"Id":"45pX1h3wYxXeoMxb"},{"Id":"SDy3lvnsqNiRahkk"},{"Id":"iPMkX40l4liwHLuX"},{"Id":"r5sKV9M3vwYhaTGQ"},{"Id":"DWFMckB3ir2mhb3o"},{"Id":"SG26KglswExN0P2j"},{"Id":"U8wcHRmHQ84Pysk2"},{"Id":"D29ggoX1W9DEJFBK"},{"Id":"B1eiITcg3cVzqdev"}]

 

3.4. Get parameter 

API returns parameter parameters.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"B1eiITcg3cVzqdev","Name":"Sensor.Paramxxx","Value":"","Unit":"","UINotification":"False","LogToDatabase":"False","AvreageInterval":"0","ChartSteps":"False"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev
Response:
{"Id":"B1eiITcg3cVzqdev","Name":"Sensor.Paramxxx","Value":"","Unit":"","UINotification":"False","LogToDatabase":"False","AvreageInterval":"0","ChartSteps":"False"}

 

3.5. Set parameter

API sets parameter parameters.

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]
Method: POST
Parameter:{"Id":"zm2F4egP3oVn8A34","Name":"Sensor.Parameter7","Value":"","Unit":"","UINotification":"False","LogToDatabase":"False","AvreageInterval":"0","ChartSteps":"False"}
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '{"Id":"B1eiITcg3cVzqdev","Name":"Sensor.Parameter7","Value":"","Unit":"","UINotification":"False","LogToDatabase":"False","AvreageInterval":"0","ChartSteps":"False"}' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev
Response:
{"Response":"0"}

 

3.6. Set parameter name

API set parameter name

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Name/[name]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/Name/test%20name
Response:
{"Response":"0"}

3.7. Get parameter name

API gets parameter name.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Name
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"B1eiITcg3cVzqdev","Name":"test name"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev/Name
Response:
{"Id":"B1eiITcg3cVzqdev","Name":"test name"}

3.8. Set parameter description

API sets parameter description.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Description/[description]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev/Description/test%201111
Response:
{"Response":"0"}

3.9. Get parameter description

API get parameter description

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Description
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"B1eiITcg3cVzqdev","Description":"test 1111"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev/Description
Response:
{"Id":"B1eiITcg3cVzqdev","Description":"test 1111"}

3.10. Set parameter unit

API sets parameter description.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Unit/[unit]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev/Unit/%
Response:
{"Response":"0"}

 

3.11. Get parameter unit

API gets parameter unit.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Unit
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"B1eiITcg3cVzqdev","Unit":"%"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/B1eiITcg3cVzqdev/Unit
Response:
{"Id":"B1eiITcg3cVzqdev","Unit":"%"}

3.12. Set parameter UI notification

API parameter UI notification.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/UINotification/[true/false]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/UINotification/true
Response:
{"Response":"0"} 

3.13 Get parameter UI notification

API to get parameter UI notification.

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/UINotification
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"zm2F4egP3oVn8A34","UINotification":"True"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/UINotification
Response:
{"Id":"zm2F4egP3oVn8A34","UINotification":"True"}

 

3.14. Set parameter log to database

API sets parameter log to database indicator.

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/LogToDatabase/[true/false]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/LogToDatabase/true
Response:
{"Response":"0"}

3.15. Get parameter log to database

API gets parameter log to database indicator.

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/LogToDatabase
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"zm2F4egP3oVn8A34","LogToDatabase":"True"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/LogToDatabase
Response:
{"Id":"zm2F4egP3oVn8A34","LogToDatabase":"True"} 

3.16. Set parameter averaging interval

API to set averaging interval.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/AvreageInterval/[interval in min]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/AvreageInterval/10
Response:
{"Response":"0"}

3.17. Get parameter averaging interval 

API to get parameter averaging interval. 

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/AvreageInterval
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"zm2F4egP3oVn8A34","AvreageInterval":"10"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/AvreageInterval
Response:
{"Id":"zm2F4egP3oVn8A34","AvreageInterval":"10"}

 

3.18. Set parameter chart steps

API to set parameter chart steps indicator.

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/ChartSteps/[true/false]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/ChartSteps/true
Response:
{"Response":"0"}

 

3.19. Get parameter chart steps

API to get parameter chart steps indicator. 

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/ChartSteps
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"zm2F4egP3oVn8A34","ChartSteps":"True"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/ChartSteps
Response:
{"Id":"zm2F4egP3oVn8A34","ChartSteps":"True"}

 

3.20. Set parameter value

API set parameter value. 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Value/[value]
Method: POST
Parameter:
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X POST -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/Value/10.1
Response:
{"Response":"0"}

 

3.21. Get parameter value

 

API to get parameter value

 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/[id]/Value
Method: GET
Parameter:
Header: EIOT-AuthToken - token
Return: {"Id":"zm2F4egP3oVn8A34","Value":"10.1"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: Fs2ZZ7Fucf4QQZ7WmkYzzOeocM8pCKqxHUfzz13t" -X GET -d '' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/zm2F4egP3oVn8A34/Value
Response:
{"Id":"zm2F4egP3oVn8A34","Value":"10.1"}

 

3.22. Set parameter values

API sets parameter values

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/Values
Method: POST
Parameter: [{"Id": "B1eiITcg3cVzqdev", "Value": "33.2" },{"Id": "D29ggoX1W9DEJFBK", "Value": "11.1" }]
Header: EIOT-AuthToken - token
Return: {"Response":"0"}

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X POST -d '[{"Id": "B1eiITcg3cVzqdev", "Value": "33.1" },{"Id": "D29ggoX1W9DEJFBK", "Value": "11.1" }]' http://cloud.iot-playground.com/RestApi/v1.0/Parameter/Values
Response:
{"Response":"0"}

 

3.23. Get parameter values

API gets parameter values 

URL: http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/Values
Method: GET
Parameter: [{"Id": "B1eiITcg3cVzqdev"},{"Id": "D29ggoX1W9DEJFBK"}]
Header: EIOT-AuthToken - token
Return: [{"Id":"B1eiITcg3cVzqdev","Value":"33.2"},{"Id":"D29ggoX1W9DEJFBK","Value":"11.1"}]

 

Request:
curl -i --header "Accept: application/json; indent=4" --header "Content-Type: application/json" --header "EIOT-AuthToken: AplORU4dF6dF27wDDsPvQ5EEFieoUjq3G428By5n" -X GET -d '[{"Id": "B1eiITcg3cVzqdev"},{"Id": "D29ggoX1W9DEJFBK"}]' http://cloud.iot-playground.com:40404/RestApi/v1.0/Parameter/Values
Response:
[{"Id":"B1eiITcg3cVzqdev","Value":"33.2"},{"Id":"D29ggoX1W9DEJFBK","Value":"11.1"}]

See more tutorials at http://iot-playground.com/build

You have no rights to post comments

Forum latest

  • No posts to display.