Use these endpoints to manage point-in-time snapshots of a container’s filesystem. You can create new snapshots with an optional alias and expiry, list existing snapshots, restore a container to a previous snapshot state, update snapshot aliases, and delete snapshots that are no longer needed.
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" : " You do not have permission to access this container "
"message" : " Container not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Create a new snapshot for a container. You can optionally provide a human-readable alias and an expiry in days.
Name In Type Required Description idpath string Yes Unique identifier of the container to create snapshot for
Name 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 request payload "
"message" : " Authentication required "
"message" : " You do not have permission to create snapshots for this container "
"message" : " Container not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Restore a container from a snapshot. The container’s filesystem state is rolled back to the point in time the snapshot was taken.
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 PATCH " 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" : " Invalid snapshot name or container ID "
"message" : " Authentication required "
"message" : " You do not have permission to restore this container "
"message" : " Container or snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Update the alias of an existing snapshot. Set the alias to null to remove the existing alias.
Name In Type Required Description idpath string Yes Unique identifier of the container namepath string Yes Name of the snapshot
Name Type Required Description aliasstring | null Yes New alias for the snapshot (set to null to remove alias; max 100 characters)
curl -X PATCH " 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 value "
"message" : " Authentication required "
"message" : " You do not have permission to update snapshots for this container "
"message" : " Container or snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "
Delete a snapshot from a container. This action is irreversible.
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" : " Invalid snapshot name or container ID "
"message" : " Authentication required "
"message" : " You do not have permission to delete snapshots for this container "
"message" : " Container or snapshot not found "
"error" : " Internal Server Error " ,
"message" : " An unexpected error occurred "