droplets
Overview
Name | droplets |
Type | Resource |
Id | digitalocean.droplets.droplets |
Fields
Name | Datatype | Description |
---|---|---|
id | integer | A unique identifier for each Droplet instance. This is automatically generated upon Droplet creation. |
name | string | The human-readable name set for the Droplet instance. |
disk | integer | The size of the Droplet's disk in gigabytes. |
vpc_uuid | string | A string specifying the UUID of the VPC to which the Droplet is assigned. |
tags | array | An array of Tags the Droplet has been tagged with. |
status | string | A status string indicating the state of the Droplet instance. This may be "new", "active", "off", or "archive". |
networks | object | The details of the network that are configured for the Droplet instance. This is an object that contains keys for IPv4 and IPv6. The value of each of these is an array that contains objects describing an individual IP resource allocated to the Droplet. These will define attributes like the IP address, netmask, and gateway of the specific network depending on the type of network it is. |
size_slug | string | The unique slug identifier for the size of this Droplet. |
image | object | |
memory | integer | Memory of the Droplet in megabytes. |
snapshot_ids | array | An array of snapshot IDs of any snapshots created from the Droplet instance. |
features | array | An array of features enabled on this Droplet. |
region | object | |
vcpus | integer | The number of virtual CPUs. |
next_backup_window | object | The details of the Droplet's backups feature, if backups are configured for the Droplet. This object contains keys for the start and end times of the window during which the backup will start. |
backup_ids | array | An array of backup IDs of any backups that have been taken of the Droplet instance. Droplet backups are enabled at the time of the instance creation. |
locked | boolean | A boolean value indicating whether the Droplet has been locked, preventing actions by users. |
kernel | object | Note: All Droplets created after March 2017 use internal kernels by default. These Droplets will have this attribute set to null .The current kernel for Droplets with externally managed kernels. This will initially be set to the kernel of the base image when the Droplet is created. |
size | object | |
created_at | string | A time value given in ISO8601 combined date and time format that represents when the Droplet was created. |
volume_ids | array | A flat array including the unique identifier for each Block Storage volume attached to the Droplet. |
Methods
Name | Accessible by | Required Params | Description |
---|---|---|---|
get | SELECT | droplet_id | To show information about an individual Droplet, send a GET request to/v2/droplets/$DROPLET_ID . |
list | SELECT | 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 beset 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 queryparameter set to the name of the tag in your GET request. For example, /v2/droplets?tag_name=$TAG_NAME . | |
create | INSERT | To create a new Droplet, send a POST request to /v2/droplets setting therequired 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 anobject 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 returnedas part of the response's links object can be used to check the statusof 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. ADroplet 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 JSONobjects, 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 tocheck the status of each individual Droplet create event. | |
_get | EXEC | droplet_id | To show information about an individual Droplet, send a GET request to/v2/droplets/$DROPLET_ID . |
_list | EXEC | 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 beset 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 queryparameter set to the name of the tag in your GET request. For example, /v2/droplets?tag_name=$TAG_NAME . | |
destroy | EXEC | 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. |
destroy_byTag | EXEC | tag_name | 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 .A successful request will receive a 204 status code with no body in response. This indicates that the request was processed successfully. |
destroy_retryWithAssociatedResources | EXEC | droplet_id | If the status of a request to destroy a Droplet with its associated resources reported any errors, it can be retried by sending a POST request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/retry endpoint.Only one destroy can be active at a time per Droplet. If a retry is issued while another destroy is in progress for the Droplet a 409 status code will be returned. A successful response will include a 202 response code and no content. |
destroy_withAssociatedResourcesDangerous | EXEC | X-Dangerous, droplet_id | To destroy a Droplet along with all of its associated resources, send a DELETE request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/dangerous endpoint. The headers of this request must include an X-Dangerous key set totrue . To preview which resources will be destroyed, first query theDroplet's associated resources. This operation can not be reverse and should be used with caution. A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources. |
destroy_withAssociatedResourcesSelective | EXEC | droplet_id | To destroy a Droplet along with a sub-set of its associated resources, send a DELETE request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/selective endpoint. The JSON body of the request should include reserved_ips , snapshots , volumes ,or volume_snapshots keys each set to an array of IDs for the associatedresources to be destroyed. The IDs can be found by querying the Droplet's associated resources. Any associated resource not included in the request will remain and continue to accrue changes on your account. A successful response will include a 202 response code and no content. Use the status endpoint to check on the success or failure of the destruction of the individual resources. |
get_DestroyAssociatedResourcesStatus | EXEC | droplet_id | To check on the status of a request to destroy a Droplet with its associated resources, send a GET request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources/status endpoint. |
list_associatedResources | EXEC | droplet_id | To list the associated billable resources that can be destroyed along with a Droplet, send a GET request to the /v2/droplets/$DROPLET_ID/destroy_with_associated_resources endpoint.The response will be a JSON object containing snapshots , volumes , andvolume_snapshots keys. Each will be set to an array of objects containinginformation about the associated resources. |
list_neighborsIds | EXEC | To retrieve a list of all Droplets that are co-located on the same physical hardware, send a GET request to /v2/reports/droplet_neighbors_ids .The results will be returned as a JSON object with a key of neighbor_ids .This will be set to an array of arrays. Each array will contain a set of Droplet IDs for Droplets that share a physical server. An empty array indicates that all Droplets associated with your account are located on separate physical hardware. |