rollback_version
Restore a project file to the bytes it had at a previous version (commit SHA). Pass path as a project-relative file path (e.g. model/revenue.py, README.md, data/seed.csv, assets/logo.png). This creates a new commit — it does NOT rewrite history. Use list_versions to find the commit SHA you want to restore. Optionally specify a branch to restore on a scenario branch instead of the default branch. Binary files are restored byte-for-byte (no UTF-8 decoding) so images, parquet, and other non-text files survive a rollback round-trip. Requires at least Editor access to the project. Returns: project (str) — project name; path (str) — project-relative path of the restored file; restored_to_sha (str) — commit SHA whose content was restored; new_commit_sha (str) — newly created commit SHA; commit_message (str) — message of the new commit.
destructive
Parameters
Section titled “Parameters”| Name | Type | Required | Default | Description |
|---|---|---|---|---|
project_name | str | Yes | — | |
path | str | Yes | — | |
target_sha | str | Yes | — | |
commit_message | str | No | '' | |
branch | str | No | '' |
Returns
Section titled “Returns”Returns a structured object. Top-level fields:
project(string)model_name(string)restored_to_sha(string)new_commit_sha(string)commit_message(string)
See the response example below for the full payload shape.
Example
Section titled “Example”Tool Call
Section titled “Tool Call”{ "name": "rollback_version", "arguments": { "project_name": "forecasts", "model_name": "revenue", "target_sha": "0123456789abcdef0123456789abcdef01234567", "commit_message": "rollback: restore previous revenue model" }}Response
Section titled “Response”{ "project": "forecasts", "model_name": "revenue", "restored_to_sha": "0123456789abcdef0123456789abcdef01234567", "new_commit_sha": "abc1234def5678901234567890abcdef12345678", "commit_message": "rollback: restore previous revenue model"}- Module:
Versions - Requires authentication via API token or Auth0 JWT.