Evaluate Workflows via API
Transform API data with Workflow scripts
Customize your API requests and responses using Workflow scripts
Maxim Workflows provide powerful scripting capabilities to modify requests and responses. These scripts help you transform data, add authentication, and handle complex response structures.
Scripts are optional - you’ll only need them when you want to modify your API’s behavior.
Request Modification
The prescript
function runs before sending requests to your API. Use it to modify request parameters, add headers, or transform data.
Response Processing
The postscriptV2
function processes API responses before displaying them. Use it to transform response data or extract specific fields:
Conversation Management
Simulation scripts only run for multi-turn conversations. They won’t execute for single-turn tests.
Use these scripts to set up and clean up multi-turn conversation tests:
Available Libraries
You don’t need to use require
or import
to use these modules in scripts. These are directly available in the script environment.
axios
: Axios is a popular HTTP client library for JavaScript. It provides a simple API for making HTTP requests and supports various features like request and response interceptors, request cancellation, and automatic JSON parsing.