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
Request
This endpoint expects a multipart form containing a file.
file
The .js parsing script file to validate.
Response
Successful Response
valid
True if the script passes all validation checks
error
Human-readable error message when valid=false. Null when valid=true.
error_type
Error category when valid=false: ‘syntax_error’, ‘no_export’. Null when valid=true.
Errors
400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
413
Content Too Large Error
503
Service Unavailable Error