For the complete documentation index, see llms.txt. This page is also available as Markdown.

Query Kubernetes Events

Search and aggregate Kubernetes events over HTTP using gcQL queries - surface warnings, group events by reason, and track cluster activity.

Endpoint

POST /api/k8s/v2/events/search

Authentication

This endpoint requires API Key authentication via the Authorization header.

Headers

Header
Required
Description

Authorization

Yes

Bearer token with your API key

Content-Type

Yes

Must be application/json

X-Backend-Id

Only for multi-backend accounts

Your backend identifier, found under Settings → Access → API Keys (details)

Request Body

Parameter
Type
Required
Description

start

string

Yes

Start of the time range (RFC3339 / ISO 8601)

end

string

Yes

End of the time range (RFC3339 / ISO 8601)

query

string

Yes

The gcQL query to execute

Examples

Recent Warning Events

Fetch the latest Warning-type events:

Example Response:

Events by Reason

Count events grouped by reason to see what dominates cluster activity:

Example Response:

Filtering by Specific Reasons

Match several reasons at once with in():

Best Practices

  1. Start from type:Warning when hunting for problems - normal events usually dominate the volume.

  2. Group by reason to get a quick picture before drilling into raw events.

  3. Discover field names with a * | field_names query if you are unsure what is available to filter on.

  4. Always bound results with | limit N.

Last updated