Method check_group_night_mode
The method check_group_night_mode determines the current night mode status of a certain group.
Parameters
| Parameter Name |
Description |
Default value |
Optional |
| group_name |
name of the group |
none |
no |
Response
Response will return a json string with result_code=0 in case of success and the data indicating the night mode status.
A non-zero result_code indicates an error and will be accompanied by a description of the error.
| result_code |
Description |
| 0 |
Success |
| 500 |
Error. Details will be present in the json string. |
The data will contain the fields:
- status: 0 (OFF), 1 (ON)
- night_mode_greeting (prompt to be played, if set)
- fwd_night_mode_dest_type
- fwd_night_mode_dest_address
Example:
curl https://DOMAIN_NAME:API_TOKEN@bcs.brastel.com/basix/api/check_group_night_mode' -d '{"group_name": "group1"}'
|
Sample result (night mode OFF):
1
2
3
4
5
6
|
{
"result_code": 0,
"data": {
"night_mode_status": 0
}
}
|
Sample result (night mode ON):
1
2
3
4
5
6
7
8
9
|
{
"result_code": 0,
"data": {
"night_mode_status": 1,
"night_mode_greeting": "night_mode.wav",
"fwd_night_mode_dest_type": 2,
"fwd_night_mode_dest_address": 1111
}
}
|