# pub.chive.collection.getSubcollections

> Published by [chive.pub](https://lexicon.garden/identity/did:plc:7natp5xae72bddaqlkef2t4e)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getSubcollections)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getSubcollections/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getSubcollections/examples)

## Definitions

### `pub.chive.collection.getSubcollections`

**Type**: `query`

Get subcollections of a given collection

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `uri` | `string` | Yes | AT-URI of the parent collection |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `subcollections` | `array` | Yes | Subcollections of the given collection |

## Raw Schema

```json
{
  "id": "pub.chive.collection.getSubcollections",
  "defs": {
    "main": {
      "type": "query",
      "output": {
        "schema": {
          "type": "object",
          "required": [
            "subcollections"
          ],
          "properties": {
            "subcollections": {
              "type": "array",
              "items": {
                "ref": "pub.chive.collection.defs#collectionView",
                "type": "ref"
              },
              "description": "Subcollections of the given collection"
            }
          }
        },
        "encoding": "application/json"
      },
      "parameters": {
        "type": "params",
        "required": [
          "uri"
        ],
        "properties": {
          "uri": {
            "type": "string",
            "description": "AT-URI of the parent collection"
          }
        }
      },
      "description": "Get subcollections of a given collection"
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1,
  "revision": 1
}
```
