Get project containers
Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.
Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.
This endpoint returns detailed information about each container including their current status, port mappings, and runtime configuration.
Use this to monitor the health and state of all services within your Docker Compose project.
API Token authentication
Virtual Machine ID
1268054Docker Compose project name using alphanumeric characters, dashes, and underscores only
my-docker-projectSuccess response
Unique container identifier (short form of Docker container ID)
bbd4c89e850dContainer name as defined in docker-compose or assigned by Docker
nginxDocker image name and tag used to create this container
nginx:latestCommand being executed inside the container (may be truncated with ...)
/docker-entrypoint.sh nginx -g daemon off;Human-readable container status including uptime, exit codes, or error information
Up 4 hoursProgrammatic container lifecycle state for automated processing
runningPossible values: Container health status
healthyPossible values: Real-time resource usage statistics (only available for running containers)
Unauthenticated response
Validation error response
Error response
GET /api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/containers HTTP/1.1
Host: developers.hostinger.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
[
{
"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?