Skip to content
Judgment Labs
Esc
↑↓navigate↵open⌘Jpreview

Test preprocessing candidate

Run unsaved preprocessing source against one historical trace in the production sandbox with read-only, trace-scoped SQL. Returns the evidence (up to 50 KiB), its size and timing, or failure diagnostics. Saves nothing.

POST/v1/projects/{projectId}/artifacts/preprocessing-tests
Authorization
AuthorizationPersonal API key · headerrequired

Your personal API key from Settings > Personal API Keys, sent as Bearer <key>.

X-Organization-IdOrganization ID · headerrequired

The organization to act in. Copy it with Copy organization ID in the organization menu or the settings sidebar.

Path parameters
projectIdstringrequired
Request body
requiredapplication/json
trace_idstringrequired

The historical trace to extract evidence from

min length 1 · max length 128
source_codestringrequired

A complete JavaScript function expression: async ({ traceId, sql }) => { ... }. Return JSON evidence; throw when validation fails.

max length 100000
Responses
200

Response for status 200

resultobjectrequired
Show properties
One of:
object
statusstringrequired
artifact_duration_msnumberrequired
min 0
evidence_size_bytesintegerrequired
min 0 · max 9007199254740991
evidenceanyrequired
object
statusstringrequired
reasonstringrequired
Allowed:artifact_failedtimeoutevidence_too_large
errorstringrequired
max length 2000
artifact_duration_msnumber | nullrequired
Show properties
Any of:
number
number
null
null
evidence_size_bytesinteger | nullrequired
Show properties
Any of:
integer
integer
null
null
Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.judgmentlabs.ai/v1/projects/YOUR_PROJECT_ID/artifacts/preprocessing-tests' \
  -H 'Authorization: Bearer YOUR_API_KEY' \
  -H 'X-Organization-Id: YOUR_ORGANIZATION_ID' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "trace_id": "string",
  "source_code": "string"
}'
Response
{
  "result": {
    "status": "succeeded",
    "artifact_duration_ms": 0,
    "evidence_size_bytes": 0,
    "evidence": null
  }
}

Was this page helpful?