POST
/api/v1/vpc/node/detach/
curl --request POST \ --url 'https://api.e2enetworks.com/myaccount/api/v1/vpc/node/detach/?project_id=<PROJECT_ID>&apikey=<API_KEY>&location=<LOCATION>' \ --header 'Authorization: Bearer <API_TOKEN>' \ --header 'Content-Type: application/json' \ --data '"{\n \"vpc_name\": \"VPC-493\",\n \"dns\": \"8.8.8.8 8.8.4.4\",\n \"cidr\": {{vpc_cidr}},\n \"node_id\": {{node_id}},\n \"action\": \"detach\",\n \"network_id\": {{network_id}},\n \"subnet_id\": {{subnet_id}}\n}"'import requests
response = requests.post( "https://api.e2enetworks.com/myaccount/api/v1/vpc/node/detach/", params={"project_id": "<PROJECT_ID>", "apikey": "<API_KEY>", "location": "<LOCATION>"}, headers={"Authorization": "Bearer <API_TOKEN>"}, json="{\n \"vpc_name\": \"VPC-493\",\n \"dns\": \"8.8.8.8 8.8.4.4\",\n \"cidr\": {{vpc_cidr}},\n \"node_id\": {{node_id}},\n \"action\": \"detach\",\n \"network_id\": {{network_id}},\n \"subnet_id\": {{subnet_id}}\n}",)print(response.json())const url = new URL("https://api.e2enetworks.com/myaccount/api/v1/vpc/node/detach/");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 \"vpc_name\": \"VPC-493\",\n \"dns\": \"8.8.8.8 8.8.4.4\",\n \"cidr\": {{vpc_cidr}},\n \"node_id\": {{node_id}},\n \"action\": \"detach\",\n \"network_id\": {{network_id}},\n \"subnet_id\": {{subnet_id}}\n}"),});console.log(await response.json());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 geographic region for the VPC operation
Example
<LOCATION>Request Body
Section titled “Request Body”Media typeapplication/json
JSON-formatted string containing the parameters for detaching a VPC
string
Example
{ "vpc_name": "VPC-493", "dns": "8.8.8.8 8.8.4.4", "cidr": {{vpc_cidr}}, "node_id": {{node_id}}, "action": "detach", "network_id": {{network_id}}, "subnet_id": {{subnet_id}}}Responses
Section titled “Responses”Successful response
Media typeapplication/json
object
code
HTTP status code indicating the result of the detach VPC operation
integer
data
object
vpc_id
Identifier of the VPC that was detached
integer
vpc_name
Name or identifier of the VPC
string
project_id
Identifier of the detached project
string
errors
object
message
Human-readable status message for the detach VPC operation
string
Example
{ "code": 200, "data": { "vpc_id": 1234, "vpc_name": "VPC-493", "project_id": "12345" }, "message": "VPC detach operation successfully done"}