Machine Templates

Get a machine template

Changed on

Deprecated: use Environments (/api/v0/environments) instead. Returns details of a specific machine template. Returns 409 when the organization requires personal GitLab Self-Hosted connections and the GitLab project behind the template was renamed or moved since repositories were last synced; an admin must sync repositories before the request can succeed.

get/api/v0/machines/templates/{templateId}

Request

  • Base URL
    https://api.factory.ai
  • Auth
    HTTP bearer

Path parameters

templateId, string required

Template ID

Headers

X-Factory-Org-Id, string

Organization a JWT request acts in; required to act in a sub-organization. Without it, the request acts in the user's root organization, or is rejected with 403 when the user cannot access the root organization. API keys always act in their own organization and ignore this header.

Response

Response for status 200

GetMachineTemplate200ResponseBody required
templateId, string required

Template ID

repoUrl, union required

Repository URL

templateName, string required

Human-readable template name

defaultBranch, string required

Default branch name

createdBy, string required

User ID of creator

createdAt, integer

Creation timestamp (ms)

buildStatus, object

Build status

lastUpdatedAt, integer nullable

Last update timestamp (ms)

environmentVariables, object[]

Shared environment variables

userEnvironmentVariablesByUser, object[]

User-specific environment variables

setupScript, string

Setup script to run after cloning

Changes