# at.happyproto.fleet.getHostMix

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

## Definitions

### `at.happyproto.fleet.getHostMix#coverage`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `of` | `integer` | Yes | A count over twelve of thirty instances is a different claim from a count over thirty. |
| `sharing` | `integer` | Yes |  |

### `at.happyproto.fleet.getHostMix#fact`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `instances` | `integer` | Yes |  |
| `key` | `string` | Yes |  |
| `value` | `string` | Yes |  |

### `at.happyproto.fleet.getHostMix`

**Type**: `query`

Categorical host facts across the fleet, with consent coverage. Keys whose values vary per instance, or that carry embedded documents, are named but not enumerated. Admin only.

#### Output

**Encoding**: `application/json`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `coverage` | `ref` → `#coverage` | Yes |  |
| `facts` | `array` | Yes | Only keys whose values repeat across instances. A value seen once per instance is a measurement, not a category. |
| `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 |  |
| `varying` | `array` | Yes | Host keys that are not a mix: values differ per instance, or are JSON documents. Named so a reader knows the key exists, without rendering one row per instance. |

#### 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.getHostMix#varyingKey`

**Type**: `object`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `distinctValues` | `integer` | Yes |  |
| `key` | `string` | Yes |  |

## Raw Schema

```json
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "coverage": {
      "properties": {
        "of": {
          "description": "A count over twelve of thirty instances is a different claim from a count over thirty.",
          "type": "integer"
        },
        "sharing": {
          "type": "integer"
        }
      },
      "required": [
        "sharing",
        "of"
      ],
      "type": "object"
    },
    "fact": {
      "properties": {
        "instances": {
          "type": "integer"
        },
        "key": {
          "type": "string"
        },
        "value": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "value",
        "instances"
      ],
      "type": "object"
    },
    "main": {
      "description": "Categorical host facts across the fleet, with consent coverage. Keys whose values vary per instance, or that carry embedded documents, are named but not enumerated. 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": {
            "coverage": {
              "ref": "#coverage",
              "type": "ref"
            },
            "facts": {
              "description": "Only keys whose values repeat across instances. A value seen once per instance is a measurement, not a category.",
              "items": {
                "ref": "#fact",
                "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"
            },
            "varying": {
              "description": "Host keys that are not a mix: values differ per instance, or are JSON documents. Named so a reader knows the key exists, without rendering one row per instance.",
              "items": {
                "ref": "#varyingKey",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "status",
            "coverage",
            "facts",
            "varying"
          ],
          "type": "object"
        }
      },
      "type": "query"
    },
    "varyingKey": {
      "properties": {
        "distinctValues": {
          "type": "integer"
        },
        "key": {
          "type": "string"
        }
      },
      "required": [
        "key",
        "distinctValues"
      ],
      "type": "object"
    }
  },
  "id": "at.happyproto.fleet.getHostMix",
  "lexicon": 1
}
```
