# at.happyproto.fleet.getResets

> Counter resets — the negative deltas instance_daily_deltas discards. A reset is a restored backup, a wiped volume, a re-provision or a wrong clock. 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.getResets)
- [Schema JSON](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getResets/schema.json)
- [Analytics](https://lexicon.garden/lexicon/did:plc:mo7vq4jbioxwafy5zkcc3eux/at.happyproto.fleet.getResets/analytics)

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

Type: query · GET

### Output (application/json)

- `have` (integer): History available, when accruing.
- `need` (integer): History required, when accruing.
- `resets` (array, required)
  - `items` (ref)
    - Reference: `#reset`
- `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.

## #reset (`at.happyproto.fleet.getResets#reset`)

Type: object

### Properties

- `day` (string, required)
- `from` (integer, required): Value before the reset.
- `instanceId` (string, required)
- `metric` (string, required)
- `to` (integer, required): Value after it. Both are carried because "records fell" is not actionable and "fell from 412,000 to 12" is.

## Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Counter resets — the negative deltas instance_daily_deltas discards. A reset is a restored backup, a wiped volume, a re-provision or a wrong clock. 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"
            },
            "resets": {
              "items": {
                "ref": "#reset",
                "type": "ref"
              },
              "type": "array"
            },
            "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",
            "resets"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "reset": {
      "properties": {
        "day": {
          "type": "string"
        },
        "from": {
          "description": "Value before the reset.",
          "type": "integer"
        },
        "instanceId": {
          "type": "string"
        },
        "metric": {
          "type": "string"
        },
        "to": {
          "description": "Value after it. Both are carried because \"records fell\" is not actionable and \"fell from 412,000 to 12\" is.",
          "type": "integer"
        }
      },
      "required": [
        "instanceId",
        "day",
        "metric",
        "from",
        "to"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.fleet.getResets",
  "lexicon": 1
}
```
