Docs · Dashboard
The dashboard REST API.
Every dashboard page reads a small REST API that returns JSON, so anything you see in the browser you can also get from a script. The Config page lists the routes a running daemon actually registered.
- Base URL
- http://127.0.0.1:8080
- Format
- JSON responses
- List routes
- GET /api/routes
Examples
$ curl -s http://127.0.0.1:8080/api/health
{"ok":true,"node_id":0,"hostname":"127.0.0.1","ip_address":"127.0.0.1","is_leader":true}
$ curl -s http://127.0.0.1:8080/api/pools | python -m json.tool
$ curl -s http://127.0.0.1:8080/api/topology # node ids for /api/nodes/{node}/...
$ curl -s http://127.0.0.1:8080/api/nodes/0/workersPOST routes take their fields as query or form parameters. The module's own settings go in config as a YAML mapping. Validate first, which creates nothing and returns every field error at once, then send the same request without action to create:
$ curl -s -X POST http://127.0.0.1:8080/api/pools/compose \
-d mod_name=clio_bdev -d pool_name=ram::scratch -d pool_id=700.0 \
-d pool_query=local \
--data-urlencode $'config=bdev_type: ram\ncapacity: 256MB' \
-d action=validateRuntime routes (clio_admin)
| Method | Path | Returns or does |
|---|---|---|
| GET | /api/health | Dashboard liveness plus this node's identity |
| GET | /api/topology | Cluster membership and SWIM state as this node sees it |
| GET | /api/pools | Pools composed on this node |
| GET | /api/config | The settings this daemon actually came up with |
| GET | /api/routes | Every route and asset mount registered by any module |
| GET | /api/chimods | Loaded modules and their dashboard capabilities |
| GET | /api/nodes/{node}/workers | Per-worker queue depth, load and task counts |
| GET | /api/nodes/{node}/containers | Per-pool containers and their learned task-cost models |
| GET | /api/nodes/{node}/bdevs | Every block device on the node, with capacity and throughput |
| GET | /api/nodes/{node}/system_stats | Sampled CPU, RAM and GPU utilization newer than ?min_event_id |
| GET | /api/pools/{pool}/monitor | Forwards ?query to the pool's own Monitor() (?routing=local|broadcast|…) |
| POST | /api/pools/{pool}/destroy | Destroys a pool and its containers on this node |
| POST | /api/pools/compose | Creates a pool of any module. Fields: mod_name, pool_name, pool_id, pool_query, config; action=validate checks without creating |
{node} is a node id from /api/topology. {pool} is a pool id such as 512.0.
Module routes
Modules with their own page register routes under /api/mod/<module>/.
| Module | Method | Path | Returns or does |
|---|---|---|---|
clio_bdev | GET | /api/mod/clio_bdev/pools | Block-device pools on this node |
| GET | /api/mod/clio_bdev/create | The form spec for a new block device | |
| POST | /api/mod/clio_bdev/create | Validates (action=validate) or creates a block device | |
clio_cte_core | GET | /api/mod/clio_cte_core/pools | CTE core pools on this node |
| GET | /api/mod/clio_cte_core/{pool}/targets | The pool's storage targets, with score and capacity | |
| POST | /api/mod/clio_cte_core/{pool}/register_target | Registers a block device as a storage target. Fields: name, then bdev_type and capacity, or attach_pool_id | |
| POST | /api/mod/clio_cte_core/{pool}/unregister_target | Removes a storage target from placement. Field: name | |
| GET | /api/mod/clio_cte_core/create | The form spec for a new CTE core pool | |
| POST | /api/mod/clio_cte_core/create | Validates (action=validate) or creates a CTE core pool | |
clio_safe_bdev | GET | /api/mod/clio_safe_bdev/pools | Safe block-device arrays on this node |
| POST | /api/mod/clio_safe_bdev/{pool}/add_member | Adds a member to the array | |
| POST | /api/mod/clio_safe_bdev/{pool}/replace_member | Replaces a member | |
| POST | /api/mod/clio_safe_bdev/{pool}/remove_member | Removes a member | |
| GET | /api/mod/clio_safe_bdev/create | The form spec for a new array | |
| POST | /api/mod/clio_safe_bdev/create | Validates (action=validate) or creates an array |
Routes are registered by modules that are loaded, so a runtime without clio_safe_bdev has none of its routes. GET /api/routes is the authoritative list for a given daemon.