Restore a Station

Request Parameters

Parameter

Description

Mandatory

group

Group identifier.

This parameter can be defined in the request several times to add the station to several groups at a time.

no

id

Station identifier.

The parameter can be defined in the request as many times as you like to restore multiple stations at a time.

If there is no deleted station with this identifier, the identifier will be returned in the fail block of the response document.

yes

parent-group

Primary group identifier.

If the parameter is not set, then the station is restored with the same parent group that it had before the deletion.

no

 

Request Example

http://192.168.1.1:9080/api/stations/restore.ds?id=1000&id=1001&id=1002

XML and JSON response structure examples are described below.

 

XML Response

<drweb-es-api api_version="4.3.0" timestamp="1527436692" 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 stations

The <station /> element contains an identifier of a restored station.

The <fail /> element contains information about all the nonexistent identifiers of deleted stations, if such identifiers were specified in the request.

The <fail /> element attribute:

Attribute

Description

total

Total number of station identifiers

The <station /> element contains nonexistent identifier of a deleted station specified in the request.

 

JSON Response

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

    "timestamp": 1557453053,

    "api": {
      "version": 40300,

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

      "version": "12.00.0.201909260",
      "uuid": "6d63ec4f-68f7-40ad-a389-8a57a042d3ed"}},

"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 stations

list

The array contains identifiers of restored stations.

The fail block contains information about all the nonexistent identifiers of deleted stations, if such identifiers were specified in the request.

The fail block elements:

Field name

Description

total

Total number of station identifiers

list

The array contains nonexistent identifiers of deleted stations specified in the request.