---
search:
  tags:
    - V1
    - POST
seo:
  description: >-
    Run unsaved preprocessing source against one… Reference for the POST
    /v1/projects/{projectId}/artifacts/preprocessing-tests endpoint in the
    Judgeval API.
sidebar:
  label: Test preprocessing candidate
  badge: POST
title: Test preprocessing candidate
type: openapi-operation
---
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`

**Request body** (`application/json`, required)

- `trace_id` (string, required) — The historical trace to extract evidence from
- `source_code` (string, required) — A complete JavaScript function expression: async ({ traceId, sql }) =\> { ... }. Return JSON evidence; throw when validation fails.

Request body example:

```json
{
  "trace_id": "string",
  "source_code": "string"
}
```

**Responses**

- `200` — Response for status 200

Response example, 200:

```json
{
  "result": {
    "status": "succeeded",
    "artifact_duration_ms": 0,
    "evidence_size_bytes": 0,
    "evidence": null
  }
}
```
