POST
/api/v1/nodes/ipv6/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '"{\n \"node_id\": {{vm_id}},\n \"action\": \"attach\",\n \"location\": {{location}}\n}"'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json="{\n \"node_id\": {{vm_id}},\n \"action\": \"attach\",\n \"location\": {{location}}\n}",)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify("{\n \"node_id\": {{vm_id}},\n \"action\": \"attach\",\n \"location\": {{location}}\n}"),});console.log(await response.json());curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '"{\n \"node_id\": {{vm_id}},\n \"action\": \"detach\",\n \"detach_ipv6\": {{ipv6}},\n \"location\": {{location}}\n}"'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json="{\n \"node_id\": {{vm_id}},\n \"action\": \"detach\",\n \"detach_ipv6\": {{ipv6}},\n \"location\": {{location}}\n}",)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/nodes/ipv6/");url.search = new URLSearchParams({ project_id: "<PROJECT_ID>", apikey: "<API_KEY>", location: "<LOCATION>" });
const response = await fetch(url, { method: "POST", headers: { "Authorization": "Bearer <API_TOKEN>", "Content-Type": "application/json" }, body: JSON.stringify("{\n \"node_id\": {{vm_id}},\n \"action\": \"detach\",\n \"detach_ipv6\": {{ipv6}},\n \"location\": {{location}}\n}"),});console.log(await response.json());Attach IPv6 and Detach IPv6 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 for authenticating the request
Example
<API_KEY>location
required
string
Specifies the location identifier for the IPv6 attachment.
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
One of:
JSON string representing the request body for attaching an IPv6 address
string
Example
{ "node_id": {{vm_id}}, "action": "attach", "location": {{location}}}JSON-encoded request body for detaching an IPv6 address
string
Example
{ "node_id": {{vm_id}}, "action": "detach", "detach_ipv6": {{ipv6}}, "location": {{location}}}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
HTTP status code indicating the result of the IPv6 attachment request
integer
data
object
attached_ipv6
IPv6 address attached to the resource
string
errors
object
message
Human-readable status message for the IPv6 attachment operation.
string
Example
{ "code": 200, "data": { "attached_ipv6": "2306:64c0:2000::59" }, "message": "IPv6 attached successfully to the compute node."}