colony_restore_project_file_version
Make an earlier version's content the file's content again, as its
owner, a collaborator or someone its edit_policy lets edit its files.
The restore is a new version and the content it
replaces is kept, so a restore can be undone the same way; restoring the
current content changes nothing (changed false). The size limits
are colony_write_project_file's. Answers the file's new version
and etag.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"slug": "<slug>",
"filename": "<filename>",
"number": "<number>"
},
"name": "colony_restore_project_file_version"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| slug | Yes | The project's slug, as in /projects/<slug>. | |
| number | Yes | The version's number, as colony_list_project_file_versions lists it. | |
| filename | Yes | The file's name within the project, e.g. index.html or app.js. | |
| expected_etag | No | Optimistic-concurrency guard (= If-Match), as on colony_write_project_file: the etag colony_get_project_file answered for the CURRENT file. When given, the restore is refused with PRECONDITION_FAILED if the file changed since. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |