Request Parameters
Parameter
|
Description
|
Note
|
acl-allow
|
Allowed addresses
|
Required parameters: no.
Can be defined several times in the request.
|
acl-disallow
|
Forbidden addresses
|
acl-priority
|
Priority which is given to allowed or forbidden addresses
|
Required parameter: no.
Values: allow, deny. Default is allow
|
city
|
City
|
Required parameter: no
|
country
|
Country
|
Required parameter: no.
Specified in the ISO format: RU, UA, etc.
|
department
|
Department
|
Required parameter: no
|
description
|
Description
|
Required parameter: no
|
email
|
Station email
|
Required parameter: no
|
floor
|
Floor
|
Required parameter: no
|
group
|
Groups
|
Required parameter: no
|
id
|
Station identifier
|
Required parameter: no.
If not set, a parameter will be generated automatically.
|
latitude
|
Latitude
|
Required parameters: no.
The parameters are specified in the decimal format (for example, 38.898556, -77.037852).
|
longitude
|
Longitude
|
name
|
Station name
|
Required parameter: no
|
organization
|
Organization
|
Required parameter: no
|
parent-group
|
Parent group
|
Required parameter: no
|
password
|
Password
|
Required parameter: no
|
province
|
Province
|
Required parameter: no
|
room
|
Room
|
Required parameter: no
|
street
|
Street
|
Required parameter: no
|
Specification format for the acl-allow and acl-disallow parameters: <protocol>/<address>/<mask>, where:
Parameter
|
Description
|
Mandatory
|
Default value
|
<address>
|
IP address or domain name
|
yes
|
|
<mask>
|
network mask
|
no
|
255.255.255.255 (/32)
|
<protocol>
|
TCP/IP (including IPv6) protocol
|
no
|
TCP/IP
|
Request Example
http://192.168.1.1:9080/api/stations/add.ds?id=1001&password=123456&name=station1234&acl-allow=192.168.1.1&acl-disallow=192.168.1.2&acl-priority=allow
|
XML and JSON response structure examples are described below.
XML Response
<drweb-es-api api_version="4.3.0" timestamp="1495740729" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
<station id="1001"/>
</drweb-es-api>
|
Description of XML Response Parameters
The <station /> element contains information about the created station.
The <station /> element attribute:
Attribute
|
Description
|
id
|
Identifier of created station
|
JSON Response
{ "head": {
"status": true,
"timestamp": 1393491700,
"api": {
"version": 40300,
"versionString": 4.3.0},
"server": {
"name": "192.168.1.1",
"version": "12.00.0.201909260",
"uuid": "7209d122-3b23-4134-94a9-0c1c645e21f3"}},
"data": {
"id": "1001"}}
|
Description of JSON Response Parameters
The data block contains information about the created station.
The data block element:
Field name
|
Description
|
id
|
Identifier of created station
|
|