# The run folders on a machine: size, run, age and whether a run still holds each.

> Asks the connected node and waits up to 20 seconds.
> https://koi.dog/docs/api/nodes/list-node-workspaces/

`GET /api/v1/nodes/{id}/workspaces` · Scope: `read`

`409 offline` when it is not connected; `409 not_supported` when its koidog is older than this route (update it). Removes nothing. Every folder comes in the one answer.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The machine's id. |

## Response.

200 OK · JSON object

## Request.

```sh
curl "https://api.koi.dog/api/v1/nodes/$ID/workspaces" \
    -H "Authorization: Bearer $KOIDOG_API_KEY"
```

```js
const res = await fetch(`https://api.koi.dog/api/v1/nodes/${process.env.ID}/workspaces`, {
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
  },
});
console.log(await res.json());
```

```python
import os

import requests

r = requests.get(
    f"https://api.koi.dog/api/v1/nodes/{os.environ['ID']}/workspaces",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "nodeId": "string",
  "at": "string",
  "workspaces": [],
  "totalBytes": 0,
  "removableBytes": 0
}
```
