Get Information about Products on a Station

Request Parameters

Parameter

Description

Obligatory

id

Station identifier.

This parameter can be defined in the request several times to get the data about products for several stations at a time.

yes

 

Request Example

http://192.168.1.1:9080/api/stations/products.ds?id=123456789

XML and JSON response structure examples are described below.

 

XML Response

<drweb-es-api api_version="4.3.0" timestamp="1561465774" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <stations total="1">
    <station id="88e984a0-6031-11e9-5b7e-f4ffebd769bf">
        <products total="4">
          <product code="10-drwbases" modified_time="1560510660" revision="12020190603092307" state_code="S" state="Normal">Dr.Web virus databases</product>

          <product code="10-drwspamdb" modified_time="1560510660" revision="12020190603090829" state_code="F" state="Update failed">Dr.Web Anti-spam databases</product>

          <product code="20-drwagent" modified_time="1560510660" revision="12020190530164458" state_code="S" state="Normal">Dr.Web Agent for Windows</product>

          <product code="10-drwgatedb" modified_time="1560510660" revision="12020190603090829" state_code="F" state="Update failed">SpIDer Gate databases</product>
        </products>
    </station>
  </stations>
</drweb-es-api>

 

Description of XML Response Parameters

The <stations /> element contains information about all stations.

The <stations /> element attribute:

Attribute

Description

total

Total number of stations

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

The <station /> element attribute:

Attribute

Description

id

Station identifier

The <products /> element contains information on all stations of a specified station.

The <products /> element attribute:

Attribute

Description

total

Total number of products

The <product /> element contains information on a specific product.

The <product /> element attributes:

Attribute

Description

code

Product code

modified_time

The date of last revision update in the Unix timestamp format

revision

Revision number

state_code

Code of the update state. May take one of the following values:

D—update is delayed,

F—update error,

S—the product is updated successfully.

state

Update state. May take one of the following values:

Delayed—update is delayed,

Update failed—update error,

Normal—the product is updated successfully.

 

JSON Response

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

    "timestamp": 1561465752,

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

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

      "version": "12.00.0.201909260",
      "uuid": "76b05bc0-8691-11e9-63e5-7036cecd07fa"}}

"data": {
    "total": 1,

    "list": [
      {"products": {
          "10-drwbases": {
              "modified_time": "1560510660",

              "name": "Dr.Web virus databases",

              "revision": 12020190603092307,

              "state": "Normal",
              "state_code": "S"},

          "10-drwgatedb": {
              "modified_time": "1560510660",

              "name": "SpIDer Gate databases",

              "revision": 12020190603090829,

              "state": "Update failed",
              "state_code": "F"},

          "10-drwspamdb": {
              "modified_time": "1560510660",

              "name": "Dr.Web Anti-spam databases",

              "revision": 12020190603090829,

              "state": "Update failed",
              "state_code": "F"},

          "20-drwagent": {
              "modified_time": "1560510660",

              "name": "Dr.Web Agent for Windows",

              "revision": 12020190530164458,

              "state": "Normal",
              "state_code": "S"}},
        "station_id": "88e984a0-6031-11e9-5b7e-f4ffebd769bf",
        "total": 4}]}}

 

Description of JSON Response Parameters

The data block contains information on all requested stations.

The data block elements:

Field name

Description

total

Total number of stations information on which is displayed in response

The list array contains information on all requested stations.

Elements in the list array:

Field name

Description

station_id

Station identifier

total

Total number of products on the station

The products array contains information about specific products on a station, nested blocks names corresponding the product codes.

Elements in the products array:

Field name

Description

modified_time

The date of last revision update in the Unix timestamp format

name

Product name

revision

Revision number

state

Update state. May take one of the following values:

Delayed—update is delayed,

Update failed—update error,

Normal—the product is updated successfully.

state_code

Code of the update state. May take one of the following values:

D—update is delayed,

F—update error,

S—the product is updated successfully.