hosts

Per-machine earnings day-series (host owner)

The account-wide /hosts/earnings day-series narrowed to one machine and attributed through jobs.machine_id, in the identical shape so one chart renders both. Ledger-derived only: every bar links back to journal_lines on host_payable:<id> for jobs that ran on this machine, and the series reconciles exactly to those rows. paid_micro is zero throughout, because payout settlements carry no job_id and belong to the account rather than to any one machine — attributing them would double-count a payout across the fleet. A non-owner receives 404, never 403, so machine existence never leaks. A malformed window is refused rather than silently defaulted.

get/api/v1/hosts/machines/{id}/earnings

Request

  • Base URL: https://amplerun-api.spiry.org
  • URL: https://amplerun-api.spiry.org/api/v1/hosts/machines/{id}/earnings
  • Auth: HTTP bearer

Path parameters

idstring uuid required
Example:3f0e2a55-8c1b-4d2e-9a6f-0b7c1d2e3f40

Query parameters

windowstring

Trailing window as <n>d (default 30d, 1..365).

Response

Daily earnings bars for this machine, oldest first.

window_daysinteger required
fromstring date-time required
tostring date-time required

Example response

{
  "from": "2026-09-25T12:00:00Z",
  "to": "2026-09-25T12:00:00Z",
  "days": [
    {
      "paid_micro": "1"
    }
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.