.gridos files, and selectively clear cell data. Use them to build save-on-exit workflows, backup scripts, or migration tooling.
POST /system/save
Persist the current in-memory workbook state tosystem_state.gridos in the server’s working directory. Call this endpoint whenever you want a recoverable snapshot — for example, before a large agent chain or at the end of a session.
Request
No request body required.Response
"Success" when the state was written to disk.Example
The save file is written to
system_state.gridos in the directory from which you started the GridOS server. Move or back up this file if you need off-server storage.POST /system/load
Load the workbook state from thesystem_state.gridos save file and replace the current in-memory state. If no save file exists, the endpoint returns an error status (HTTP 200) rather than an HTTP error code.
Request
No request body required.Response
"Success" when the state was loaded, or "Error" when the save file does not exist.Present only when
status is "Error". Value: "No save file found.".Example
GET /system/export
Download the current workbook as a.gridos file. The response is a file attachment with a timestamped filename derived from the workbook name. The file format is JSON and can be reimported with POST /system/import.
Query Parameters
None.Response
Returns anapplication/json file download. The Content-Disposition header specifies a filename in the form workbookname-YYYYMMDD-HHMMSS.gridos.
Example
Export timestamps use UTC. The filename replaces spaces in the workbook name with underscores and strips characters that are not alphanumeric, hyphens, or underscores.
POST /system/import
Replace the current workbook with the state contained in a.gridos file you previously exported. Send the parsed JSON content of the file as the request body.
Request
The request body must be the full state dictionary from a.gridos file — i.e. the JSON object you would get from GET /system/export. Set the Content-Type header to application/json.
The complete workbook state dictionary. At minimum it must be a valid JSON object. The exact schema matches the output of
GET /system/export.Response
"Success" when the workbook was imported and is now the active state.Errors
| Status | Meaning |
|---|---|
400 | The payload is not a valid JSON object, or the state dictionary could not be applied. |
Example
POST /system/clear
Clear all unlocked cells on a sheet. Locked cells are preserved exactly as they are. This is the standard way to reset user-entered data while keeping any protected structure or template content in place.Query Parameters
The sheet to clear. Defaults to the currently active sheet when omitted.
Response
"Success" when the clear operation completed.The name of the sheet that was cleared.
Example
Clearing a sheet does not remove its charts. Use
DELETE /system/charts/{chart_id} to remove individual charts.