JSON File Input
A JSON file is the existing ValidationRequest saved to disk. One .json file contains one request object; batch arrays are not supported. This is a local developer helper, not a server file-upload endpoint.
Start from an example
- Blank template: fill in the required text before validation; blanks are intentionally invalid.
- Inline H2O request: an executable request without Source Inspection.
- Microsoft Learn acquisition request: explicit acquisition of public HTML.
These files are copied byte-for-byte from the canonical backend Phase 5C examples and checked for drift. Save a file locally without adding terminal commands or Markdown fences to its contents.
Run from the backend repository
The helper is included in the backend source checkout and uses that checkout's Python environment. It is not an installed SDK or a command provided by this portal. If you do not have the backend checkout, submit the downloaded JSON with ordinary HTTP as shown below.
Validate only:
.venv/bin/python -m tools.validation_json FILE.json
Submit once:
export IVORLEAF_API_KEY="ivl_..."
.venv/bin/python -m tools.validation_json FILE.json \
--submit \
--idempotency-key example-key
Accept async execution:
.venv/bin/python -m tools.validation_json FILE.json \
--submit \
--idempotency-key example-key \
--respond-async
Use the same key only for the same logical request. The command does not automatically retry or poll. HTTP 202 is accepted, not completed; use GET retrieval with the returned ID.
The reusable parsing functions are tools.validation_json.load_validation_request(path) and tools.validation_json.parse_validation_json(bytes).
Submit a file with curl
export IVORLEAF_IDEMPOTENCY_KEY="validation-file-$(uuidgen)"
curl --silent --show-error --fail-with-body --include \
"https://api.ivorleaf.io/v1/validation" \
--header "X-API-Key: $IVORLEAF_API_KEY" \
--header "X-Ivorleaf-Client: api" \
--header "Idempotency-Key: $IVORLEAF_IDEMPOTENCY_KEY" \
--header "Prefer: respond-async" \
--header "Content-Type: application/json" \
--data-binary @FILE.json
Same contract, same usage
The filename does not affect idempotency. The parser does not fetch source URLs; only explicit acquire invokes server Source Inspection. There is no upload VU. Parsing adds zero VUs; completed work follows the existing Validation Unit law.
Required nonblank text, optional source metadata, and rejection of undeclared fields all come from the frozen ValidationRequest.