Skip to content
Start here

Time Travel

Get D1 database bookmark
d1.database.time_travel.get_bookmark(strdatabase_id, TimeTravelGetBookmarkParams**kwargs) -> TimeTravelGetBookmarkResponse
GET/accounts/{account_id}/d1/database/{database_id}/time_travel/bookmark
Restore D1 Database to a bookmark or point in time
d1.database.time_travel.restore(strdatabase_id, TimeTravelRestoreParams**kwargs) -> TimeTravelRestoreResponse
POST/accounts/{account_id}/d1/database/{database_id}/time_travel/restore
ModelsExpand Collapse
class TimeTravelGetBookmarkResponse:
bookmark: Optional[str]

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

class TimeTravelRestoreResponse:

Response from a time travel restore operation.

bookmark: Optional[str]

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

message: Optional[str]

A message describing the result of the restore operation.

previous_bookmark: Optional[str]

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