Skip to content

Server configuration

Get and update the server configuration of the device (XL Private Protocol)

Get the device server configuration

API info

Url: /web_api/v1/dev_manage/get_server_config

Method: GET

Content-Type:x-www-form-urlencoded

Request parameter

fieldtyperequireddesc
vehicleNostringYesPlate No.

Response Data (type:array(object))

Return to the list of servers configured by the device, define View current page Table 1

Example

Request example

url
http://localhost:8080/web_api/v1/dev_manage/get_server_config?vehicleNo=130000000001
http://localhost:8080/web_api/v1/dev_manage/get_server_config?vehicleNo=130000000001

Response example

json
{
    "code": 200,
    "msg": "success",
    "data": [{
        "serverAddr": "127.0.0.1",
        "serverPort": 8080,
        "protocolType":2,
        "deviceNo":"130000000001"
    },{
        "serverAddr": "128.0.1.2",
        "serverPort": 7001,
        "protocolType":2,
        "deviceNo":"130000000005"
    }]
}
{
    "code": 200,
    "msg": "success",
    "data": [{
        "serverAddr": "127.0.0.1",
        "serverPort": 8080,
        "protocolType":2,
        "deviceNo":"130000000001"
    },{
        "serverAddr": "128.0.1.2",
        "serverPort": 7001,
        "protocolType":2,
        "deviceNo":"130000000005"
    }]
}

Get the device server configuration

API info

Url: /web_api/v1/dev_manage/set_server_config

Method: POST

Content-Type:application/json

Request parameter

fieldtyperequireddesc
vehicleNostringYesPlate No.
itemInfosarray(object)YesServer configuration information, currently supports 4 Table 1

Response Data

None

Example

Request example

json
http://localhost:8080/web_api/v1/dev_manage/set_server_config
{
    "vehicleNo": "130000001",
    "itemInfos": [{
        "serverAddr": "127.0.0.1",
        "serverPort": 8080,
        "protocolType":2,
        "deviceNo":"18600000001"
    },{
        "serverAddr": "127.0.0.1",
        "serverPort": 7001,
        "protocolType":2,
        "deviceNo":"18600000002"   
    }]
}
http://localhost:8080/web_api/v1/dev_manage/set_server_config
{
    "vehicleNo": "130000001",
    "itemInfos": [{
        "serverAddr": "127.0.0.1",
        "serverPort": 8080,
        "protocolType":2,
        "deviceNo":"18600000001"
    },{
        "serverAddr": "127.0.0.1",
        "serverPort": 7001,
        "protocolType":2,
        "deviceNo":"18600000002"   
    }]
}

Response example

json
{
    "hdr":{
        "code":200,
        "message":"success"
    }
}
{
    "hdr":{
        "code":200,
        "message":"success"
    }
}

Table 1: Server configuration information

fieldtypedesc
serverAddrintegerServer address. You can enter the domain name
serverPortintegerServer port
protocolTypeinteger0: Disable. 1: Private protocol; 2: Ministry Standard -2013; 3:TTX protocol; 4: JT2013; 5: JT2019(Su standard); 6: JT2019(Guangdong); 7: JT2019(Shaanxi)
deviceNostringDevice number