Skip to content

backup

konigle.models.website.backup

Backup models for the Konigle SDK.

This module provides models for website backups including creation and resource representations.

Backup

Bases: Resource

Backup resource model.

backup_type = Field(..., title='Backup Type', description='Type of resource being backed up') class-attribute instance-attribute

Type of resource being backed up.

created_at = Field(..., title='Created At', description='Creation timestamp.') class-attribute instance-attribute

Creation timestamp.

description = Field(default='', max_length=255, title='Description', description="Optional user-provided description at backup time. Can be used to capture additional context, e.g. 'before major redesign' or 'before editing product description'") class-attribute instance-attribute

Optional user-provided description of the backup.

error_message = Field(default='', title='Error Message', description='Error message if status is FAILED') class-attribute instance-attribute

Error message if status is FAILED.

file_size_bytes = Field(default=None, title='File Size', description="Size of the backup file in bytes. Can be null if the file hasn't been created yet") class-attribute instance-attribute

Size of the backup file in bytes.

kind = Field(..., title='Kind', description='Type of backup. Transient backups are created during editing flow/AI chat and normally restored during the same session. Durable backups are meant for long term storage and can be restored weeks or months later') class-attribute instance-attribute

Type of backup - transient or durable.

metadata = Field(default_factory=dict, title='Metadata', description='Additional metadata about the backup that might be useful for display, searching, or restoration logic') class-attribute instance-attribute

Additional metadata about the backup.

site = Field(..., title='Site ID', description='ID of the site this backup belongs to') class-attribute instance-attribute

ID of the site this backup belongs to.

status = Field(..., title='Status', description='Current status of the backup') class-attribute instance-attribute

Current status of the backup.

target_description = Field(default='', max_length=255, title='Target Description', description='Human readable description of the target. Can be used to store page name, pathname etc.') class-attribute instance-attribute

Human readable description of the target.

target_id = Field(..., max_length=64, title='Target ID', description="Page ID, Blog ID, Folder ID, Product ID etc. NULL for site-level backups like site_foundation that aren't tied to a specific page or folder") class-attribute instance-attribute

ID of the target resource. NULL for site-level backups.

trigger = Field(..., title='Trigger', description='What triggered the backup creation') class-attribute instance-attribute

What triggered the backup creation.

BackupCreate

Bases: CreateModel

Model for creating a new backup.

Contains fields required for backup creation.

backup_type = Field(..., title='Backup Type', description='Type of resource being backed up') class-attribute instance-attribute

Type of resource being backed up.

description = Field(default='', max_length=255, title='Description', description='Optional user-provided description of the backup. Can be used to capture additional context') class-attribute instance-attribute

Optional user-provided description of the backup.

target_id = Field(default=None, max_length=64, title='Target ID', description='ID of the target resource (Page, Folder, Blog, Product). NULL for site-level backups like site_foundation or site_template') class-attribute instance-attribute

ID of the target resource. NULL for site-level backups.

trigger = Field(..., title='Trigger', description='What triggered the backup creation') class-attribute instance-attribute

What triggered the backup creation.