Transform Folder into Stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/transform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": "<string>",
"inject_variables": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: '<string>', inject_variables: true})
};
fetch('https://api.vertracloud.app/v1/stacks/transform', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/transform"
payload = {
"folder_id": "<string>",
"inject_variables": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/transform"
payload := strings.NewReader("{\n \"folder_id\": \"<string>\",\n \"inject_variables\": 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))
}Stacks
Transform Folder into Stack
Turns the applications and databases of a folder into a stack, optionally injecting the connection variables.
POST
/
v1
/
stacks
/
transform
Transform Folder into Stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/transform \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"folder_id": "<string>",
"inject_variables": true
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({folder_id: '<string>', inject_variables: true})
};
fetch('https://api.vertracloud.app/v1/stacks/transform', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/transform"
payload = {
"folder_id": "<string>",
"inject_variables": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.vertracloud.app/v1/stacks/transform"
payload := strings.NewReader("{\n \"folder_id\": \"<string>\",\n \"inject_variables\": 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))
}Creates a stack from every application and database in a folder. The folder stays. With
inject_variables: true the platform adds the connection variables and the certificates to the applications; with false the applications are assumed to connect on their own. Needs the stacks:write scope when called with an API key.
string
required
The folder to take the resources from.
string
The workspace of the folder. Absent means your own folder.
string
The stack name. Optional.
boolean
required
Whether the platform creates the connections and injects the variables and certificates.
object[]
Connections to create when
inject_variables is true. Each item has app_id, database_id and an optional env_map (see Create Connection).Response
201 with the stack, the same as Create Stack, including restart_required and apps_to_restart.
Errors
| Status | Code | When |
|---|---|---|
| 400 | STACK_TRANSFORM_EMPTY | The folder has no application, or no database, to put in a stack. |
| 409 | STACK_MEMBER_CONFLICT | A resource of the folder is already in another stack. |
| 403 | WORKSPACE_OWNER_ONLY | You are a workspace member, not the owner. |
Last modified on October 28, 2026