Skip to content

List a server's running intervals

Returns the periods in which the server was running, each with why it stopped, and the period running now. It feeds the uptime timeline of a server's detail page.

A server counts as running from when it starts after being created, or when a resume finishes, until a park finishes, a delete starts, access is revoked, or a lifecycle step fails. While a park is in progress the server is still running (and billed); a park that does not finish leaves the period unbroken. The periods come from the server's lifecycle log, the same one List a server's event history reads, and their seconds are the uptime Get a server's daily cost and uptime reports.

A server is visible to the person who created it and to members with manage_forge; anyone else is told it does not exist. Requires a bearer token (or API key) whose principal holds the use_forge capability in the acting organization. It works while Forge cloud compute is switched off.

GEThttps://api.aitronos.com/v1/forge/compute/hosts/{host_id}/intervals

Path Parameters

host_id string required

The server's id: the fchost_ id returned in id, or the UUID sent when the server was created (any letter case, with or without hyphens).

Query Parameters

from string optional

First day of the period, inclusive, as YYYY-MM-DD (UTC). Defaults to the first day of to's month; with neither from nor to, the period is the current calendar month (UTC).

to string optional

Last day of the period, inclusive, as YYYY-MM-DD (UTC). Defaults to the last day of from's month. The period is at most 93 days, both ends counted.

organization_id string optional

The organization the server belongs to: send its organization.id (from List your servers in every organization). Defaults to your current organization, where a server of another organization is not found. You must be an active member of it, or the request is refused with 403 ORGANIZATION_ACCESS_DENIED.

Headers

X-Organization-Id string optional

The same as organization_id, as a header. When both are sent, the query parameter wins.


Returns

  • host_id string — the server's fchost_ id.
  • current object or null — the period running now, {started_at}; null while the server is not running (for example while it is parked).
  • intervals array — every running period that overlaps the requested days, oldest first. Periods are not cut at the edges of the requested days: one that started before from keeps its real started_at. The period running now, if any, is last. Each has:
    • started_at string — when the server started running (UTC).
    • ended_at string or null — when it stopped running (UTC); null while it still runs.
    • ended_by string or null — why it stopped: park (a park finished: the server is saved and not running), delete (a delete started), stop (access was revoked and the server removed at once), failure (a lifecycle step failed). null while it still runs.

Every timestamp is ISO 8601 in UTC with a Z suffix.

{
  "host_id": "fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90",
  "current": {"started_at": "2026-10-02T07:12:00Z"},
  "intervals": [
    {"started_at": "2026-09-30T22:00:00Z", "ended_at": "2026-10-01T03:00:00Z", "ended_by": "park"},
    {"started_at": "2026-10-02T07:12:00Z", "ended_at": null, "ended_by": null}
  ]
}

Errors

StatusCodeWhen
401AUTHENTICATION_REQUIREDNo valid credential.
403ORGANIZATION_ACCESS_DENIEDorganization_id or X-Organization-Id names an organization you are not an active member of.
403INSUFFICIENT_PERMISSIONSThe caller does not hold use_forge in the acting organization.
404FORGE_COMPUTE_HOST_NOT_FOUNDNo server with this id in the acting organization, or it was created by someone else and the caller does not hold manage_forge.
422INVALID_DATE_RANGEto is before from.
422DATE_RANGE_TOO_LARGEThe period is longer than 93 days.
422VALIDATION_ERRORfrom or to is not a YYYY-MM-DD date.
422INVALID_ID_FORMAThost_id is neither a UUID nor fchost_<32 hex>.
cURL
curl "https://api.aitronos.com/v1/forge/compute/hosts/fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90/intervals?from=2026-10-01&to=2026-10-31" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Response:

{
  "host_id": "fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90",
  "current": {"started_at": "2026-10-02T07:12:00Z"},
  "intervals": [
    {"started_at": "2026-09-30T22:00:00Z", "ended_at": "2026-10-01T03:00:00Z", "ended_by": "park"},
    {"started_at": "2026-10-02T07:12:00Z", "ended_at": null, "ended_by": null}
  ]
}