Update project containers
curl --request POST \
--url https://api.tinfoil.sh/api/containers/projects/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>",
"hold": true,
"mark_latest_release": true,
"instance_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"confirm_downtime": true
}
'import requests
url = "https://api.tinfoil.sh/api/containers/projects/{id}/update"
payload = {
"tag": "<string>",
"hold": True,
"mark_latest_release": True,
"instance_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"confirm_downtime": 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({
tag: '<string>',
hold: true,
mark_latest_release: true,
instance_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
confirm_downtime: true
})
};
fetch('https://api.tinfoil.sh/api/containers/projects/{id}/update', 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.tinfoil.sh/api/containers/projects/{id}/update",
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([
'tag' => '<string>',
'hold' => true,
'mark_latest_release' => true,
'instance_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'confirm_downtime' => 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.tinfoil.sh/api/containers/projects/{id}/update"
payload := strings.NewReader("{\n \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\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.tinfoil.sh/api/containers/projects/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tinfoil.sh/api/containers/projects/{id}/update")
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 \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "updating",
"error": "<string>",
"container": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"repo": "<string>",
"config_name": "<string>",
"source": "github",
"current_tag": "<string>",
"status": "created",
"host_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"cpus": 123,
"gpus": 123,
"memory_mb": 123,
"config": "<string>",
"variables": "aSDinaTvuI8gbWludGxpZnk=",
"secrets": [
"<string>"
],
"ssh_keys": [
"<string>"
],
"stale_secrets": [
"<string>"
],
"debug": true,
"held": true,
"github_app_connected": true,
"repo_status": "active",
"update_tag": "<string>",
"update_status": "<string>",
"update_type": "blue_green",
"internal_domain": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deploy_started_at": "2023-11-07T05:31:56Z",
"deploy_completed_at": "2023-11-07T05:31:56Z",
"update_started_at": "2023-11-07T05:31:56Z",
"update_completed_at": "2023-11-07T05:31:56Z",
"boot_stages": "<unknown>",
"update_boot_stages": "<unknown>",
"error_message": "<string>",
"mark_latest_release": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_deploy_attempt_tag": "<string>",
"last_deploy_attempt_error": "<string>",
"last_deploy_attempt_at": "2023-11-07T05:31:56Z",
"sandbox": true,
"purpose": "production",
"network_policy": {
"public": true,
"egress_mode": "restricted",
"egress": [
{
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"port": 32768,
"alias": {
"ip": "<string>",
"port": 32768,
"target": "<string>"
}
}
],
"destinations": [
{
"cidr": "<string>",
"protocol": "<string>",
"port": 123,
"name": "<string>"
}
]
},
"owner_key_mode": "tmk",
"update_strategy": "blue_green",
"connections": {
"production": {
"url": "<string>",
"repo": "<string>",
"tag": "<string>",
"config_name": "<string>",
"config_digest": "<string>"
},
"review": {
"url": "<string>",
"repo": "<string>",
"tag": "<string>",
"config_name": "<string>",
"config_digest": "<string>"
}
},
"owner_public_key": "<string>",
"clerk_user_id": "<string>",
"clerk_org_id": "<string>",
"disable_cc_mode": true,
"display_order": 123,
"tinfoild_deployment_id": "<string>",
"update_config": {},
"update_deployment_id": "<string>",
"ssh_port": 123,
"update_ssh_port": 123,
"supports_version_change": true,
"host_name": "<string>",
"update_host_name": "<string>",
"host_gpu_type": "<string>",
"host_cpu_type": "<string>",
"volumes": {},
"volume_slots": [
{
"name": "<string>",
"size": "<string>",
"key_secret": "<string>"
}
],
"object_storage": {
"id": "<string>",
"bucket_url": "<string>",
"credentials_url": "<string>"
}
}
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Projects
Update project containers
Updates all or the selected running containers of a project to a tag and reports a result per container. If any container would be replaced, nothing changes without confirm_downtime.
POST
/
api
/
containers
/
projects
/
{id}
/
update
Update project containers
curl --request POST \
--url https://api.tinfoil.sh/api/containers/projects/{id}/update \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"tag": "<string>",
"hold": true,
"mark_latest_release": true,
"instance_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"confirm_downtime": true
}
'import requests
url = "https://api.tinfoil.sh/api/containers/projects/{id}/update"
payload = {
"tag": "<string>",
"hold": True,
"mark_latest_release": True,
"instance_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"confirm_downtime": 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({
tag: '<string>',
hold: true,
mark_latest_release: true,
instance_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
confirm_downtime: true
})
};
fetch('https://api.tinfoil.sh/api/containers/projects/{id}/update', 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.tinfoil.sh/api/containers/projects/{id}/update",
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([
'tag' => '<string>',
'hold' => true,
'mark_latest_release' => true,
'instance_ids' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'confirm_downtime' => 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.tinfoil.sh/api/containers/projects/{id}/update"
payload := strings.NewReader("{\n \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\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.tinfoil.sh/api/containers/projects/{id}/update")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.tinfoil.sh/api/containers/projects/{id}/update")
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 \"tag\": \"<string>\",\n \"hold\": true,\n \"mark_latest_release\": true,\n \"instance_ids\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"confirm_downtime\": true\n}"
response = http.request(request)
puts response.read_body{
"results": [
{
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "updating",
"error": "<string>",
"container": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"repo": "<string>",
"config_name": "<string>",
"source": "github",
"current_tag": "<string>",
"status": "created",
"host_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"domain": "<string>",
"cpus": 123,
"gpus": 123,
"memory_mb": 123,
"config": "<string>",
"variables": "aSDinaTvuI8gbWludGxpZnk=",
"secrets": [
"<string>"
],
"ssh_keys": [
"<string>"
],
"stale_secrets": [
"<string>"
],
"debug": true,
"held": true,
"github_app_connected": true,
"repo_status": "active",
"update_tag": "<string>",
"update_status": "<string>",
"update_type": "blue_green",
"internal_domain": "<string>",
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"deploy_started_at": "2023-11-07T05:31:56Z",
"deploy_completed_at": "2023-11-07T05:31:56Z",
"update_started_at": "2023-11-07T05:31:56Z",
"update_completed_at": "2023-11-07T05:31:56Z",
"boot_stages": "<unknown>",
"update_boot_stages": "<unknown>",
"error_message": "<string>",
"mark_latest_release": true,
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_deploy_attempt_tag": "<string>",
"last_deploy_attempt_error": "<string>",
"last_deploy_attempt_at": "2023-11-07T05:31:56Z",
"sandbox": true,
"purpose": "production",
"network_policy": {
"public": true,
"egress_mode": "restricted",
"egress": [
{
"container_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"port": 32768,
"alias": {
"ip": "<string>",
"port": 32768,
"target": "<string>"
}
}
],
"destinations": [
{
"cidr": "<string>",
"protocol": "<string>",
"port": 123,
"name": "<string>"
}
]
},
"owner_key_mode": "tmk",
"update_strategy": "blue_green",
"connections": {
"production": {
"url": "<string>",
"repo": "<string>",
"tag": "<string>",
"config_name": "<string>",
"config_digest": "<string>"
},
"review": {
"url": "<string>",
"repo": "<string>",
"tag": "<string>",
"config_name": "<string>",
"config_digest": "<string>"
}
},
"owner_public_key": "<string>",
"clerk_user_id": "<string>",
"clerk_org_id": "<string>",
"disable_cc_mode": true,
"display_order": 123,
"tinfoild_deployment_id": "<string>",
"update_config": {},
"update_deployment_id": "<string>",
"ssh_port": 123,
"update_ssh_port": 123,
"supports_version_change": true,
"host_name": "<string>",
"update_host_name": "<string>",
"host_gpu_type": "<string>",
"host_cpu_type": "<string>",
"volumes": {},
"volume_slots": [
{
"name": "<string>",
"size": "<string>",
"key_secret": "<string>"
}
],
"object_storage": {
"id": "<string>",
"bucket_url": "<string>",
"credentials_url": "<string>"
}
}
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Body
application/json
Was this page helpful?