v36

OpenAPI 3.1.0raw.githubusercontent.com2026-08-0187270483.0 KB
Function Accuracy

Run Function Regression Testing

Kick off a regression run between two versions of a function.

Replays a sample of corrected historical inputs against the comparison version, producing fresh transformations marked isRegression: true. Each new run returns the workflow callIDs you can monitor via GET /v3/calls/{callID}.

Supported for every function type that produces correctable transformations: extract, transform, analyze, join. For extract specifically, the regression sample is dispatched through the same OCR vs. vision path used at original call time (PDF, PNG, JPEG, HEIC, HEIF, WebP go through the vision worker; everything else goes through OCR → transform).

The comparison version must share a schema-compatible output shape with the baseline; structural differences are reported as a 400 with the offending field-level diffs.

Typical flow

  1. POST /v3/functions/regression — queues calls, returns { originalReferenceID, callID } per sample.
  2. Wait (poll GET /v3/calls/{callID} or subscribe to webhooks).
  3. POST /v3/functions/regression/corrections to copy baseline corrections onto the new regression transformations.
  4. POST /v3/functions/compare to compare baseline vs comparison metrics for the regression dataset.
post/v3/functions/regression

Request body

functionNamestring required

Name of the function to test for regressions

Must be an existing function with historical transformation data containing user corrections. The function must be currently active and callable.

baselineVersionNuminteger

Function version number to use as baseline for comparison

  • Defaults to currentVersionNum - 1 (previous version)
  • Must be a valid, existing version number for the function
  • Used to retrieve historical transformation data for comparison
  • Cannot be the same as comparisonVersionNum
comparisonVersionNuminteger

Function version number to test against the baseline

  • Defaults to current version number (latest version)
  • Must be a valid, existing version number for the function
  • This version will be used to create new function calls for testing
  • Cannot be the same as baselineVersionNum
sampleSizeinteger

Number of historical samples to test

  • Defaults to 50 samples
  • Minimum: 1, Maximum: 1000
  • Only transformations with correctedJSON (user corrections) are eligible
  • Actual sample size may be smaller if insufficient corrected data exists
  • Larger samples provide more statistical confidence but take longer to process
onlyCorrectedDataboolean

Whether to only test transformations with user corrections

  • Defaults to true (recommended)
  • When true: Only uses transformations with correctedJSON as ground truth
  • When false: May include transformations without corrections (less reliable)
  • Corrected data provides the most accurate regression testing results

Response

The request has succeeded.

functionNamestring required

Name of the function being tested

Echoes back the function name from the request for confirmation.