Back to top

Devices

Device Management

Retrieve all devices
GET
/projects/{id}/devices

Provides a collection of devices for a given project.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    include
    string in query

    related attributes to include

    page
    integer in query

    page to display, default to 1, max 100_000

    per_page
    integer in query

    items per page, default to 10, max 1_000

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"devices": [
    		{
    			"id": "string",
    			"short_id": "string",
    			"hostname": "string",
    			"description": "string",
    			"state": "string",
    			"tags": [
    				"string"
    			],
    			"image_url": "string",
    			"billing_cycle": "string",
    			"user": "string",
    			"iqn": "string",
    			"locked": "boolean",
    			"bonding_mode": "integer",
    			"created_at": "string",
    			"updated_at": "string",
    			"spot_instance": "boolean",
    			"spot_price_max": "number",
    			"termination_time": "string",
    			"provisioning_percentage": "number",
    			"operating_system": {
    				"id": "string",
    				"slug": "string",
    				"name": "string",
    				"distro": "string",
    				"version": "string",
    				"provisionable_on": [
    					"string"
    				]
    			},
    			"always_pxe": "boolean",
    			"ipxe_script_url": "string",
    			"location": {
    				"cage": "string",
    				"facility": "string",
    				"rack": "string",
    				"row": "string",
    				"switch": "string"
    			},
    			"facility": {
    				"id": "string",
    				"name": "string",
    				"code": "string",
    				"features": [
    					"string"
    				],
    				"address": {
    					"$ref": "#\/definitions\/Address"
    				}
    			},
    			"plan": {
    				"id": "string",
    				"slug": "string",
    				"name": "string",
    				"description": "string",
    				"line": "string",
    				"specs": "object",
    				"pricing": "object",
    				"available_in": [
    					{
    						"href": "string"
    					}
    				]
    			},
    			"userdata": "string",
    			"root_password": "string",
    			"href": "string",
    			"project": {
    				"href": "string"
    			},
    			"project_lite": {
    				"href": "string"
    			},
    			"volumes": [
    				{
    					"href": "string"
    				}
    			],
    			"hardware_reservation": {
    				"href": "string"
    			},
    			"ssh_keys": [
    				{
    					"href": "string"
    				}
    			],
    			"ip_addresses": [
    				{
    					"id": "string",
    					"address_family": "integer",
    					"netmask": "string",
    					"public": "boolean",
    					"enabled": "boolean",
    					"cidr": "integer",
    					"management": "boolean",
    					"manageable": "boolean",
    					"assigned_to": {
    						"$ref": "#\/definitions\/Href"
    					},
    					"network": "string",
    					"address": "string",
    					"gateway": "string",
    					"href": "string",
    					"created_at": "string",
    					"parent_block": {
    						"$ref": "#\/definitions\/ParentBlock"
    					}
    				}
    			],
    			"provisioning_events": {
    				"id": "string",
    				"state": "string",
    				"type": "string",
    				"body": "string",
    				"relationships": [
    					{
    						"href": "string"
    					}
    				],
    				"interpolated": "string",
    				"created_at": "string",
    				"href": "string"
    			}
    		}
    	],
    	"meta": {
    		"first": {
    			"href": "string"
    		},
    		"previous": {
    			"href": "string"
    		},
    		"self": {
    			"href": "string"
    		},
    		"next": {
    			"href": "string"
    		},
    		"last": {
    			"href": "string"
    		},
    		"total": "integer"
    	}
    }
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
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.

  • Parameters
  • id
    string  (required) in path

    Project UUID

    device
     (required) in body

    Device to create

    {
    	"facility": "string",
    	"plan": "string",
    	"hostname": "string",
    	"description": "string",
    	"billing_cycle": "string",
    	"operating_system": "string",
    	"always_pxe": "boolean",
    	"ipxe_script_url": "string",
    	"userdata": "string",
    	"locked": "boolean",
    	"hardware_reservation_id": "string",
    	"spot_instance": "boolean",
    	"spot_price_max": "number",
    	"termination_time": "string",
    	"tags": [
    		"string"
    	],
    	"project_ssh_keys": [
    		"string"
    	],
    	"user_ssh_keys": [
    		"string"
    	],
    	"features": [
    		"string"
    	]
    }
  • Response  201   created
  • {
    	"id": "string",
    	"short_id": "string",
    	"hostname": "string",
    	"description": "string",
    	"state": "string",
    	"tags": [
    		"string"
    	],
    	"image_url": "string",
    	"billing_cycle": "string",
    	"user": "string",
    	"iqn": "string",
    	"locked": "boolean",
    	"bonding_mode": "integer",
    	"created_at": "string",
    	"updated_at": "string",
    	"spot_instance": "boolean",
    	"spot_price_max": "number",
    	"termination_time": "string",
    	"provisioning_percentage": "number",
    	"operating_system": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"distro": "string",
    		"version": "string",
    		"provisionable_on": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		}
    	},
    	"always_pxe": "boolean",
    	"ipxe_script_url": "string",
    	"location": {
    		"cage": "string",
    		"facility": "string",
    		"rack": "string",
    		"row": "string",
    		"switch": "string"
    	},
    	"facility": {
    		"id": "string",
    		"name": "string",
    		"code": "string",
    		"features": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		},
    		"address": {
    			"address": "string",
    			"address2": "string",
    			"city": "string",
    			"state": "string",
    			"zip_code": "string",
    			"country": "string",
    			"coordinates": {
    				"latitude": "string",
    				"longitude": "string"
    			}
    		}
    	},
    	"plan": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"description": "string",
    		"line": "string",
    		"specs": "object",
    		"pricing": "object",
    		"available_in": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		}
    	},
    	"userdata": "string",
    	"root_password": "string",
    	"href": "string",
    	"project": {
    		"href": "string"
    	},
    	"project_lite": {
    		"href": "string"
    	},
    	"volumes": [
    		{
    			"href": "string"
    		}
    	],
    	"hardware_reservation": {
    		"href": "string"
    	},
    	"ssh_keys": [
    		{
    			"href": "string"
    		}
    	],
    	"ip_addresses": [
    		{
    			"id": "string",
    			"address_family": "integer",
    			"netmask": "string",
    			"public": "boolean",
    			"enabled": "boolean",
    			"cidr": "integer",
    			"management": "boolean",
    			"manageable": "boolean",
    			"assigned_to": {
    				"href": "string"
    			},
    			"network": "string",
    			"address": "string",
    			"gateway": "string",
    			"href": "string",
    			"created_at": "string",
    			"parent_block": {
    				"network": "string",
    				"netmask": "string",
    				"cidr": "integer",
    				"href": "string"
    			}
    		}
    	],
    	"provisioning_events": {
    		"id": "string",
    		"state": "string",
    		"type": "string",
    		"body": "string",
    		"relationships": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		},
    		"interpolated": "string",
    		"created_at": "string",
    		"href": "string"
    	}
    }
  • Response  401   unauthorized
  • Response  422   unprocessable entity
  • Response  403   forbidden
  • Response  404   not found
Retrieve a device
GET
/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

  • Parameters
  • id
    string  (required) in path

    Device UUID

    include
    string in query

    related attributes to include

  •  
  • Response Body Show Hide
  • Request URL Show Hide
  • cURL Show Hide
  • Response  200   ok
  • {
    	"id": "string",
    	"short_id": "string",
    	"hostname": "string",
    	"description": "string",
    	"state": "string",
    	"tags": [
    		"string"
    	],
    	"image_url": "string",
    	"billing_cycle": "string",
    	"user": "string",
    	"iqn": "string",
    	"locked": "boolean",
    	"bonding_mode": "integer",
    	"created_at": "string",
    	"updated_at": "string",
    	"spot_instance": "boolean",
    	"spot_price_max": "number",
    	"termination_time": "string",
    	"provisioning_percentage": "number",
    	"operating_system": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"distro": "string",
    		"version": "string",
    		"provisionable_on": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		}
    	},
    	"always_pxe": "boolean",
    	"ipxe_script_url": "string",
    	"location": {
    		"cage": "string",
    		"facility": "string",
    		"rack": "string",
    		"row": "string",
    		"switch": "string"
    	},
    	"facility": {
    		"id": "string",
    		"name": "string",
    		"code": "string",
    		"features": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		},
    		"address": {
    			"address": "string",
    			"address2": "string",
    			"city": "string",
    			"state": "string",
    			"zip_code": "string",
    			"country": "string",
    			"coordinates": {
    				"latitude": "string",
    				"longitude": "string"
    			}
    		}
    	},
    	"plan": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"description": "string",
    		"line": "string",
    		"specs": "object",
    		"pricing": "object",
    		"available_in": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		}
    	},
    	"userdata": "string",
    	"root_password": "string",
    	"href": "string",
    	"project": {
    		"href": "string"
    	},
    	"project_lite": {
    		"href": "string"
    	},
    	"volumes": [
    		{
    			"href": "string"
    		}
    	],
    	"hardware_reservation": {
    		"href": "string"
    	},
    	"ssh_keys": [
    		{
    			"href": "string"
    		}
    	],
    	"ip_addresses": [
    		{
    			"id": "string",
    			"address_family": "integer",
    			"netmask": "string",
    			"public": "boolean",
    			"enabled": "boolean",
    			"cidr": "integer",
    			"management": "boolean",
    			"manageable": "boolean",
    			"assigned_to": {
    				"href": "string"
    			},
    			"network": "string",
    			"address": "string",
    			"gateway": "string",
    			"href": "string",
    			"created_at": "string",
    			"parent_block": {
    				"network": "string",
    				"netmask": "string",
    				"cidr": "integer",
    				"href": "string"
    			}
    		}
    	],
    	"provisioning_events": {
    		"id": "string",
    		"state": "string",
    		"type": "string",
    		"body": "string",
    		"relationships": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		},
    		"interpolated": "string",
    		"created_at": "string",
    		"href": "string"
    	}
    }
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
Update the device
PUT
/devices/{id}

Updates the device.

  • Parameters
  • id
    string  (required) in path

    Device UUID

    device
     (required) in body

    Facility to update

    {
    	"hostname": "string",
    	"description": "string",
    	"billing_cycle": "string",
    	"userdata": "string",
    	"locked": "boolean",
    	"tags": [
    		"string"
    	],
    	"always_pxe": "boolean",
    	"ipxe_script_url": "string",
    	"spot_instance": "boolean"
    }
  • Response  200   ok
  • {
    	"id": "string",
    	"short_id": "string",
    	"hostname": "string",
    	"description": "string",
    	"state": "string",
    	"tags": [
    		"string"
    	],
    	"image_url": "string",
    	"billing_cycle": "string",
    	"user": "string",
    	"iqn": "string",
    	"locked": "boolean",
    	"bonding_mode": "integer",
    	"created_at": "string",
    	"updated_at": "string",
    	"spot_instance": "boolean",
    	"spot_price_max": "number",
    	"termination_time": "string",
    	"provisioning_percentage": "number",
    	"operating_system": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"distro": "string",
    		"version": "string",
    		"provisionable_on": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		}
    	},
    	"always_pxe": "boolean",
    	"ipxe_script_url": "string",
    	"location": {
    		"cage": "string",
    		"facility": "string",
    		"rack": "string",
    		"row": "string",
    		"switch": "string"
    	},
    	"facility": {
    		"id": "string",
    		"name": "string",
    		"code": "string",
    		"features": {
    			"type": "array",
    			"items": {
    				"type": "string"
    			}
    		},
    		"address": {
    			"address": "string",
    			"address2": "string",
    			"city": "string",
    			"state": "string",
    			"zip_code": "string",
    			"country": "string",
    			"coordinates": {
    				"latitude": "string",
    				"longitude": "string"
    			}
    		}
    	},
    	"plan": {
    		"id": "string",
    		"slug": "string",
    		"name": "string",
    		"description": "string",
    		"line": "string",
    		"specs": "object",
    		"pricing": "object",
    		"available_in": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		}
    	},
    	"userdata": "string",
    	"root_password": "string",
    	"href": "string",
    	"project": {
    		"href": "string"
    	},
    	"project_lite": {
    		"href": "string"
    	},
    	"volumes": [
    		{
    			"href": "string"
    		}
    	],
    	"hardware_reservation": {
    		"href": "string"
    	},
    	"ssh_keys": [
    		{
    			"href": "string"
    		}
    	],
    	"ip_addresses": [
    		{
    			"id": "string",
    			"address_family": "integer",
    			"netmask": "string",
    			"public": "boolean",
    			"enabled": "boolean",
    			"cidr": "integer",
    			"management": "boolean",
    			"manageable": "boolean",
    			"assigned_to": {
    				"href": "string"
    			},
    			"network": "string",
    			"address": "string",
    			"gateway": "string",
    			"href": "string",
    			"created_at": "string",
    			"parent_block": {
    				"network": "string",
    				"netmask": "string",
    				"cidr": "integer",
    				"href": "string"
    			}
    		}
    	],
    	"provisioning_events": {
    		"id": "string",
    		"state": "string",
    		"type": "string",
    		"body": "string",
    		"relationships": {
    			"type": "array",
    			"items": {
    				"$ref": "#\/definitions\/Href"
    			}
    		},
    		"interpolated": "string",
    		"created_at": "string",
    		"href": "string"
    	}
    }
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found
  • Response  422   unprocessable entity
Delete the device
/devices/{id}

Deletes a device and deprovisions it in our datacenter.

  • Parameters
  • id
    string  (required) in path

    Device UUID

  • Response  204   no content
  • Response  401   unauthorized
  • Response  403   forbidden
  • Response  404   not found