Search for Stations and Groups

Top  Previous  Next

Request Parameters

Parameter

Description

Valid values

Note

Mandatory

query

Search string

-

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

yes

groups

Search by groups

yes | no

By default is yes

no

stations

Search by stations

yes | no

By default is no

no

tariffs

Search by tariff groups

yes | no

By default is no

no

Request Example

Response Documents Structure

XML response.

JSON response.

XML Response Structure

<drweb-avdesk-api api_version="4.1.3" timestamp="1396521309" server="192.168.1.1" srv_version="10.01.0.201707130" status="true">

<groups total="4">

<group id="123" name="123123" description="" parent_id="" parent_name="" child_groups="0" stations="0"/>

<group id="20e27d73-d21d-b211-a788-85419c46f0e6" name="Everyone" description="All stations" parent_id="" parent_name="" child_groups="0" stations="4"/>

<group id="1234" name="New1" description="" parent_id="" parent_name="" child_groups="1" stations="0"/>

<group id="e9138544-b9ad-4504-958f-dd29b504fc47" name="New2" description="" parent_id="1234" parent_name="New1" child_groups="0" stations="1"/>

</groups>

<stations total="1">

<station id="a7dc5ddb-6f35-4311-976d-9de7ff7e0035" name="Mac-mini-admin.local" parent_id="20e27d73-d21d-b211-a788-85419c46f0e6" parent_name="Everyone" description="" last_seen_time="1396512183" last_seen_addr="tcp://192.168.1.2:49338" user-id=""/>

</stations>

</drweb-avdesk-api>

Description of XML Response Parameters

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

The <groups /> element attributes:

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

Identifier of a parent group

parent_name

Name of a parent group

child_groups

Number of child groups

stations

Number of stations that are included into this group

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

The <stations /> element attributes:

Attribute

Description

total

Total number of stations that are corresponded the search request

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

The <station /> element attributes:

Attribute

Description

id

Station identifier

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 Structure

{   "head": {

      "status": true,

      "timestamp": 1396521677,

      "api": {

          "version": 40103

      },

      "server": {

          "name": "192.168.1.1",

          "version": 1000201707130,

          "uuid": "7c889d36-b94a-42b8-b2c6-8c3a5500bf1e"

      }

  },

  "data": {

      "groups": {

          "total": 4,

          "list": [

              {

                  "id": "123",

                  "name": "123123",

                  "parent_id": null,

                  "parent_name": null,

                  "child_groups": 0,

                  "stations": 0,

                  "description": null

              },

              {

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

                  "name": "Everyone",

                  "parent_id": null,

                  "parent_name": null,

                  "child_groups": 0,

                  "stations": 4,

                  "description": "All stations"

              },

          ]

      },

      "stations": {

          "total": 1,

          "list": [

              {

                  "id": "a7dc5ddb-6f35-4311-976d-9de7ff7e0035",

                  "name": "Mac-mini-admin.local",

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

                  "parent_name": "Everyone",

                  "description": null,

                  "last_seen_at": 1396512183,

                  "last_seen_addr": "tcp://192.168.1.1:49338"

                   "user_id": null

              }

          ]

      }

  }

}

Description of JSON Response Parameter

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 on specific groups.

Elements in the list array:

Field name

Description

id

Group identifier

name

Group name

description

Description string

parent_id

Identifier of a parent group

parent_name

Name of a parent group

child_groups

Number of child groups

stations

Number of stations that are 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 on specific stations.

Elements in the list array:

Field name

Description

id

Station identifier

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