Get a List of Stations by State

Request Parameters

Parameter

Description

Mandatory

group-id

ID of a group, which includes the stations to be provided in a response.

The response contains information about all stations in the specified group (ignoring the nested ones).

no

page

Page number to be returned in a response, in paged view (can be used to display information about a large number of stations).

The default value is 1.

no

per-page

Number of stations per page in paged view (can be used to display information about a large number of stations).

The default value is 100.

no

server-id

ID of the Dr.Web Server the stations are connected to

no

state

Station status:

activated—stations are activated,

deinstalled—anti-virus software was uninstalled from stations,

deleted—stations were deleted,

new—new stations, anti-virus software is not installed,

newbies—newbie stations,

offline—stations are offline,

online—stations are online,

unactivated—stations are not activated,

with_update_errors—stations with errors of anti-virus software updates.

This parameter can be repeated any number of times per request to request information about multiple statuses at a time.

no

The page and per-page parameters can work with one state value only.

 

Request Example

https://192.168.1.1:9081/api/stations/list-by-state.ds?page=1&per-page=2&state=new

XML and JSON response structure examples are described below.

 

XML Response Structure

<drweb-es-api api_version="4.3.0" timestamp="1558521951" server="192.168.1.1" srv_version="13.00.0.202005090" status="true">
  <stations>
     <new total="2">
        <station id="1003" name="DRWEB-1003" last_seen_time="1587574768" last_seen_addr="tcp://192.168.10.124:1921" os="35850247" os_name="Windows 7 Professional x64"/>

        <station id="1004" name="DRWEB-1004" last_seen_time="1489574584" last_seen_addr="tcp://192.168.1.2:1038" os="0" os_name="unknown"/>
     </new>
  </stations>

  <pages total="2" current="1" objects-per-page="2"/>
</drweb-es-api>

Description of XML Response Parameters

The <stations /> element contains information about all stations consistent with the request.

Names of elements nested in the <stations /> element correspond with requested statuses.

Attribute of each nested element:

Attribute

Description

total

Total number of stations with the requested status per page

The <station /> element contains information about a specific station.

The <station /> element attributes:

Attribute

Description

id

Station ID

name

Station name

last_seen_time

Time of last connection to the Dr.Web Server

last_seen_addr

Network address from which a station connected to the Dr.Web Server the last time

os

Operating system code

os_name

Operating system name

onconnect

Action to be performed when a station connects to the Dr.Web Server next time:

0—perform nothing,

1—access to the Dr.Web Server for a newbie will be denied,

2—access to the Dr.Web Server for a newbie will be granted.

state

Station status:

0—station is offline,

1—station is online,

2—access to the Dr.Web Server for a newbie is granted,

3—access to the Dr.Web Server for a newbie is denied.

The onconnect and state attributes are provided in a response for stations with the newbies status only.

The <pages /> element contains information about the paged view.

The <pages /> element attributes:

Attribute

Description

total

Total number of pages

current

Current page number

objects-per-page

Max number of stations per page

 

JSON Response Structure

{ "head": {
    "status": true,

    "timestamp": 1587680158,

    "api": {
      "version": 40300,
      "versionString": 4.3.0},

    "server": {
      "name": "192.168.1.1",

      "version": "13.00.0.202005090",
      "uuid": "6d8f5aa0-850a-11ea-4c3c-c8efa441e4dd"}},

 "data": {
    "pages": {
      "current": 1,

      "objects_per_page": 2,
      "total": 2},

    "stations": {
      "new": [
          {"id": "1003",

          "last_seen_addr": "tcp://192.168.10.124:1921",

          "last_seen_time": 1587574768,

          "name": "DRWEB-1003",

          "os": 35850247,
          "os_name": "Windows 7 Professional x64",
          "state": 1},

          {"id": "1004",
          "last_seen_time": 0,

          "name": "DRWEB-1004",

          "os": 0,
          "os_name": "unknown",
          "state": 0}]}}}}

Description of JSON Response Parameters

The pages block contains information about the paged view.

The pages block elements:

Field name

Description

current

Current page number

objects_per_page

Max number of stations per page

total

Total number of pages

The stations block contains arrays with information about all stations consistent with the request.

Every nested array contains parameters for a specific station with certain status. Nested array name corresponds with the station status.

Object elements in a nested array:

Field name

Description

id

Station ID

last_seen_addr

Network address from which a station connected to the Dr.Web Server the last time

last_seen_time

Time of last connection to the Dr.Web Server

name

Station name

onconnect

Action to be performed when a station connects to the Dr.Web Server next time:

0—perform nothing,

1—access to the Dr.Web Server for a newbie will be denied,

2—access to the Dr.Web Server for a newbie will be granted.

os

Operating system code

os_name

Operating system name

state

Station status:

0—station is offline,

1—station is online,

2—access to the Dr.Web Server for a newbie is granted,

3—access to the Dr.Web Server for a newbie is denied.

The onconnect and state elements are provided in a response for stations with the newbies status only.