Get Cluster Event
Try it
GET
/v0/cluster/events/{event_id}Get specific cluster monitor event.
The identifiers of the events can be retrieved via GET /v0/cluster/events.
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.
This endpoint can return a 404 for an event that no longer exists due to clean-up.
Authentication
JSON web token (JWT) or API keyBearer token
Parameters
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
event_id | string | Yes | Cluster monitor event identifier or `latest` |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
selector | ClusterMonitorEventFieldSelector | No | The `selector` parameter limits which fields are returned. Limiting which fields is particularly handy for instance when frequently monitoring over low bandwidth connections while being only interested in status. |
Response
200
application/json- 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.
all_healthybooleanrequiredapi_resources_infostringapi_self_infostringapi_statusstringrequiredcompiler_resources_infostringcompiler_self_infostringcompiler_statusstringrequiredidstring (uuid)requiredCluster monitor event identifier.recorded_atstring (date-time)requiredrunner_resources_infostringrunner_self_infostringrunner_statusstringrequired
404
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.
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/{event_id}?selector=<selector>' \
-H 'Authorization: Bearer YOUR_TOKEN'const response = await fetch('https://api.example.com/v0/cluster/events/{event_id}?selector=<selector>', {
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/{event_id}?selector=<selector>', {
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/{event_id}"
params = {
"selector": "<selector>"
}
headers = {
"Authorization": "Bearer YOUR_TOKEN"
}
response = requests.request("get", url, params=params, 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/{event_id}?selector=<selector>", 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))
}