Get project list
Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.
Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.
This endpoint returns basic information about each project including name,
status, file path and list of containers with details about their names,
image, status, health and ports. Container stats are omitted in this
endpoint. If you need to get detailed information about container with
stats included, use the Get project containers endpoint.
Use this to get an overview of all Docker projects on your VPS instance.
API Token authentication
Virtual Machine ID
1268054Success response
Array of VPS.V1.DockerManager.ProjectResource
Docker Compose project name (derived from directory name or compose file)
my-projectRaw output from docker compose ps command showing service count and states
running(2)Derived project state parsed from the raw docker compose status
runningPossible values: Full filesystem path to the docker-compose.yml file
/docker/my-project/docker-compose.yamlUnauthenticated response
Validation error response
Error response
GET /api/vps/v1/virtual-machines/{virtualMachineId}/docker HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"name": "my-project",
"status": "running(2)",
"state": "running",
"path": "/docker/my-project/docker-compose.yaml",
"containers": [
{
"id": "bbd4c89e850d",
"name": "nginx",
"image": "nginx:latest",
"command": "/docker-entrypoint.sh nginx -g daemon off;",
"status": "Up 4 hours",
"state": "running",
"health": "healthy",
"ports": [
{
"type": "published",
"protocol": "tcp",
"host_ip": "0.0.0.0",
"host_port": 8080,
"container_port": 80,
"host_port_start": 1,
"host_port_end": 1,
"container_port_start": 1,
"container_port_end": 1
}
],
"stats": {
"cpu_percentage": 15.4,
"memory_percentage": 0.4,
"memory_used": 66532147.2,
"memory_total": 16771847290.88,
"net_in": 2110000,
"net_out": 30100
}
}
]
}
]Last updated
Was this helpful?