# at.happyproto.fleet.getVersions

> Published by [happyproto.at](https://lexicon.garden/identity/did:plc:mo7vq4jbioxwafy5zkcc3eux)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getVersions)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getVersions/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getVersions/examples)

## Definitions

### `at.happyproto.fleet.getVersions`

**Type**: `query`

HappyView version distribution and upgrade lag. Admin only.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `have` | `integer` | No | History available, when accruing. |
| `need` | `integer` | No | History required, when accruing. |
| `status` | `string` | Yes | Why a figure is absent. Branch on this, never on field presence. |
| `unit` | `string` | No |  |
| `versions` | `array` | Yes |  |

#### Errors

- **AuthRequired**: This endpoint requires an authenticated caller.
- **Forbidden**: The caller is not a HappyProto admin.
- **Upstream**: The telemetry store could not be queried.

### `at.happyproto.fleet.getVersions#version`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `adopters` | `integer` | No |  |
| `firstSeen` | `string` (datetime) | No | First appearance anywhere in the fleet. |
| `instances` | `integer` | Yes |  |
| `medianDaysToAdopt` | `integer` | No | Median days from fleet-first-seen to adoption. Non-adopters excluded, never counted as infinite. |
| `version` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "HappyView version distribution and upgrade lag. Admin only.",
      "errors": [
        {
          "description": "This endpoint requires an authenticated caller.",
          "name": "AuthRequired"
        },
        {
          "description": "The caller is not a HappyProto admin.",
          "name": "Forbidden"
        },
        {
          "description": "The telemetry store could not be queried.",
          "name": "Upstream"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "have": {
              "description": "History available, when accruing.",
              "type": "integer"
            },
            "need": {
              "description": "History required, when accruing.",
              "type": "integer"
            },
            "status": {
              "description": "Why a figure is absent. Branch on this, never on field presence.",
              "knownValues": [
                "ok",
                "accruing",
                "withheld"
              ],
              "type": "string"
            },
            "unit": {
              "knownValues": [
                "days",
                "snapshots"
              ],
              "type": "string"
            },
            "versions": {
              "items": {
                "ref": "#version",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "status",
            "versions"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "version": {
      "properties": {
        "adopters": {
          "type": "integer"
        },
        "firstSeen": {
          "description": "First appearance anywhere in the fleet.",
          "format": "datetime",
          "type": "string"
        },
        "instances": {
          "type": "integer"
        },
        "medianDaysToAdopt": {
          "description": "Median days from fleet-first-seen to adoption. Non-adopters excluded, never counted as infinite.",
          "type": "integer"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "version",
        "instances"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.fleet.getVersions",
  "lexicon": 1
}
```
