/sys/config/ui/custom-messages
Vault Enterprise license required
The /sys/config/ui/custom-messages
endpoint is used to list, create, read, update, or delete custom messages.
List custom messages
This endpoint returns a list of all custom messages that exist.
Method | Path |
---|---|
LIST | /sys/config/ui/custom-messages/ |
Parameters
active
(bool: <optional>)
- A flag indicating whether to only include custom messages whose active property is set to the value specified in the results. If this parameter is omitted, the results include both active and inactive custom messages.authenticated
(bool: <optional>)
- A flag indicating whether to only include custom messages whose authenticated property is set to the value specified in the results. If this parameter is omitted, the results include both authenticated and unauthenticated custom messages.type
(string: <optional>)
- A flag that can only be set to eitherbanner
ormodal
. It indicates whether to only include custom messages whose type property is set to the value specified in the results. If this parameter is omitted, the results include both types of custom messages.
Sample request
Sample response
Create custom message
This endpoint allows the creation of a new custom message. Vault allows up to 100 custom messages per namespace. If this endpoint is called to create a custom message when the maximum number of custom messages already exists, an error will be returned.
Method | Path |
---|---|
POST | /sys/config/ui/custom-messages/ |
Parameters
title
(string: <required>)
- The title of the custom message.authenticated
(bool: <optional>)
- A flag indicating whether the custom message is displayed post-login (true
) or pre-login (false
). If this parameter is omitted, the custom message is created as post-login. Pre-login messages may be retrieved by anonymous clients, as such their content should not contain any sensitive information.type
(string: <optional>)
- The type of the custom message. Must be eitherbanner
ormodal
. If this parameter is omitted, the custom message type is set tobanner
.message
(string: <required>)
- The base64 encoded message body of the custom message.link
(Map: <optional>)
- A link object that contains a single property. The property key is the link title and its value is the URL.options
(Map: <optional>)
- A map of custom UI properties to set for the custom message.start_time
(string: <required>)
- A RFC3339 formatted timestamp that marks the beginning of the custom message's active period.end_time
(string: <optional>)
- A RFC3339 formatted timestamp that marks the end of the custom message's active period. If no end time is provided, the custom message's active period never ends.
Sample payload
Sample request
Sample response
Read custom message
This endpoint returns the properties of a specific custom message.
Method | |
---|---|
GET | /sys/config/ui/custom-messages/:id |
Parameters
id
(string: <required>)
- The unique ID assigned to the custom message at creation time.
Sample request
Sample response
Update custom message
This endpoint updates the properties of a specific custom message.
Method | |
---|---|
POST | /sys/config/ui/custom-messages/:id |
Parameters
id
(string: <required>)
- The unique ID assigned to the custom message at creation time.title
(string: <required>)
- The title of the custom message.authenticated
(bool: <optional>)
- A flag indicating whether the custom message is displayed post-login (true
) or pre-login (false
). If this parameter is omitted, the custom message is created as post-login. Pre-login messages may be retrieved by anonymous clients, as such their content should not contain any sensitive information.type
(string: <optional>)
- The type of the custom message. Must be eitherbanner
ormodal
. If this parameter is omitted, the custom message type is set tobanner
.message
(string: <required>)
- The base64 encoded message body of the custom message.link
(Map: <optional>)
- A link object that contains a single property. The property key is the link title and its value is the URL.options
(Map: <optional>)
- A map of custom UI properties to set for the custom message.start_time
(string: <required>)
- A RFC3339 formatted timestamp that marks the beginning of the custom message's active period.end_time
(string: <optional>)
- A RFC3339 formatted timestamp that marks the end of the custom message's active period. If no end time is provided, the custom message's active period never ends.
Sample payload
Sample request
Sample response
Delete custom message
This endpoint deletes a specific custom message.
Method | |
---|---|
DELETE | /sys/config/ui/custom-messages/:id |
Parameters
id
(string: <required>)
- The unique ID assigned to the custom message at creation time.
Sample request