Request Parameters
Parameter
|
Description
|
Note
|
Mandatory
|
id
|
Group identifier
|
|
yes
|
message
|
Text of a message sent to the station
|
Message text may contain the {link} macro
|
yes
|
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
|
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
|
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
Response Documents Structure
•XML response. •JSON response. XML Response Structure
<drweb-avdesk-api api_version="4.1.3" timestamp="1391507880" server="192.168.1.1" srv_version="10.01.0.201707130" status="true">
<stations total="0">
<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-avdesk-api>
|
Description of XML Response Parameters
•The <stations /> element contains information about all stations to which the message has been sent. The <stations /> element attributes:
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—send is delayed, •failed—send is failed, •initiated—send is initiated. |
JSON Response Structure
{ "head": {
"status": true,
"timestamp": 1395731622,
"api": {
"version": 40103
},
"server": {
"name": "192.168.1.1",
"version": 1000201707130,
"uuid": "1023dcd7-d11d-b211-896d-8804c0842edb"
}},
"data": {
"total": 0,
"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 groups to which the message has been sent.
The data block elements:
Field name
|
Description
|
total
|
Total number of groups to which the message has been sent
|
•The list array contains information about specific groups to which the message has been sent. Elements in the list array:
Field name
|
Description
|
id
|
Group identifier
|
status
|
The state of message sending process. May take the following values:
•delayed—send is delayed, •failed—send is failed, •initiated—send is initiated. |
|