# GPU Droplets ## Create **post** `/v2/droplets` To create a new Droplet, send a POST request to `/v2/droplets` setting the required attributes. A Droplet will be created using the provided information. The response body will contain a JSON object with a key called `droplet`. The value will be an object containing the standard attributes for your new Droplet. The response code, 202 Accepted, does not indicate the success or failure of the operation, just that the request has been accepted for processing. The `actions` returned as part of the response's `links` object can be used to check the status of the Droplet create event. ### Create Multiple Droplets Creating multiple Droplets is very similar to creating a single Droplet. Instead of sending `name` as a string, send `names` as an array of strings. A Droplet will be created for each name you send using the associated information. Up to ten Droplets may be created this way at a time. Rather than returning a single Droplet, the response body will contain a JSON array with a key called `droplets`. This will be set to an array of JSON objects, each of which will contain the standard Droplet attributes. The response code, 202 Accepted, does not indicate the success or failure of any operation, just that the request has been accepted for processing. The array of `actions` returned as part of the response's `links` object can be used to check the status of each individual Droplet create event. ### Returns - **SingleDropletResponse:** `object` - **droplet:** `Droplet` - **links:** `object` - **actions:** `array of ActionLink` - **MultipleDropletResponse:** `object` - **droplets:** `array of Droplet` - **links:** `object` - **actions:** `array of ActionLink` ## Retrieve **get** `/v2/droplets/{droplet_id}` To show information about an individual Droplet, send a GET request to `/v2/droplets/$DROPLET_ID`. ### Returns - **droplet:** `Droplet` ## List **get** `/v2/droplets` To list all Droplets in your account, send a GET request to `/v2/droplets`. The response body will be a JSON object with a key of `droplets`. This will be set to an array containing objects each representing a Droplet. These will contain the standard Droplet attributes. ### Filtering Results by Tag It's possible to request filtered results by including certain query parameters. To only list Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your GET request. For example, `/v2/droplets?tag_name=$TAG_NAME`. ### GPU Droplets By default, only non-GPU Droplets are returned. To list only GPU Droplets, set the `type` query parameter to `gpus`. For example, `/v2/droplets?type=gpus`. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **droplets:** `array of Droplet` - **links:** `PageLinks` ## Delete **delete** `/v2/droplets/{droplet_id}` To delete a Droplet, send a DELETE request to `/v2/droplets/$DROPLET_ID`. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. ## Delete By Tag **delete** `/v2/droplets` To delete **all** Droplets assigned to a specific tag, include the `tag_name` query parameter set to the name of the tag in your DELETE request. For example, `/v2/droplets?tag_name=$TAG_NAME`. This endpoint requires `tag:read` scope. A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. ## List Firewalls **get** `/v2/droplets/{droplet_id}/firewalls` To retrieve a list of all firewalls available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/firewalls` The response will be a JSON object that has a key called `firewalls`. This will be set to an array of `firewall` objects, each of which contain the standard `firewall` attributes. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **firewalls:** `array of Firewall` - **links:** `PageLinks` ## List Kernels **get** `/v2/droplets/{droplet_id}/kernels` To retrieve a list of all kernels available to a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/kernels` The response will be a JSON object that has a key called `kernels`. This will be set to an array of `kernel` objects, each of which contain the standard `kernel` attributes. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **kernels:** `array of Kernel` - **links:** `PageLinks` ## List Neighbors **get** `/v2/droplets/{droplet_id}/neighbors` To retrieve a list of any "neighbors" (i.e. Droplets that are co-located on the same physical hardware) for a specific Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/neighbors`. The results will be returned as a JSON object with a key of `droplets`. This will be set to an array containing objects representing any other Droplets that share the same physical hardware. An empty array indicates that the Droplet is not co-located any other Droplets associated with your account. ### Returns - **droplets:** `array of Droplet` ## List Snapshots **get** `/v2/droplets/{droplet_id}/snapshots` To retrieve the snapshots that have been created from a Droplet, send a GET request to `/v2/droplets/$DROPLET_ID/snapshots`. You will get back a JSON object that has a `snapshots` key. This will be set to an array of snapshot objects, each of which contain the standard Droplet snapshot attributes. ### Returns - **meta:** `MetaProperties` Information about the response itself. - **links:** `PageLinks` - **snapshots:** `array of object` - **id:** `number` The unique identifier for the snapshot or backup. - **created\_at:** `string` A time value given in ISO8601 combined date and time format that represents when the snapshot was created. - **min\_disk\_size:** `number` The minimum size in GB required for a volume or Droplet to use this snapshot. - **name:** `string` A human-readable name for the snapshot. - **regions:** `array of string` An array of the regions that the snapshot is available in. The regions are represented by their identifying slug values. - **size\_gigabytes:** `number` The billable size of the snapshot in gigabytes. - **type:** `"snapshot" OR "backup"` Describes the kind of image. It may be one of `snapshot` or `backup`. This specifies whether an image is a user-generated Droplet snapshot or automatically created Droplet backup. - `"snapshot"` - `"backup"` ## Domain Types ### Droplet Backup Policy - **DropletBackupPolicy:** `object` - **hour:** `0 OR 4 OR 8 OR 3 more` The hour of the day that the backup window will start. - `0` - `4` - `8` - `12` - `16` - `20` - **plan:** `"daily" OR "weekly"` The backup plan used for the Droplet. The plan can be either `daily` or `weekly`. - `"daily"` - `"weekly"` - **retention\_period\_days:** `number` The number of days the backup will be retained. - **weekday:** `"SUN" OR "MON" OR "TUE" OR 4 more` The day of the week on which the backup will occur. - `"SUN"` - `"MON"` - `"TUE"` - `"WED"` - `"THU"` - `"FRI"` - `"SAT"` - **window\_length\_hours:** `number` The length of the backup window starting from `hour`.