Ploi API
Ploi API

Update container

Update a specific container in your server.

PATCH /api/servers/{server}/docker/containers/{container}

Example request:

curl -X PATCH "https://ploi.io/api/servers/{server}/docker/containers/1" \
-H "Authorization: Bearer {token}" \
-H "Content-Type: application/json" \
-H "Accept: application/json"
--data '{"name":"new-name"}'

Body Parameters

Name Type Description
name string Optional. The new name of the container.
deploy_script string Optional. Docker compose configuration in YAML format.

Response

{
  "id": 3,
  "status": "active",
  "name": "postgres-database",
  "deploy_script": "version: '3'\nservices:\n  db:\n    image: postgres:16\n    environment:\n      POSTGRES_PASSWORD: example\n      POSTGRES_USER: ploi\n    ports:\n      - '5432:5432'",
  "path": "/home/ploi/containers/postgres-database",
  "last_deploy_at": null,
  "created_at": "2025-04-01T10:30:00.000000Z",
  "type": "docker",
  "state": "stopped"
}