Hi team,
Reopening this because the previous thread was closed before I got an answer.
First, thanks for shipping the dashboard fix and the new DELETE endpoint.
I immediately tried wiring it into our automation, but ran into another issue.
The endpoint is documented as:
curl -X DELETE \ ``https://fly.io/api/v1/postgresv2/{cluster}/databases/{name}``
-H "Authorization: Bearer $FLY_API_TOKEN"
However, every request returns:
{"error":"Cluster is missing an MPGv2 cluster ID"}
Digging into it, it looks like the API is expecting an MPGv2 cluster ID, but I don’t appear to have one.
When I inspect the cluster, I see:
{
"id": "9jknq035mmXXXXXX", // shown in the UI
"mpgd_cluster_id": "", // empty
"version": 1,
"name": "XXXXXX-staging-db-ord",
...
}
The dashboard displays the id, and that’s also what fly mpg list exposes, but the API rejects it because it wants an mpgd_cluster_id, which appears to be empty.
So I’m not sure how this endpoint is intended to be called.
Am I missing another API that returns the MPGv2 cluster ID, or is this a bug where V1 clusters don’t have the value populated?
For context, we’re trying to automate customer provisioning/deprovisioning, so we’d really like to be able to delete individual databases programmatically.
Thanks!