Projects
Update a project
Update project repositories, setup script, agent instructions, environment variables, VM sizes and defaults; enable or pause scheduled builds or the warm pool; rename or customize its appearance.
PATCH
/
v1
/
projects
/
{projectId}
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const project = await client.projects.update('projectId', {});use tembo_rs::*;
let client = Tembo::from_env()?;
let response = client
.projects()
.update("example", ProjectsUpdateBody::new())
.send()
.await?;
curl --request PATCH \
--url https://api.tembo.io/v1/projects/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": [
"<string>"
],
"agentInstructions": "<string>",
"includeDeps": true,
"includeSkills": true,
"resourceSettings": {
"automaticSizing": true
},
"defaultForSizes": [],
"environmentVariables": {},
"schedule": {
"cron": "<string>",
"enabled": true,
"timezone": "<string>"
},
"sizes": [],
"warmPoolSchedule": {
"timezone": "<string>",
"days": [
3
],
"startTime": "<string>",
"endTime": "<string>"
},
"warmPoolEnabled": true
}
'import requests
url = "https://api.tembo.io/v1/projects/{projectId}"
payload = {
"description": "<string>",
"name": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": ["<string>"],
"agentInstructions": "<string>",
"includeDeps": True,
"includeSkills": True,
"resourceSettings": { "automaticSizing": True },
"defaultForSizes": [],
"environmentVariables": {},
"schedule": {
"cron": "<string>",
"enabled": True,
"timezone": "<string>"
},
"sizes": [],
"warmPoolSchedule": {
"timezone": "<string>",
"days": [3],
"startTime": "<string>",
"endTime": "<string>"
},
"warmPoolEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
name: '<string>',
setupScript: '<string>',
codeRepositoryIds: ['<string>'],
agentInstructions: '<string>',
includeDeps: true,
includeSkills: true,
resourceSettings: {automaticSizing: true},
defaultForSizes: [],
environmentVariables: {},
schedule: {cron: '<string>', enabled: true, timezone: '<string>'},
sizes: [],
warmPoolSchedule: {timezone: '<string>', days: [3], startTime: '<string>', endTime: '<string>'},
warmPoolEnabled: true
})
};
fetch('https://api.tembo.io/v1/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tembo.io/v1/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'name' => '<string>',
'setupScript' => '<string>',
'codeRepositoryIds' => [
'<string>'
],
'agentInstructions' => '<string>',
'includeDeps' => true,
'includeSkills' => true,
'resourceSettings' => [
'automaticSizing' => true
],
'defaultForSizes' => [
],
'environmentVariables' => [
],
'schedule' => [
'cron' => '<string>',
'enabled' => true,
'timezone' => '<string>'
],
'sizes' => [
],
'warmPoolSchedule' => [
'timezone' => '<string>',
'days' => [
3
],
'startTime' => '<string>',
'endTime' => '<string>'
],
'warmPoolEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tembo.io/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.tembo.io/v1/projects/{projectId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"setupScript": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"activeSnapshots": [
{
"id": "<string>",
"size": "nano",
"builtAt": "2023-11-07T05:31:56Z"
}
],
"resourceSettings": {
"automaticSizing": true,
"allocation": {
"memoryMinMb": 123,
"memoryMaxMb": 123,
"diskSizeGb": 123,
"cpuMin": 123,
"cpuMax": 123
}
},
"agentInstructions": "<string>",
"codeRepositoryIds": [
"<string>"
],
"color": "neutral",
"defaultForSizes": [
"nano"
],
"icon": "folder",
"onboardingDefault": true,
"sizes": [
"nano"
],
"warmPoolEnabled": true,
"warmPoolSchedule": {
"timezone": "<string>",
"days": [
3
],
"startTime": "<string>",
"endTime": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Response
Update a project
Was this page helpful?
⌘I
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const project = await client.projects.update('projectId', {});use tembo_rs::*;
let client = Tembo::from_env()?;
let response = client
.projects()
.update("example", ProjectsUpdateBody::new())
.send()
.await?;
curl --request PATCH \
--url https://api.tembo.io/v1/projects/{projectId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"description": "<string>",
"name": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": [
"<string>"
],
"agentInstructions": "<string>",
"includeDeps": true,
"includeSkills": true,
"resourceSettings": {
"automaticSizing": true
},
"defaultForSizes": [],
"environmentVariables": {},
"schedule": {
"cron": "<string>",
"enabled": true,
"timezone": "<string>"
},
"sizes": [],
"warmPoolSchedule": {
"timezone": "<string>",
"days": [
3
],
"startTime": "<string>",
"endTime": "<string>"
},
"warmPoolEnabled": true
}
'import requests
url = "https://api.tembo.io/v1/projects/{projectId}"
payload = {
"description": "<string>",
"name": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": ["<string>"],
"agentInstructions": "<string>",
"includeDeps": True,
"includeSkills": True,
"resourceSettings": { "automaticSizing": True },
"defaultForSizes": [],
"environmentVariables": {},
"schedule": {
"cron": "<string>",
"enabled": True,
"timezone": "<string>"
},
"sizes": [],
"warmPoolSchedule": {
"timezone": "<string>",
"days": [3],
"startTime": "<string>",
"endTime": "<string>"
},
"warmPoolEnabled": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
description: '<string>',
name: '<string>',
setupScript: '<string>',
codeRepositoryIds: ['<string>'],
agentInstructions: '<string>',
includeDeps: true,
includeSkills: true,
resourceSettings: {automaticSizing: true},
defaultForSizes: [],
environmentVariables: {},
schedule: {cron: '<string>', enabled: true, timezone: '<string>'},
sizes: [],
warmPoolSchedule: {timezone: '<string>', days: [3], startTime: '<string>', endTime: '<string>'},
warmPoolEnabled: true
})
};
fetch('https://api.tembo.io/v1/projects/{projectId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.tembo.io/v1/projects/{projectId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'description' => '<string>',
'name' => '<string>',
'setupScript' => '<string>',
'codeRepositoryIds' => [
'<string>'
],
'agentInstructions' => '<string>',
'includeDeps' => true,
'includeSkills' => true,
'resourceSettings' => [
'automaticSizing' => true
],
'defaultForSizes' => [
],
'environmentVariables' => [
],
'schedule' => [
'cron' => '<string>',
'enabled' => true,
'timezone' => '<string>'
],
'sizes' => [
],
'warmPoolSchedule' => [
'timezone' => '<string>',
'days' => [
3
],
'startTime' => '<string>',
'endTime' => '<string>'
],
'warmPoolEnabled' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.tembo.io/v1/projects/{projectId}"
payload := strings.NewReader("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.tembo.io/v1/projects/{projectId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/projects/{projectId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"description\": \"<string>\",\n \"name\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"resourceSettings\": {\n \"automaticSizing\": true\n },\n \"defaultForSizes\": [],\n \"environmentVariables\": {},\n \"schedule\": {\n \"cron\": \"<string>\",\n \"enabled\": true,\n \"timezone\": \"<string>\"\n },\n \"sizes\": [],\n \"warmPoolSchedule\": {\n \"timezone\": \"<string>\",\n \"days\": [\n 3\n ],\n \"startTime\": \"<string>\",\n \"endTime\": \"<string>\"\n },\n \"warmPoolEnabled\": true\n}"
response = http.request(request)
puts response.read_body{
"createdAt": "2023-11-07T05:31:56Z",
"description": "<string>",
"id": "<string>",
"name": "<string>",
"setupScript": "<string>",
"updatedAt": "2023-11-07T05:31:56Z",
"activeSnapshots": [
{
"id": "<string>",
"size": "nano",
"builtAt": "2023-11-07T05:31:56Z"
}
],
"resourceSettings": {
"automaticSizing": true,
"allocation": {
"memoryMinMb": 123,
"memoryMaxMb": 123,
"diskSizeGb": 123,
"cpuMin": 123,
"cpuMax": 123
}
},
"agentInstructions": "<string>",
"codeRepositoryIds": [
"<string>"
],
"color": "neutral",
"defaultForSizes": [
"nano"
],
"icon": "folder",
"onboardingDefault": true,
"sizes": [
"nano"
],
"warmPoolEnabled": true,
"warmPoolSchedule": {
"timezone": "<string>",
"days": [
3
],
"startTime": "<string>",
"endTime": "<string>"
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}