Droplet Properties
Generated on 18 Mar 2026
Returns general information about the Droplet, including the Droplet's region, hostname, and ID.
http://169.254.169.254
Endpoints
GET Get Metadata Index
/metadata/v1
The top-level metadata index. This index can be navigated to find all available Metadata endpoints.
Request: /metadata/v1
curl -X GET \
"http://169.254.169.254/metadata/v1"Responses
A list of metadata endpoints.
Response
id
hostname
user-data
vendor-data
public-keys
region
interfaces/
dns/
floating_ip/
reserved_ip/
tags/
features/
GET Get Droplet's Metadata
/metadata/v1.json
Returns the entire contents of Droplet's matadata, in JSON. This endpoint is unique because it returns all of the metadata at once, instead of individual metadata items.
Request: /metadata/v1.json
curl -X GET \
"http://169.254.169.254/metadata/v1.json"Responses
A JSON array of Droplet metadata.
If you access an index endpoint but forget to add the trailing slash, you will receive a 301 Moved Permanently response.
If you access an endpoint that does not exist, you will receive a 404 Not Found response. Resolve this by using an existing endpoint.
Response
[
{
"dns": {
"nameservers": [
"2001:4860:4860::8844",
"2001:4860:4860::8888",
"8.8.8.8"
]
},
"droplet_id": 2756294,
"features": {
"dhcp_enabled": true
},
"hostname": "sample-droplet",
"interfaces": {
"private": [],
"public": []
},
"public_keys": [
"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcbi6cygCUmuNlB0KqzBpHXf7CFYb3VE4pDOf/RLJ8OFDjOM+fjF83a24QktSVIpQnHYpJJT2pQMBxD+ZmnhTbKv+OjwHSHwAfkBullAojgZKzz+oN35P4Ea4J78AvMrHw0zp5MknS+WKEDCA2c6iDRCq6/hZ13Mn64f6c372JK99X29lj/B4VQpKCQyG8PUSTFkb5DXTETGbzuiVft+vM6SF+0XZH9J6dQ7b4yD3sOder+M0Q7I7CJD4VpdVD/JFa2ycOS4A4dZhjKXzabLQXdkWHvYGgNPGA5lI73TcLUAueUYqdq3RrDRfaQ5Z0PEw0mDllCzhk5dQpkmmqNi0F [email protected]"
],
"region": "nyc3",
"vendor_data": "#cloud-config\ndisable_root: false\nmanage_etc_hosts: true\n\ncloud_config_modules:\n - ssh\n - set_hostname\n - [ update_etc_hosts, once-per-instance ]\n\ncloud_final_modules:\n - scripts-vendor\n - scripts-per-once\n - scripts-per-boot\n - scripts-per-instance\n - scripts-user\n"
}
]301 Moved Permanently404 Not FoundGET Get Hostname
/metadata/v1/hostname
The Droplet's hostname, as specified by the user during Droplet creation.
Request: /metadata/v1/hostname
curl -X GET \
"http://169.254.169.254/metadata/v1/hostname"Responses
The Droplet's hostname as plain text.
Response
sample-dropletGET Get Droplet ID
/metadata/v1/id
The Droplet's unique identifier. This is automatically generated upon Droplet creation.
Request: /metadata/v1/id
curl -X GET \
"http://169.254.169.254/metadata/v1/id"Responses
The Droplet's ID as an integer.
Response
2756294GET Get Public Keys
/metadata/v1/public-keys
Public SSH key(s) that were added to the Droplet's root user's authorized_keys file during Droplet creation.
Request: /metadata/v1/public-keys
curl -X GET \
"http://169.254.169.254/metadata/v1/public-keys"Responses
The Droplet's public key in plain text.
Response
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCcbi6cygCUmuNlB0KqzBpHXf7CFYb3VE4pDOf/RLJ8OFDjOM+fjF83a24QktSVIpQnHYpJJT2pQMBxD+ZmnhTbKv+OjwHSHwAfkBullAojgZKzz+oN35P4Ea4J78AvMrHw0zp5MknS+WKEDCA2c6iDRCq6/hZ13Mn64f6c372JK99X29lj/B4VQpKCQyG8PUSTFkb5DXTETGbzuiVft+vM6SF+0XZH9J6dQ7b4yD3sOder+M0Q7I7CJD4VpdVD/JFa2ycOS4A4dZhjKXzabLQXdkWHvYGgNPGA5lI73TcLUAueUYqdq3RrDRfaQ5Z0PEw0mDllCzhk5dQpkmmqNi0F [email protected]
GET Get Region
/metadata/v1/region
The region code of where the Droplet resides.
Request: /metadata/v1/region
curl -X GET \
"http://169.254.169.254/metadata/v1/region"Responses
The Droplet's region as plain text.
Response
nyc3GET Get User Data
/metadata/v1/user-data
The user data that was provided by the user during Droplet creation. User data can contain arbitrary data for miscellaneous use or, with certain Linux distributions, an arbitrary shell script or cloud-config file that will be consumed by a variation of cloud-init upon boot. At this time, cloud-config support is included with Ubuntu 14.04, and CentOS 7 images on DigitalOcean.
Request: /metadata/v1/user-data
curl -X GET \
"http://169.254.169.254/metadata/v1/user-data"Responses
The user data provided as plain text.
Response
#! /bin/bash
echo "Data from user"
GET Get Vendor Data
/metadata/v1/vendor-data
Vendor-provided data that can be used to configure Droplets upon their creation. This is similar to user data, but it is provided by DigitalOcean instead of the user.
Request: /metadata/v1/vendor-data
curl -X GET \
"http://169.254.169.254/metadata/v1/vendor-data"Responses
The vendor data provided as plain text.
Response
#cloud-config
disable_root: false
manage_etc_hosts: true
cloud_config_modules:
- ssh
- set_hostname
- [ update_etc_hosts, once-per-instance ]
cloud_final_modules:
- scripts-vendor
- scripts-per-once
- scripts-per-boot
- scripts-per-instance
- scripts-user