The Container Snapshots API lets you manage point-in-time snapshots of a container’s filesystem. Use these endpoints to list existing snapshots, create new ones, restore a container from a snapshot, update snapshot aliases, and delete snapshots you no longer need.
Get all snapshots for a container.
Name In Type Required Description idpath string Yes Unique identifier of the container to retrieve snapshots for
curl -X GET " https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/snapshots " \
-H " Authorization: Bearer <token> "
const { data } = await client . api . containers . listSnapshotsIterator ( {
id: " 507f1f77bcf86cd799439011 "
"message" : " Snapshots retrieved successfully " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"name" : " snap-20250115-103000 " ,
"alias" : " backup-2025-01-15 " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"last_used_at" : " 2025-01-15T14:00:00.000Z " ,
"expires_at" : " 2025-02-15T10:30:00.000Z " ,
"name" : " snap-20250110-080000 " ,
"alias" : " weekly-backup " ,
"created_at" : " 2025-01-10T08:00:00.000Z " ,
"message" : " Invalid container ID format "
"message" : " Authentication required "
"message" : " Insufficient permissions to access this container "
"message" : " Container not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Create a new snapshot for a container. Optionally provide an alias for human-friendly identification and an expiry in days.
Name In Type Required Description idpath string Yes Unique identifier of the container to create snapshot for
Field Type Required Description aliasstring No Optional user-friendly alias for the snapshot (max 100 characters) expirynumber No Expiry in days
curl -X POST " https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/snapshots " \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "pre-deployment-backup",
const { data } = await client . api . containers . createSnapshot ( {
id: " 507f1f77bcf86cd799439011 " ,
alias: " pre-deployment-backup " ,
"message" : " Snapshot created successfully " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"name" : " snap-20250115-145500 " ,
"alias" : " pre-deployment-backup " ,
"created_at" : " 2025-01-15T14:55:00.000Z " ,
"expires_at" : " 2025-02-14T14:55:00.000Z " ,
"message" : " Invalid alias: exceeds maximum length "
"message" : " Authentication required "
"message" : " Insufficient permissions to snapshot this container "
"message" : " Container not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Restore a container from a specified snapshot. This replaces the container’s current filesystem state with the contents of the snapshot.
Name In Type Required Description idpath string Yes Unique identifier of the container to restore namepath string Yes Name of the snapshot to restore from
curl -X PUT " https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/snapshots/snap-20250115-103000 " \
-H " Authorization: Bearer <token> "
const { data } = await client . api . containers . restoreSnapshot ( {
id: " 507f1f77bcf86cd799439011 " ,
name: " snap-20250115-103000 "
"message" : " Container restored from snapshot successfully " ,
"message" : " Container restored from snapshot successfully " ,
"message" : " Container cannot be restored in its current state "
"message" : " Authentication required "
"message" : " Insufficient permissions to restore this container "
"message" : " Snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred during restore "
Update the alias of an existing snapshot. Pass null for the alias to remove an existing alias.
Name In Type Required Description idpath string Yes Unique identifier of the container namepath string Yes Name of the snapshot to update
Field Type Required Description aliasstring | null Yes New alias for the snapshot. Set to null to remove alias (max 100 characters)
curl -X PUT " https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/snapshots/snap-20250115-103000/alias " \
-H " Authorization: Bearer <token> " \
-H " Content-Type: application/json " \
"alias": "production-baseline"
const { data } = await client . api . containers . updateSnapshotAlias ( {
id: " 507f1f77bcf86cd799439011 " ,
name: " snap-20250115-103000 " ,
alias: " production-baseline "
"message" : " Snapshot alias updated successfully " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"name" : " snap-20250115-103000 " ,
"alias" : " production-baseline " ,
"created_at" : " 2025-01-15T10:30:00.000Z " ,
"last_used_at" : " 2025-01-15T14:00:00.000Z " ,
"expires_at" : " 2025-02-15T10:30:00.000Z " ,
"message" : " Invalid alias: exceeds maximum length "
"message" : " Authentication required "
"message" : " Insufficient permissions to modify this snapshot "
"message" : " Snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Delete a snapshot. This action cannot be undone.
Name In Type Required Description idpath string Yes Unique identifier of the container namepath string Yes Name of the snapshot to delete
curl -X DELETE " https://api.hoody.com/api/v1/containers/507f1f77bcf86cd799439011/snapshots/snap-20250110-080000 " \
-H " Authorization: Bearer <token> "
const { data } = await client . api . containers . deleteSnapshot ( {
id: " 507f1f77bcf86cd799439011 " ,
name: " snap-20250110-080000 "
"message" : " Snapshot deleted successfully " ,
"container_id" : " 507f1f77bcf86cd799439011 " ,
"project_id" : " 507f1f77bcf86cd799439033 " ,
"snapshot_name" : " snap-20250110-080000 "
"message" : " Cannot delete snapshot while it is in use "
"message" : " Authentication required "
"message" : " Insufficient permissions to delete this snapshot "
"message" : " Snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "