# Events

Cedana API for events

## List events

> Returns events within the specified time window, optionally filtered by operation or resource type.\
> The metadata field contains structured information about the event that can be used for filtering and display.

```json
{"openapi":"3.1.0","info":{"title":"Cedana API","version":"0.0.0-staging"},"tags":[{"name":"Events","description":"Cedana API for events"}],"security":[{"Token":[]}],"components":{"securitySchemes":{"Token":{"type":"http","scheme":"bearer"}},"schemas":{"Event":{"type":"object","description":"A single Event record with structured metadata","required":["id","status","operation","resource_type","message","metadata","source","timestamp"],"properties":{"id":{"type":"integer","format":"int64"},"message":{"type":"string"},"metadata":{},"operation":{"type":"string"},"resource_type":{"type":"string"},"source":{"type":"string"},"status":{"type":"string"},"timestamp":{"type":"integer","minimum":0}}},"ApiError":{"type":"object","description":"Standard error response for API endpoints","required":["message"],"properties":{"code":{"type":["string","null"],"description":"HTTP status code"},"details":{"description":"Optional additional error details"},"message":{"type":"string","description":"Error message describing what went wrong"}}}}},"paths":{"/v2/events":{"get":{"tags":["Events"],"summary":"List events","description":"Returns events within the specified time window, optionally filtered by operation or resource type.\nThe metadata field contains structured information about the event that can be used for filtering and display.","operationId":"list_events","parameters":[{"name":"time","in":"query","description":"Time window in seconds (default: 3600 = 1 hour)","required":false,"schema":{"type":"integer","format":"int32"}},{"name":"operation","in":"query","description":"Filter by operation (e.g., \"checkpoint\", \"restore\")","required":false,"schema":{"type":["string","null"]}},{"name":"resource_type","in":"query","description":"Filter by resource type (e.g., \"pod\", \"action\", \"checkpoint\")","required":false,"schema":{"type":["string","null"]}}],"responses":{"200":{"description":"Returns list of events","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Event"}}}}},"500":{"description":"Failed to fetch events from database","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiError"}}}}}}}}}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cedana.ai/references/api/events.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
