This page describes the REST endpoints that are added by the @PLUGIN@ plugin.
Please also take note of the general information on the REST API.
GET /config/server/@PLUGIN@~message/
Gets the message of the day.
GET /config/server/@PLUGIN@~message/ HTTP/1.0
As response a MessageOfTheDayInfo entity is returned that contains the message and associated metadata.
HTTP/1.1 200 OK
Content-Disposition: attachment
Content-Type: application/json;charset=UTF-8
)]}'
{
"id": "hello",
"content_id": "768630922",
"starts_at": "Feb 4, 2020 5:53:00 PM",
"expires_at": "Dec 30, 2020 6:00:00 PM",
"html": "hello you!"
}
POST /config/server/@PLUGIN@~message/
Sets the message of the day. Only users with Update Banner capability on the server can call this API. In the request body, the data must be provided as a MessageInput entity.
POST /config/server/@PLUGIN@~message/ HTTP/1.0
Content-Type: application/json; charset=UTF-8
{
"message": "sample announcement",
"expires_at": "11/11/2024, 11:11 PM PST"
}
HTTP/1.1 200 OK
The MessageOfTheDayInfo entity contains information about the message of the day.
id: ID of the messagecontent_id: ID generated based on the message contentstarts_at: Date, when the message will be first displayedexpires_at: Date, after which the message will not be displayed anymorehtml: String, containing the HTML-formatted messageThe MessageInput entity contains information about setting the message.
| Field Name | Description | |
|---|---|---|
message | The message to display in the banner. | |
expires_at | optional | Date, after which the message will not be displayed anymore. Must be specified in MM/dd/yyyy, hh:mm a z format |