# fyi.opensocial.getTemplate

> 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.

- Kind: query
- Authority: opensocial.fyi
- Lexicon: 1
- Published by [lexicons.opensocial.fyi](https://lexicon.garden/identity/did:plc:2gqnilpksz2e7faj3bwvo6qc), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:2gqnilpksz2e7faj3bwvo6qc/fyi.opensocial.getTemplate/analytics)

## Query (`fyi.opensocial.getTemplate`)

Type: query · GET

### Parameters (query string)

- `cid` (string · cid): That version's CID.
- `group` (string · did, required)
- `uri` (string · at-uri, required): The template, its fyi.opensocial.template.
- `version` (string · at-uri): One of its versions, its fyi.opensocial.templateVersion.

### Output (application/json)

- `entry` (ref, required)
  - Reference: `fyi.opensocial.template#entry`
- `html` (string, required): Its page.
- `version` (ref, required)
  - Reference: `com.atproto.repo.strongRef`

### Errors

- `NotFound`: No description in schema.
- `Forbidden`: No description in schema.

## 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
}
```
