Request Parameters
Parameter
|
Description
|
Obligatory
|
id
|
Station identifier
|
yes
|
link-text
|
The {link} macro will be substituted with a string defined in this parameter
|
no
|
link-url
|
Page URL opened when the {link} is clicked
|
no
|
logo
|
Logo in BMP format (24-bit image in the base64 encoding)
|
no
|
logo-text
|
Text placed to left of the logo, for example, a company name
|
no
|
logo-url
|
Logo URL opened when the logo is clicked
|
no
|
message
|
Text of a message sent to the station.
Message text may contain the {link} macro.
|
yes
|
Request Example
http://192.168.1.1:9080/api/stations/send-message.ds?id=1000&id=1001&message=message&logo-text=logo-text&logo-url=www.drweb.com&link-text=drweb&link-url=drweb.com&logo={base64}
|
XML and JSON response structure examples are described below.
XML Response
<drweb-es-api api_version="4.3.0" timestamp="1558521952" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
<stations total="2">
<station id="1000" status="initiated"/>
<station id="1001" status="delayed"/>
</stations>
</drweb-es-api>
|
Description of XML Response Parameters
The <stations /> element contains information about all stations to which the message has been sent.
The <stations /> element attribute:
Attribute
|
Description
|
total
|
Total number of stations to which the message has been sent
|
•The <station /> element contains information about a specific station to which the message has been sent. The <station /> element attributes:
Attribute
|
Description
|
id
|
Station identifier
|
status
|
The state of message sending process. Can take the following values:
•delayed—sending is delayed, •failed—sending is failed, •initiated—sending is initiated. |
JSON Response
{ "head": {
"status": true,
"timestamp": 1552276920,
"api": {
"version": 40300,
"versionString": 4.3.0},
"server": {
"name": "192.168.1.1",
"version": "12.00.0.201909260",
"uuid": "a509dab1-d423-4059-971a-aa3944a2c48a"}},
"data": {
"total": 2,
"list": {
"1000": "initiated",
"1001": "delayed"}}}
|
Description of JSON Response Parameters
The data block contains information on all stations to which the message has been sent.
The data block elements:
Field name
|
Description
|
total
|
Total number of stations to which the message has been sent
|
•The list array contains information about specific stations to which the message has been sent. Elements in the list array:
Field name
|
Description
|
Identifier of a station to which the message has been sent
|
The state of message sending process. Can take the following values:
•delayed—sending is delayed, •failed—sending is failed, •initiated—sending is initiated. |
|