# at.happyproto.fleet.getGrowth

> 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.getGrowth)
- [Documentation](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getGrowth/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getGrowth/examples)

## Definitions

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `metric` | `string` | Yes |  |
| `perDay` | `integer` | Yes | Fleet-wide daily growth over the window. |

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `instanceId` | `string` | Yes |  |
| `metric` | `string` | Yes |  |
| `rate` | `integer` | Yes | Mean daily delta over the window. |

### `at.happyproto.fleet.getGrowth`

**Type**: `query`

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.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `byInstance` | `array` | Yes |  |
| `fleet` | `array` | Yes |  |
| `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 |  |
| `windowDays` | `integer` | No |  |

#### Errors

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

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