Request Parameters
Parameter
|
Description
|
Mandatory
|
id
|
Tariff group identifier.
|
yes
|
page
|
The page number in paged view (may be used to display information about the large number of stations)
|
no
|
per-page
|
Number of stations per one page in paged view (may be used to display information about the large number of stations)
|
no
|
Request Example
http://192.168.1.1:9080/api/tariffs/stations_list.ds?id=1
Response Documents Structure
•XML response. •JSON response. XML Response Structure
<drweb-avdesk-api api_version="4.1.3" timestamp="1410161993" server="192.168.1.1" srv_version="10.01.0.201707130" status="true">
<stations total="2">
<station id="also" name="also" last_seen_time="0" last_seen_addr="" state="0"/>
<station id="EXP" name="EXP" last_seen_time="0" last_seen_addr="" state="0"/>
</stations>
<pages total="1" current="1" objects-per-page="100"/>
</drweb-avdesk-api>
|
Description of XML Response Parameters
•The <stations /> element contains information on stations included to the specified tariff group. The <stations /> element attributes:
Attribute
|
Description
|
total
|
Total number of stations that are included to the specified tariff group
|
▫The <station /> element contains information on specific stations of specified tariff group. The <station /> element attributes:
Attribute
|
Description
|
id
|
Station identifier
|
name
|
Station name
|
last_seen_time
|
Time of last connection to the Server
|
last_seen_addr
|
Address from which the stations connected to the Server at last time
|
state
|
The current state of the station. (See Returned station state codes.)
|
JSON Response Structure
{ "head": {
"status": true,
"timestamp":1410162219,
"api":{
"version":<%API_V_J%>
},
"server":{
"name":"192.168.1.1",
"version":<%SRV_V_J%>,
"uuid": "70c5f522-aaab-4c93-a180-a442a0da9c2a"
}
},
"data":{
"pages": {
"total": 1,
"current": 1,
"objects_per_page": 100
},
"stations":{
"total": 2,
"list": [{
"id": "also",
"name": "also",
"last_seen_time":0,
"last_seen_addr":null,
"state": 0
}, {
"id": "EXP",
"name": "EXP",
"last_seen_time":0,
"last_seen_addr":null,
"state": 0
}
]
}
}
}
|
Description of JSON Response Parameters
The pages block contains information on the number of displayed objects.
The pages block elements:
Field name
|
Description
|
total
|
Total number of pages
|
current
|
Number of the current page
|
objects_per_page
|
The number of records on one page
|
•The stations block contains information on all stations of a requested tariff group. The stations block elements:
Field name
|
Description
|
total
|
Total number of stations that are included to the specified tariff group
|
▫The list array contains information on specific stations of specified tariff group. Elements in the list array:
Field name
|
Description
|
id
|
Station identifier
|
name
|
Station name
|
last_seen_time
|
Time of last connection to the Server
|
last_seen_addr
|
Address from which the stations connected to the Server at last time
|
state
|
The current state of the station. (See Returned station state codes.)
|
|