Restore a Station

Request Parameters

Parameter

Description

Mandatory

group

Group ID.

Parameter can be defined in a request several times to add a station to multiple groups at a time.

no

id

Station ID.

Parameter can be defined in a request several times to restore multiple stations at a time.

If a deleted station with a passed ID is not found, then this ID will be returned in the fail block of a response document.

yes

parent-group

Primary group ID.

If parameter is not set, then station will be restored within the same primary group that it belonged to before deletion.

no

 

Request Example

https://192.168.1.1:9081/api/stations/restore.ds?id=1000&id=1001&id=1002

XML and JSON response structure examples are described below.

 

XML Response Structure

<drweb-es-api api_version="4.3.0" timestamp="1582030262" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <success total="2">
     <station>1000</station>

     <station>1001</station>
  </success>

  <fail total="1">
     <station>1002</station>
  </fail>
</drweb-es-api>

 

Description of XML Response Parameters

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

The <success /> element attribute:

Attribute

Description

total

Total number of restored stations

The <station /> element value contains ID of a restored station.

The <fail /> element contains information about nonexistent IDs of deleted stations, if such IDs were passed in a request.

The <fail /> element attribute:

Attribute

Description

total

Total number of nonexistent IDs of deleted stations

The <station /> element contains nonexistent ID of a deleted station.

 

JSON Response Structure

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

    "timestamp": 1582030519,

    "api": {
      "version": 40300,

      "versionString": 4.3.0},
    "server": {
      "name": "192.168.1.1",

      "version": "12.00.0.201909260",
      "uuid": "eae1a652-96d5-48fd-9169-4788a03688b8"}},

"data": {
    "success": {
      "total": 2,

      "list": [
          "1000",
          "1001"]},

    "fail": {
      "total": 1,

      "list": [
          "1002"]}}}

 

Description of JSON Response Parameters

The success block contains information about all restored stations.

The success block elements:

Field name

Description

total

Total number of restored stations

list

Array with IDs of restored stations

Elements of objects in the list array:

Field name

Description

id

Station ID

The fail block contains information about nonexistent IDs of deleted stations if such IDs were passed in a request.

The fail block elements:

Field name

Description

total

Total number of nonexistent IDs of deleted stations

list

Array with nonexistent IDs of deleted stations

Elements of objects in the list array:

Field name

Description

id

Nonexistent ID of a station