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.
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).
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.
X-Organization-Id string optional
The same as organization_id, as a header. When both are sent, the query parameter wins.
host_idstring — the server'sfchost_id.currentobject ornull— the period running now,{started_at};nullwhile the server is not running (for example while it is parked).intervalsarray — every running period that overlaps the requested days, oldest first. Periods are not cut at the edges of the requested days: one that started beforefromkeeps its realstarted_at. The period running now, if any, is last. Each has:started_atstring — when the server started running (UTC).ended_atstring ornull— when it stopped running (UTC);nullwhile it still runs.ended_bystring ornull— 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).nullwhile 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}
]
}| Status | Code | When |
|---|---|---|
| 401 | AUTHENTICATION_REQUIRED | No valid credential. |
| 403 | ORGANIZATION_ACCESS_DENIED | organization_id or X-Organization-Id names an organization you are not an active member of. |
| 403 | INSUFFICIENT_PERMISSIONS | The caller does not hold use_forge in the acting organization. |
| 404 | FORGE_COMPUTE_HOST_NOT_FOUND | No server with this id in the acting organization, or it was created by someone else and the caller does not hold manage_forge. |
| 422 | INVALID_DATE_RANGE | to is before from. |
| 422 | DATE_RANGE_TOO_LARGE | The period is longer than 93 days. |
| 422 | VALIDATION_ERROR | from or to is not a YYYY-MM-DD date. |
| 422 | INVALID_ID_FORMAT | host_id is neither a UUID nor fchost_<32 hex>. |
- Bash
- Python
- Python
- JavaScript
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}
]
}