---
title: "Try a remote task against a sample"
method: POST
path: "/api/{org_id}/tasks/{entity_id}/test_run"
tags: ["RemoteTasks"]
---

# Try a remote task against a sample

`POST /api/{org_id}/tasks/{entity_id}/test_run`

## Request

- Base URL: `https://api.openobserve.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.openobserve.ai/api/{org_id}/tasks/{entity_id}/test_run`
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/openobserve/apis/openobserve-api-http/docs/api/:org_id/tasks/:entity_id/test_run/post.ts> (a function with typed inputs; its response is checked against the schema)

Runs the task's latest published version against at most ten samples using the registered contract, at concurrency min(4, max_concurrency). Volatile: no Experiment, no execution records, no history. Idempotency keys are `testrun-` prefixed.

## Path parameters

- `org_id` string, required
- `entity_id` string, required

## Request body

- object
  - `samples` TestRunSampleBody[], required: At most ten samples. Enforced again server-side.
    - `input` unknown, required
    - `metadata` unknown
    - `rowId` string, nullable: A stable handle to line a result back up with its input. A Dataset row id, or a caller-chosen label for a hand-entered sample.

## Response `200`

- object: The whole test-run result. Volatile: it is this response and nothing else — no Experiment, no execution records, no history.
  - `results` TestRunRowResultBody[], required
    - `attempts` integer, required: Attempts the registered retry policy took. A bench runs the same policy a real Slot would, so this is how a reader sees a retried sample.
    - `error` string, nullable
    - `httpStatus` integer, nullable
    - `input` unknown, required
    - `latencyMs` integer, required
    - `parsedOutput` unknown
    - `rawRequest` string, required
    - `rawResponse` string, required
    - `rowId` string, required
    - `status` string, required

## Other responses

- `400`: Bad Request
- `409`: Conflict

---

[API](https://skmtc.dev/openobserve/apis/openobserve-api-http.md) - [All operations](https://skmtc.dev/openobserve/apis/openobserve-api-http/llms.txt) - [OpenAPI document](https://skmtc.dev/openobserve/apis/openobserve-api-http/revisions/0529b8a10252?raw)
