Cloud API
Containers
The containers a Docker runtime keeps running on its server, as they are listed.
URL base https://cloud.yet.com.br/v1
As descrições dos endpoints estão em inglês.
O objeto
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.
Requisição
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.
Quem: Cloud admin
Corpo
namestringobrigatório- Its name.
imagestringobrigatório- The image.
commandstring[]- Its command.
env{ name, value, secret }[]- Its variables.
privilegedboolean- Whether it runs privileged.
volumesstring[]host:containermounts.replicasnumber1unless set.
Requisição
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.
Quem: Cloud admin
Requisição
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.
Quem: Cloud admin
Corpo
enabledbooleanobrigatório- Whether it runs.
Requisição
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.
Quem: Cloud admin
Requisição
curl -X DELETE https://cloud.yet.com.br/v1/runtimes/{id}/containers/{container} \
-H "Authorization: Bearer $YET_API_KEY"Resposta · 204 Sem conteúdo