# GET /api/v1/hosts/machines/{id}/telemetry

Rolling telemetry history in 5-minute buckets (host owner/admin)

Operation: `getMachineTelemetry`.

Rolling telemetry history in 5-minute buckets (host owner/admin)

Min/avg/max per measured field per 5-minute bucket, for sparklines. Host owner only: a non-owner receives 404, never 403, so machine existence never leaks. History is retained for 48 h and pruned by the worker cleanup task; a `window` longer than the retention is refused rather than silently clamped. A field that was never measured in a bucket is absent, and a bucket's `samples` count states how much evidence backs it.

## Endpoint

`GET https://amplerun-api.spiry.org/api/v1/hosts/machines/{id}/telemetry`

## Authentication

Use the credential and scope required by this operation. For programmatic renter/host calls: `Authorization: Bearer $AMPLERUN_API_KEY`. A host-agent signature or other specialized proof is required where the description specifies it.

## Parameters

| Name | Location | Presence | Type | Description |
| --- | --- | --- | --- | --- |
| `id` | path | Required | UUID |  |
| `window` | query | Optional | string | Lookback as &lt;n&gt;s\|&lt;n&gt;m\|&lt;n&gt;h (default 6h, at most the retention window). |

## Responses

### `200`

Telemetry history buckets, oldest first.

`application/json`
| Field | Type | Presence | Description |
| --- | --- | --- | --- |
| `machine_id` | UUID | Required |  |
| `window_s` | integer | Required |  |
| `bucket_s` | 300 | Required |  |
| `retention_s` | 172800 | Required |  |
| `buckets` | array of object | Required |  |

```json
{
  "type": "object",
  "additionalProperties": false,
  "required": [
    "machine_id",
    "window_s",
    "bucket_s",
    "retention_s",
    "buckets"
  ],
  "properties": {
    "machine_id": {
      "$ref": "#/components/schemas/UUID"
    },
    "window_s": {
      "type": "integer",
      "minimum": 1
    },
    "bucket_s": {
      "type": "integer",
      "enum": [
        300
      ]
    },
    "retention_s": {
      "type": "integer",
      "enum": [
        172800
      ]
    },
    "buckets": {
      "type": "array",
      "items": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "bucket",
          "samples",
          "devices"
        ],
        "properties": {
          "bucket": {
            "$ref": "#/components/schemas/Rfc3339Utc"
          },
          "samples": {
            "type": "integer",
            "minimum": 1
          },
          "devices": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "pci_address"
              ],
              "properties": {
                "pci_address": {
                  "type": "string"
                },
                "temperature_c": {
                  "$ref": "#/components/schemas/TelemetryNumberSummary"
                },
                "utilization_pct": {
                  "$ref": "#/components/schemas/TelemetryNumberSummary"
                },
                "power_watts": {
                  "$ref": "#/components/schemas/TelemetryNumberSummary"
                },
                "fan_pct": {
                  "$ref": "#/components/schemas/TelemetryNumberSummary"
                },
                "memory_used_bytes": {
                  "$ref": "#/components/schemas/TelemetryAmountSummary"
                },
                "unified_memory_used_bytes": {
                  "$ref": "#/components/schemas/TelemetryAmountSummary"
                }
              }
            }
          },
          "host": {
            "type": "object",
            "properties": {
              "cpu_utilization_pct": {
                "$ref": "#/components/schemas/TelemetryNumberSummary"
              },
              "load1": {
                "$ref": "#/components/schemas/TelemetryNumberSummary"
              },
              "memory_used_bytes": {
                "$ref": "#/components/schemas/TelemetryAmountSummary"
              },
              "disk_free_bytes": {
                "$ref": "#/components/schemas/TelemetryAmountSummary"
              },
              "uptime_s": {
                "$ref": "#/components/schemas/TelemetryAmountSummary"
              }
            }
          }
        }
      }
    }
  }
}
```

### `default`

Error envelope. 401 unauthenticated, 403/404 forbidden, 409 conflict, 422 invalid input, 429 rate limited (code UNAVAILABLE, retryable:true, no Retry-After header), 503 unavailable money/provider state with retryable:true.

`application/json`
| Field | Type | Presence | Description |
| --- | --- | --- | --- |
| `error` | object | Required |  |

```json
{
  "$ref": "#/components/schemas/ErrorEnvelope"
}
```

## Static request outline

Replace path/query placeholders and provide the required JSON body, headers and credential from the sections above. This is a request outline, not a command that chooses an amount or starts a rental for you.

```sh
curl --request GET 'https://amplerun-api.spiry.org/api/v1/hosts/machines/{id}/telemetry' \
  --header "Authorization: Bearer $AMPLERUN_API_KEY"
```

[Schema definitions](https://docs.amplerun.com/reference/schemas.md) · [Download OpenAPI](/openapi.json) · [Authentication](https://docs.amplerun.com/agents/authentication.md) · [Errors and recovery](https://docs.amplerun.com/reference/errors.md)

---
Generated from the AmpleRun API contract.
Canonical: https://docs.amplerun.com/reference/api/get-machine-telemetry/
