Update an template
Update an template
PUTundefined/functions/v1/templates/:templateIdentifier
Update an template
Request
Path Parameters
The ID or Name of the template
Header Parameters
The ID of the organization (this parameter is not required when using API key authorization)
The ID of the project (Use this if you are not going to use the X-Project-Name)
The Name of the project (Use this if you are not going to use the X-Project-Id)
- application/json
Bodyrequired
Must have the UUID of an existing integration linked to the same project and organization where the template will be created.
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]+)*$
URL of the repository to be used.
Indicates if the app is containerized.
The source code language (NodeJS, Java, Python, Golang). Required if isContainerized is false.
Path to the Dockerfile in the repository (required if isContainerized is true).
Possible values: <= 255 characters
Number of replicas to be created.
Possible values: >= 0
and <= 10
Array of ports to be used (numbers only).
Possible values: >= 1
templateVariables object[]
Type of traffic. Must be "internal" or "external".
ID of the instance type. Must be a valid UUID.
Name of the repository. Must be a non-empty string.
Responses
- 200
- 400
- 401
- 403
Success
- application/json
- Schema
- Example (auto)
Schema
true
2024-01-01T00:00:00.000Z
200
Success
Template updated successfully
someone-method:success
data object
{
"success": true,
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 200,
"statusText": "Success",
"message": "Template updated successfully",
"localization": "someone-method:success",
"data": {
"id": "string",
"projectId": "string",
"name": "string",
"gitUrl": "string",
"dockerfilePath": "string",
"ports": [
0
],
"numReplicas": 0,
"traffic": "string",
"repositoryName": "string",
"createdAt": "2024-07-29T15:51:28.071Z",
"updatedAt": "2024-07-29T15:51:28.071Z",
"integrations": {
"id": "string",
"name": "string",
"workspace": "string",
"providerName": "string",
"workspaceType": "string"
},
"instanceTypes": {
"id": "string",
"name": "string",
"maxCpu": "string",
"maxRam": "string",
"category": "string",
"requestCpu": "string",
"requestRam": "string"
},
"templateVariables": [
{
"name": "string",
"value": "string",
"secretsVariables": {},
"encrypted": true
}
]
}
}
Bad Request
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
400
Bad Request
Message Error
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 400,
"statusText": "Bad Request",
"message": "Message Error",
"localization": "someone-method:error"
}
Unauthorized
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
401
Unauthorized
Message Unauthorized
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 401,
"statusText": "Unauthorized",
"message": "Message Unauthorized",
"localization": "someone-method:error"
}
Forbidden
- application/json
- Schema
- Example (auto)
Schema
false
null
2024-01-01T00:00:00.000Z
403
Forbidden
Message Forbidden
someone-method:error
{
"success": false,
"data": {},
"timestamp": "2024-01-01T00:00:00.000Z",
"statusCode": 403,
"statusText": "Forbidden",
"message": "Message Forbidden",
"localization": "someone-method:error"
}
Authorization: x-api-key
name: x-api-keytype: apiKeyin: header
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
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());