Allocate an IP Address
POST/virtual_machines/virtual_machine/allocate_ip
Allocate an IP address to a virtual machine, automatically determining the network interface
Scopes
ip_addresses
OAuth2 Scopes
When using OAuth2 authentication, scopes are prefixed with api.katapult.io/core/v1/
.
Request
- application/json
Body
virtual_machine
object
required
All 'virtual_machine[]' params are mutually exclusive, only one can be provided.
ip_address
object
required
All 'ip_address[]' params are mutually exclusive, only one can be provided.
Responses
- 200
- 400
- 403
- 404
- 406
- 422
- 429
- 503
Allocate an IP address to a virtual machine, automatically determining the network interface
- application/json
- Schema
- Example (from schema)
Schema
ip_address
object
required
network
object
data_center
object
country
object
{
"ip_address": {
"id": "string",
"address": "string",
"reverse_dns": "string",
"vip": true,
"label": "string",
"address_with_mask": "string",
"network": {
"id": "string",
"name": "string",
"permalink": "string",
"data_center": {
"id": "string",
"name": "string",
"permalink": "string",
"country": {
"id": "string",
"name": "string",
"iso_code2": "string",
"iso_code3": "string",
"time_zone": "string",
"eu": true
}
}
},
"allocation_id": "string",
"allocation_type": "string"
}
}
No API token was provided in the Authorization header. Ensure a token is provided prefixed with Bearer
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [missing_api_token
]
{
"code": "missing_api_token",
"description": "string",
"detail": {}
}
403 error response
- application/json
- Schema
- Example (from schema)
Schema
- UnauthorizedNetworkForAPITokenSchema
- InvalidAPITokenSchema
- InvalidCapabilitiesTokenSchema
- ScopeNotGrantedErrorSchema
oneOf
Network is not allowed to access the API with this API token
Possible values: [unauthorized_network_for_api_token
]
detail
object
The IP address the request was received from
The API token provided was not valid (it may not exist or have expired)
Possible values: [invalid_api_token
]
detail
object
The capabilities token provided was not valid (either not valid, expired or not signed by the correct key)
Possible values: [invalid_capabilities_token
]
The scope required for this endpoint has not been granted to the authenticating identity
Possible values: [scope_not_granted
]
detail
ScopeNotGrantedError
{}
404 error response
- application/json
- Schema
- Example (from schema)
Schema
- VirtualMachineNotFoundSchema
- IPAddressNotFoundSchema
oneOf
No virtual machine was found matching any of the criteria provided in the arguments
Possible values: [virtual_machine_not_found
]
No IP addresses were found matching any of the criteria provided in the arguments
Possible values: [ip_address_not_found
]
{}
The object found is in the trash and therefore cannot be manipulated through the API. It should be restored in order to run this operation.
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [object_in_trash
]
detail
object
trash_object
object
nullable
{
"code": "object_in_trash",
"description": "string",
"detail": {
"trash_object": {
"id": "string",
"keep_until": 0,
"object_id": "string",
"object_type": "string"
}
}
}
422 error response
- application/json
- Schema
- Example (from schema)
Schema
- NoInterfaceAvailableSchema
- IPAlreadyAllocatedSchema
oneOf
This virtual machine does not have a network interface that is compatible with the provided IP address
Possible values: [no_interface_available
]
This IP address has already been allocated to another resource
Possible values: [ip_already_allocated
]
{}
You have reached the rate limit for this type of request
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [rate_limit_reached
]
detail
object
The total number of requests per minute that are permitted
{
"code": "rate_limit_reached",
"description": "string",
"detail": {
"total_permitted": 0
}
}
The service is currently unavailable, please try again later
- application/json
- Schema
- Example (from schema)
Schema
Possible values: [service_unavailable
]
{
"code": "service_unavailable",
"description": "string",
"detail": {}
}