alerts_list
GET
/api/alerts
const url = 'https://example.com/api/alerts';const options = {method: 'GET', headers: {Authorization: '<Authorization>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”is_active
boolean
page
integer
A page number within the paginated result set.
Responses
Section titled “Responses”Media typeapplication/json
object
count
required
integer
next
string format: uri
previous
string format: uri
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
message
required
string
status
required
success- Successinfo- Infowarning- Warningerror- Error
string
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" } ]}
