Retrieve the full configuration of a Vultr instance template including the plan, OS, SSH keys, startup script, and VPC settings via the API.
Retrieving an instance template returns its full configuration including the plan, OS, SSH keys, startup script, VPC, and storage settings. This is useful for reviewing a template's details before using it to create a cluster or instance.
This guide explains how to retrieve an instance template using the Vultr API.
Send a GET request to the List Instance Templates endpoint to retrieve all templates.
$ curl "https://api.vultr.com/v2/instances/templates" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
Note the id of the template you want to retrieve.
Send a GET request to the Get Instance Template endpoint to retrieve the template details. Replace {template-id} with the template id.
$ curl "https://api.vultr.com/v2/instances/templates/{template-id}" \
-X GET \
-H "Authorization: Bearer ${VULTR_API_KEY}"
The response contains the template configuration details.