Skip to content

Detach Public IP / Attach Public IP

POST
/api/v1/reserve_ips/public_reserveip_actions/
curl --request POST \
--url 'https://api.e2enetworks.com/myaccount/api/v1/reserve_ips/public_reserveip_actions/?project_id=<PROJECT_ID>&apikey=<BASE_URL>&location=<LOCATION>' \
--header 'Authorization: Bearer <API_TOKEN>' \
--header 'Content-Type: application/json' \
--data '"{\n \"public_ip\": {{public_ip}},\n \"type\": \"detach\",\n \"vm_id\": {{vm_id}}\n}"'

Detach Public IP and Attach Public IP share this request; the body you send decides which one runs.

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 to authorize the detach public IP request

Example

<BASE_URL>
location
required
string

E2E Myaccount region where the public IP is located

Example

<LOCATION>
Media typeapplication/json
One of:

JSON-formatted string specifying the public IP to detach, the operation type, and the target VM ID

string

Example

{
"public_ip": {{public_ip}},
"type": "detach",
"vm_id": {{vm_id}}
}

Successful response

Media typeapplication/json
object
code

HTTP status code of the detach operation

integer
data
object
IP

The public IPv4 address assigned to the detached resource

string
status

Indicates the result status of the detach public IP operation

string
vm_name

Name of the virtual machine associated with the detach operation

string
errors
object
message

Status message indicating the result of the detach public IP operation.

string

Example

{
"code": 200,
"data": {
"IP": "1.2.3.4",
"status": "",
"vm_name": "--"
},
"message": "IP Detached Successfully."
}