Course contents8 lessons
Course overview
  1. Create an API based application
  2. 02Set inputs and outputs using API toolkit
  3. 03Input randomization
  4. 04Batch run
  5. 05Save data
  6. 06Formula auditing using Excel Export
  7. 07Document creation
  8. 08Export to Postman

Lesson 2 of 8

Set inputs and outputs using API toolkit

Configure API Toolkit inputs and outputs, test calculations with named ranges or cell references, and interpret response-time metrics.

2 min read

Use API Toolkit to construct and test a SpreadsheetWeb calculation request before integrating the API into another application. API Toolkit provides a purpose-built testing environment similar to a general API client, while exposing SpreadsheetWeb inputs, outputs, transactions, and calculation timing in one interface.

Understand the calculation request

The request panel begins with identifiers for the workspace, application, and transaction. The input and output collections remain empty until you select the workbook values that the request should use.

As you add settings, API Toolkit updates the request JSON automatically. This makes it possible to see exactly how each configuration choice is represented in the API payload.

Add inputs and outputs

  1. Open the Settings area in API Toolkit.
  2. Add a workbook named range as an input. The lesson uses the applicant's issue age because changing it produces an observable premium change.
  3. Add a calculated named range as an output. The example requests the total premium.
  4. Enter an input value in the settings panel or directly in the request editor.
  5. Select Calculate to send the request.

The calculation response includes the requested output and its calculated value. You can compare the result with the workbook by entering the same input value in Excel.

Reference cells and multi-cell ranges

Named ranges are convenient but optional. If a cell does not have a named range, you can request it by worksheet and cell reference. This works for both inputs and outputs.

You can also add a multi-cell named range. API Toolkit expands the range into its individual values in the request. Use Load defaults to populate those values from the workbook, then change only the inputs needed for the test scenario.

Interpret response times

API Toolkit reports several timing measurements:

  • Calculation engine time measures the workbook calculation itself on the server.
  • API request time includes the calculation plus communication between the browser and server.
  • Total time also includes client-side work such as rendering the JSON response in API Toolkit.

For an external integration, API request time is generally the more useful end-to-end reference. Actual values will vary with the model, network conditions, server environment, and request size.