vultr v0.2.2 Vultr
Link to this section Summary
Functions
Retrieve information about the current account
Retrieve a list of available applications
Retrieve information about the current API key
List all backups on the current account
Attach a block storage subscription to a VPS subscription
Create a block storage subscription
Delete a block storage subscription
Detach a block storage subscription from the currently attached instance
Set the label of a block storage subscription
Retrieve a list of any active block storage subscriptions on this account
Resize the block storage volume to a new size
Create a Vultr client with an API-Key for authenticated methods
Create a domain name in DNS
Add a DNS record
Delete a domain name and all associated records
Delete an individual DNS record
List all domains associated with the current account
List all the records associated with a particular domain
Update a DNS record
List all ISOs currently available on this account
Retrieve a list of available operating systems
Retrieve a list of all active plans. Plans that are no longer available will not be shown
Retrieve a list of all active vc2 plans. Plans that are no longer available will not be shown
Retrieve a list of all active vdc2 plans. Plans that are no longer available will not be shown
Retrieve a list of the VPSPLANID
s currently available in this location
Retrieve a list of all active regions
Attach a reserved IP to an existing subscription
Convert an existing IP on a subscription to a reserved IP
Create a new reserved IP
Remove a reserved IP from your account
Detach a reserved IP from an existing subscription
List all the active reserved IPs on this account
Changes the virtual machine to a different application
Retrieves a list of applications to which a virtual machine can be changed
Disables automatic backups on a server
Enables automatic backups on a server
Retrieves the backup schedule for a server
Sets the backup schedule for a server
Get the bandwidth used by a virtual machine
Create a new virtual machine
Add a new IPv4 address to a server
Destroy (delete) a virtual machine
Removes a secondary IPv4 address from a server
Retrieves the application information for this subscription
Retrieves the (base64 encoded) user-data for this subscription
Halt a virtual machine. This is a hard power off (basically, unplugging the machine)
Attach an ISO and reboot the server
Detach the currently mounted ISO and reboot the server
Retrieve the current ISO state for a given subscription
Set the label of a virtual machine
List all active or pending virtual machines on the current account
List the IPv4 information of a virtual machine
List the IPv6 information of a virtual machine
Determine what other subscriptions are hosted on the same physical host as a given subscription
Changes the virtual machine to a different operating system
Retrieves a list of operating systems to which a virtual machine can be changed
Reboot a virtual machine
Reinstall the operating system on a virtual machine
Restore the specified backup to the virtual machine
Restore the specified snapshot to the virtual machine
Set a reverse DNS entry for an IPv4 address of a virtual machine to the original setting
Remove a reverse DNS entry for an IPv6 address of a virtual machine
List the IPv6 reverse DNS entries of a virtual machine
Set a reverse DNS entry for an IPv4 address of a virtual machine
Set a reverse DNS entry for an IPv6 address of a virtual machine
Sets the cloud-init user-data for this subscription
Start a virtual machine
Upgrade the plan of a virtual machine
Retrieve a list of the VPSPLANIDs for which a virtual machine can be upgraded
Create a snapshot from an existing virtual machine
Destroy (delete) a snapshot
List all snapshots on the current account
Create a new SSH Key
Remove a SSH key
List all the SSH keys on the current account
Update an existing SSH Key
Create a startup script
Remove a startup script
List all startup scripts on the current account
Update an existing startup script
Create a new user
Delete a user
Retrieve a list of any users associated with this account
Update the details for a user
Link to this section Functions
Retrieve information about the current account.
Backend
- Method:
GET
- Path:
/v1/account/info
- API Key:
Required
- Required Access:
billing
Retrieve a list of available applications.
These refer to applications that can be launched when creating a Vultr VPS.
Backend
- Method:
GET
- Path:
/v1/app/list
- API Key:
No
- Required Access:
None
Retrieve information about the current API key.
Backend
- Method:
GET
- Path:
/v1/auth/info
- API Key:
Required
- Required Access:
None
List all backups on the current account.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | Yes | Unique identifier of a subscription. Only backups for this subscription object will be returned. |
Backend
- Method:
GET
- Path:
/v1/backup/list
- API Key:
Required
- Required Access:
subscriptions
Attach a block storage subscription to a VPS subscription.
The block storage volume must not be attached to any other VPS subscriptions for this to work.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | ID of the block storage subscription to attach. |
attach_to_subid | integer | No | ID of the VPS subscription to mount the block storage subscription to. |
Backend
- Method:
POST
- Path:
/v1/block/attach
- API Key:
Required
- Required Access:
subscriptions
Create a block storage subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
dcid | integer | No | DCID of the location to create this subscription in. See regions_list . |
label | string | Yes | Text label that will be associated with the subscription. |
size_gb | integer | No | Size (in GB) of this subscription. |
Backend
- Method:
POST
- Path:
/v1/block/create
- API Key:
Required
- Required Access:
provisioning
Delete a block storage subscription.
All data will be permanently lost. There is no going back from this call.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | ID of the block storage subscription to delete. |
Backend
- Method:
POST
- Path:
/v1/block/delete
- API Key:
Required
- Required Access:
subscriptions
Detach a block storage subscription from the currently attached instance.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | ID of the block storage subscription to detach. |
Backend
- Method:
POST
- Path:
/v1/block/detach
- API Key:
Required
- Required Access:
subscriptions
Set the label of a block storage subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | ID of the block storage subscription to detach. |
label | string | No | Text label that will be shown in the control panel. |
Backend
- Method:
POST
- Path:
/v1/block/label_set
- API Key:
Required
- Required Access:
subscriptions
Retrieve a list of any active block storage subscriptions on this account.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | Yes | Unique identifier of a subscription. Only the subscription object will be returned. |
Backend
- Method:
GET
- Path:
/v1/block/list
- API Key:
Required
- Required Access:
subscriptions
Resize the block storage volume to a new size.
WARNING: When shrinking the volume, you must manually shrink the filesystem and partitions beforehand, or you will lose data.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | ID of the block storage subscription to resize. |
size_gb | integer | No | New size (in GB) of the block storage subscription. |
Backend
- Method:
POST
- Path:
/v1/block/resize
- API Key:
Required
- Required Access:
subscriptions
Create a Vultr client with an API-Key for authenticated methods
Create a domain name in DNS.
Params
Name | Type | Optional | Description |
---|---|---|---|
domain | string | No | Domain name to create. |
serverip | string | No | Server IP to use when creating default records (A and MX). |
Backend
- Method:
POST
- Path:
/v1/dns/create_domain
- API Key:
Required
- Required Access:
dns
Add a DNS record.
Params
Name | Type | Optional | Description |
---|---|---|---|
data | string | No | Data for this record. |
domain | string | No | Domain name to add record to. |
name | string | No | Name (subdomain) of record. |
priority | integer | No | (only required for MX and SRV) Priority of this record (omit the priority from the data). |
ttl | integer | Yes | TTL of this record. |
type | string | No | Type (A, AAAA, MX, etc) of record. |
Backend
- Method:
POST
- Path:
/v1/dns/create_record
- API Key:
Required
- Required Access:
dns
Delete a domain name and all associated records.
Params
Name | Type | Optional | Description |
---|---|---|---|
domain | string | No | Domain name to delete. |
Backend
- Method:
POST
- Path:
/v1/dns/delete_domain
- API Key:
Required
- Required Access:
dns
Delete an individual DNS record.
Params
Name | Type | Optional | Description |
---|---|---|---|
recordid | integer | No | ID of record to delete. See dns_records . |
domain | string | No | Domain name to delete record from. |
Backend
- Method:
POST
- Path:
/v1/dns/delete_record
- API Key:
Required
- Required Access:
dns
List all domains associated with the current account.
Backend
- Method:
GET
- Path:
/v1/dns/list
- API Key:
Required
- Required Access:
dns
List all the records associated with a particular domain.
Params
Name | Type | Optional | Description |
---|---|---|---|
domain | string | No | Domain to list records for. |
Backend
- Method:
GET
- Path:
/v1/dns/records
- API Key:
Required
- Required Access:
dns
Update a DNS record.
Params
Name | Type | Optional | Description |
---|---|---|---|
recordid | integer | No | ID of record to update. See dns_records . |
data | string | Yes | Data for this record. |
domain | string | No | Domain name of record to update. |
name | string | Yes | Name (subdomain) of record. |
priority | integer | Yes | (only required for MX and SRV) Priority of this record (omit the priority from the data). |
ttl | string | Yes | TTL of this record. |
Backend
- Method:
POST
- Path:
/v1/dns/update_record
- API Key:
Required
- Required Access:
dns
List all ISOs currently available on this account.
Backend
- Method:
GET
- Path:
/v1/iso/list
- API Key:
Required
- Required Access:
subscriptions
Retrieve a list of available operating systems.
If the windows
flag is true, a Windows license will be included with the instance, which will increase the cost.
Backend
- Method:
GET
- Path:
/v1/os/list
- API Key:
No
- Required Access:
None
Retrieve a list of all active plans. Plans that are no longer available will not be shown.
The windows
field is no longer in use, and will always be false.
Windows licenses will be automatically added to any plan as necessary.
The deprecated
field indicates that the plan will be going away in the future.
New deployments of it will still be accepted, but you should begin to transition away from it’s usage.
Typically, deprecated plans are available for 30 days after they are deprecated.
Params
Name | Type | Optional | Description |
---|---|---|---|
type | string | Yes | The type of plans to return. Possible values: ‘all’, ‘vc2’, ‘ssd’, ‘vdc2’, ‘dedicated’. |
Backend
- Method:
GET
- Path:
/v1/plans/list
- API Key:
No
- Required Access:
None
Retrieve a list of all active vc2 plans. Plans that are no longer available will not be shown.
The deprecated
field indicates that the plan will be going away in the future.
New deployments of it will still be accepted, but you should begin to transition away from it’s usage.
Typically, deprecated plans are available for 30 days after they are deprecated.
Backend
- Method:
GET
- Path:
/v1/plans/list_vc2
- API Key:
No
- Required Access:
None
Retrieve a list of all active vdc2 plans. Plans that are no longer available will not be shown.
The deprecated
field indicates that the plan will be going away in the future.
New deployments of it will still be accepted, but you should begin to transition away from it’s usage.
Typically, deprecated plans are available for 30 days after they are deprecated.
Backend
- Method:
GET
- Path:
/v1/plans/list_vdc2
- API Key:
No
- Required Access:
None
Retrieve a list of the VPSPLANID
s currently available in this location.
If your account has special plans available, you will need to pass your API key in in order to see them. For all other accounts, the API key is not optional.
Params
Name | Type | Optional | Description |
---|---|---|---|
dcid | integer | No | Retrieve a list of the VPSPLANID s currently available in this location. |
Backend
- Method:
GET
- Path:
/v1/regions/availability
- API Key:
Optional
- Required Access:
None
Retrieve a list of all active regions.
Note that just because a region is listed here, does not mean that there is room for new servers.
Backend
- Method:
GET
- Path:
/v1/regions/list
- API Key:
No
- Required Access:
None
Attach a reserved IP to an existing subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
attach_subid | integer | No | Unique indentifier of the server to attach the reserved IP to. |
ip_address | string | No | Reserved IP to attach to your account (use the full subnet here). |
Backend
- Method:
POST
- Path:
/v1/reservedip/attach
- API Key:
Required
- Required Access:
subscriptions
Convert an existing IP on a subscription to a reserved IP.
Returns the SUBID
of the newly created reserved IP.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | SUBID of the server that currently has the IP address you want to convert. |
ip_address | string | No | IP address you want to convert (v4 must be a /32, v6 must be a /64). |
label | string | Yes | Label for this reserved IP. |
Backend
- Method:
POST
- Path:
/v1/reservedip/convert
- API Key:
Required
- Required Access:
subscriptions
Create a new reserved IP.
Reserved IPs can only be used within the same datacenter for which they were created.
Params
Name | Type | Optional | Description |
---|---|---|---|
dcid | integer | No | Location to create this reserved IP in. See regions_list . |
ip_type | string | No | Type of reserved IP to create. Either ‘v4’ or ‘v6’. |
label | string | Yes | Label for this reserved IP. |
Backend
- Method:
POST
- Path:
/v1/reservedip/create
- API Key:
Required
- Required Access:
subscriptions
Remove a reserved IP from your account.
After making this call, you will not be able to recover the IP address.
Params
Name | Type | Optional | Description |
---|---|---|---|
ip_address | string | No | Reserved IP to remove from your account. |
Backend
- Method:
POST
- Path:
/v1/reservedip/destroy
- API Key:
Required
- Required Access:
subscriptions
Detach a reserved IP from an existing subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
detach_subid | integer | No | Unique identifier of the server to detach the reserved IP from. |
ip_address | string | No | Reserved IP to attach to your account (use the full subnet here). |
Backend
- Method:
POST
- Path:
/v1/reservedip/detach
- API Key:
Required
- Required Access:
subscriptions
List all the active reserved IPs on this account.
The subnet_size
field is the size of the network assigned to this subscription.
This will typically be a /64 for IPv6, or a /32 for IPv4.
Backend
- Method:
GET
- Path:
/v1/reservedip/list
- API Key:
Required
- Required Access:
subscriptions
Changes the virtual machine to a different application.
All data will be permanently lost.
Params
Name | Type | Optional | Description |
---|---|---|---|
appid | integer | No | Application to use. See server_app_change_list . |
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/app_change
- API Key:
Required
- Required Access:
subscriptions
Retrieves a list of applications to which a virtual machine can be changed.
Always check against this list before trying to switch applications because it is not possible to switch between every application combination.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/app_change_list
- API Key:
Required
- Required Access:
subscriptions
Disables automatic backups on a server.
Once disabled, backups can only be enabled again by customer support.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/backup_disable
- API Key:
Required
- Required Access:
subscriptions
Enables automatic backups on a server.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/backup_enable
- API Key:
Required
- Required Access:
upgrade
Retrieves the backup schedule for a server.
All time values are in UTC.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/backup_get_schedule
- API Key:
Required
- Required Access:
subscriptions
Sets the backup schedule for a server.
All time values are in UTC.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
cron_type | string | No | Backup cron type. Can be one of ‘daily’, ‘weekly’, or ‘monthly’. |
dom | integer | Yes | Day-of-month value (1-28). Applicable to crons: ‘monthly’. |
dow | integer | Yes | Day-of-week value (0-6). Applicable to crons: ‘weekly’. |
hour | integer | Yes | Hour value (0-23). Applicable to crons: ‘daily’, ‘weekly’, ‘monthly’. |
Backend
- Method:
POST
- Path:
/v1/server/backup_set_schedule
- API Key:
Required
- Required Access:
subscriptions
Get the bandwidth used by a virtual machine.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/bandwidth
- API Key:
Required
- Required Access:
subscriptions
Create a new virtual machine.
You will start being billed for this immediately.
The response only contains the SUBID
for the new machine.
You should use server_list
to poll and wait for the machine to be created (as this does not happen instantly).
Params
Name | Type | Optional | Description |
---|---|---|---|
appid | integer | Yes | If launching an application (OSID 186), this is the APPID to launch.See app_list . |
dcid | integer | No | Location to create this virtual machine in. See regions_list . |
isoid | integer | Yes | If you’ve selected the ‘custom’ operating system, this is the ID of a specific ISO to mount during the deployment. |
osid | integer | No | Operating system to use. See os_list . |
scriptid | integer | Yes | If you’ve not selected a ‘custom’ operating system, this can be the SCRIPTID of a startup script to execute on boot.See startupscript_list . |
snapshotid | string | Yes | If you’ve selected the ‘snapshot’ operating system, this should be the SNAPSHOTID to restore for the initial installation.See snapshot_list . |
sshkeyid | string | Yes | Comma delimited list of SSH keys to apply to this server on install (only valid for Linux/FreeBSD). See sshkey_list . |
vpsplanid | integer | No | Plan to use when creating this virtual machine. See plans_list . |
auto_backups | yes_no | Yes | Whether or not automatic backups will be enabled for this server (these have an extra charge associated with them). |
ddos_protection | yes_no | Yes (Default "no" ) | Whether or not DDOS protection will be enabled on the subscription (there is an additional charge for this). |
enable_ipv6 | yes_no | Yes | Whether or not an IPv6 subnet will be assigned to the machine (where available). |
enable_private_network | yes_no | Yes | Whether or not private networking support will be added to the new server. |
hostname | string | Yes | The hostname to assign to this server. |
ipxe_chain_url | string | Yes | If you’ve selected the ‘custom’ operating system, this can be set to chainload the specified URL on bootup, via iPXE. |
label | string | Yes | This is a text label that will be shown in the control panel. |
notify_activate | yes_no | Yes (Default "yes" ) | Whether or not an activation email will be sent when the server is ready. |
reserved_ip_v4 | string | Yes | IP address of the floating IP to use as the main IP of this server |
tag | string | Yes | The tag to assign to this server. |
userdata | string | Yes | Base64 encoded cloud-init user-data. |
Backend
- Method:
POST
- Path:
/v1/server/create
- API Key:
Required
- Required Access:
provisioning
Add a new IPv4 address to a server.
You will start being billed for this immediately. The server will be rebooted unless you specify otherwise. You must reboot the server before the IPv4 address can be configured.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
reboot | yes_no | Yes (Default "yes" ) | Whether or not the server is rebooted immediately. |
Backend
- Method:
POST
- Path:
/v1/server/create_ipv4
- API Key:
Required
- Required Access:
upgrade
Destroy (delete) a virtual machine.
All data will be permanently lost, and the IP address will be released. There is no going back from this call.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/destroy
- API Key:
Required
- Required Access:
subscriptions
Removes a secondary IPv4 address from a server.
Your server will be hard-restarted. We suggest halting the machine gracefully before removing IPs.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/destroy_ipv4
- API Key:
Required
- Required Access:
subscriptions
Retrieves the application information for this subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/get_app_info
- API Key:
Required
- Required Access:
subscriptions
Retrieves the (base64 encoded) user-data for this subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/get_user_data
- API Key:
Required
- Required Access:
subscriptions
Halt a virtual machine. This is a hard power off (basically, unplugging the machine).
The data on the machine will not be modified, and you will still be billed for the machine.
To completely delete a machine, see server_destroy
.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/halt
- API Key:
Required
- Required Access:
subscriptions
Attach an ISO and reboot the server.
Params
Name | Type | Optional | Description |
---|---|---|---|
isoid | integer | No | The ISO that will be mounted. See iso_list . |
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/iso_attach
- API Key:
Required
- Required Access:
subscriptions
Detach the currently mounted ISO and reboot the server.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/iso_detach
- API Key:
Required
- Required Access:
subscriptions
Retrieve the current ISO state for a given subscription.
The returned state may be ‘ready’, ‘isomounting’ or ‘isomounted’.
ISOID
will only be set when the mounted ISO exists in your library ( see iso_list
), otherwise it will read ‘0’.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/iso_status
- API Key:
Required
- Required Access:
subscriptions
Set the label of a virtual machine.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
label | string | No | This is a text label that will be shown in the control panel. |
Backend
- Method:
POST
- Path:
/v1/server/label_set
- API Key:
Required
- Required Access:
subscriptions
List all active or pending virtual machines on the current account.
The ‘status’ field represents the status of the subscription and will be ‘pending’, ‘active’, ‘suspended’ or ‘closed’.
If the status is ‘active’, you can check power_status
to determine if the VPS is powered on or not.
When status is ‘active’, you may also use server_state
for a more detailed status of ‘none’, ‘locked’, ‘installingbooting’, ‘isomounting’ or ‘ok’.
The API does not provide any way to determine if the initial installation has completed or not.
The v6_network
, v6_main_ip
, and v6_network_size
fields are deprecated in favor of v6_networks
.
If you need to filter the list, review the parameters for this function.
Currently, only one filter at a time may be applied (SUBID
, tag
, label
, main_ip
).
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | Yes | Unique identifier of a subscription. Only the subscription object will be returned. |
label | string | Yes | A text label string. Only subscription objects with this text label will be returned. |
main_ip | string | Yes | An IPv4 address. Only the subscription matching this IPv4 address will be returned. |
tag | string | Yes | A tag string. Only subscription objects with this tag will be returned. |
Backend
- Method:
GET
- Path:
/v1/server/list
- API Key:
Required
- Required Access:
subscriptions
List the IPv4 information of a virtual machine.
IP information is only available for virtual machines in the ‘active’ state.
Backend
- Method:
GET
- Path:
/v1/server/list_ipv4
- API Key:
Required
- Required Access:
subscriptions
List the IPv6 information of a virtual machine.
IP information is only available for virtual machines in the ‘active’ state. If the virtual machine does not have IPv6 enabled, then an empty array is returned.
Backend
- Method:
GET
- Path:
/v1/server/list_ipv6
- API Key:
Required
- Required Access:
subscriptions
Determine what other subscriptions are hosted on the same physical host as a given subscription.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/neighbors
- API Key:
Required
- Required Access:
subscriptions
Changes the virtual machine to a different operating system.
All data will be permanently lost.
Params
Name | Type | Optional | Description |
---|---|---|---|
osid | integer | No | Operating system to use. See server_os_change_list . |
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/os_change
- API Key:
Required
- Required Access:
subscriptions
Retrieves a list of operating systems to which a virtual machine can be changed.
Always check against this list before trying to switch operating systems. because it is not possible to switch between every operating system combination.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/os_change_list
- API Key:
Required
- Required Access:
subscriptions
Reboot a virtual machine.
This is a hard reboot (basically, unplugging the machine).
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/reboot
- API Key:
Required
- Required Access:
subscriptions
Reinstall the operating system on a virtual machine.
All data will be permanently lost, but the IP address will remain the same. There is no going back from this call.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
hostname | string | Yes | The hostname to assign to this server. |
Backend
- Method:
POST
- Path:
/v1/server/reinstall
- API Key:
Required
- Required Access:
subscriptions
Restore the specified backup to the virtual machine.
Any data already on the virtual machine will be lost.
Params
Name | Type | Optional | Description |
---|---|---|---|
backupid | string | No | BACKUPID to restore to this instance.See backup_list . |
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/restore_backup
- API Key:
Required
- Required Access:
subscriptions
Restore the specified snapshot to the virtual machine.
Any data already on the virtual machine will be lost.
Params
Name | Type | Optional | Description |
---|---|---|---|
backupid | string | No | SNAPSHOTID to restore to this instance.See snapshot_list . |
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/restore_snapshot
- API Key:
Required
- Required Access:
subscriptions
Set a reverse DNS entry for an IPv4 address of a virtual machine to the original setting.
Upon success, DNS changes may take 6-12 hours to become active.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
ip | string | No | IPv4 address used in the reverse DNS update. See server_list_ipv4 . |
Backend
- Method:
POST
- Path:
/v1/server/reverse_default_ipv4
- API Key:
Required
- Required Access:
subscriptions
Remove a reverse DNS entry for an IPv6 address of a virtual machine.
Upon success, DNS changes may take 6-12 hours to become active.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
ip | string | No | IPv6 address used in the reverse DNS update. See server_list_ipv6 . |
Backend
- Method:
POST
- Path:
/v1/server/reverse_delete_ipv6
- API Key:
Required
- Required Access:
subscriptions
List the IPv6 reverse DNS entries of a virtual machine.
Reverse DNS entries are only available for virtual machines in the ‘active’ state. If the virtual machine does not have IPv6 enabled, then an empty array is returned.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
GET
- Path:
/v1/server/reverse_list_ipv6
- API Key:
Required
- Required Access:
subscriptions
Set a reverse DNS entry for an IPv4 address of a virtual machine.
Upon success, DNS changes may take 6-12 hours to become active.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
entry | string | No | Reverse DNS entry. |
ip | string | No | IPv4 address used in the reverse DNS update. See server_list_ipv4 . |
Backend
- Method:
POST
- Path:
/v1/server/reverse_set_ipv4
- API Key:
Required
- Required Access:
subscriptions
Set a reverse DNS entry for an IPv6 address of a virtual machine.
Upon success, DNS changes may take 6-12 hours to become active.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
entry | string | No | Reverse DNS entry. |
ip | string | No | IPv6 address used in the reverse DNS update. See server_list_ipv6 . |
Backend
- Method:
POST
- Path:
/v1/server/reverse_set_ipv6
- API Key:
Required
- Required Access:
subscriptions
Sets the cloud-init user-data for this subscription.
Note that user-data is not supported on every operating system, and is generally only provided on instance startup.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
userdata | string | No | Base64 encoded cloud-init user-data. |
Backend
- Method:
POST
- Path:
/v1/server/set_user_data
- API Key:
Required
- Required Access:
subscriptions
Start a virtual machine.
If the machine is already running, it will be restarted.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/start
- API Key:
Required
- Required Access:
subscriptions
Upgrade the plan of a virtual machine.
The virtual machine will be rebooted upon a successful upgrade.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
vpsplanid | integer | No | The new plan. See server_upgrade_plan_list . |
Backend
- Method:
POST
- Path:
/v1/server/upgrade_plan
- API Key:
Required
- Required Access:
upgrade
Retrieve a list of the VPSPLANIDs for which a virtual machine can be upgraded.
An empty response array means that there are currently no upgrades available.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
Backend
- Method:
POST
- Path:
/v1/server/upgrade_plan_list
- API Key:
Required
- Required Access:
upgrade
Create a snapshot from an existing virtual machine.
The virtual machine does not need to be stopped.
Params
Name | Type | Optional | Description |
---|---|---|---|
subid | integer | No | Unique identifier for this subscription. See server_list . |
description | string | Yes | Description of snapshot contents. |
Backend
- Method:
POST
- Path:
/v1/snapshot/create
- API Key:
Required
- Required Access:
subscriptions
Destroy (delete) a snapshot.
There is no going back from this call.
Params
Name | Type | Optional | Description |
---|---|---|---|
snapshotid | integer | No | Unique identifier for this snapshot. See snapshot_list . |
Backend
- Method:
POST
- Path:
/v1/snapshot/destroy
- API Key:
Required
- Required Access:
subscriptions
List all snapshots on the current account.
Backend
- Method:
GET
- Path:
/v1/snapshot/list
- API Key:
Required
- Required Access:
subscriptions
Create a new SSH Key.
Params
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | Name of the SSH key. |
ssh_key | string | No | SSH public key (in authorized_keys format). |
Backend
- Method:
POST
- Path:
/v1/sshkey/create
- API Key:
Required
- Required Access:
subscriptions
Remove a SSH key.
Note that this will not remove the key from any machines that already have it.
Params
Name | Type | Optional | Description |
---|---|---|---|
sshkeyid | string | No | Unique identifier for this SSH key. See sshkey_list . |
Backend
- Method:
POST
- Path:
/v1/sshkey/destroy
- API Key:
Required
- Required Access:
subscriptions
List all the SSH keys on the current account.
Backend
- Method:
GET
- Path:
/v1/sshkey/list
- API Key:
Required
- Required Access:
subscriptions
Update an existing SSH Key.
Note that this will only update newly installed machines. The key will not be updated on any existing machines.
Params
Name | Type | Optional | Description |
---|---|---|---|
sshkeyid | string | No | SSHKEYID of key to update.See sshkey_list . |
name | string | Yes | New name for the SSH key. |
ssh_key | string | Yes | New SSH key contents. |
Backend
- Method:
POST
- Path:
/v1/sshkey/update
- API Key:
Required
- Required Access:
subscriptions
Create a startup script.
Params
Name | Type | Optional | Description |
---|---|---|---|
name | string | No | Name of the newly created startup script. |
script | string | No | Startup script contents. |
type | string | Yes | Type of startup script. Either boot or pxe. |
Backend
- Method:
POST
- Path:
/v1/startupscript/create
- API Key:
Required
- Required Access:
subscriptions
Remove a startup script.
Params
Name | Type | Optional | Description |
---|---|---|---|
scriptid | string | No | Unique identifier for this startup script. |
Backend
- Method:
POST
- Path:
/v1/startupscript/destroy
- API Key:
Required
- Required Access:
subscriptions
List all startup scripts on the current account.
Scripts of type ‘boot’ are executed by the server’s operating system on the first boot. Scripts of type ‘pxe’ are executed by iPXE when the server itself starts up.
Backend
- Method:
GET
- Path:
/v1/startupscript/list
- API Key:
Required
- Required Access:
subscriptions
Update an existing startup script.
Params
Name | Type | Optional | Description |
---|---|---|---|
scriptid | string | No | SCRIPTID of script to updateSee startupscript_list . |
name | string | Yes | New name for the startup script. |
script | string | Yes | New startup script contents. |
Backend
- Method:
POST
- Path:
/v1/startupscript/update
- API Key:
Required
- Required Access:
subscriptions
Create a new user.
Params
Name | Type | Optional | Description |
---|---|---|---|
acls | array | No | List of ACLs that this user should have. See user_list for information on possible ACLs. |
api_enabled | yes_no | No | Whether or not this user’s API key will work on api.vultr.com . |
email | string | No | Email address for this user. |
name | string | No | Name for this user. |
password | string | No | Password for this user. |
Backend
- Method:
POST
- Path:
/v1/user/create
- API Key:
Required
- Required Access:
manage_users
Delete a user.
Params
Name | Type | Optional | Description |
---|---|---|---|
userid | integer | No | ID of the user to delete. |
Backend
- Method:
POST
- Path:
/v1/user/delete
- API Key:
Required
- Required Access:
manage_users
Retrieve a list of any users associated with this account.
ACLs will contain one or more of the following flags:
manage_users
: Create, update, and delete other users. This will basically grant them all other permissionssubscriptions
: Destroy and update any existing subscriptions (also supporting things, such as ISOs and SSH keys)provisioning
: Deploy new instances. Note this ACL requires the subscriptions ACLbilling
: Manage and view billing information (invoices, payment methods)support
: Create and update support tickets. Users with this flag will be CC’d on any support interactionsabuse
: If enabled on any user, only users with this flag enabled will receive abuse notifications (requires support flag)dns
: Create, update, and delete any forward DNS records (reverse is controlled by the subscriptions flag)upgrade
: If enabled, this user will be allowed to upgrade an instance’s plan, or add paid features (such as DDOS protection or backups)
Backend
- Method:
GET
- Path:
/v1/user/list
- API Key:
Required
- Required Access:
manage_users
Update the details for a user.
Params
Name | Type | Optional | Description |
---|---|---|---|
userid | integer | No | ID of the user to update. |
acls | array | Yes | List of ACLs that this user should have. See user_list for information on possible ACLs. |
api_enabled | yes_no | Yes | Whether or not this user’s API key will work on api.vultr.com . |
email | string | Yes | New email address for this user. |
name | string | Yes | New name for this user. |
password | string | Yes | New password for this user. |
Backend
- Method:
POST
- Path:
/v1/user/update
- API Key:
Required
- Required Access:
manage_users