# at.happyproto.fleet.getGrowth

> Fleet and per-instance growth rates from instance_daily_deltas. Counter resets are excluded by the view, so a wiped volume lowers no rate. 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.getGrowth)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getGrowth/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getGrowth/analytics)

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

Type: query · GET

### Output (application/json)

- `byInstance` (array, required)
  - `items` (ref)
    - Reference: `#instanceRate`
- `fleet` (array, required)
  - `items` (ref)
    - Reference: `#fleetRate`
- `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
- `windowDays` (integer)

### Errors

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

## #fleetRate (`at.happyproto.fleet.getGrowth#fleetRate`)

Type: object

### Properties

- `metric` (string, required)
- `perDay` (integer, required): Fleet-wide daily growth over the window.

## #instanceRate (`at.happyproto.fleet.getGrowth#instanceRate`)

Type: object

### Properties

- `instanceId` (string, required)
- `metric` (string, required)
- `rate` (integer, required): Mean daily delta over the window.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "fleetRate": {
      "properties": {
        "metric": {
          "type": "string"
        },
        "perDay": {
          "description": "Fleet-wide daily growth over the window.",
          "type": "integer"
        }
      },
      "required": [
        "metric",
        "perDay"
      ],
      "type": "object"
    },
    "instanceRate": {
      "properties": {
        "instanceId": {
          "type": "string"
        },
        "metric": {
          "type": "string"
        },
        "rate": {
          "description": "Mean daily delta over the window.",
          "type": "integer"
        }
      },
      "required": [
        "instanceId",
        "metric",
        "rate"
      ],
      "type": "object"
    },
    "main": {
      "description": "Fleet and per-instance growth rates from instance_daily_deltas. Counter resets are excluded by the view, so a wiped volume lowers no rate. 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": {
            "byInstance": {
              "items": {
                "ref": "#instanceRate",
                "type": "ref"
              },
              "type": "array"
            },
            "fleet": {
              "items": {
                "ref": "#fleetRate",
                "type": "ref"
              },
              "type": "array"
            },
            "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"
            },
            "windowDays": {
              "type": "integer"
            }
          },
          "required": [
            "status",
            "fleet",
            "byInstance"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.fleet.getGrowth",
  "lexicon": 1
}
```
