Update a template

PUT/compute/{connection_id}/template/{id}

Parameters

fieldsstring array
Fields to return
rawstring
Raw parameters to include in the 3rd-party request. Encoded as a URL component. eg. raw parameters: foo=bar&zoo=bar -> raw=foo%3Dbar%26zoo%3Dbar
connection_idstring required
ID of the connection
idstring required
ID of the Template

Payload

idstring
Unique identifier for the template
created_atdate-time
When the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atdate-time
When the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestring
Display name of the template
aliasesstring array
Alternative names or tags for the template
imagestring
Container or OS image
dockerfilestring
Dockerfile used to build the template
start_commandstring
Command run when an instance starts
status enum
Valid values:
"PENDING"
"BUILDING"
"READY"
"FAILED"
"OTHER"
Normalized build status
gpu_model enum
Valid values:
"NVIDIA_GB300"
"NVIDIA_B300"
"NVIDIA_GB200"
"NVIDIA_B200"
"NVIDIA_GH200"
Default GPU model
gpu_countnumber
Default number of GPUs
cpu_countnumber
Default number of vCPUs
memory_mbnumber
Default memory in MiB
disk_mbnumber
Default disk in MiB
ports
Ports exposed by instances from this template
env array
Default environment variables (write-only values)
is_publicboolean
Whether the template is publicly shared
last_used_atdate-time
When an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadata array
Vendor labels, tags and metadata

Returns

Response fieldTypeRequiredDescription
idstringNoUnique identifier for the template
created_atstring (date-time)NoWhen the template was created (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
updated_atstring (date-time)NoWhen the template was last updated (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
namestringNoDisplay name of the template
aliasesstring[]NoAlternative names or tags for the template
imagestringNoContainer or OS image
dockerfilestringNoDockerfile used to build the template
start_commandstringNoCommand run when an instance starts
statusenumNoNormalized build status Values: PENDING, BUILDING, READY, FAILED, OTHER
gpu_modelenumNoDefault GPU model Values: NVIDIA_GB300, NVIDIA_B300, NVIDIA_GB200, NVIDIA_B200, NVIDIA_GH200, NVIDIA_H200, NVIDIA_H100_SXM, NVIDIA_H100_PCIE, NVIDIA_H100_NVL, NVIDIA_A100_SXM_80GB, NVIDIA_A100_PCIE_80GB, NVIDIA_A100_40GB, NVIDIA_L40S, NVIDIA_L40, NVIDIA_L4, NVIDIA_A40, NVIDIA_A10, NVIDIA_RTX_PRO_6000, NVIDIA_RTX_6000_ADA, NVIDIA_RTX_A6000, NVIDIA_RTX_A5000, NVIDIA_RTX_A4000, NVIDIA_RTX_5090, NVIDIA_RTX_4090, NVIDIA_RTX_3090, NVIDIA_V100, NVIDIA_T4, AMD_MI355X, AMD_MI325X, AMD_MI300X, AMD_MI250, OTHER
gpu_countnumberNoDefault number of GPUs
cpu_countnumberNoDefault number of vCPUs
memory_mbnumberNoDefault memory in MiB
disk_mbnumberNoDefault disk in MiB
portsobjectNoPorts exposed by instances from this template
envComputeEnv[]NoDefault environment variables (write-only values)
env[].namestringYesEnvironment variable name
env[].valuestringNoEnvironment variable value (write-only; never returned)
is_publicbooleanNoWhether the template is publicly shared
last_used_atstring (date-time)NoWhen an instance was last started from this template (ISO-8601 / YYYY-MM-DDTHH:MM:SSZ format)
metadataComputeMetadata[]NoVendor labels, tags and metadata
metadata[].idstringNo
metadata[].slugstringNoThe label, tag or metadata key
metadata[].valueobjectNoThe label, tag or metadata value
metadata[].namespacestringNoThe origin of the value (eg. labels, tags, metadata)
metadata[].formatenumNoThe data type of the value Values: TEXT, NUMBER, DATE, BOOLEAN, ARRAY, OBJECT
metadata[].extra_dataobjectNo

Errors

Errors return the HTTP status code and a JSON body with statusCode, error (the short label) and message (a human-readable detail).

{
  "statusCode": 429,
  "error": "Too Many Requests",
  "message": "Too many requests to unified.to API; max requests per minute: N"
}
StatusErrorMeaning
400Bad RequestThe request was malformed or failed validation.
401UnauthorizedThe connection is likely broken; re-authorize it.
403ForbiddenThe connection is missing permissions or scopes.
404Not FoundThe requested resource does not exist.
429Too Many RequestsRate limit exceeded (see the two sources below).
500Internal Server ErrorAn unexpected error occurred.
501Not ImplementedNot supported by this integration.

Errors from the underlying integration pass through: the integration's status comes back as ours (429, 401, 403, 404 or 5xx), usually with its message. When the integration's error body is unclear, Unified extracts what it can and returns a clearer message.

429 Too Many Requests

A 429 has two possible sources:

  • The integration's own rate limit, passed through.
  • Unified's workspace limit: a rolling 60 seconds, set by plan, with the message Too many requests to unified.to API; max requests per minute: N.
const options = {
  method: 'PUT',
  url: 'https://api.unified.to/compute/5de520f96e439b002043d8dc/template/5de520f96e439b002043d8d8',
  headers: {
    authorization: 'bearer .....'
  },
  data: undefined,
  params: {
    fields: '',
    raw: '',
  }
};

const results = await axios.request(options);
Are we missing anything? Let us know
Was this page helpful?