# at.happyproto.fleet.getResets

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

## Definitions

### `at.happyproto.fleet.getResets`

**Type**: `query`

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.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `have` | `integer` | No | History available, when accruing. |
| `need` | `integer` | No | History required, when accruing. |
| `resets` | `array` | Yes |  |
| `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.

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

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `day` | `string` | Yes |  |
| `from` | `integer` | Yes | Value before the reset. |
| `instanceId` | `string` | Yes |  |
| `metric` | `string` | Yes |  |
| `to` | `integer` | Yes | Value after it. Both are carried because "records fell" is not actionable and "fell from 412,000 to 12" is. |

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