Cloud API
Applications
Base URL https://cloud.yet.com.br/v1
The object
idstring- Its id.
namespace_idstring- Its namespace.
namestring- Its name.
stagesstring[]- Its environments, in order.
subdomainstring- The name it answers at under its stages’ domains.
portnumber8080unless set.replicasnumber1unless set.envobject- Its variables, in every stage.
stage_envobject- Each stage’s own, by environment id.
repositorystringowner/nameon the company’s GitHub.auto_promotestring[]- Stages that promote to the next by themselves.
List namespaces
/v1/namespacesThe groups applications belong to.
curl https://cloud.yet.com.br/v1/namespaces \
-H "Authorization: Bearer $YET_API_KEY"Create a namespace
/v1/namespacesA group of applications: a product, a team.
Who: Developer everywhere, or admin
Body
namestringrequired- Its name.
curl -X POST https://cloud.yet.com.br/v1/namespaces \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"name": "shop"
}'List applications
/v1/applicationsThose in environments the key’s person sees.
curl https://cloud.yet.com.br/v1/applications \
-H "Authorization: Bearer $YET_API_KEY"Get an application
/v1/applications/{id}With each stage: what runs there, and its address.
curl https://cloud.yet.com.br/v1/applications/{id} \
-H "Authorization: Bearer $YET_API_KEY"Create an application
/v1/applicationsIn a namespace, with its stages.
Who: Developer everywhere, or admin
Body
namespace_idstringrequired- Its namespace.
namestringrequired- Its name.
stagesstring[]required- Its environments, in order, each on a runtime of its own.
repositorystring- Built from:
owner/name. branchstring- The branch whose pushes are built.
portnumber- The port it listens on.
replicasnumber- How many run in each stage.
envobject- Its variables.
curl -X POST https://cloud.yet.com.br/v1/applications \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"namespace_id": "ns_01J9",
"name": "api",
"stages": [
"en_01J9",
"en_02K4"
],
"repository": "acme/api",
"branch": "main",
"port": 3000
}'Change an application
/v1/applications/{id}Any of its fields; each given whole.
Who: Developer everywhere, or admin
curl -X PATCH https://cloud.yet.com.br/v1/applications/{id} \
-H "Authorization: Bearer $YET_API_KEY"Release an image
/v1/applications/{id}/releasesA numbered release of an image, deployed to the first stage.
Who: Developer in its first stage
Body
imagestringrequired- The image:
ghcr.io/acme/api:1.4.0.
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/releases \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"image": "ghcr.io/acme/api:1.4.0"
}'Promote
/v1/applications/{id}/promoteWhat runs in one stage, to the next.
Who: Developer in the next stage
Body
fromstringrequired- The stage it goes from.
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/promote \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"from": "en_01J9"
}'Delete an application
/v1/applications/{id}It stops running in every stage.
Who: Developer everywhere, or admin
curl -X DELETE https://cloud.yet.com.br/v1/applications/{id} \
-H "Authorization: Bearer $YET_API_KEY"Build now
/v1/applications/{id}/buildsFrom its repository’s branch, now — the release follows when it is built.
Who: Developer everywhere, or admin
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/builds \
-H "Authorization: Bearer $YET_API_KEY"Get a build
/v1/applications/{id}/builds/{build}The build, and how it ran on each runtime — its log among it.
curl https://cloud.yet.com.br/v1/applications/{id}/builds/{build} \
-H "Authorization: Bearer $YET_API_KEY"List its own databases
/v1/applications/{id}/resourcesThe databases of its own, beside it in each stage.
curl https://cloud.yet.com.br/v1/applications/{id}/resources \
-H "Authorization: Bearer $YET_API_KEY"Give it a database
/v1/applications/{id}/resourcesOf its own, beside it in each stage.
Who: Developer everywhere, or admin
Body
kindstringrequiredoverlite,postgresorredis.env_varstring- The variable it finds it in.
placementstring- Where it runs.
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/resources \
-H "Authorization: Bearer $YET_API_KEY"Remove its database
/v1/applications/{id}/resources/{resource}It stops; its volume stays.
Who: Developer everywhere, or admin
curl -X DELETE https://cloud.yet.com.br/v1/applications/{id}/resources/{resource} \
-H "Authorization: Bearer $YET_API_KEY"Attach a database
/v1/applications/{id}/attachmentsOne of its environments’ databases, handed in a variable.
Who: Developer everywhere, or admin
Body
resource_idstringrequired- The database.
env_varstringrequired- The variable.
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/attachments \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"resource_id": "db_01J9",
"env_var": "ORDERS_URL"
}'Detach a database
/v1/applications/{id}/attachments/{resource}The variable goes at the next deploy.
Who: Developer everywhere, or admin
curl -X DELETE https://cloud.yet.com.br/v1/applications/{id}/attachments/{resource} \
-H "Authorization: Bearer $YET_API_KEY"Open a session
/v1/applications/{id}/sessionsIts logs as they come, or a shell in a copy of it: answers with a WebSocket address, good for a moment.
Who: Developer everywhere, or admin
Body
kind"logs" | "shell"required- What to open.
environmentstringrequired- The stage.
podstring- One pod’s, for logs.
curl -X POST https://cloud.yet.com.br/v1/applications/{id}/sessions \
-H "Authorization: Bearer $YET_API_KEY"{
"id": "se_01J9",
"url": "wss://cloud.yet.com.br/sessions/se_01J9?ticket=…"
}