Limai Docs
API ReferenceValidation Scripts

List Validation Scripts

List the custom validation scripts registered on a model or deployment

GET/api/v1/extraction-schema/{extractionSchemaId}/validation-scripts

Returns every custom validation script registered on the model or deployment, enabled or not, ordered by key.

Custom validation scripts are standalone Node.js ES modules that run in a sandbox after extraction. Each one reads the extracted data from a JSON file passed as argv[2] and writes a { findings, breakdown } object to stdout. A script with behavior: "RESEND" can request a re-extraction of the cells it flagged; behavior: "SURFACE" only reports.

Parameters

NameTypeInRequiredDescription
extractionSchemaIdstringpathYesThe model or deployment's extraction schema ID, returned when listing a project's deployments.

Request

const res = await fetch(
"https://app.limai.io/api/v1/extraction-schema/esch_abc123/validation-scripts",
{
  headers: {
    Authorization: "Bearer YOUR_API_TOKEN",
  },
}
);
const { scripts } = await res.json();

Response

Response200
{
  "scripts": [
    {
      "id": "cvs_abc123",
      "extractionSchemaId": "esch_abc123",
      "key": "vin-checksum",
      "name": "VIN format (ISO 3779)",
      "description": "Validates the VIN against the ISO 3779 format",
      "behavior": "RESEND",
      "s3Key": "custom-validations/esch_abc123/vin-checksum/v3-9f2b7c1d4e05.mjs",
      "version": 3,
      "contentHash": "9f2b...",
      "enabled": true,
      "timeoutMs": 60000,
      "createdAt": "2025-01-01T00:00:00.000Z",
      "updatedAt": "2025-01-15T12:00:00.000Z"
    }
  ]
}

On this page