# at.happyproto.fleet.listInstances

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

## Definitions

### `at.happyproto.fleet.listInstances#consent`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `total` | `integer` | Yes |  |
| `withContact` | `integer` | No |  |
| `withHost` | `integer` | No |  |
| `withLexiconNames` | `integer` | No |  |

### `at.happyproto.fleet.listInstances#instance`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `instanceId` | `string` | Yes |  |
| `lastSeen` | `string` (datetime) | Yes |  |
| `lexicons` | `integer` | No |  |
| `records` | `integer` | No |  |
| `reportMode` | `string` | Yes |  |
| `scriptErrors` | `integer` | No |  |
| `spaces` | `integer` | No |  |
| `users` | `integer` | No |  |
| `version` | `string` | Yes |  |

### `at.happyproto.fleet.listInstances`

**Type**: `query`

The reporting fleet, one row per instance, from its most recent snapshot. Admin only.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `consent` | `ref` → `#consent` | Yes | What the fleet has consented to share. Absence of a field is a consent decision, not a gap in collection. |
| `instances` | `array` | Yes |  |

#### 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": {
    "consent": {
      "properties": {
        "total": {
          "type": "integer"
        },
        "withContact": {
          "type": "integer"
        },
        "withHost": {
          "type": "integer"
        },
        "withLexiconNames": {
          "type": "integer"
        }
      },
      "required": [
        "total"
      ],
      "type": "object"
    },
    "instance": {
      "properties": {
        "instanceId": {
          "type": "string"
        },
        "lastSeen": {
          "format": "datetime",
          "type": "string"
        },
        "lexicons": {
          "type": "integer"
        },
        "records": {
          "type": "integer"
        },
        "reportMode": {
          "knownValues": [
            "auto",
            "manual"
          ],
          "type": "string"
        },
        "scriptErrors": {
          "type": "integer"
        },
        "spaces": {
          "type": "integer"
        },
        "users": {
          "type": "integer"
        },
        "version": {
          "type": "string"
        }
      },
      "required": [
        "instanceId",
        "lastSeen",
        "version",
        "reportMode"
      ],
      "type": "object"
    },
    "main": {
      "description": "The reporting fleet, one row per instance, from its most recent snapshot. 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": {
            "consent": {
              "description": "What the fleet has consented to share. Absence of a field is a consent decision, not a gap in collection.",
              "ref": "#consent",
              "type": "ref"
            },
            "instances": {
              "items": {
                "ref": "#instance",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "instances",
            "consent"
          ],
          "type": "object"
        }
      },
      "type": "query"
    }
  },
  "id": "at.happyproto.fleet.listInstances",
  "lexicon": 1
}
```
