Request Parameters
Parameter
|
Description
|
Mandatory
|
id
|
Station identifier.
This parameter can be defined in the request several times to delete several 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
|
Parent 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
|
tariff
|
Tariff identifier.
If the parameter is not set, then the station is restored with the same tariff that it had before the deletion.
|
no
|
group
|
Group identifier.
This parameter can be defined in the request several times to add the station to several groups at a time.
|
no
|
Request Example
http://192.168.1.1:9080/api/stations/restore.ds?id=1000&id=1001
Response Documents Structure
•XML response. •JSON response. XML Response Structure
<drweb-avdesk-api api_version="4.1.3" timestamp="1427436692" server="localhost" srv_version="10.00.0.201503210" status="true">
<success total="2">
<station>fd93311d-6f4c-4ff5-b8c9-0b194d52ca6c</station>
<station>ggg3311d-6f4c-4ff5-bjdbfvjhf-s52cjhy</station>
</success>
<fail total="1">
<station>b8c9-0b194d52ca6c-fd93311d-6f4c-4ff5</station>
</fail>
</drweb-avdesk-api>
|
Description of XML Response Parameters
•The <success /> element contains information about all restored stations. The <success /> element attributes:
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 attributes:
Attribute
|
Description
|
total
|
Total number of station identifiers
|
▫The <station /> element contains nonexistent identifier of a deleted station specified in the request. JSON Response Structure
{
"head": {
"status": true,
"timestamp":1427453053,
"api":{
"version":40103
},
"server":{
"name":"localhost",
"version":1000201503210,
"uuid": "6d63ec4f-68f7-40ad-a389-8a57a042d3ed"
}
},
"data":{
"success" : {
"total": 1,
"list": ["fd93311d-6f4c-4ff5-b8c9-0b194d52ca6c"]
},
"fail" : {
"total": 1,
"list": []}}}
|
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
|
▫The list 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
|
▫The list array contains nonexistent identifiers of deleted stations specified in the request.
|