# tools.ozone.safelink.queryEvents

> Published by [ozone-lexicons.bsky.social](https://lexicon.garden/identity/did:plc:33dt5kftu3jq2h5h4jjlqezt)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.queryEvents)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.queryEvents/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.safelink.queryEvents/examples)

## Definitions

### `tools.ozone.safelink.queryEvents`

**Type**: `procedure`

Query URL safety audit events

#### Input

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `urls` | `array` | No | Filter by specific URLs or domains |
| `limit` | `integer` | No | Maximum number of results to return |
| `cursor` | `string` | No | Cursor for pagination |
| `patternType` | `string` | No | Filter by pattern type |
| `sortDirection` | `string` | No | Sort direction |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cursor` | `string` | No | Next cursor for pagination. Only present if there are more results. |
| `events` | `array` | Yes |  |

## Raw Schema

```json
{
  "id": "tools.ozone.safelink.queryEvents",
  "defs": {
    "main": {
      "type": "procedure",
      "input": {
        "schema": {
          "type": "object",
          "properties": {
            "urls": {
              "type": "array",
              "items": {
                "type": "string"
              },
              "description": "Filter by specific URLs or domains"
            },
            "limit": {
              "type": "integer",
              "default": 50,
              "maximum": 100,
              "minimum": 1,
              "description": "Maximum number of results to return"
            },
            "cursor": {
              "type": "string",
              "description": "Cursor for pagination"
            },
            "patternType": {
              "type": "string",
              "description": "Filter by pattern type"
            },
            "sortDirection": {
              "type": "string",
              "default": "desc",
              "description": "Sort direction",
              "knownValues": [
                "asc",
                "desc"
              ]
            }
          }
        },
        "encoding": "application/json"
      },
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "events"
          ],
          "properties": {
            "cursor": {
              "type": "string",
              "description": "Next cursor for pagination. Only present if there are more results."
            },
            "events": {
              "type": "array",
              "items": {
                "ref": "tools.ozone.safelink.defs#event",
                "type": "ref"
              }
            }
          }
        },
        "encoding": "application/json"
      },
      "description": "Query URL safety audit events"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
