# List servers

Lists the Forge cloud servers you created in the acting organization (your current one, or the one named in `organization_id`), newest first, each as the [server object](/docs/api-reference/forge-compute/get-host#returns). Deleted servers stay in the list for seven days after they were deleted. With `scope=org` it lists every member's servers, so an organization admin can see — and stop — everything the organization pays for. To list your servers in every organization at once, use [List your servers in every organization](/docs/api-reference/forge-compute/list-my-hosts).

Callers holding `manage_forge` also receive `orphans`: resources Forge labelled in the organization's own (bring-your-own) provider accounts that no server Forge manages owns any more, such as a server left behind by an interrupted delete or one forgotten when its account was disconnected with `forget_hosts=true`, with what each costs at the provider. Remove one with [Delete a leftover resource](/docs/api-reference/forge-compute/delete-orphan). Resources in Aitronos' own accounts are never listed; Aitronos cleans those up itself.

Requires a bearer token (or API key) whose principal holds the `use_forge` capability in the acting organization; `scope=org` requires `manage_forge`. It works while Forge cloud compute is switched off. An organization API key has no user of its own, so `scope=mine` lists no servers for it.

#### Query Parameters

**`scope`** string optional

`mine` (default) lists the servers you created; `org` lists every member's servers and requires `manage_forge`.

**`organization_id`** string optional

The organization to act in. Defaults to your current organization. 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

**`hosts`** array — the servers, newest first, each a [server object](/docs/api-reference/forge-compute/get-host#returns). A server whose record cannot be read is left out rather than failing the whole list.

**`orphans`** array — leftover resources in the organization's own provider accounts. Always empty for callers without `manage_forge`. Each entry:

- **`offering_id`** string — the bring-your-own offering whose account holds the resource.
- **`provider_resource_id`** string — the resource's id at the provider. Some providers' ids contain a `/`.
- **`resource_type`** string — `server`, `snapshot`, `ssh_key` or `firewall`.
- **`name`** string or `null` — the resource's name at the provider.
- **`hourly`** string or `null` — what the resource costs per hour at the provider, in `currency`; `null` when unknown or not charged by the hour.
- **`currency`** string or `null` — the currency of `hourly`.
- **`first_seen_at`** string or `null` — when Forge first found the resource (UTC).
- **`last_seen_at`** string — when Forge last found it (UTC).



```json
{
  "hosts": [
    {
      "id": "fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90",
      "offering_id": "aitronos",
      "kind": "managed",
      "name": "build-box",
      "organization": {"id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c", "name": "Acme Engineering"},
      "user_id": "usr_7f3a9c2e1b8d4e6fa0c5b3d9e2f1a4c7",
      "project_group": {"id": "fpgrp_4b9e2c7a1d3f4e8a9c0b6d2e1f3a5b7c", "client_id": "grp-clients", "name": "Clients"},
      "location_id": "eu-central",
      "location_label": "Germany",
      "size_id": "std-16",
      "size_label": "16 vCPU · 64 GB",
      "state": "ready",
      "state_label": "Ready",
      "transient": false,
      "step": "ready",
      "step_started_at": "2026-09-28T09:03:41.502318Z",
      "state_changed_at": "2026-09-28T09:03:41.502318Z",
      "failure": null,
      "ipv4": "203.0.113.24",
      "ipv6": "2001:db8:4f2a::1",
      "ssh_port": 22,
      "ssh_user": "forge",
      "bootstrap_host_key_pub": null,
      "host_key_pub": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleServerHostKeyForDocumentationOnly0000",
      "price": {
        "hourly": "0.83",
        "monthly_cap": "520.30",
        "currency": "CHF",
        "source": "aitronos",
        "includes_vat": false,
        "catalog_version": "fc-3b8e1f0a9c42",
        "quoted_at": "2026-09-28T09:00:00.184066Z",
        "parked_per_gb_month": "0.0269",
        "price_verified": true
      },
      "month_to_date": "0.83",
      "notice": null,
      "idle_reminder": null,
      "reconcile_flags": null,
      "actions": ["park", "delete", "revoke"],
      "created_at": "2026-09-28T09:00:00.184066Z",
      "ready_at": "2026-09-28T09:03:41.502318Z",
      "parked_at": null,
      "parked_expires_at": null,
      "deleted_at": null,
      "revoked_at": null,
      "revoke_reason": null,
      "last_activity_at": null
    },
    {
      "id": "fchost_0b7e4d21c9a84f6b8d3e5a1c7f902e64",
      "offering_id": "aitronos",
      "kind": "managed",
      "name": "nightly-tests",
      "organization": {"id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c", "name": "Acme Engineering"},
      "user_id": "usr_2c6b8e1f4a9d4c7e8b0f3a5d6e1c9b27",
      "project_group": null,
      "location_id": "eu-central",
      "location_label": "Germany",
      "size_id": "std-8",
      "size_label": "8 vCPU · 32 GB",
      "state": "parked",
      "state_label": "Parked. The server is saved and not running",
      "transient": false,
      "step": null,
      "step_started_at": null,
      "state_changed_at": "2026-09-28T18:03:40.905112Z",
      "failure": null,
      "ipv4": null,
      "ipv6": null,
      "ssh_port": 22,
      "ssh_user": "forge",
      "bootstrap_host_key_pub": null,
      "host_key_pub": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleServerHostKeyForDocumentationOnly0000",
      "price": {
        "hourly": "0.42",
        "monthly_cap": "261.55",
        "currency": "CHF",
        "source": "aitronos",
        "includes_vat": false,
        "catalog_version": "fc-3b8e1f0a9c42",
        "quoted_at": "2026-09-27T14:12:09.551208Z",
        "parked_per_gb_month": "0.0269",
        "price_verified": true
      },
      "month_to_date": "11.76",
      "notice": null,
      "idle_reminder": null,
      "reconcile_flags": null,
      "actions": ["resume", "delete"],
      "created_at": "2026-09-27T14:12:09.551208Z",
      "ready_at": "2026-09-27T14:15:02.300417Z",
      "parked_at": "2026-09-28T18:03:40.905112Z",
      "parked_expires_at": "2026-10-28T18:03:40.905112Z",
      "deleted_at": null,
      "revoked_at": null,
      "revoke_reason": null,
      "last_activity_at": "2026-09-28T06:40:00Z"
    }
  ],
  "orphans": [
    {
      "offering_id": "digitalocean",
      "provider_resource_id": "512399871",
      "resource_type": "server",
      "name": "forge-build-box",
      "hourly": "0.2500",
      "currency": "USD",
      "first_seen_at": "2026-09-27T21:40:02.551730Z",
      "last_seen_at": "2026-09-28T08:55:02.118904Z"
    }
  ]
}
```

## Errors

| 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`, or asked for `scope=org` without `manage_forge`. |
| 422 | `VALIDATION_ERROR` | `scope` is neither `mine` nor `org`. |



```bash cURL
curl "https://api.aitronos.com/v1/forge/compute/hosts?scope=org" \
  -H "Authorization: Bearer $ACCESS_TOKEN"
```


```python Python SDK
# pip install aitronos-sdk
#
# The Python SDK does not expose a typed `forge_compute` namespace yet, so call
# the endpoint directly with the same credential you would pass to `Aitronos(...)`
# — an API key or a bearer token, both sent as `Authorization: Bearer <value>`.
import httpx

API_KEY = "your-api-key"

listing = httpx.get(
    "https://api.aitronos.com/v1/forge/compute/hosts",
    headers={"Authorization": f"Bearer {API_KEY}"},
    params={"scope": "org"},
).json()
for server in listing["hosts"]:
    print(server["name"], server["state"], server["month_to_date"])
for leftover in listing["orphans"]:
    print("leftover", leftover["resource_type"], leftover["provider_resource_id"])
```


```python Python
import os
import requests

token = os.environ["AITRONOS_TOKEN"]
response = requests.get(
    "https://api.aitronos.com/v1/forge/compute/hosts",
    headers={"Authorization": f"Bearer {token}"},
)
running = [h for h in response.json()["hosts"] if h["state"] == "ready"]
print(len(running), "ready servers")
```


```javascript JavaScript
const response = await fetch("https://api.aitronos.com/v1/forge/compute/hosts?scope=mine", {
  headers: { Authorization: `Bearer ${process.env.AITRONOS_TOKEN}` },
});
const { hosts } = await response.json();
console.log(hosts.map((h) => `${h.name}: ${h.state_label}`));
```

**Response:**

200 OK (scope=org)

```json
{
  "hosts": [
    {
      "id": "fchost_5d0c2b9e7a414f3c9e8b1a6d2f4c7e90",
      "offering_id": "aitronos",
      "kind": "managed",
      "name": "build-box",
      "organization": {"id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c", "name": "Acme Engineering"},
      "user_id": "usr_7f3a9c2e1b8d4e6fa0c5b3d9e2f1a4c7",
      "project_group": {"id": "fpgrp_4b9e2c7a1d3f4e8a9c0b6d2e1f3a5b7c", "client_id": "grp-clients", "name": "Clients"},
      "location_id": "eu-central",
      "location_label": "Germany",
      "size_id": "std-16",
      "size_label": "16 vCPU · 64 GB",
      "state": "ready",
      "state_label": "Ready",
      "transient": false,
      "step": "ready",
      "step_started_at": "2026-09-28T09:03:41.502318Z",
      "state_changed_at": "2026-09-28T09:03:41.502318Z",
      "failure": null,
      "ipv4": "203.0.113.24",
      "ipv6": "2001:db8:4f2a::1",
      "ssh_port": 22,
      "ssh_user": "forge",
      "bootstrap_host_key_pub": null,
      "host_key_pub": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleServerHostKeyForDocumentationOnly0000",
      "price": {
        "hourly": "0.83",
        "monthly_cap": "520.30",
        "currency": "CHF",
        "source": "aitronos",
        "includes_vat": false,
        "catalog_version": "fc-3b8e1f0a9c42",
        "quoted_at": "2026-09-28T09:00:00.184066Z",
        "parked_per_gb_month": "0.0269",
        "price_verified": true
      },
      "month_to_date": "0.83",
      "notice": null,
      "idle_reminder": null,
      "reconcile_flags": null,
      "actions": ["park", "delete", "revoke"],
      "created_at": "2026-09-28T09:00:00.184066Z",
      "ready_at": "2026-09-28T09:03:41.502318Z",
      "parked_at": null,
      "parked_expires_at": null,
      "deleted_at": null,
      "revoked_at": null,
      "revoke_reason": null,
      "last_activity_at": null
    },
    {
      "id": "fchost_0b7e4d21c9a84f6b8d3e5a1c7f902e64",
      "offering_id": "aitronos",
      "kind": "managed",
      "name": "nightly-tests",
      "organization": {"id": "org_3c1e9a7b5d2f4e8a9b0c6d1e2f3a4b5c", "name": "Acme Engineering"},
      "user_id": "usr_2c6b8e1f4a9d4c7e8b0f3a5d6e1c9b27",
      "project_group": null,
      "location_id": "eu-central",
      "location_label": "Germany",
      "size_id": "std-8",
      "size_label": "8 vCPU · 32 GB",
      "state": "parked",
      "state_label": "Parked. The server is saved and not running",
      "transient": false,
      "step": null,
      "step_started_at": null,
      "state_changed_at": "2026-09-28T18:03:40.905112Z",
      "failure": null,
      "ipv4": null,
      "ipv6": null,
      "ssh_port": 22,
      "ssh_user": "forge",
      "bootstrap_host_key_pub": null,
      "host_key_pub": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIExampleServerHostKeyForDocumentationOnly0000",
      "price": {
        "hourly": "0.42",
        "monthly_cap": "261.55",
        "currency": "CHF",
        "source": "aitronos",
        "includes_vat": false,
        "catalog_version": "fc-3b8e1f0a9c42",
        "quoted_at": "2026-09-27T14:12:09.551208Z",
        "parked_per_gb_month": "0.0269",
        "price_verified": true
      },
      "month_to_date": "11.76",
      "notice": null,
      "idle_reminder": null,
      "reconcile_flags": null,
      "actions": ["resume", "delete"],
      "created_at": "2026-09-27T14:12:09.551208Z",
      "ready_at": "2026-09-27T14:15:02.300417Z",
      "parked_at": "2026-09-28T18:03:40.905112Z",
      "parked_expires_at": "2026-10-28T18:03:40.905112Z",
      "deleted_at": null,
      "revoked_at": null,
      "revoke_reason": null,
      "last_activity_at": "2026-09-28T06:40:00Z"
    }
  ],
  "orphans": [
    {
      "offering_id": "digitalocean",
      "provider_resource_id": "512399871",
      "resource_type": "server",
      "name": "forge-build-box",
      "hourly": "0.2500",
      "currency": "USD",
      "first_seen_at": "2026-09-27T21:40:02.551730Z",
      "last_seen_at": "2026-09-28T08:55:02.118904Z"
    }
  ]
}
```

403 Forbidden

```json
{
  "success": false,
  "error": {
    "code": "INSUFFICIENT_PERMISSIONS",
    "message": "You don't have permission to perform this action.",
    "system_message": "Missing required capability: manage_forge",
    "type": "authorization_error",
    "status": 403,
    "details": {"required_capability": "manage_forge"},
    "trace_id": "3f1c9a52-7d4e-4b8a-9c21-6e0d5f7a8b34",
    "timestamp": "2026-09-28T09:00:00Z"
  }
}
```

## Related Resources

- [Forge cloud compute overview](/docs/api-reference/forge-compute/introduction)
- [List billing organizations](/docs/api-reference/forge-compute/list-billing-organizations)
- [Choose the default billing organization](/docs/api-reference/forge-compute/choose-billing-organization)
- [List project groups](/docs/api-reference/forge-compute/list-project-groups)
- [Register or update a project group](/docs/api-reference/forge-compute/put-project-group)
- [Delete a project group](/docs/api-reference/forge-compute/delete-project-group)
- [List compute offerings](/docs/api-reference/forge-compute/list-offerings)
- [Get offering options](/docs/api-reference/forge-compute/get-offering-options)
- [Resolve a free size](/docs/api-reference/forge-compute/resolve-offering-size)
- [List connected accounts](/docs/api-reference/forge-compute/list-credentials)
- [Connect a cloud account](/docs/api-reference/forge-compute/put-credential)
- [Disconnect a cloud account](/docs/api-reference/forge-compute/delete-credential)
- [Create a server](/docs/api-reference/forge-compute/create-host)
- [List servers](/docs/api-reference/forge-compute/list-hosts)
- [List your servers in every organization](/docs/api-reference/forge-compute/list-my-hosts)
- [Get a server](/docs/api-reference/forge-compute/get-host)
- [Get a server's daily cost and uptime](/docs/api-reference/forge-compute/get-host-usage)
- [List a server's running intervals](/docs/api-reference/forge-compute/list-host-intervals)
- [List a server's event history](/docs/api-reference/forge-compute/list-host-events)
- [Report a setup step](/docs/api-reference/forge-compute/report-progress)
- [Report the server's host key](/docs/api-reference/forge-compute/report-host-key)
- [Mark a server ready](/docs/api-reference/forge-compute/report-ready)
- [Report activity](/docs/api-reference/forge-compute/report-activity)
- [Park a server](/docs/api-reference/forge-compute/park-host)
- [Resume a server](/docs/api-reference/forge-compute/resume-host)
- [Delete a server](/docs/api-reference/forge-compute/delete-host)
- [Revoke a server](/docs/api-reference/forge-compute/revoke-host)
- [Get compute settings](/docs/api-reference/forge-compute/get-settings)
- [Update compute settings](/docs/api-reference/forge-compute/update-settings)
- [Get spend limits](/docs/api-reference/forge-compute/get-limits)
- [Change the organization's limits](/docs/api-reference/forge-compute/update-organization-limits)
- [Set your own limit](/docs/api-reference/forge-compute/update-my-limit)
- [List member limits](/docs/api-reference/forge-compute/list-member-limits)
- [Set a member's limit](/docs/api-reference/forge-compute/update-member-limit)
- [Delete a leftover resource](/docs/api-reference/forge-compute/delete-orphan)