Projects
Create a project
Create a reusable project environment.
POST
/
v1
/
projects
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const project = await client.projects.create({
name: 'x',
});use tembo_rs::*;
let client = Tembo::from_env()?;
let response = client
.projects()
.create(ProjectsCreateBody::new("x".to_string()))
.send()
.await?;
curl --request POST \
--url https://api.tembo.io/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": [
"<string>"
],
"agentInstructions": "<string>",
"includeDeps": true,
"includeSkills": true,
"onboardingDefault": true,
"runNow": true,
"sizes": [],
"resourceSettings": {
"automaticSizing": true
}
}
'import requests
url = "https://api.tembo.io/v1/projects"
payload = {
"name": "<string>",
"description": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": ["<string>"],
"agentInstructions": "<string>",
"includeDeps": True,
"includeSkills": True,
"onboardingDefault": True,
"runNow": True,
"sizes": [],
"resourceSettings": { "automaticSizing": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
setupScript: '<string>',
codeRepositoryIds: ['<string>'],
agentInstructions: '<string>',
includeDeps: true,
includeSkills: true,
onboardingDefault: true,
runNow: true,
sizes: [],
resourceSettings: {automaticSizing: true}
})
};
fetch('https://api.tembo.io/v1/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'setupScript' => '<string>',
'codeRepositoryIds' => [
'<string>'
],
'agentInstructions' => '<string>',
'includeDeps' => true,
'includeSkills' => true,
'onboardingDefault' => true,
'runNow' => true,
'sizes' => [
],
'resourceSettings' => [
'automaticSizing' => 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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.tembo.io/v1/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"jobIds": [
"<string>"
],
"project": {
"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
Was this page helpful?
⌘I
TypeScript SDK
import Tembo from '@tembo-io/sdk';
const client = new Tembo();
const project = await client.projects.create({
name: 'x',
});use tembo_rs::*;
let client = Tembo::from_env()?;
let response = client
.projects()
.create(ProjectsCreateBody::new("x".to_string()))
.send()
.await?;
curl --request POST \
--url https://api.tembo.io/v1/projects \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": [
"<string>"
],
"agentInstructions": "<string>",
"includeDeps": true,
"includeSkills": true,
"onboardingDefault": true,
"runNow": true,
"sizes": [],
"resourceSettings": {
"automaticSizing": true
}
}
'import requests
url = "https://api.tembo.io/v1/projects"
payload = {
"name": "<string>",
"description": "<string>",
"setupScript": "<string>",
"codeRepositoryIds": ["<string>"],
"agentInstructions": "<string>",
"includeDeps": True,
"includeSkills": True,
"onboardingDefault": True,
"runNow": True,
"sizes": [],
"resourceSettings": { "automaticSizing": True }
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
setupScript: '<string>',
codeRepositoryIds: ['<string>'],
agentInstructions: '<string>',
includeDeps: true,
includeSkills: true,
onboardingDefault: true,
runNow: true,
sizes: [],
resourceSettings: {automaticSizing: true}
})
};
fetch('https://api.tembo.io/v1/projects', 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",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'setupScript' => '<string>',
'codeRepositoryIds' => [
'<string>'
],
'agentInstructions' => '<string>',
'includeDeps' => true,
'includeSkills' => true,
'onboardingDefault' => true,
'runNow' => true,
'sizes' => [
],
'resourceSettings' => [
'automaticSizing' => 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"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.tembo.io/v1/projects")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tembo.io/v1/projects")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"setupScript\": \"<string>\",\n \"codeRepositoryIds\": [\n \"<string>\"\n ],\n \"agentInstructions\": \"<string>\",\n \"includeDeps\": true,\n \"includeSkills\": true,\n \"onboardingDefault\": true,\n \"runNow\": true,\n \"sizes\": [],\n \"resourceSettings\": {\n \"automaticSizing\": true\n }\n}"
response = http.request(request)
puts response.read_body{
"jobIds": [
"<string>"
],
"project": {
"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>"
}