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

Get project list

Retrieves a list of all Docker Compose projects currently deployed on the virtual machine.

Get project list

get

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.

Authorizations
AuthorizationstringRequired

API Token authentication

Path parameters
virtualMachineIdintegerRequired

Virtual Machine ID

Example: 1268054
Responses
200

Success response

application/json
namestringOptional

Docker Compose project name (derived from directory name or compose file)

Example: my-project
statusstringOptional

Raw output from docker compose ps command showing service count and states

Example: running(2)
statestring · enumOptional

Derived project state parsed from the raw docker compose status

Example: runningPossible values:
pathstringOptional

Full filesystem path to the docker-compose.yml file

Example: /docker/my-project/docker-compose.yaml
get/api/vps/v1/virtual-machines/{virtualMachineId}/docker
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?