### Get Account Information with Curl Source: https://www.vultr.com/api/v1 This example shows how to retrieve account, permission, and billing information using a GET request to the `/v2/account` endpoint. It requires an API Key for authorization and returns a JSON object with account details. ```curl curl "https://api.vultr.com/v2/account" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ```json { "account": { "name": "Example Account", "email": "admin@example.com", "acls": [ "manage_users", "subscriptions_view", "subscriptions", "billing", "support", "provisioning", "dns", "abuse", "upgrade", "firewall", "alerts", "objstore", "loadbalancer" ], "balance": -100.55, "pending_charges": 60.25, "last_payment_date": "2020-10-10T01:56:20+00:00", "last_payment_amount": -1.25 } } ``` -------------------------------- ### POST /v2/instances/start Source: https://www.vultr.com/api/index Start multiple Vultr instances simultaneously. ```APIDOC ## POST /v2/instances/start ### Description Start multiple Vultr instances simultaneously. ### Method POST ### Endpoint /v2/instances/start ### Parameters #### Request Body - **instance_ids** (array of strings) - Required - The Instance IDs to start. ### Request Example ```json { "instance_ids": [ "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "1d651bd2-b93c-4bb6-8b91-0546fd765f15", "c2790719-278d-474c-8dff-cb35d6e5503f" ] } ``` ### Response #### Success Response (204) No Content #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ``` -------------------------------- ### API Path Parameter Example (Get User) Source: https://www.vultr.com/api/index Illustrates the use of path parameters in API requests. This example shows how to include a variable identifier, such as a user ID, directly within the API endpoint URL to retrieve specific information. ```curl curl "https://api.vultr.com/v2/users/{user-id}" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Start Bare Metal Instance (Curl) Source: https://www.vultr.com/api/index Starts a Bare Metal instance. Requires the Bare Metal ID. Successful operations return a 204 No Content. Possible errors include Bad Request, Unauthorized, and Not Found. ```curl curl "https://api.vultr.com/v2/baremetals/{baremetal-id}/start" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### GET /v2/iso Source: https://www.vultr.com/api/index Get the ISOs in your account. ```APIDOC ## GET /v2/iso ### Description Get the ISOs in your account. ### Method GET ### Endpoint /v2/iso ### Parameters #### Query Parameters - **per_page** (integer) - Optional - Number of items requested per page. Default is 100 and Max is 500. - **cursor** (string) - Optional - Cursor for paging. See Meta and Pagination. ### Request Example ```bash curl "https://api.vultr.com/v2/iso" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (200) OK #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **404**: Not Found ``` -------------------------------- ### GET /plans Source: https://www.vultr.com/api/v1 Retrieves a list of available plans for VPS instances. ```APIDOC ## GET /plans ### Description Retrieves a list of available plans for VPS instances, including details on RAM, disk, and vCPU count. ### Method GET ### Endpoint /plans ### Parameters #### Query Parameters - **available_regions** (string) - Optional - A comma-separated list of region IDs to filter plans available in those regions. ### Request Example ``` GET /plans?available_regions=atl,mia ``` ### Response #### Success Response (200) - **plans** (array) - A list of plan objects. - **id** (string) - The unique identifier for the plan (e.g., "vc2-6c-16gb"). - **region** (string) - The region where this plan is available. - **cpu_count** (integer) - The number of virtual CPUs. - **ram** (integer) - The amount of RAM in MB. - **disk** (integer) - The amount of disk space in GB. - **price_monthly** (number) - The monthly cost of the plan. - **name** (string) - The human-readable name of the plan. #### Response Example ```json { "plans": [ { "id": "vc2-6c-16gb", "region": "atl", "cpu_count": 6, "ram": 16384, "disk": 55, "price_monthly": 40, "name": "6GB Plan" } ] } ``` ``` -------------------------------- ### Create CDN Pull Zone (Curl Example) Source: https://www.vultr.com/api/v1 This example shows how to use `curl` to send a POST request to create a CDN Pull Zone. It includes the necessary headers for authorization and content type, along with the JSON payload. ```bash curl -X POST https://api.vultr.com/v2/cdns/pull-zones \ -H "Authorization: Bearer ${VULTR_API_KEY}" \ -H "Content-Type: application/json" \ -d @payload.json ``` -------------------------------- ### CDN Push Zone List Response Example (200 OK) Source: https://www.vultr.com/api/index An example of the JSON response when listing CDN Push Zones. It includes a list of push zones, each with its ID, creation date, status, and configuration details, along with pagination metadata. ```json { "push_zones": [ { "id": "ef4d95d5-98dc-4710-94f5-0ee97e70a9a5", "date_created": "2024-01-25 09:41:05", "status": "active", "label": "my-pushzone", "cdn_url": "https://cdn-wdghak5h67sm.vultrcdn.com", "vanity_domain": "my.domain.com", "cache_size": 50000000, "requests": null, "in_bytes": null, "out_bytes": null, "packets_per_sec": 50, "cors": false, "gzip": true, "block_ai": false, "block_bad_bots": true, "regions": [ "..." ] } ], "meta": { "total": 3, "links": { "next": "WxYzExampleNext", "prev": "" } } } ``` -------------------------------- ### API Query Parameter Example (Filter Plans) Source: https://www.vultr.com/api/index Shows how to use query parameters to filter API results. This example demonstrates requesting only 'High Frequency Compute' plans by setting the 'type' parameter. It also shows combining filtering with pagination using 'type' and 'per_page'. ```curl curl "https://api.vultr.com/v2/plans?type=vhf" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ```curl curl "https://api.vultr.com/v2/plans?type=vhf&per_page=2" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### POST /v2/bare-metals/{baremetal-id}/start Source: https://www.vultr.com/api/v1 Starts a Bare Metal instance. ```APIDOC ## POST /v2/bare-metals/{baremetal-id}/start ### Description Starts the Bare Metal instance. ### Method POST ### Endpoint /v2/bare-metals/{baremetal-id}/start ### Parameters #### Path Parameters - **baremetal-id** (string) - Required - The Bare Metal id. ### Request Example ```curl curl "https://api.vultr.com/v2/bare-metals/{baremetal-id}/start" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (204) No Content ``` -------------------------------- ### Get CDN Pull Zone - Curl Example Source: https://www.vultr.com/api/index Example cURL command to retrieve information about a specific CDN Pull Zone. This demonstrates how to make a GET request using the pull zone ID and includes authorization. ```bash curl "https://api.vultr.com/v2/cdns/pull-zones/{pullzone-id}" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Get Database Connector Status Response (JSON) Source: https://www.vultr.com/api/index Example JSON response for the Get Database Connector Status endpoint, detailing the connector's state and task statuses. ```json { "connector_status": { "state": "RUNNING", "tasks": [ { "id": 0, "state": "RUNNING", "trace": "" } ] } } ``` -------------------------------- ### POST /v2/instances/{instance-id}/start Source: https://www.vultr.com/api/index Starts a specific Vultr instance. ```APIDOC ## POST /v2/instances/{instance-id}/start ### Description Starts a specific Vultr instance. ### Method POST ### Endpoint /v2/instances/{instance-id}/start ### Parameters #### Path Parameters - **instance-id** (string) - Required - The ID of the instance to start. ### Request Example ```bash curl "https://api.vultr.com/v2/instances/{instance-id}/start" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (204) No Content #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ``` -------------------------------- ### Get Database Connector Status (Curl) Source: https://www.vultr.com/api/index Retrieves the status information for a Managed Database connector. The example shows a GET request to the Vultr API, requiring an API key for authorization. ```curl curl "https://api.vultr.com/v2/databases/{database-id}/connectors/{connector-name}/status" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Get Single Firewall Rule for Load Balancer (Curl) Source: https://www.vultr.com/api/index Fetches a specific firewall rule for a Load Balancer using its ID. The example demonstrates a curl GET request that requires an API key. ```curl curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}/firewall-rules/{firewall-rule-id}" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### POST /v2/bare-metals/start Source: https://www.vultr.com/api/index Starts a list of specified Bare Metal instances. This action will power on the instances. ```APIDOC ## POST /v2/bare-metals/start ### Description Starts a list of specified Bare Metal instances. This action will power on the instances. ### Method POST ### Endpoint /v2/bare-metals/start ### Parameters #### Request Body - **baremetal_ids** (array of strings) - Required - A list of Bare Metal instance IDs to start. ### Request Example ```json { "baremetal_ids": [ "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "1d651bd2-b93c-4bb6-8b91-0546fd765f15", "c2790719-278d-474c-8dff-cb35d6e5503f" ] } ``` ### Response #### Success Response (204) No Content #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ``` -------------------------------- ### GET /v2/domains/{dns-domain}/soa Source: https://www.vultr.com/api/index Retrieves the Start of Authority (SOA) record for a specified DNS domain. ```APIDOC ## Get SOA Information ### Description Retrieves the Start of Authority (SOA) record for a specified DNS domain. ### Method GET ### Endpoint https://api.vultr.com/v2/domains/{dns-domain}/soa ### Parameters #### Path Parameters - **dns-domain** (string) - Required - The DNS Domain. ### Request Example ```curl curl "https://api.vultr.com/v2/domains/{dns-domain}/soa" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (200) - **dns_soa** (object) - Contains the DNS SOA record details. - **nsprimary** (string) - The primary nameserver. - **email** (string) - The contact email address. #### Response Example ```json { "dns_soa": { "nsprimary": "ns1.vultr.com", "email": "admin@example.com" } } ``` ``` -------------------------------- ### POST /v2/instances Source: https://www.vultr.com/api/index Creates a new virtual machine instance with specified configurations. ```APIDOC ## POST /v2/instances ### Description Creates a new virtual machine instance with specified configurations. ### Method POST ### Endpoint https://api.vultr.com/v2/instances ### Parameters #### Request Body - **region** (string) - Required - The region where the instance will be deployed. - **plan** (string) - Required - The plan for the instance (e.g., 'vc2-6c-16gb'). - **label** (string) - Optional - A label for the instance. - **os_id** (integer) - Required - The ID of the operating system to install. - **user_data** (string) - Optional - Base64 encoded user data. - **backups** (string) - Optional - Enable or disable backups ('enabled' or 'disabled'). - **hostname** (string) - Optional - The hostname for the instance. - **tags** (array of strings) - Optional - Tags to apply to the instance. ### Request Example ```json { "region": "ewr", "plan": "vc2-6c-16gb", "label": "Example Instance", "os_id": 215, "user_data": "QmFzZTY0IEV4YW1wbGUgRGF0YQ==", "backups": "enabled", "hostname": "my_hostname", "tags": [ "a tag", "another" ] } ``` ### Response #### Success Response (202) - **instance** (object) - Details of the created instance. - **id** (string) - The unique identifier of the instance. - **os** (string) - The operating system of the instance. - **ram** (integer) - The amount of RAM in MB. - **disk** (integer) - The disk size in GB. - **main_ip** (string) - The main IPv4 address. - **vcpu_count** (integer) - The number of vCPUs. - **region** (string) - The deployment region. - **plan** (string) - The instance plan. - **date_created** (string) - The date and time the instance was created. - **status** (string) - The current status of the instance. - **allowed_bandwidth** (integer) - Allowed bandwidth in GB. - **netmask_v4** (string) - The IPv4 netmask. - **gateway_v4** (string) - The IPv4 gateway. - **power_status** (string) - The power status of the instance. - **server_status** (string) - The server status. - **v6_network** (string) - The IPv6 network information. - **v6_main_ip** (string) - The main IPv6 address. - **v6_network_size** (integer) - The size of the IPv6 network. - **label** (string) - The instance label. - **internal_ip** (string) - The internal IP address. - **vpc_only** (boolean) - Whether the instance is VPC only. - **kvm** (string) - URL for KVM access. - **hostname** (string) - The instance hostname. - **os_id** (integer) - The ID of the operating system. - **app_id** (integer) - The ID of the associated marketplace app. - **image_id** (string) - The ID of the custom image. - **snapshot_id** (string) - The ID of the snapshot. - **firewall_group_id** (string) - The ID of the firewall group. - **features** (array of strings) - Enabled features. - **default_password** (string) - The default root password. - **tags** (array of strings) - Applied tags. - **user_scheme** (string) - The user scheme (e.g., 'root'). #### Response Example ```json { "instance": { "id": "4f0f12e5-1f84-404f-aa84-85f431ea5ec2", "os": "CentOS 8 Stream", "ram": 1024, "disk": 0, "main_ip": "0.0.0.0", "vcpu_count": 1, "region": "ewr", "plan": "vc2-1c-1gb", "date_created": "2021-09-14T13:22:20+00:00", "status": "pending", "allowed_bandwidth": 1000, "netmask_v4": "", "gateway_v4": "0.0.0.0", "power_status": "running", "server_status": "none", "v6_network": "", "v6_main_ip": "", "v6_network_size": 0, "label": "", "internal_ip": "", "vpc_only": false, "kvm": "", "hostname": "my_hostname", "os_id": 401, "app_id": 0, "image_id": "", "snapshot_id": "", "firewall_group_id": "", "features": [], "default_password": "v5{Fkvb#2ycPGwHs", "tags": [ "a tag", "another" ], "user_scheme": "root" } } ``` ``` -------------------------------- ### POST /instances Source: https://www.vultr.com/api/v1 Creates a new VPS instance in a specified region with a chosen plan and deployment method (OS, ISO, snapshot, etc.). ```APIDOC ## POST /instances ### Description Creates a new VPS instance in a specified region with a chosen plan and deployment method (OS, ISO, snapshot, etc.). You must supply one of `os_id`, `iso_id`, `snapshot_id`, `app_id`, or `image_id`. ### Method POST ### Endpoint /instances ### Parameters #### Request Body - **region** (string) - Required - The region ID where the instance will be created (e.g., "atl"). - **plan** (string) - Required - The plan ID for the instance (e.g., "vc2-6c-16gb"). - **os_id** (integer) - Optional - The ID of the operating system to install. - **iso_id** (string) - Optional - The ID of the ISO image to use for installation. - **snapshot_id** (string) - Optional - The ID of the snapshot to restore. - **app_id** (integer) - Optional - The ID of the application to deploy. - **image_id** (string) - Optional - The ID of a custom image to deploy. - **label** (string) - Optional - A label for the instance. - **hostname** (string) - Optional - The hostname for the instance. - **tags** (array) - Optional - A list of tags to apply to the instance. - **vpc_ids** (array) - Optional - A list of VPC IDs to attach the instance to. ### Request Example ```json { "region": "atl", "plan": "vc2-6c-16gb", "os_id": 215, "label": "My New Server", "tags": ["web", "production"] } ``` ### Response #### Success Response (200) - **instance** (object) - Details of the newly created instance. - **id** (string) - The unique identifier for the instance. - **status** (string) - The current status of the instance (e.g., "pending", "active"). - **label** (string) - The label of the instance. - **region** (string) - The region where the instance was created. - **plan** (string) - The plan used for the instance. - **date_created** (string) - The timestamp when the instance was created. #### Response Example ```json { "instance": { "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "status": "pending", "label": "My New Server", "region": "atl", "plan": "vc2-6c-16gb", "date_created": "2023-10-27T10:00:00+00:00" } } ``` ``` -------------------------------- ### POST /v2/bare-metals/{baremetal-id}/start Source: https://www.vultr.com/api/index Starts a halted bare metal instance. ```APIDOC ## POST /v2/bare-metals/{baremetal-id}/start ### Description Starts the Bare Metal instance. ### Method POST ### Endpoint /v2/bare-metals/{baremetal-id}/start ### Parameters #### Path Parameters - **baremetal-id** (string) - Required - The Bare Metal id. ### Request Example ```bash curl "https://api.vultr.com/v2/bare-metals/{baremetal-id}/start" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (204) No Content #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ``` -------------------------------- ### GET /v2/logs Source: https://www.vultr.com/api/index Retrieves a list of logs from your Vultr account. Supports filtering by resource type, start and end times. ```APIDOC ## GET /v2/logs ### Description Retrieves a list of logs from your Vultr account. Supports filtering by resource type, start and end times. ### Method GET ### Endpoint https://api.vultr.com/v2/logs ### Query Parameters - **resource_type** (string) - Optional - Filter logs by resource type (e.g., "instances", "kubernetes"). - **start_time** (string) - Optional - Filter logs starting from this timestamp (ISO 8601 format). - **end_time** (string) - Optional - Filter logs up to this timestamp (ISO 8601 format). ### Request Example ```curl curl "https://api.vultr.com/v2/logs" -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (200) - **logs** (array) - A list of log objects. - **resource_id** (string) - The ID of the resource the log pertains to. - **resource_type** (string) - The type of the resource. - **log_level** (string) - The severity level of the log. - **message** (string) - The log message. - **timestamp** (string) - The timestamp when the log was generated. - **metadata** (object) - Additional metadata for the log. - **meta** (object) - Metadata about the pagination and counts. - **next_page_url** (string) - URL for the next page of results. - **continue_time** (string) - Timestamp to continue fetching logs from. - **returned_count** (integer) - Number of logs returned in this request. - **unreturned_count** (integer) - Number of logs not returned. - **total_count** (integer) - Total number of logs available. #### Response Example ```json { "logs": [ { "resource_id": "xb671a46-66ed-4dfb-b839-543f2c6c0b63", "resource_type": "instances", "log_level": "debug", "message": "Success", "timestamp": "2025-06-26T16:45:06+00:00", "metadata": { } } ], "meta": { "next_page_url": "https://api.vultr.com/v2/logs?end_time=2025-09-18T10:21:20Z&start_time=2025-09-18T00:00:00Z&resource_type=kubernetes", "continue_time": "2025-06-26T12:24:03Z", "returned_count": 5000, "unreturned_count": 3524, "total_count": 8524 } } ``` ``` -------------------------------- ### POST /v2/bare-metals/start Source: https://www.vultr.com/api/v1 Starts one or more specified Bare Metal servers. Requires a list of Bare Metal IDs in the request body. ```APIDOC ## Start Bare Metals ### Description Starts one or more specified Bare Metal servers. Requires a list of Bare Metal IDs in the request body. ### Method POST ### Endpoint /v2/bare-metals/start ### Parameters #### Request Body - **baremetal_ids** (array of strings) - Required - A list of Bare Metal IDs to start. ### Request Example ```json { "baremetal_ids": [ "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "1d651bd2-b93c-4bb6-8b91-0546fd765f15", "c2790719-278d-474c-8dff-cb35d6e5503f" ] } ``` ### Response #### Success Response (204) No Content #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **404**: Not Found ``` -------------------------------- ### Get CDN Pull Zone - Response Example Source: https://www.vultr.com/api/index Example JSON response when successfully retrieving information for a CDN Pull Zone. This details the various attributes of the pull zone, including its ID, creation date, status, origin details, and configuration settings. ```json { "pull_zone": { "id": "ef4d95d5-98dc-4710-94f5-0ee97e70a9a5", "date_created": "2024-01-25 09:41:05", "status": "active", "label": "my-pullzone", "origin_scheme": "https", "origin_domain": "constant.com", "cdn_url": "https://cdn-wdghak5h67sm.vultrcdn.com", "vanity_domain": "my.domain.com", "cache_size": 50000000, "requests": null, "in_bytes": null, "out_bytes": null, "packets_per_sec": 50, "last_purge": "2024-01-25 11:39:04", "cors": false, "gzip": true, "block_ai": false, "block_bad_bots": true, "regions": [ "..." ] } } ``` -------------------------------- ### Attach ISO to Instance using cURL and JSON Source: https://www.vultr.com/api/index This example demonstrates how to attach an ISO to an instance using a cURL command. It includes a JSON payload specifying the ISO ID and requires an API key for authorization. ```json { "iso_id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60" } ``` ```shell curl "https://api.vultr.com/v2/instances/{instance-id}/iso/attach" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" \ -H "Content-Type: application/json" \ -d @payload.json ``` -------------------------------- ### Start Instance (cURL) Source: https://www.vultr.com/api/index Initiates the startup of a single Vultr instance identified by its Instance ID. The request must include an Authorization header with a valid API key. A 'No Content' response signifies successful initiation. ```bash curl "https://api.vultr.com/v2/instances/{instance-id}/start" \ -X POST \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Get Load Balancer Reverse DNS (Curl) Source: https://www.vultr.com/api/index Example using curl to retrieve Reverse DNS information for a Vultr Load Balancer. Requires the Load Balancer ID. ```curl curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}/reverse-dns" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Get DNS Domain SOA Record (Curl) Source: https://www.vultr.com/api/index Retrieves the Start of Authority (SOA) record for a specified DNS domain. Requires the DNS domain as a path parameter and an API key for authorization. ```curl curl "https://api.vultr.com/v2/domains/{dns-domain}/soa" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Create Startup Script Payload JSON Source: https://www.vultr.com/api/index Example JSON payload for creating a new startup script. The 'name' and 'script' fields are required. The 'script' field must be base-64 encoded. ```json { "name": "Example Startup Script", "type": "pxe", "script": "QmFzZTY0IEV4YW1wbGUgRGF0YQ==" } ``` -------------------------------- ### Instance Response Sample (JSON) Source: https://www.vultr.com/api/index A sample JSON response detailing an instance's configuration. This includes information about its operating system, resources (RAM, disk, vCPU), network details, status, and features like DDoS protection and IPv6 support. ```json { "instance": { "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "os": "Ubuntu 20.04 x64", "ram": 16384, "disk": 384, "main_ip": "192.0.2.123", "vcpu_count": 4, "region": "ewr", "plan": "vc2-6c-16gb", "date_created": "2020-10-10T01:56:20+00:00", "status": "active", "allowed_bandwidth": 5000, "netmask_v4": "255.255.254.0", "gateway_v4": "192.0.2.1", "power_status": "running", "server_status": "ok", "v6_network": "", "v6_main_ip": "", "v6_network_size": 0, "label": "Example Instance", "internal_ip": "", "vpc_only": false, "kvm": "https://my.vultr.com/subs/vps/novnc/api.php?data=00example11223344", "hostname": "my_new_hostname", "tag": "Example Tag", "os_id": 215, "app_id": 0, "image_id": "", "snapshot_id": "", "firewall_group_id": "", "features": [ "ddos_protection", "ipv6", "auto_backups" ] } } ``` -------------------------------- ### JSON: Get Snapshot Response Source: https://www.vultr.com/api/index Example JSON response when successfully retrieving snapshot information. Includes details like snapshot ID, creation date, description, sizes, status, and OS/App IDs. ```json { "snapshot": { "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "date_created": "2020-10-10T01:56:20+00:00", "description": "Example Snapshot", "size": 42949672960, "compressed_size": 949678560, "status": "complete", "os_id": 215, "app_id": 0 } } ``` -------------------------------- ### Get Load Balancer Forwarding Rule (Curl) Source: https://www.vultr.com/api/index Example using curl to retrieve information for a specific forwarding rule on a Vultr Load Balancer. Requires the Load Balancer ID and Forwarding Rule ID. ```curl curl "https://api.vultr.com/v2/load-balancers/{load-balancer-id}/forwarding-rules/{forwarding-rule-id}" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Create Startup Script using cURL Source: https://www.vultr.com/api/index Creates a new startup script. Requires 'name' and 'script' attributes, where the script must be base-64 encoded. Optional 'type' parameter can be 'boot' or 'pxe'. Requires API key authentication. ```shell curl "https://api.vultr.com/v2/startup-scripts" \ -X POST \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ${VULTR_API_KEY}" \ -d @payload.json ``` -------------------------------- ### Get Account BGP Information (API) Source: https://www.vultr.com/api/index Shows an example of how to fetch account-specific Border Gateway Protocol (BGP) information using the Vultr API. This request requires API Key authorization and is a read-only operation. ```curl curl "https://api.vultr.com/v2/account/bgp" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### Create Bare Metal Instance Response (JSON) Source: https://www.vultr.com/api/index Provides an example of the JSON response received after successfully initiating the creation of a Bare Metal instance. It includes details about the created instance, such as its ID, status, and configuration. ```json { "bare_metal": { "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "os": "Application", "ram": "32768 MB", "disk": "2x 240GB SSD", "main_ip": "", "cpu_count": 4, "region": "ams", "date_created": "2020-10-10T01:56:20+00:00", "status": "pending", "netmask_v4": "", "gateway_v4": "", "plan": "vbm-4c-32gb", "v6_network": "", "v6_main_ip": "", "v6_network_size": 0, "label": "Example Bare Metal", "mac_address": 2199756823533, "tag": "Example Tag", "tags": [ "Another tag" ], "os_id": 186, "app_id": 3, "image_id": "", "snapshot_id": "", "features": [ "ipv6" ], "user_scheme": "root", "mdisk_mode": "raid1" } } ``` -------------------------------- ### Get Account Information (API) Source: https://www.vultr.com/api/index Provides a `curl` example to retrieve general account information, including user details, permissions (ACLs), balance, and payment history. This is a read-only operation typically requiring an API Key. ```curl curl "https://api.vultr.com/v2/account" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### JSON: Available Plans Response Source: https://www.vultr.com/api/index Example JSON response showing available instance plans. This list is part of a larger API response and indicates different configurations for virtual machines. ```json { "available_plans": [ "vc2-1c-1gb", "vc2-1c-2gb", "vc2-2c-4gb", "vc2-4c-8gb", "vc2-6c-16gb", "vc2-8c-32gb", "vc2-16c-64gb", "vc2-24c-96gb", "vdc-4vcpu-8gb", "vdc-4vcpu-16gb", "vdc-6vcpu-24gb", "vdc-8vcpu-32gb", "vhf-1c-1gb", "vhf-1c-2gb", "vhf-2c-4gb", "vhf-3c-8gb", "vhf-4c-16gb", "vhf-6c-24gb", "vhf-8c-32gb", "vhf-12c-48gb" ] } ``` -------------------------------- ### Get Bare Metal IPv4 Information - Curl Source: https://www.vultr.com/api/index This example shows how to retrieve IPv4 information for a specific Bare Metal instance using the Vultr API and Curl. It requires the Bare Metal ID and an API key. The response includes a list of IPv4 addresses and associated network details. ```curl curl "https://api.vultr.com/v2/bare-metals/{baremetal-id}/ipv4" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` -------------------------------- ### GET /v2/os Source: https://www.vultr.com/api/index Lists all available Operating System images for server instances at Vultr. ```APIDOC ## GET /v2/os ### Description List the OS images available for installation at Vultr. ### Method GET ### Endpoint /v2/os ### Parameters #### Query Parameters - **per_page** (integer) - Optional - Number of items requested per page. Default is 100 and Max is 500. - **cursor** (string) - Optional - Cursor for paging. See Meta and Pagination. ### Request Example ```curl curl "https://api.vultr.com/v2/os" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (200) - **os** (array) - A list of available operating systems. - **id** (integer) - The ID of the OS image. - **name** (string) - The name of the OS. - **arch** (string) - The architecture of the OS (e.g., x64). - **family** (string) - The family of the OS (e.g., centos). - **meta** (object) - Pagination metadata. - **total** (integer) - The total number of items. - **links** (object) - Links for pagination. - **next** (string) - URL for the next page. - **prev** (string) - URL for the previous page. #### Response Example ```json { "os": [ { "id": 127, "name": "CentOS 6 x64", "arch": "x64", "family": "centos" } ], "meta": { "total": 1, "links": { "next": "", "prev": "" } } } ``` ``` -------------------------------- ### GET /v2/instances/jobs/{job-id} Source: https://www.vultr.com/api/index Get available information for an Instance job. ```APIDOC ## GET /v2/instances/jobs/{job-id} ### Description Get available information for an Instance job. ### Method GET ### Endpoint /v2/instances/jobs/{job-id} ### Parameters #### Path Parameters - **job-id** (string) - Required - The Job ID. ### Request Example ```bash curl "https://api.vultr.com/v2/instances/jobs/{job-id}" \ -X GET \ -H "Authorization: Bearer ${VULTR_API_KEY}" ``` ### Response #### Success Response (200) OK ```json { "job": { "id": "b3123d06-ec83-456c-ac71-ae8c4bc95e18", "vps_id": "243f120d-400a-4060-b864-8b21d5b9cc2b", "type": "UPGRADE", "state": "success", "info": "Upgrade completed successfully!", "added_at": "2025-05-05 14:54:34", "updated_at": "2025-05-05 14:54:44" } } ``` #### Error Responses - **400**: Bad Request - **401**: Unauthorized - **403**: Forbidden - **404**: Not Found ``` -------------------------------- ### POST /v2/bare-metals/{baremetal-id}/reinstall Source: https://www.vultr.com/api/index Reinstalls a bare metal instance, optionally setting a new hostname. ```APIDOC ## POST /v2/bare-metals/{baremetal-id}/reinstall ### Description Reinstalls the Bare Metal instance using an optional `hostname`. ### Method POST ### Endpoint /v2/bare-metals/{baremetal-id}/reinstall ### Parameters #### Path Parameters - **baremetal-id** (string) - Required - The Bare Metal id. #### Request Body - **hostname** (string) - Optional - The hostname to use when reinstalling this bare metal server. ### Request Example ```json { "hostname": "my_new_hostname" } ``` ### Response #### Success Response (202) Accepted #### Response Example (202) ```json { "bare_metal": { "id": "cb676a46-66fd-4dfb-b839-443f2e6c0b60", "os": "Application", "ram": "32768 MB", "disk": "2x 240GB SSD", "main_ip": "192.0.2.123", "cpu_count": 4, "region": "ams", "date_created": "2020-10-10T01:56:20+00:00", "status": "pending", "netmask_v4": "255.255.254.0", "gateway_v4": "192.0.2.1", "plan": "vbm-4c-32gb", "v6_network": "2001:0db8:5001:3990::", "v6_main_ip": "2001:0db8:5001:3990:0ec4:7aff:fe8e:f97a", "v6_network_size": 64, "label": "Example Bare Metal", "mac_address": 2199756823533, "tag": "Example Tag", "os_id": 183, "app_id": 3, "image_id": "", "snapshot_id": "" } } ``` #### Error Responses - **400** Bad Request - **401** Unauthorized - **404** Not Found ```