# tools.ozone.set.querySets

> 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.set.querySets)
- [Documentation](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.set.querySets/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:33dt5kftu3jq2h5h4jjlqezt/tools.ozone.set.querySets/examples)

## Definitions

### `tools.ozone.set.querySets`

**Type**: `query`

Query available sets

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `limit` | `integer` | No |  |
| `cursor` | `string` | No |  |
| `sortBy` | `string` | No |  |
| `namePrefix` | `string` | No |  |
| `sortDirection` | `string` | No | Defaults to ascending order of name field. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `sets` | `array` | Yes |  |
| `cursor` | `string` | No |  |

## Raw Schema

```json
{
  "id": "tools.ozone.set.querySets",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "sets"
          ],
          "properties": {
            "sets": {
              "type": "array",
              "items": {
                "ref": "tools.ozone.set.defs#setView",
                "type": "ref"
              }
            },
            "cursor": {
              "type": "string"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "properties": {
          "limit": {
            "type": "integer",
            "default": 50,
            "maximum": 100,
            "minimum": 1
          },
          "cursor": {
            "type": "string"
          },
          "sortBy": {
            "enum": [
              "name",
              "createdAt",
              "updatedAt"
            ],
            "type": "string",
            "default": "name"
          },
          "namePrefix": {
            "type": "string"
          },
          "sortDirection": {
            "enum": [
              "asc",
              "desc"
            ],
            "type": "string",
            "default": "asc",
            "description": "Defaults to ascending order of name field."
          }
        }
      },
      "description": "Query available sets"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
