API ReferenceValidation Scripts
Get Validation Script
Fetch one validation script, optionally with its source
GET
/api/v1/extraction-schema/{extractionSchemaId}/validation-scripts/{key}Returns a single validation script by key. Pass includeSource=true to also read back the currently registered source from storage — useful for confirming what is actually deployed before pushing a change.
Parameters
| Name | Type | In | Required | Description |
|---|---|---|---|---|
extractionSchemaId | string | path | Yes | The model or deployment's extraction schema ID, returned when listing a project's deployments. |
key | string | path | Yes | The script key |
includeSource | boolean | query | No | Set to true to include the script source in the response |
Request
const res = await fetch(
"https://app.limai.io/api/v1/extraction-schema/esch_abc123/validation-scripts/vin-checksum?includeSource=true",
{
headers: {
Authorization: "Bearer YOUR_API_TOKEN",
},
}
);
const { script } = await res.json();Response
Response200
{
"script": {
"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",
"source": "import { readFileSync } from ..."
}
}Returns 404 when no script with that key is registered on the schema.