Retrieve Template list
4 min
you can retrieve a list of configuration templates that are currently available instances have a fixed configuration of vcpu, ram, and direct attached storage size endpoint use the following endpoint for templates https //api ionos com/cloudapi/v6/templates/ request note the following request contains sample values remember to replace them with the relevant information curl x 'get' \\ 'https //api ionos com/cloudapi/v6/templates' \\ h 'accept application/json' to make authenticated requests to the api, the following fields are mandatory in the request header name type description v6 string the api version templates string template attributes id, metadata, and properties you can refine your request by adding the optional query parameter depth name type description depth integer template detail depth default value is 0 response a 200 message confirms that the templates list is fetched { "id" "15f67991 0f51 4efc a8ad ef1fb31a480c", "type" "collection", "href" "\<resource uri>", "items" \[ { "id" "15f67991 0f51 4efc a8ad ef1fb31a480c", "type" "template", "href" "\<resource uri>", "metadata" { "etag" "45480eb3fbfc31f1d916c1eaa4abdcc3", "createddate" "2015 12 04t14 34 09 809z", "createdby" "user\@example com", "createdbyuserid" "user\@example com", "lastmodifieddate" "2015 12 04t14 34 09 809z", "lastmodifiedby" "user\@example com", "lastmodifiedbyuserid" "63cef532 26fe 4a64 a4e0 de7c8a506c90", "state" "available" }, "properties" { "name" "my resource", "cores" 2, "ram" 2048, "storagesize" 10, "category" "template category" } } ] }
