Plan a project update
curl --request POST \
--url https://api.tinfoil.sh/api/containers/projects/{id}/update/plan \
--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/plan"
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/plan', 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/plan",
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/plan"
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/plan")
.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/plan")
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{
"read_only": true,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_release_tag": "<string>",
"eligible_count": 123,
"skipped_count": 123,
"failed_count": 123,
"results": [
{
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "planned",
"plan": {
"read_only": true,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"current": {
"tag": "<string>",
"cpus": 123,
"memory_mb": 123,
"gpus": 123
},
"target": {
"tag": "<string>",
"cpus": 123,
"memory_mb": 123,
"gpus": 123
},
"update_strategy": "blue_green",
"downtime_required": true,
"hold": true,
"hold_source": "project",
"hold_available": true,
"mark_latest_release": true,
"configuration_changes": {
"variables": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"secrets": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"ssh_keys": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"settings": [
"<string>"
],
"secrets_refreshed": [
"<string>"
]
},
"volume_data": "<string>",
"cost_estimate": {
"available": true,
"reason": "<string>"
},
"secret_delivery": {
"mode": "managed",
"managed_secrets": [
"<string>"
],
"external_secrets": [
"<string>"
],
"external_secrets_verified": true,
"keyserver_ignored_in_debug": true
},
"target_host_name": "<string>"
},
"error": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Projects
Plan a project update
Previews a project update per container without changing anything.
POST
/
api
/
containers
/
projects
/
{id}
/
update
/
plan
Plan a project update
curl --request POST \
--url https://api.tinfoil.sh/api/containers/projects/{id}/update/plan \
--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/plan"
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/plan', 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/plan",
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/plan"
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/plan")
.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/plan")
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{
"read_only": true,
"project_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"latest_release_tag": "<string>",
"eligible_count": 123,
"skipped_count": 123,
"failed_count": 123,
"results": [
{
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"status": "planned",
"plan": {
"read_only": true,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"current": {
"tag": "<string>",
"cpus": 123,
"memory_mb": 123,
"gpus": 123
},
"target": {
"tag": "<string>",
"cpus": 123,
"memory_mb": 123,
"gpus": 123
},
"update_strategy": "blue_green",
"downtime_required": true,
"hold": true,
"hold_source": "project",
"hold_available": true,
"mark_latest_release": true,
"configuration_changes": {
"variables": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"secrets": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"ssh_keys": {
"added": [
"<string>"
],
"changed": [
"<string>"
],
"removed": [
"<string>"
]
},
"settings": [
"<string>"
],
"secrets_refreshed": [
"<string>"
]
},
"volume_data": "<string>",
"cost_estimate": {
"available": true,
"reason": "<string>"
},
"secret_delivery": {
"mode": "managed",
"managed_secrets": [
"<string>"
],
"external_secrets": [
"<string>"
],
"external_secrets_verified": true,
"keyserver_ignored_in_debug": true
},
"target_host_name": "<string>"
},
"error": "<string>"
}
]
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "<string>",
"code": "<string>"
}Authorizations
Body
application/json
Response
Project update plan.
Was this page helpful?