Search for Stations and Groups

Request Parameters

Parameter

Description

Valid values

Note

groups

Search by groups

yes | no

Required parameter: no.

The default value is yes

query

Search string

Required parameter: yes.

The script searches for matches in the identifier, name and description string of an object and in the identifiers of users.

stations

Search by stations

yes | no

Required parameter: no.

The default value is no

 

Request Example

http://192.168.1.1:9080/api/server/search.ds?query=1&groups=yes&stations=yes

XML and JSON response structure examples are described below.

 

XML Response

<drweb-es-api api_version="4.3.0" timestamp="11558521947" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <groups total="2">
     <group id="20e27d73-d21d-b211-a788-85419c46f0e6" name="Everyone" description="All stations" parent_id="" parent_name="" child_groups="0" stations="2"/>

     <group id="10f58fa7-ffa6-4e85-ba4a-f67f44455a75" name="GroupAfterAddGroupFunctional3" description="" parent_id="ParentGroupForAGF5" parent_name="ParentGroupForAGF5" child_groups="0" stations="0"/>
  </groups>

  <stations total="2">
     <station id="StationForChangeStationFunctional1" name="StationForChangeStationFunctional1" parent_id="20e27d73-d21d-b211-a788-85419c46f0e6" parent_name="Everyone" description="StationForChangeStationFunctional 1" last_seen_time="0" last_seen_addr="" user-id=""/>

     <station id="2091ada3-ed5e-e611-3392-f0b9022a5484" name="WIN-7-PRO-SP1-X" parent_id="20e27d73-d21d-b211-a788-85419c46f0e6" parent_name="Everyone" description="" last_seen_time="1489567785" last_seen_addr="tcp://192.168.1.2:49285" user-id=""/>
  </stations>
</drweb-es-api>

 

Description of XML Response Parameters

The <groups /> element contains information on all groups that are corresponded the search request.

The <groups /> element attribute:

Attribute

Description

total

Total number of groups that are corresponded the search request

The <group /> element contains information on specific group that is corresponded the search request.

The <group /> element attributes:

Attribute

Description

id

Group identifier

name

Group name

description

Description string

parent_id

Parent group identifier

parent_name

Parent group name

child_groups

Number of child groups

stations

Number of stations included into this group

The <stations /> element contains information on all stations that are corresponded the search request.

The <stations /> element attribute:

Attribute

Description

total

Total number of stations included into the specified group

The <station /> element contains information on specific station that is corresponded the search request.

The <station /> element attributes:

Attribute

Description

id

Station ID

name

Station name

parent_id

Identifier of a primary group

parent_name

Name of a primary group

description

Description string

last_seen_time

Time of a last connection of a station to the Server

last_seen_addr

Address from which the station connected to the Server at the last time

user-id

User identifier

JSON Response

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

    "timestamp": 1558522035,

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

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

      "version": "12.00.0.201909260",
      "uuid": "27671337-e0b0-4f60-aeb0-ab1f2ca47f77"}},

"data": {
    "groups": {
      "total": 2,

      "list": [
          {"child_groups": 0,

          "description": "All stations",

          "id": "20e27d73-d21d-b211-a788-85419c46f0e6",

          "name": "Everyone",

          "parent_id": null,

          "parent_name": null,
          "stations": 2},

          {"child_groups": 0,
          "description": null,

          "id": "10f58fa7-ffa6-4e85-ba4a-f67f44455a75",

          "name": "GroupAfterAddGroupFunctional3",

          "parent_id": "ParentGroupForAGF5",

          "parent_name": "ParentGroupForAGF5",
          "stations": 0}]},

    "stations": {
      "total": 2,

      "list": [
          {"description": "StationForChangeStationFunctional 1",

          "id": "StationForChangeStationFunctional1",

          "last_seen_addr": null,

          "last_seen_at": 0,

          "name": "StationForChangeStationFunctional1",

          "parent_id": "20e27d73-d21d-b211-a788-85419c46f0e6",
          "parent_name": "Everyone"}

          {"description": null,
          "id": "2091ada3-ed5e-e611-3392-f0b9022a5484",

          "last_seen_addr": "tcp://192.168.233.131:49285",

          "last_seen_at": 1489567785,

          "name": "WIN-7-PRO-SP1-X",

          "parent_id": "20e27d73-d21d-b211-a788-85419c46f0e6",
          "parent_name": "Everyone"}]}}}

 

Description of JSON Response Parameters

The groups block contains information on all groups that are corresponded the search request.

The groups block elements:

Field name

Description

total

Total number of groups that are corresponded the search request

The list array contains information about specific groups.

Elements in the list array:

Field name

Description

child_groups

Number of child groups

description

Description string

id

Group identifier

name

Group name

parent_id

Parent group identifier

parent_name

Parent group name

stations

Number of stations included into this group

The stations block contains information on all stations that are corresponded the search request.

The stations block elements:

Field name

Description

total

Total number of stations that are corresponded the search request

The list array contains information about specific stations.

Elements in the list array:

Field name

Description

description

Description string

id

Station identifier

last_seen_addr

Address from which the station connected to the Server at the last time

last_seen_time

Time of a last connection of a station to the Server

name

Station name

parent_id

Identifier of a primary group

parent_name

Name of a primary group