List Cluster Events
Try it
GET
/v0/cluster/eventsRetrieve a list of retained cluster monitor events ordered from most recent to least recent.
The returned events only have limited details, the full details can be retrieved using
the GET /v0/cluster/events/\<event-id> endpoint.
Cluster monitor events are collected at a periodic interval (every 10s), however only every 10 minutes or if the overall health changes, does it get inserted into the database (and thus, served by this endpoint). At most 1000 events are retained (newest first), and events older than 72h are deleted. The latest event, if it already exists, is never cleaned up.
Authentication
JSON web token (JWT) or API keyBearer token
Response
200
application/json- ClusterMonitorEventSelectedInfo[]
- objectCluster monitor event information which has a selected subset of optional fields. If an optional field is not selected (i.e., is `None`), it will not be serialized.
500
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
501
application/json- objectInformation returned by REST API endpoints on error.
detailsobjectrequiredDetailed error metadata. The contents of this field is determined by `error_code`.error_codestringrequiredError code is a string that specifies this error type.messagestringrequiredHuman-readable error message.
curl -X GET 'https://api.example.com/v0/cluster/events' \
-H 'Authorization: Bearer YOUR_TOKEN'const response = await fetch('https://api.example.com/v0/cluster/events', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = await response.json();
console.log(data);interface ApiResponse {
// shape your response here
}
const response: Response = await fetch('https://api.example.com/v0/cluster/events', {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_TOKEN'
}
});
const data = (await response.json()) as ApiResponse;
console.log(data);import requests
url = "https://api.example.com/v0/cluster/events"
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.request("get", url, headers=headers)
print(response.json())package main
import (
"fmt"
"io"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.example.com/v0/cluster/events", nil)
if err != nil {
panic(err)
}
req.Header.Set("Authorization", "Bearer YOUR_TOKEN")
resp, err := http.DefaultClient.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
out, _ := io.ReadAll(resp.Body)
fmt.Println(string(out))
}[]