Skip to content

Attach AddOn IPv4 / Detach AddOn IPv4

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

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

public_ip
required
string

Path parameter public_ip.

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 authenticate the request

Example

<API_KEY>
location
required
string

Specifies the target location for attaching the IPv4 add-on.

Example

<LOCATION>
Media typeapplication/json
One of:

JSON string with parameters to attach an IPv4 add-on to a VM

string

Example

{
"vm_id": {{vm_id}},
"type": "attach"
}

Successful response

Media typeapplication/json
object
code

HTTP status code of the response

integer
data
object
IP

IPv4 address of the attached add-on

string
status

Status field

string
vm_name

Name of the virtual machine

string
vm_id

Identifier of the virtual machine

integer
errors
object
message

Status message indicating the result of the IPv4 attachment operation.

string

Example

{
"code": 200,
"data": {
"IP": "1.2.3.4",
"status": "Attached",
"vm_name": "C3-8GB-792",
"vm_id": 123456
},
"message": "IP assigned Successfully."
}