Skip to main content
Version: v1.0.1

Update an template

Update an template

PUT 

undefined/functions/v1/templates/:templateIdentifier

Update an template

Request

Path Parameters

    templateIdentifier stringrequired

    The ID or Name of the template

Header Parameters

    X-Organization-Id string

    The ID of the organization (this parameter is not required when using API key authorization)

    X-Project-Id string

    The ID of the project (Use this if you are not going to use the X-Project-Name)

    X-Project-Name string

    The Name of the project (Use this if you are not going to use the X-Project-Id)

Bodyrequired

    gitIntegrationIdstringrequired

    Must have the UUID of an existing integration linked to the same project and organization where the template will be created.

    namestringrequired

    Only accepts lowercase letters or numbers, maximum 30 characters, minimum 3, the only special character allowed is the hyphen but it cannot be at the beginning or end, no spaces are allowed.

    Possible values: >= 3 characters and <= 30 characters, Value must match regular expression ^[a-z0-9]+(-[a-z0-9]+)*$

    gitUrluri

    URL of the repository to be used.

    isContainerizedbooleanrequired

    Indicates if the app is containerized.

    sourceCodeLanguagestring

    The source code language (NodeJS, Java, Python, Golang). Required if isContainerized is false.

    dockerfilePathstring

    Path to the Dockerfile in the repository (required if isContainerized is true).

    Possible values: <= 255 characters

    numReplicasnumberrequired

    Number of replicas to be created.

    Possible values: >= 0 and <= 10

    portsnumber[]required

    Array of ports to be used (numbers only).

    Possible values: >= 1

    templateVariables object[]

    Array of variables to be used in the template.

  • Array [
  • namestring

    Name of the variable.

    valuestring

    Value of the variable. Null if secretVariableId is present.

    encryptedboolean

    Indicates if the variable is encrypted, only when secretVariableId is not provided.

    secretVariableIdstring

    ID of the secret variable. Only if value has no value.

  • ]
  • trafficstringrequired

    Type of traffic. Must be "internal" or "external".

    instanceTypeIdstringrequired

    ID of the instance type. Must be a valid UUID.

    repositoryNamestringrequired

    Name of the repository. Must be a non-empty string.

    oneOf

Responses

Success

Schema
    successboolean
    Default value: true
    timestampstring
    Default value: 2024-01-01T00:00:00.000Z
    statusCodenumber
    Default value: 200
    statusTextstring
    Default value: Success
    messagestring
    Default value: Template updated successfully
    localizationstring
    Default value: someone-method:success
    data object
    idstring
    projectIdstring
    namestring
    gitUrlstring
    dockerfilePathstring
    portsinteger[]
    numReplicasinteger
    trafficstring
    repositoryNamestring
    createdAtdate-time
    updatedAtdate-timenullable
    integrations object
    idstring
    namestring
    workspacestring
    providerNamestring
    workspaceTypestring
    instanceTypes object
    idstring
    namestring
    maxCpustring
    maxRamstring
    categorystring
    requestCpustring
    requestRamstring
    templateVariables object[]
  • Array [
  • namestring
    valuestring
    secretsVariablesobject
    encryptedboolean
  • ]

Authorization: x-api-key

name: x-api-keytype: apiKeyin: header
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Put, "undefined/functions/v1/templates/:templateIdentifier");
request.Headers.Add("Accept", "application/json");
request.Headers.Add("x-api-key", "<x-api-key>");
var content = new StringContent("{\n \"gitIntegrationId\": \"string\",\n \"name\": \"string\",\n \"gitUrl\": \"string\",\n \"isContainerized\": true,\n \"sourceCodeLanguage\": \"string\",\n \"dockerfilePath\": \"string\",\n \"numReplicas\": 0,\n \"ports\": [\n 0\n ],\n \"templateVariables\": [\n {\n \"name\": \"string\",\n \"value\": \"string\",\n \"encrypted\": true,\n \"secretVariableId\": \"string\"\n }\n ],\n \"traffic\": \"string\",\n \"instanceTypeId\": \"string\",\n \"repositoryName\": \"string\"\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Request Collapse all
Base URL
undefined/functions/v1
Auth
Parameters
— pathrequired
— header
— header
— header
Body required
{
  "gitIntegrationId": "string",
  "name": "string",
  "gitUrl": "string",
  "isContainerized": true,
  "sourceCodeLanguage": "string",
  "dockerfilePath": "string",
  "numReplicas": 0,
  "ports": [
    0
  ],
  "templateVariables": [
    {
      "name": "string",
      "value": "string",
      "encrypted": true,
      "secretVariableId": "string"
    }
  ],
  "traffic": "string",
  "instanceTypeId": "string",
  "repositoryName": "string"
}
ResponseClear

Click the Send API Request button above and see the response here!