# at.happyproto.fleet.getVersions

> HappyView version distribution and upgrade lag. Admin only.

- Kind: query
- Authority: fleet.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.fleet.getVersions)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getVersions/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getVersions/analytics)

## Query (`at.happyproto.fleet.getVersions`)

Type: query · GET

### Output (application/json)

- `have` (integer): History available, when accruing.
- `need` (integer): History required, when accruing.
- `status` (string, required): Why a figure is absent. Branch on this, never on field presence.
  - Constraints: knownValues: ok | accruing | withheld
- `unit` (string)
  - Constraints: knownValues: days | snapshots
- `versions` (array, required)
  - `items` (ref)
    - Reference: `#version`

### Errors

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

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

Type: object

### Properties

- `adopters` (integer)
- `firstSeen` (string · datetime): First appearance anywhere in the fleet.
- `instances` (integer, required)
- `medianDaysToAdopt` (integer): Median days from fleet-first-seen to adoption. Non-adopters excluded, never counted as infinite.
- `version` (string, required)

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