> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Events

#### Get all events with pagination using cursor

Since there can be a large number of events, they are paginated.
You can go through the results using the `cursor`.

```typescript
import { Client } from "@upstash/qstash";

const client = new Client({ token: "<QSTASH_TOKEN>" });
const allEvents = [];
let cursor = null;
while (true) {
  const res = await client.events({ cursor });
  allEvents.push(...res.events);
  cursor = res.cursor;
  if (!cursor) {
    break;
  }
}
```
