> ## Documentation Index
> Fetch the complete documentation index at: https://www.truefoundry.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

> SDK methods to query Kubernetes and TrueFoundry events for pods, jobs, and applications.

## Methods

<Accordion title="get">
  Get Events for Pod, Job Run, Application. The events are sourced from Kubernetes as well as events captured by truefoundry. Optional query parameters include startTs, endTs for filtering.

  #### Parameters

  <ParamField body="start_ts" type="typing.Optional[str]">
    Start timestamp (ISO format) for querying events
  </ParamField>

  <ParamField body="end_ts" type="typing.Optional[str]">
    End timestamp (ISO format) for querying events
  </ParamField>

  <ParamField body="application_id" type="typing.Optional[str]">
    Application ID
  </ParamField>

  <ParamField body="application_fqn" type="typing.Optional[str]">
    Application FQN
  </ParamField>

  <ParamField body="pod_names" type="typing.Optional[typing.Union[str, typing.Sequence[str]]]">
    Name of the pods
  </ParamField>

  <ParamField body="job_run_name" type="typing.Optional[str]">
    Job run name
  </ParamField>

  #### Returns

  <ResponseField name="GetEventsResponse" type="GetEventsResponse">
    [🔗 GetEventsResponse](/docs/truefoundry_sdk/types#geteventsresponse)

    Returns a list of events matching the query parameters.
  </ResponseField>

  #### Usage

  ```python lines theme={"dark"}
  from truefoundry import TrueFoundry

  client = TrueFoundry(
      api_key="YOUR_API_KEY",
      base_url="https://yourhost.com/path/to/api",
  )

  client.events.get(
      start_ts="value",
      end_ts="value",
      application_id="application_id_value",
      application_fqn="value",
      pod_names="value",
      job_run_name="value",
  )
  ```
</Accordion>
