1. Get the System Announcement Message Details
This GET method returns the system announcement message details.
Note: Only administrators can execute this API.
GET | {{url}}/api/settings/banner |
Request Example
curl -X GET '{{url}}/api/settings/banner>' -H 'Authorization: Bearer <token>'
Response Example
{
"status": "ON",
"messageType": "INFO",
"message": "Test message."
}
Status: 200 OK |
2. Save the System Announcement Message
This POST method saves the system announcement message details.
Note: Only administrators can execute this API. If messageSchedule is not provided in the request JSON body, the system announcement message is shown immediately for unlimited time.
POST | {{url}}/api/settings/banner |
Request Example
curl -X POST '{{url}}/api/settings/banner' -H 'Authorization: Bearer <token>' -H 'content-type: application/json'
-d
'{
"status":"ON",
"messageType":"INFO",
"message":"Test message.",
"messageSchedule":{
"startDate":"2024-02-20 20:00:00",
"endDate":"2024-02-21 20:00:00",
"timeZone":"Asia/Kolkata"
}
}'
Response Example
{
"status": "ON",
"messageType": "INFO",
"message": "Test message.",
"messageSchedule": {
"startDate": "2024-02-20 20:00:00",
"endDate": "2024-02-21 20:00:00",
"timeZone": "Asia/Kolkata"
}
}
Status: 201 Created |
3. Get the System Announcement Message
This GET method returns the system announcement message details. Any authenticated user can access this API to get the details.
GET | {{url}}/api/banner |
Request Example
curl -X GET '{{url}}/api/banner>' -H 'Authorization: Bearer <token>'
Response Example
{
"messageType": "INFO",
"message": "Test message."
}
Status: 200 OK |