Closed BobyMCbobs closed 1 year ago
These api endpoints maybe of use
https://metal.equinix.com/developers/docs/locations/metros/#capacity
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/capacity/metros" \
-d '{
"servers": [
{
"metro": "<metro_code>",
"plan": "<server_type>",
"quantity": <integer>
}
]
}'
A sample response from SJC1 facility
{
"servers": [
{
"facility": "sjc1",
"plan": "c3.medium.x86",
"quantity": 5,
"available": false
}
]
}
https://metal.equinix.com/developers/docs/locations/facilities/#facility-capacity
curl -X POST \
-H "Content-Type: application/json" \
-H "X-Auth-Token: <API_TOKEN>" \
"https://api.equinix.com/metal/v1/capacity" \
-d '{
"servers": [
{
"facility": "<facility_code>",
"plan": "<server_type>",
"quantity": <number_of_servers>
}
]
}'
It would be useful to be able to provide a list of ServerSpec types and have the next type that is available in the given region be chosen
Links: