Send a Message to a Station

Request Parameters

Parameter

Description

Mandatory

id

Station ID.

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

yes

link-text

The {link} macro will be substituted with a string defined in this parameter

no

link-url

Link to a page, which will open if macro is launched {link}

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

Link to a page, which will open if logo is clicked

no

message

Text of a message sent to the station.

Message text may contain the {link} macro.

yes

 

Request Example

https://192.168.1.1:9081/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 Structure

<drweb-es-api api_version="4.3.0" timestamp="1582030327" server="192.168.1.1" srv_version="13.00.0.202005090" 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 on sending a message to stations specified in a request.

The <stations /> element attribute:

Attribute

Description

total

Total number of stations in a response

The <stations/> element contains information on sending a message to a specific station.

The <station /> element attributes:

Attribute

Description

id

Station identifier

status

Message sending status:

delayed—sending is delayed,

failed—sending is failed,

initiated—sending is initiated.

 

JSON Response Structure

{ "head": {
    "status": true,
    "timestamp": 1582030584,

    "api": {
      "version": 40300,
      "versionString": 4.3.0},

    "server": {
      "name": "192.168.1.1",

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

 "data": {
    "total": 2,

    "list": {
       "1000": "initiated",
       "1001": "delayed"}}}

 

Description of JSON Response Parameters

The data block contains information on sending a message to stations specified in a request.

The data block elements:

Field name

Description

total

Total number of stations in a response

list

Block with results of sending a message for each station

The list block elements:

Field name

Description

Station ID

Message sending status:

delayed—sending is delayed,

failed—sending is failed,

initiated—sending is initiated.