Lesson 5 of 8
Save data
Save API request and response JSON or selected input and output values in SpreadsheetWeb for backup, review, and auditing.
2 min readStore SpreadsheetWeb API activity in the platform database when you need a server-side backup, an audit trail, or a searchable record of calculation inputs and outputs. The consuming application will often keep its own data, but SpreadsheetWeb can preserve either the complete JSON messages or selected workbook values as part of the API request.
Save request and response JSON
The first approach stores the full calculation request and response. This preserves the complete payload exchanged for each API call.
- Open the API application in Design.
- Go to Database and create a database table. The lesson names the table Main, but you can use a name appropriate to the application.
- Open the table and select Add Request Fields.
- Add the request JSON and response JSON fields.
- Publish the transaction.
Return to API Toolkit and select the newly published transaction. In the Record Loading and Saving settings, enable Save new record. The request JSON changes to include the save operation.
Run several calculations, then open View Data for the application. Add the request and response JSON columns to the data layout. Each saved API call appears as a record, and the corresponding JSON messages can be opened or downloaded for review.
Save selected input and output values
Full JSON is useful for detailed diagnostics, but a database table can also store individual workbook values in separate columns. This makes important fields easier to browse, filter, or report on.
- Start a new application transaction and return to the database table configuration.
- Add the named ranges you want to preserve, such as the issue age input and total premium output.
- Publish the updated transaction.
- Select that transaction in API Toolkit and keep Save new record enabled.
- Run the required calculations and review the new records in View Data.
The saved rows now contain the selected inputs and calculated outputs alongside any JSON fields already configured.
Choose an auditing strategy
Use request and response JSON when you need the most complete record of the API exchange. Use individual columns when business users need direct access to specific values. You can enable both approaches in the same table to support detailed troubleshooting and convenient reporting.