For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get project containers

Retrieves a list of all containers belonging to a specific Docker Compose project on the virtual machine.

Get project containers

get

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
virtualMachineIdintegerRequired

Virtual Machine ID

Example: 1268054
projectNamestring · min: 3 · max: 64Required

Docker Compose project name using alphanumeric characters, dashes, and underscores only

Example: my-docker-project
Responses
200

Success response

application/json
idstringOptional

Unique container identifier (short form of Docker container ID)

Example: bbd4c89e850d
namestringOptional

Container name as defined in docker-compose or assigned by Docker

Example: nginx
imagestringOptional

Docker image name and tag used to create this container

Example: nginx:latest
commandstringOptional

Command being executed inside the container (may be truncated with ...)

Example: /docker-entrypoint.sh nginx -g daemon off;
statusstringOptional

Human-readable container status including uptime, exit codes, or error information

Example: Up 4 hours
statestring · enumOptional

Programmatic container lifecycle state for automated processing

Example: runningPossible values:
healthstring · enumOptional

Container health status

Example: healthyPossible values:
statsone of · nullableOptional

Real-time resource usage statistics (only available for running containers)

get/api/vps/v1/virtual-machines/{virtualMachineId}/docker/{projectName}/containers
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?