Añadir miembro al stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "<string>",
"resource_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: '<string>', resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/members"
payload = {
"resource_type": "<string>",
"resource_id": "<string>"
}
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/{stack_id}/members"
payload := strings.NewReader("{\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\"\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))
}Miembros
Añadir miembro al stack
Incorpora a un stack una aplicación o base de datos que ya tienes, con conexiones opcionales.
POST
/
v1
/
stacks
/
{stack_id}
/
members
Añadir miembro al stack
curl --request POST \
--url https://api.vertracloud.app/v1/stacks/{stack_id}/members \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"resource_type": "<string>",
"resource_id": "<string>"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({resource_type: '<string>', resource_id: '<string>'})
};
fetch('https://api.vertracloud.app/v1/stacks/{stack_id}/members', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.vertracloud.app/v1/stacks/{stack_id}/members"
payload = {
"resource_type": "<string>",
"resource_id": "<string>"
}
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/{stack_id}/members"
payload := strings.NewReader("{\n \"resource_type\": \"<string>\",\n \"resource_id\": \"<string>\"\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))
}Añade una aplicación o una base de datos al stack. Debe pertenecer a la misma cuenta o workspace que el stack y no estar en otro stack. Requiere el scope
stacks:write cuando se llama con una clave de API.
string
requerido
El ID del stack.
string
El workspace al que pertenece el stack, cuando actúas sobre él como propietario del workspace.
string
requerido
application o database.string
requerido
El ID de la aplicación o de la base de datos.
object[]
Conexiones que se crean entre el nuevo miembro y las aplicaciones del stack. Puede estar vacío. Cada elemento tiene
app_id, exactamente uno de database_id o target_app_id, y un env_map opcional (consulta Crear conexión).Response
El stack actualizado conrestart_required y apps_to_restart, como en Crear stack. Reinicia las aplicaciones listadas para que lean las nuevas variables.
Errores
| Estado | Código | Cuándo |
|---|---|---|
| 409 | STACK_MEMBER_CONFLICT | El recurso ya está en otro stack, o no está en la misma cuenta o workspace. |
| 403 | WORKSPACE_OWNER_ONLY | Eres miembro del workspace, no su propietario. |
| 404 | STACK_NOT_FOUND | El stack no existe o pertenece a otra cuenta. |
| 404 | APP_NOT_FOUND | La aplicación no existe o no es tuya. |
| 404 | DATABASE_NOT_FOUND | La base de datos no existe o no es tuya. |
Última modificación el 28 de octubre de 2026