(Status API)
Line 4: Line 4:
 
* '''status''' - represent some method of [Status API]
 
* '''status''' - represent some method of [Status API]
 
* '''service''' - implements several methods to send SMS and telemetry
 
* '''service''' - implements several methods to send SMS and telemetry
 +
* '''health''' - represent some method of [Status API]
  
 
= Detection of entry point =
 
= Detection of entry point =
Line 41: Line 42:
 
'''destination''' - ID of destination station or group<br>
 
'''destination''' - ID of destination station or group<br>
 
'''output1''' ... '''output8''' - command for each output (same as [[MQTT API]]): 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse
 
'''output1''' ... '''output8''' - command for each output (same as [[MQTT API]]): 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse
 +
 +
= Health API =
 +
 +
/health/<object><br>
 +
/health/<object>/?action=check<br>
 +
/health/<object>/?action=measure<br>
 +
<br>
 +
available objects list is available via system.php / D-BUS<br>

Revision as of 18:18, 18 October 2019

Since version BrandMeister 20190421-185653 has built-in web server.

Embedded web server provides several services such as:

  • status - represent some method of [Status API]
  • service - implements several methods to send SMS and telemetry
  • health - represent some method of [Status API]

Detection of entry point

system.php provides a data of entry point of HTTP interface. Please check ‘'remote’' object, returned by system.php. Port parameter corresponds to TCP port and ‘'Secure'’ indicates using of HTTPS (or HTTP).

Status API

  • /status/system.json
  • /status/status.json
  • /status/list.json
  • /status/terminal.json
  • /status/status.msgpack
  • /status/list.msgpack
  • /status/terminal.msgpack

.json methods implement fully the same structure of data as .php version. .msgpack methods have MeasagePack-encoded data in the same order as .json version. Please check info about General Status API (.php) at API/Status.

Service API

This service API requires to use HTTP Digest Authentication, where username is an registered application ID. All requests should be sent as HTTP POST method having type application/x-www-form-urlencoded In case of success server returns HTTP code 200 or 500 in case of failure.

/service/message

source - ID to be used as a source
destination - ID of destination station or group
type - ‘'private'’ or '‘announce'’ (for group message)
text - message text in UTF-8

/service/telemetry

source - ID to be used as a source
destination - ID of destination station or group
output1 ... output8 - command for each output (same as MQTT API): 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse

Health API

/health/<object>
/health/<object>/?action=check
/health/<object>/?action=measure

available objects list is available via system.php / D-BUS

Since version BrandMeister 20190421-185653 has built-in web server.

Embedded web server provides several services such as:

Detection of entry point[edit]

system.php provides a data of entry point of HTTP interface. Please check ‘'remote’' object, returned by system.php. Port parameter corresponds to TCP port and ‘'Secure'’ indicates using of HTTPS (or HTTP).

Status API[edit]

.json methods implement fully the same structure of data as .php version. .msgpack methods have MeasagePack-encoded data in the same order as .json version. Please check info about General Status API (.php) at API/Status.

Service API[edit]

This service API requires to use HTTP Digest Authentication, where username is an registered application ID. All requests should be sent as HTTP POST method having type application/x-www-form-urlencoded In case of success server returns HTTP code 200 or 500 in case of failure.

/service/message[edit]

source - ID to be used as a source
destination - ID of destination station or group
type - ‘'private'’ or '‘announce'’ (for group message)
text - message text in UTF-8

/service/telemetry[edit]

source - ID to be used as a source
destination - ID of destination station or group
output1 ... output8 - command for each output (same as MQTT API): 0 = None, 20 = Clear, 21 = Set, 22 = Toggle, 23 = Pulse

Health API[edit]

/health/<object>
/health/<object>/?action=check
/health/<object>/?action=measure

available objects list is available via system.php / D-BUS