文章目录
Gain the platform connectiong information
API insruction
gian connection information betwween device and the platform
Request
- Method: GET/POST
- URL:
platform/get.json
- Headers:
- submit parameter: no
Response
- Body
{
"result": "ok",
"data": {
"AUTH_CODE": "1221423",
"MASTER_PORT": "7000",
"MASTER_ADDR": "192.168.0.11"
}
}
- return instruction:
field | type | instruction |
---|---|---|
MASTER_ADDR | alphabetic string | platform address |
MASTER_PORT | alphabetic string | platform address port |
AUTH_CODE | alphabetic string | Platform connection authorized code |
test interface:
http://192.168.2.123/api/platform/get.json
Configure the platform connection parameters
API instruction
configure the platform connection parameters
Request
- Method: GET/POST
- URL:
platform/set.json
- Headers:
- submit parameters:
field | type | instruction |
---|---|---|
MASTER_ADDR | alphabetic string | platform address |
MASTER_PORT | alphabetic string | platform address port |
AUTH_CODE | alphabetic string | Platform connection authorized code |
Response
- Body
{
"result": "ok"
}
test interface
http://192.168.2.123/api/platform/set.json?MASTER_ADDR=192.168.0.11&MASTER_PORT=7000&AUTH_CODE=1221423