# fyi.opensocial.getTemplate

> Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate)
- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate/examples)

## Definitions

### `fyi.opensocial.getTemplate`

**Type**: `query`

One of the templates shared within the group, for its members alone: its page and how a tab uses it, at the version given, or else its latest.

#### Parameters

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `cid` | `string` (cid) | No | That version's CID. |
| `group` | `string` (did) | Yes |  |
| `uri` | `string` (at-uri) | Yes | The template, its fyi.opensocial.template. |
| `version` | `string` (at-uri) | No | One of its versions, its fyi.opensocial.templateVersion. |

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `entry` | `ref` → `fyi.opensocial.template#entry` | Yes |  |
| `html` | `string` | Yes | Its page. |
| `version` | `ref` → `com.atproto.repo.strongRef` | Yes |  |

#### Errors

- **NotFound**
- **Forbidden**

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "One of the templates shared within the group, for its members alone: its page and how a tab uses it, at the version given, or else its latest.",
      "errors": [
        {
          "name": "NotFound"
        },
        {
          "name": "Forbidden"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "entry": {
              "ref": "fyi.opensocial.template#entry",
              "type": "ref"
            },
            "html": {
              "description": "Its page.",
              "type": "string"
            },
            "version": {
              "ref": "com.atproto.repo.strongRef",
              "type": "ref"
            }
          },
          "required": [
            "html",
            "entry",
            "version"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cid": {
            "description": "That version's CID.",
            "format": "cid",
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "uri": {
            "description": "The template, its fyi.opensocial.template.",
            "format": "at-uri",
            "type": "string"
          },
          "version": {
            "description": "One of its versions, its fyi.opensocial.templateVersion.",
            "format": "at-uri",
            "type": "string"
          }
        },
        "required": [
          "group",
          "uri"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "fyi.opensocial.getTemplate",
  "lexicon": 1
}
```
