GET /v2/ipv4-addresses/
Returns an array with a list of existing IP addresses.
{
"success": true,
"ipv4_addresses": [
{
"id": "$ip_id",
"ipv4_address": "$ip_address",
"cost_per_hour": "$cost_per_hour",
"owner": {
"id": "$owner_id",
"name": "$owner_name"
},
"zone": {
"id": "$zone_id",
"name": "$zone_name"
},
"virtual_machine": {
"id": "$vm_id",
"label": "$vm_name"
},
"attach_time": "$ip_date",
"dhcp": $ip_dhcp
}
]
}
GET GET /v2/ipv4-addresses/$IP_ID
Returns information about the IP address with the specified $IP_ID
.
{
"success": true,
"ipv4_address": {
"id": "$ip_id",
"ipv4_address": "$ip_address",
"cost_per_hour": "$cost_per_hour",
"owner": {
"id": "$owner_id",
"name": "$owner_name"
},
"zone": {
"id": "$zone_id",
"name": "$zone_name"
},
"virtual_machine": {
"id": "$vm_id",
"label": "$vm_name"
},
"attach_time": "$ip_date",
"dhcp": $ip_dhcp
}
}
PUT /v2/ipv4-addresses
{
"zone_id": "$zone_id"
}
{
"success": true,
"ipv4_address": {
"id": "$ip_id",
"ipv4_address": "$ip_address",
"cost_per_hour": "$cost_per_hour",
"owner": {
"id": "$owner_id",
"name": "$owner_name"
},
"zone": {
"id": "$zone_id",
"name": "$zone_name"
},
"virtual_machine": {
"id": "$vm_id",
"label": "$vm_name"
},
"attach_time": "$ip_date",
"dhcp": $ip_dhcp
}
}
POST /v2/ipv4-addresses/$IP_ID/attach
Connecting the IP address with ID $IP_ID
, to the virtual server.
{
"virtual_machine_id": "$vm_id"
}
{
"success":true
}
POST /v2/ipv4-addresses/$IP_ID/detach
Adds a task to disconnect the IP address with $IP_ID
from the virtual server. The IP address must be connected to a virtual server for the operation to succeed.
{
"success":true
}
DELETE /v2/ipv4-addresses/$IP_ID
Adds a task to delete the IP address with $IP_ID
. If the IP address is connected to a virtual server, it will automatically be disconnected from it.
{
"success":true
}