Restart Application
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{id}/restart \
--header 'Content-Type: application/json' \
--data '
{
"cleanup_old_runtime_language": "<string>",
"reinstall_dependencies": true,
"force_build": true
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/restart"
payload = {
"cleanup_old_runtime_language": "<string>",
"reinstall_dependencies": True,
"force_build": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cleanup_old_runtime_language: '<string>',
reinstall_dependencies: true,
force_build: true
})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/restart', 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.vertracloud.app/v1/apps/{id}/restart",
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([
'cleanup_old_runtime_language' => '<string>',
'reinstall_dependencies' => true,
'force_build' => true
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/apps/{id}/restart"
payload := strings.NewReader("{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/apps/{id}/restart")
.header("Content-Type", "application/json")
.body("{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}"
response = http.request(request)
puts response.read_body{
"response": {
"status": "success"
}
}
Applications
Restart Application
Restarts an application by its ID.
POST
/
v1
/
apps
/
{id}
/
restart
Restart Application
curl --request POST \
--url https://api.vertracloud.app/v1/apps/{id}/restart \
--header 'Content-Type: application/json' \
--data '
{
"cleanup_old_runtime_language": "<string>",
"reinstall_dependencies": true,
"force_build": true
}
'import requests
url = "https://api.vertracloud.app/v1/apps/{id}/restart"
payload = {
"cleanup_old_runtime_language": "<string>",
"reinstall_dependencies": True,
"force_build": True
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
cleanup_old_runtime_language: '<string>',
reinstall_dependencies: true,
force_build: true
})
};
fetch('https://api.vertracloud.app/v1/apps/{id}/restart', 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.vertracloud.app/v1/apps/{id}/restart",
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([
'cleanup_old_runtime_language' => '<string>',
'reinstall_dependencies' => true,
'force_build' => true
]),
CURLOPT_HTTPHEADER => [
"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.vertracloud.app/v1/apps/{id}/restart"
payload := strings.NewReader("{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
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.vertracloud.app/v1/apps/{id}/restart")
.header("Content-Type", "application/json")
.body("{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vertracloud.app/v1/apps/{id}/restart")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"cleanup_old_runtime_language\": \"<string>\",\n \"reinstall_dependencies\": true,\n \"force_build\": true\n}"
response = http.request(request)
puts response.read_body{
"response": {
"status": "success"
}
}
string
required
The application ID to restart. If the application belongs to a workspace, pass its ID in the
workspace_id query parameter.string
If the application belongs to a workspace, the workspace’s ID. Required for workspace members acting on an application they don’t own.
string
Optional. One of
javascript, typescript, bun, python, static, php, go, ruby, java, rust. Any other value is rejected.Deletes the known artifact directories (e.g. node_modules, vendor, target) of the named language from the application’s volume before this restart reinstalls dependencies for its current language — reclaiming the disk quota those old artifacts held after a runtime change. It never touches project source files. Installing the current language’s dependencies already happens on its own on the first restart after a runtime change; this field only controls whether the previous language’s leftovers are cleaned up first.boolean
Optional. Reinstalls the application’s dependencies from scratch, ignoring the install cache — the equivalent of “Reinstall dependencies” in the dashboard’s file manager. Use it when a dependency folder is corrupted or a package was installed by hand and needs to go. Counts toward your plan’s hourly deploy limit.
boolean
Optional. Runs the application’s build command again even if no source file changed since the last build — the equivalent of “Force build” in the dashboard. Only meaningful when the application has a build command. Counts toward your plan’s hourly deploy limit.
The value must differ from the application’s current language. Sending the language the application already uses fails with
400 CLEANUP_LANGUAGE_SAME_AS_CURRENT — nothing is deleted.Response
object
The response containing the operation status.
Show Toggle object
Show Toggle object
string
The operation status (
success).{
"response": {
"status": "success"
}
}
Error Responses
string
The error code indicating the reason for the failure. Possible values:
APP_NOT_FOUND: The specified application does not exist.ACCESS_DENIED: The user does not have permission to act on the application.VALIDATION_ERROR:cleanup_old_runtime_languageis not one of the supported languages (400).CLEANUP_LANGUAGE_SAME_AS_CURRENT:cleanup_old_runtime_languagematches the application’s current language (400).DEPLOY_RATE_LIMITED:reinstall_dependenciesorforce_buildwas sent and the plan’s hourly deploy limit is exhausted (429);detailscarrieslimit,window_secondsandretry_after.APPLICATION_SHIELD_COOLDOWN: Vertra Shield temporarily paused the application; retry after the cooldown (403).OPERATION_IN_PROGRESS: Another lifecycle operation on the same application is already running (409). The container was not touched — wait a few seconds and retry. See Common Error Codes.
{
"code": "CLEANUP_LANGUAGE_SAME_AS_CURRENT"
}
{
"code": "OPERATION_IN_PROGRESS"
}
This route shares a budget of 10 requests per minute per application with
start and stop. With reinstall_dependencies or force_build, it also consumes one slot of your plan’s hourly deploy limit. See Rate Limiting.