# app.rocksky.event.getEvents

> Published by [rocksky.app](https://lexicon.garden/identity/did:plc:vegqomyce4ssoqs7zwqvgqty)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.event.getEvents)
- [Documentation](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.event.getEvents/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:vegqomyce4ssoqs7zwqvgqty/app.rocksky.event.getEvents/examples)

## Definitions

### `app.rocksky.event.getEvents`

**Type**: `query`

List indexed music events, soonest first. Without a time window only unexpired events are returned: those ending (or, with no end, starting) today or later, plus undated ones.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `artist` | `string` | No | Only events this artist plays: the artist's AT-URI, id or sha256. |
| `did` | `string` (did) | No | Only events published by this repo. |
| `from` | `string` (datetime) | No | Only events that end at or after this time. Defaults to the start of today (UTC) when neither `to` nor `includePast` is given. |
| `genre` | `string` | No | Only events whose genre matches (case-insensitive). |
| `includePast` | `boolean` | No | Return past events too, most recent first, instead of upcoming ones. |
| `kind` | `string` | No | Only events of this kind (concert, festival...). |
| `limit` | `integer` | No | The maximum number of events to return. |
| `offset` | `integer` | No | The offset for pagination. |
| `rsvpBy` | `string` (did) | No | Only events this DID has RSVP'd to (going or interested). |
| `to` | `string` (datetime) | No | Only events that start at or before this time. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `events` | `array` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "List indexed music events, soonest first. Without a time window only unexpired events are returned: those ending (or, with no end, starting) today or later, plus undated ones.",
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "events": {
              "items": {
                "ref": "app.rocksky.event.defs#eventView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "events"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "artist": {
            "description": "Only events this artist plays: the artist's AT-URI, id or sha256.",
            "type": "string"
          },
          "did": {
            "description": "Only events published by this repo.",
            "format": "did",
            "type": "string"
          },
          "from": {
            "description": "Only events that end at or after this time. Defaults to the start of today (UTC) when neither `to` nor `includePast` is given.",
            "format": "datetime",
            "type": "string"
          },
          "genre": {
            "description": "Only events whose genre matches (case-insensitive).",
            "type": "string"
          },
          "includePast": {
            "description": "Return past events too, most recent first, instead of upcoming ones.",
            "type": "boolean"
          },
          "kind": {
            "description": "Only events of this kind (concert, festival...).",
            "type": "string"
          },
          "limit": {
            "default": 20,
            "description": "The maximum number of events to return.",
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "offset": {
            "default": 0,
            "description": "The offset for pagination.",
            "minimum": 0,
            "type": "integer"
          },
          "rsvpBy": {
            "description": "Only events this DID has RSVP'd to (going or interested).",
            "format": "did",
            "type": "string"
          },
          "to": {
            "description": "Only events that start at or before this time.",
            "format": "datetime",
            "type": "string"
          }
        },
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "app.rocksky.event.getEvents",
  "lexicon": 1
}
```
