PUT
/api/v1/reserve_ips/floating-ip/attach/
curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '"{\n \"ip_address\": {{floating_ip}},\n \"node_ids\": [\n {{node_id}}\n ]\n}"'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json="{\n \"ip_address\": {{floating_ip}},\n \"node_ids\": [\n {{node_id}}\n ]\n}",)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify("{\n \"ip_address\": {{floating_ip}},\n \"node_ids\": [\n {{node_id}}\n ]\n}"),});console.log(await response.json());curl --request PUT \ --url 'https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/?project_id=<PROJECT_ID>&location=<LOCATION>&apikey=<API_KEY>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '{ "ip_address": "164.52.220.153", "node_ids": [ 244981 ]}'import requests
response = requests.put( "https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/", params={"project_id": "<PROJECT_ID>", "location": "<LOCATION>", "apikey": "<API_KEY>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json={ "ip_address": "164.52.220.153", "node_ids": [ 244981, ], },)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/floating-ip/attach/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", location: "<LOCATION>", apikey: "<API_KEY>" });
const response = await fetch(url, { method: "PUT", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify({ "ip_address": "164.52.220.153", "node_ids": [ 244981 ] }),});console.log(await response.json());Attach Floating IPv4 and Attach Floating IP to Node(s) share this request; the body you send decides which one runs.
Parameters
Section titled “Parameters”Query Parameters
Section titled “Query Parameters”project_id
required
integer
Identifier of the project to scope the request to. Required integer project ID.
Example
<PROJECT_ID>apikey
required
string
API key used for authenticating the request
Example
<API_KEY>location
required
string
Specifies the target location for attaching the floating IPv4 address.
Example
<LOCATION>Request Body
Section titled “Request Body”Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
HTTP status code indicating the result of the attach operation
integer
data
object
ip_address
IPv4 address of the attached floating IP
string
node_ids
Array<integer>
errors
object
message
Human-readable status message indicating the result of the attach operation.
string
Example
{ "code": 200, "data": { "ip_address": "1.2.3.4", "node_ids": [ 123456 ] }, "message": "Floating IP is attached successfully."}