rollback_file
rollback_file: Restore Previous File Version
rollback_file: Restore Previous File VersionReverts a file to a previous version.
def rollback_file(
agent_name: str,
file_path: str,
n: int,
base_url: str = aios_kernel_url
) -> StorageResponseParameters:
agent_name: Identifier for the agent making the requestfile_path: Path to the file to roll backn: Number of versions to roll back (1 for previous version)base_url: API endpoint URL
Returns:
StorageResponseobject containing rollback status
Example:
# Roll back a configuration file to its previous version
response = rollback_file(
"system_agent",
"config/app_settings.json",
n=1
)
print(response["response"]["response_message"])Last updated