Skip to content
Start here

Time Travel

Get D1 database bookmark
client.d1.database.timeTravel.getBookmark(stringdatabaseId, TimeTravelGetBookmarkParams { account_id, timestamp } params, RequestOptionsoptions?): TimeTravelGetBookmarkResponse { bookmark }
GET/accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark
Restore D1 Database to a bookmark or point in time
client.d1.database.timeTravel.restore(stringdatabaseId, TimeTravelRestoreParams { account_id, bookmark, timestamp } params, RequestOptionsoptions?): TimeTravelRestoreResponse { bookmark, message, previous_bookmark }
POST/accounts/{account_id}/d1/database/{database_id}/time_travel/restore
ModelsExpand Collapse
TimeTravelGetBookmarkResponse { bookmark }
bookmark?: string

A bookmark representing a specific state of the database at a specific point in time.

TimeTravelRestoreResponse { bookmark, message, previous_bookmark }

Response from a time travel restore operation.

bookmark?: string

The new bookmark representing the state of the database after the restore operation.

message?: string

A message describing the result of the restore operation.

previous_bookmark?: string

The bookmark representing the state of the database before the restore operation. Can be used to undo the restore if needed.