Volume endpoints with block usage data

Just yesterday we announced volumes endpoints in Machines API. One thing some might have not noticed is that this comes with new block usage data!

GET https://api.machines.dev/v1/apps/APP_NAME/volumes
GET https://api.machines.dev/v1/apps/APP_NAME/volumes/VOLUME_ID

        "id": "vol_abcde12345",
        "name": "pg_data",
        "state": "created",
        "size_gb": 10,
        "region": "gru",
        "zone": "f280",
        "encrypted": true,
        "attached_machine_id": "abcdefgh1234",
        "attached_alloc_id": null,
        "created_at": "2023-06-06T19:35:01.01Z",
        "blocks": 2562885,
        "block_size": 4096,
        "blocks_free": 2524866,
        "blocks_avail": 2389750

These stats are collected from running machines (sorry our 5% Apps v1 folks, but you should migrate anyway) so don’t worry if you have old volumes that show no usage, maybe their machine is just suspended.

If you’ve been poking around https://fly-metrics.net you’d have noticed we had those on our Prometheus Data already and indeed those data are the same but should be easier to consume from a REST API, isn’t that right?

Is that helpful for y’all? What are your use case for volumes and how can this data help you? Let us know, we love feedback.