Request Parameters
Parameter
|
Description
|
Note
|
Mandatory
|
user-id
|
User identifier
|
|
yes
|
server-id
|
Identifier of the Server to which stations are connected
|
|
no
|
page
|
Number of displayed pages
|
The default value is 1
|
no
|
per-page
|
Number of records on one page
|
The default value is 100
|
no
|
Request Example
http://192.168.1.1:9080/api/stations/list-by-user-id.ds?page=1&per-page=3&user-id=123456789
Response Documents Structure
•XML response. •JSON response. XML Response Structure
<drweb-avdesk-api api_version="4.1.3" timestamp="1407812974"
server="192.168.1.1" srv_version="10.01.0.201707130" status="true">
<stations total="1">
<station id="f0c53d67-293a-4053-8916-ca04b58fa8b5" name="My station" last_seen_time="0" last_seen_addr="" state="0"
user_id="123456789"/>
</stations>
<pages total="1" current="1" objects-per-page="100"/>
</drweb-avdesk-api>
|
Description of XML Response Parameters
•The <stations /> element contains information on all stations of a specified user. The <stations /> element attributes:
Attribute
|
Description
|
total
|
Total number of stations
|
▫The <station /> element contains information on specific station. 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
|
Network address of last connection of a station to the Server
|
state
|
Station state. May take one of the following values:
• 0—station is offline, • 1—station is online, • 2—access to the Server for a newbie is granted, • 3—access to the Server for a newbie is denied. |
user_id
|
User identifier
|
JSON Response Structure
{"head": {
"status": true,
"timestamp": 1407813623,
"api": {
"version": 40103
},
"server": {
"name": "192.168.1.1",
"version": 1000201707130,
"uuid": "4f89e6b3-fa0c-43c8-934e-f118c50f1ba7"
}
},
"data": {
"pages": {
"objects_per_page": 100,
"total": 1,
"current": 1
},
"stations": [
{
"state": 0,
"last_seen_time": 0,
"name": "My station",
"id": "f0c53d67-293a-4053-8916-ca04b58fa8b5",
"user_id": ""
}
]
}}
|
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 array contains information on all stations of a specified user. Elements in the stations array:
Field name
|
Description
|
state
|
Station state. May take one of the following values:
• 0—station is offline, • 1—station is online, • 2—access to the Server for a newbie is granted, • 3—access to the Server for a newbie is denied. |
last_seen_time
|
Time of last connection to the Server
|
name
|
Station name
|
id
|
Station identifier
|
user_id
|
User identifier
|
|