# at.happyproto.admin.getEncryptionKey

> Where an instance's encryption key is in its rotation, and whether a rotation can start now. Staff only.

- Kind: query
- Authority: admin.happyproto.at
- Lexicon: 1
- Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux), the NSID's authority

## Links

- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.getEncryptionKey)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.getEncryptionKey/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.admin.getEncryptionKey/analytics)

## Query (`at.happyproto.admin.getEncryptionKey`)

Type: query · GET

### Parameters (query string)

- `id` (string, required): The instance's id, a UUID.

### Output (application/json)

- `encryptionKey` (ref, required)
  - Reference: `at.happyproto.admin.defs#encryptionKey`

### Errors

- `AuthRequired`: This endpoint requires an authenticated caller.
- `Forbidden`: The caller is not HappyProto staff, or the provisioner does not treat them as staff.
- `InvalidRequest`: The input was malformed, or the provisioner refused it as malformed.
- `NotFound`: No such instance, or it has been deleted.
- `InvalidSlug`: Passed through from the provisioner.
- `SlugTaken`: Passed through from the provisioner.
- `NotEntitled`: Passed through from the provisioner.
- `InstanceLimit`: Passed through from the provisioner.
- `NoCapacity`: Passed through from the provisioner.
- `OperationInProgress`: Passed through from the provisioner.
- `RotationInProgress`: Passed through from the provisioner.
- `InstanceStopped`: Passed through from the provisioner.
- `NotLive`: Passed through from the provisioner.
- `RotationUnsupported`: Passed through from the provisioner.
- `AgentUnreachable`: Passed through from the provisioner.
- `NotSettled`: Passed through from the provisioner.
- `Upstream`: The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Where an instance's encryption key is in its rotation, and whether a rotation can start now. Staff only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not HappyProto staff, or the provisioner does not treat them as staff.",
          "name": "Forbidden"
        },
        {
          "description": "The input was malformed, or the provisioner refused it as malformed.",
          "name": "InvalidRequest"
        },
        {
          "description": "No such instance, or it has been deleted.",
          "name": "NotFound"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InvalidSlug"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "SlugTaken"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotEntitled"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InstanceLimit"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NoCapacity"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "OperationInProgress"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "RotationInProgress"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "InstanceStopped"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotLive"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "RotationUnsupported"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "AgentUnreachable"
        },
        {
          "description": "Passed through from the provisioner.",
          "name": "NotSettled"
        },
        {
          "description": "The provisioner is unreachable, not configured, or answered with an error it does not explain to callers.",
          "name": "Upstream"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "encryptionKey": {
              "ref": "at.happyproto.admin.defs#encryptionKey",
              "type": "ref"
            }
          },
          "required": [
            "encryptionKey"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "id": {
            "description": "The instance's id, a UUID.",
            "type": "string"
          }
        },
        "required": [
          "id"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.admin.getEncryptionKey",
  "lexicon": 1
}
```
