Skip to content

alerts_list

GET
/api/alerts
curl --request GET \
--url https://example.com/api/alerts \
--header 'Authorization: <Authorization>'

API view to list AlertBanner objects.

Supports filtering by active status using ‘is_active’ query parameter.

is_active
boolean
page
integer

A page number within the paginated result set.

Media typeapplication/json
object
count
required
integer
next
string format: uri
nullable
previous
string format: uri
nullable
results
required
Array<object>

Serializer for the AlertBanner model.

Serializes the alert’s title, message, status, start and end datetimes.

object
id
required
integer
title
required
string
<= 100 characters
message
required
string
status
required
  • success - Success
  • info - Info
  • warning - Warning
  • error - Error
string
Allowed values: success info warning error
start_datetime
required

The start date and time for the alert banner’s visibility

string format: date-time
end_datetime
required

The end date and time for the alert banner’s visibility

string format: date-time

Example

{
"count": 123,
"next": "http://api.example.org/accounts/?page=4",
"previous": "http://api.example.org/accounts/?page=2",
"results": [
{
"status": "success"
}
]
}