Send a Message to Stations of a Group

Request Parameters

Parameter

Description

Obligatory

id

Group 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/groups/send-message.ds?message=TEST_MSG&id=1&logo=logo_base64&logo-text=logo-text&logo-url=www.logo.ru&link-text=test%20text&link-url=www.url.ru

XML and JSON response structure examples are described below.

 

XML Response

<drweb-es-api api_version="4.3.0" timestamp="1558521911" server="192.168.1.1" srv_version="12.00.0.201909260" status="true">
  <stations total="3">
     <station id="203fe068-d21d-b211-ac5b-840701ce1bdd" status="delayed"/>

     <station id="50b63369-d21d-b211-ac61-840701ce1bdd" status="delayed"/>
     <station id="30fa7468-d21d-b211-ac55-840701ce1bdd" 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

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. May take the following values:

delayed—sending is delayed,

failed—sending is failed,

initiated—sending is initiated.

 

JSON Response

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

    "timestamp": 1558521992,

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

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

      "version": "12.00.0.201909260",
      "uuid": "27671337-e0b0-4f60-aeb0-ab1f2ca47f77"}},

"data": {
    "total": 3,

    "list": {
      "203fe068-d21d-b211-ac5b-840701ce1bdd": "delayed",

      "50b63369-d21d-b211-ac61-840701ce1bdd": "delayed",
      "30fa7468-d21d-b211-ac55-840701ce1bdd": "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. May take the following values:

delayed—sending is delayed,

failed—sending is failed,

initiated—sending is initiated.