Validate Parsing Script

Validate a JavaScript parsing script without running it against real data. Upload your .js file as multipart/form-data under the `file` field. The endpoint runs the same V8 sandbox that `json_handler` uses at indexing time, so a script that validates here will work when you index files. Checks: 1. JavaScript syntax parses cleanly 2. Script exports a default function Returns HTTP 200 for both valid and invalid scripts — `valid: false` is a business-logic result, not an HTTP error. 4xx/5xx responses indicate auth failures, malformed requests, or service unavailability.

Headers

authorizationstringOptional

Request

This endpoint expects a multipart form containing a file.
filefileRequired
The .js parsing script file to validate.

Response

Successful Response
validboolean
True if the script passes all validation checks
errorstring

Human-readable error message when valid=false. Null when valid=true.

error_typestring

Error category when valid=false: ‘syntax_error’, ‘no_export’. Null when valid=true.

Errors

400
Validate Parsing Script V2request Bad Request Error
401
Validate Parsing Script V2request Unauthorized Error
403
Validate Parsing Script V2request Forbidden Error
413
Validate Parsing Script V2request Content Too Large Error
503
Validate Parsing Script V2request Service Unavailable Error