Skip to content
Hoody.com

The Container Copy & Sync endpoints let you replicate an existing container to another project or server, and then incrementally resync the copy from its source. Both operations run asynchronously: the API returns immediately with the new container state (typically copying), and the copy/sync completes in the background. Once a copy is created, it can be kept up-to-date with the source at any time via the sync endpoint.

Creates a copy of an existing container. The copy operation runs asynchronously, and the new container starts automatically upon successful completion. The copy can target the same project or a different project on the same or a different server. By default, firewall rules and network rules are not carried over to the copy; use the copy_firewall_rules and copy_network_rules flags to opt in.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the source container to copy
FieldTypeRequiredDefaultDescription
target_project_idstringYesID of the project where the copy will be created (24-character hexadecimal string)
target_server_idstringNoID of the server where the copy will be created (defaults to source server)
namestringNoName for the copied container (auto-generated if not provided). 3-100 characters, alphanumeric with hyphens and underscores
ssh_public_keystringNoSSH public key for the copied container (must be unique, not inherited from source)
source_snapshotstringNoSpecific snapshot to copy from (copies latest state if not provided)
copy_firewall_rulesbooleanNofalseWhether to copy firewall rules (ACL) from source container to target container
copy_network_rulesbooleanNofalseWhether to copy network rules/settings from source container to target container
Terminal window
curl -X POST https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439011/copy \
-H "Authorization: Bearer <token>" \
-H "Content-Type: application/json" \
-d '{
"target_project_id": "507f1f77bcf86cd799439033",
"target_server_id": "507f1f77bcf86cd799439044",
"name": "web-app-copy",
"ssh_public_key": "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIK0wmN/CrjJXa/V2gV3L1q8TzX0Y2d5L3p7b6gK4yW1M user@host",
"copy_firewall_rules": true,
"copy_network_rules": false
}'

Performs an incremental sync from the source container to this container. The sync only works for containers that were created via the copy operation (that is, containers that have a source_container_id). The operation runs asynchronously.

NameInTypeRequiredDescription
idpathstringYesUnique identifier of the container to sync (must have been created via copy)
Terminal window
curl -X POST https://api.hoody.icu/api/v1/containers/507f1f77bcf86cd799439099/sync \
-H "Authorization: Bearer <token>"