Apply Baseline Corrections to Regression Transformations
Applies corrected JSON from baseline transformations to regression transformations
This endpoint copies user-corrected data from baseline function version transformations to their corresponding regression test transformations. This is useful for:
- Propagating ground truth corrections to regression test data
- Ensuring consistent evaluation data across function versions
- Preparing corrected datasets for evaluation after regression testing
How It Works
- Finds Regression Transformations: Locates transformations created during regression testing
- Matches Baseline Corrections: Finds corresponding baseline transformations with corrected JSON
- Applies Corrections: Copies the corrected JSON to regression transformations
- Returns Summary: Reports applied, skipped, and error counts with transformation IDs
Authenticate using API Key in request header
In: header
Name of the function to apply corrections for
Must be an existing function with both baseline and regression transformation data.
^[a-zA-Z0-9_-]+$Baseline version number (source of corrected data)
The function version number that contains transformations with corrected JSON that should be copied to regression transformations.
uint1 <= valueComparison version number (target for applying corrections)
The function version number of regression transformations that should receive the corrected JSON from the baseline version.
uint1 <= valueResponse Body
curl -X POST "https://api.bem.ai/v2/functions/regression/corrections" \ -H "Content-Type: application/json" \ -d '{ "functionName": "invoice-transformer", "baselineVersionNum": 3, "comparisonVersionNum": 4 }'Multiple corrections were applied to regression transformations
{
"applied": 25,
"appliedIds": [
"tr-abc-123",
"tr-def-456",
"tr-ghi-789"
],
"skipped": 0,
"errors": {}
}{
"error": "functionName is required",
"code": "validation_error"
}{
"error": "Function 'invoice-transformer' not found",
"code": "not_found"
}{
"message": "invalid request body: missing required field 'transformationIDs'",
"code": 400,
"details": {
"field": "transformationIDs",
"reason": "required field missing"
}
}