Floating IP API reference
See https://docs.openstack.org/api-ref/network/. For error handling guidance, see the API error reference.
In these methods, {floating_ip_id} is the ID of the floating IP, {port_id} is the ID of the instance port a floating IP associates with, and {server_id} is the ID of the instance. These endpoints list floating IPs, allocate a floating IP from an external network, associate and disassociate a floating IP, and release a floating IP.
Quake AI public networks#
Neutron floating IP endpoints#
List floating IPs#
GET /v2.0/floatingipsShow floating IP details#
GET /v2.0/floatingips/{floating_ip_id}Allocate a floating IP#
POST /v2.0/floatingipsRequest body
{
"floatingip": {
"floating_network_id": "PUBLIC_STATIC_NETWORK_ID"
}
}floating_network_idis the ID of thePublicStaticexternal network. Retrieve it withGET /v2.0/networks?name=PublicStatic.
Response (201 Created)
{
"floatingip": {
"id": "d46257a1-c6d0-46ae-a146-dc36ad19a430",
"floating_ip_address": "203.0.113.50",
"floating_network_id": "PUBLIC_STATIC_NETWORK_ID",
"status": "DOWN",
"port_id": null
}
}Associate a floating IP with a port#
PUT /v2.0/floatingips/{floating_ip_id}Request body
{
"floatingip": {
"port_id": "PORT_ID"
}
}port_idis the ID of the instance port that receives the floating IP. Neutron returns200 OKwith the resolvedfixed_ip_address.
Disassociate a floating IP from a port#
PUT /v2.0/floatingips/{floating_ip_id}Request body
{
"floatingip": {
"port_id": null
}
}Release a floating IP#
DELETE /v2.0/floatingips/{floating_ip_id}- Neutron returns
204 No Content.
Legacy Nova os-floating-ips endpoints (deprecated)#
List floating IPs (legacy)#
GET /os-floating-ipsShow floating IP details (legacy)#
GET /os-floating-ips/{floating_ip_id}Allocate a floating IP (legacy)#
POST /os-floating-ipsRequest body
{
"pool": "PublicStatic"
}poolis the name of the external network to allocate from, eitherPublicStaticorPublicEphemeral. The pool name must match the external network name; the literal stringpublicreturns404 Floating IP pool not found.
Associate a floating IP with an instance#
POST /servers/{server_id}/actionRequest body
{
"addFloatingIp": {
"address": "FLOATING_IP_ADDRESS"
}
}addressis the floating IP address to associate. This action returns404on microversion 2.44 or later; use the NeutronPUT /v2.0/floatingips/{floating_ip_id}associate call with aport_idinstead.
Disassociate a floating IP from an instance#
POST /servers/{server_id}/actionRequest body
{
"removeFloatingIp": {
"address": "FLOATING_IP_ADDRESS"
}
}- This action returns
404on microversion 2.44 or later; use the NeutronPUT /v2.0/floatingips/{floating_ip_id}disassociate call withport_idset tonullinstead.
Release a floating IP (legacy)#
DELETE /os-floating-ips/{floating_ip_id}