Send a Group Message

Request Parameters

Parameter

Description

Mandatory

id

Group ID

yes

link-text

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

no

link-url

Link to a page to open when the {link} macro starts

no

logo

Logo in BMP format (24-bit image in the base64 encoding)

no

logo-text

Text placed to the right of the logo, for example, a company’s name

no

logo-url

Link to a page to open when the logo is clicked

no

message

Message text to send to a group.

Message text may contain the {link} macro

yes

Request Example

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

<drweb-es-api api_version="4.3.2" timestamp="1582030330" server="192.168.1.1" srv_version="13.00.1.202310121" status="true">

  <stations total="3">

     <station id="Gr2" status="delayed"/>

     <station id="1002" status="delayed"/>

     <station id="Test2" status="failed"/>

  </stations>

</drweb-es-api>

Description of XML Response Parameters

The <stations /> element contains information about the message sent to stations in a group specified in the request.

The <stations /> element attribute:

Attribute

Description

total

Total number of stations in a response

The <station /> element contains information about the message sent to a specific station.

The <station /> element attributes:

Attribute

Description

id

Station ID

status

Message sending status:

delayed—sending was delayed,

failed—sending failed,

initiated—sending was initiated.

JSON Response Structure

{ "head": {

    "status": true,

    "timestamp": 1582030586,

    "api": {

      "version": 40302,

      "versionString": "4.3.2"},

    "server": {

      "name": "192.168.1.1",

      "version": "13.00.1.202310121",

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

"data": {

    "total": 3,

    "list": {

      "Gr2": "delayed",

      "1002": "delayed",

      "Test2": "failed"}}}

Description of JSON Response Parameters

The data block contains information about the message sent to stations in a group specified in the request.

The data block elements:

Field name

Description

total

Total number of stations in a response

list

Block containing message sending results for each station

The list block elements:

Field name

Description

Station ID

Message sending status:

delayed—sending was delayed,

failed—sending failed,

initiated—sending was initiated.