List containers
List all the docker containers on your server.
GET /api/servers/{server}/docker/containers
Example request:
curl -X GET "https://ploi.io/api/servers/{server}/docker/containers" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
Response
{
"data": [
{
"id": 1,
"status": "active",
"name": "nginx-app",
"deploy_script": "version: '3'\nservices:\n web:\n image: nginx:latest\n ports:\n - '8080:80'",
"path": "/home/ploi/containers/nginx-app",
"last_deploy_at": null,
"created_at": "2025-04-01T10:00:00.000000Z",
"type": "docker",
"state": "running"
},
{
"id": 2,
"status": "active",
"name": "redis-cache",
"deploy_script": "version: '3'\nservices:\n redis:\n image: redis:alpine\n ports:\n - '6379:6379'",
"path": "/home/ploi/containers/redis-cache",
"last_deploy_at": null,
"created_at": "2025-04-01T10:00:00.000000Z",
"type": "docker",
"state": "stopped"
}
],
"links": {
"first": "https://ploi.io/api/servers/1/docker/containers?page=1",
"last": "https://ploi.io/api/servers/1/docker/containers?page=1",
"prev": null,
"next": null
},
"meta": {
"current_page": 1,
"from": 1,
"last_page": 1,
"path": "https://ploi.io/api/servers/1/docker/containers",
"per_page": 15,
"to": 2,
"total": 2
}
}