# pub.chive.collection.getParent

> 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.getParent)
- [Documentation](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getParent/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:7natp5xae72bddaqlkef2t4e/pub.chive.collection.getParent/examples)

## Definitions

### `pub.chive.collection.getParent`

**Type**: `query`

Get the parent collection of a given collection

#### Parameters

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

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `parent` | `ref` → `pub.chive.collection.defs#collectionView` | No | Parent collection, if one exists |

## Raw Schema

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