Device Management. Check out the product docs to learn more about Server Devices.
Retrieve BGP neighbor data for this device
/devices/{id}/bgp/neighbors
Provides a summary of the BGP neighbor data associated to the BGP sessions for this device.
Retrieve all BGP sessions
/devices/{id}/bgp/sessions
Provides a listing of available BGP sessions for the device.
Create a BGP session
/devices/{id}/bgp/sessions
Creates a BGP session.
Retrieve device's events
/devices/{id}/events
Returns a list of events pertaining to a specific device
Perform an action
/devices/{id}/actions
Performs an action for the given device. Possible actions include: power_on, power_off, reboot, reinstall, and rescue (reboot the device into rescue OS.)
Retrieve all devices of an organization
/organizations/{id}/devices
Provides a collection of devices for a given organization.
Retrieve all devices of a project
/projects/{id}/devices
Provides a collection of devices for a given project.
Create a device
/projects/{id}/devices
Creates a new device and provisions it in our datacenter.
Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan.
The features attribute allows you to optionally specify what features your server should have.
For example, if you require a server with a TPM chip, you may specify { "features": { "tpm": "required" } }
(or { "features": ["tpm"] }
in shorthand).
The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below).
The request will not fail if we have no servers with that feature in our inventory.
The facilities attribute specifies in what datacenter you wish to create the device.
You can either specify a single facility { "facility": "f1" }
, or you can instruct to create the device in the best available datacenter { "facility": "any" }
. Additionally it is possible to set a prioritized location selection.
For example { "facility": ["f3", "f2", "any"] }
will try to assign to the facility f3, if there are no available f2, and so on. If "any" is not specified for "facility", the request will fail unless it can assign in the selected locations.
The `ip_addresses attribute will allow you to specify the addresses you want created with your device.
To maintain backwards compatibility, If the attribute is not sent in the request, it will be treated as if { "ip_addresses": [{ "address_family": 4, "public": true }, { "address_family": 4, "public": false }, { "address_family": 6, "public": true }] }
was sent.
The private IPv4 address is required and always need to be sent in the array. Not all operating systems support no public IPv4 address, so in those cases you will receive an error message.
For example, to only configure your server with a private IPv4 address, you can send { "ip_addresses": [{ "address_family": 4, "public": false }] }
.
Note: when specifying a subnet size larger than a /30, you will need to supply the UUID(s) of existing ip_reservations in your project to assign IPs from.
For example, { "ip_addresses": [..., {"address_family": 4, "public": true, "ip_reservations": ["uuid1", "uuid2"]}] }
To access a server without public IPs, you can use our Out-of-Band console access (SOS) or use another server with public IPs as a proxy.
Retrieve a device
/devices/{id}
Type-specific options (such as facility for baremetal devices) will be included as part of the main data structure. State value can be one of: active inactive queued or provisioning
Update the device
/devices/{id}
Updates the device.
Delete the device
/devices/{id}
Deletes a device and deprovisions it in our datacenter.
Create a devices batch
/projects/{id}/devices/batch
Creates new devices in batch and provisions them in our datacenter.
Type-specific options (such as operating_system for baremetal devices) should be included in the main data structure alongside hostname and plan.
The features attribute allows you to optionally specify what features your server should have.
For example, if you require a server with a TPM chip, you may specify { "features": { "tpm": "required" } }
(or { "features": ["tpm"] }
in shorthand).
The request will fail if there are no available servers matching your criteria. Alternatively, if you do not require a certain feature, but would prefer to be assigned a server with that feature if there are any available, you may specify that feature with a preferred value (see the example request below).
The request will not fail if we have no servers with that feature in our inventory.
The facilities attribute specifies in what datacenter you wish to create the device.
You can either specify a single facility { "facility": "f1" }
, or you can instruct to create the device in the best available datacenter { "facility": "any" }
. Additionally it is possible to set a prioritized location selection.
For example { "facility": ["f3", "f2", "any"] }
will try to assign to the facility f3, if there are no available f2, and so on. If "any" is not specified for "facility", the request will fail unless it can assign in the selected locations.
With { "facility": "any" }
you have the option to diversify to indicate how many facilities you are willing to be spread across. For this purpose use parameter: facility_diversity_level = N
.
For example:
{ "facilities": ["sjc1", "ewr1", "any"] , "facility_diversity_level" = 1, "quantity" = 10 }
will assign 10 devices into the same facility, trying first in "sjc1", and if there aren’t available, it will try in "ewr1", otherwise any other.
The ip_addresses
attribute will allow you to specify the addresses you want created with your device.
To maintain backwards compatibility, If the attribute is not sent in the request, it will be treated as if { "ip_addresses": [{ "address_family": 4, "public": true }, { "address_family": 4, "public": false }, { "address_family": 6, "public": true }] }
was sent.
The private IPv4 address is required and always need to be sent in the array. Not all operating systems support no public IPv4 address, so in those cases you will receive an error message.
For example, to only configure your server with a private IPv4 address, you can send { "ip_addresses": [{ "address_family": 4, "public": false }] }
.
Note: when specifying a subnet size larger than a /30, you will need to supply the UUID(s) of existing ip_reservations in your project to assign IPs from.
For example, { "ip_addresses": [..., {"address_family": 4, "public": true, "ip_reservations": ["uuid1", "uuid2"]}] }
To access a server without public IPs, you can use our Out-of-Band console access (SOS) or use another server with public IPs as a proxy.
Retrieve an instance bandwidth
/devices/{id}/bandwidth
Retrieve an instance bandwidth for a given period of time.
Retrieve all ip assignments
/devices/{id}/ips
Returns all ip assignments for a device.
Create a ip assignment
/devices/{id}/ips
Creates an ip assignment for a device.
Retrieve the custom metadata of an instance
/devices/{id}/customdata
Provides the custom metadata stored for this instance in json format
Retrieve the custom metadata of an IP Assignment
/devices/{instance_id}/ips/{id}/customdata
Provides the custom metadata stored for this IP Assignment in json format
Retrieve device traffic
/devices/{id}/traffic
Returns traffic for a specific device.
Retrieve all usages for device
/devices/{id}/usages
Returns all usages for a device.
Retrieve all usages for project
/projects/{id}/usages
Returns all usages for a project.