Cloud API
Containers
The containers a Docker runtime keeps running on its server, as they are listed.
Base URL https://cloud.yet.com.br/v1
The object
idstring- Its id.
runtime_idstring- Its Docker runtime.
namestring- Its name.
imagestring- The image it runs.
env{ name, value, secret }[]- Its variables; secrets are never shown back.
replicasnumber- How many run.
disabledboolean- Kept, not running.
statestring- How it runs, as Docker says.
List containers
GET
/v1/runtimes/{id}/containersThe runtime’s containers.
Request
curl https://cloud.yet.com.br/v1/runtimes/{id}/containers \
-H "Authorization: Bearer $YET_API_KEY"Create a container
POST
/v1/runtimes/{id}/containersRun at the agent’s next look.
Who: Cloud admin
Body
namestringrequired- Its name.
imagestringrequired- The image.
commandstring[]- Its command.
env{ name, value, secret }[]- Its variables.
privilegedboolean- Whether it runs privileged.
volumesstring[]host:containermounts.replicasnumber1unless set.
Request
curl -X POST https://cloud.yet.com.br/v1/runtimes/{id}/containers \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"name": "ci",
"image": "ghcr.io/acme/ci:latest",
"replicas": 2
}'Change a container
PUT
/v1/runtimes/{id}/containers/{container}The whole of it, as on creation.
Who: Cloud admin
Request
curl -X PUT https://cloud.yet.com.br/v1/runtimes/{id}/containers/{container} \
-H "Authorization: Bearer $YET_API_KEY"Turn a container off or on
PATCH
/v1/runtimes/{id}/containers/{container}Off, it is kept and stops.
Who: Cloud admin
Body
enabledbooleanrequired- Whether it runs.
Request
curl -X PATCH https://cloud.yet.com.br/v1/runtimes/{id}/containers/{container} \
-H "Authorization: Bearer $YET_API_KEY" \
-d '{
"enabled": false
}'Delete a container
DELETE
/v1/runtimes/{id}/containers/{container}It stops, and is gone.
Who: Cloud admin
Request
curl -X DELETE https://cloud.yet.com.br/v1/runtimes/{id}/containers/{container} \
-H "Authorization: Bearer $YET_API_KEY"Response · 204 No Content