Skip to content

api

Managed Harness Execution API

Submit Harness source, prepare its runtime and request execution as distinct recoverable operations.

Managed Harness Execution API

Definition

Managed execution runs an explicitly submitted Harness against the selected Benchmark Version. It is an alternative to submitting application outputs. Paths below are relative to BENCHMARK_URL from the quickstart.

Operation sequence

Method and pathInputRetain
GET /managed-run-profileSelected scopeExecution policy and concurrency token
POST /harness-submissionsname, exact sourceIssued Harness/Version IDs
POST /harness-runtime-preparationsharness_id, harness_version_idPreparation acknowledgement/state
POST /managed-runsSaved IDs and expected_managed_run_profile_revisionEvery admitted execution

Writes require the operation's Idempotency-Key. Preserve exact bytes and a separate key for each command.

Source package

source.schema_version is harness_working_copy.v1. File entries have relative path and UTF-8 content_text. The runtime accepts Python 3.12 and the callable main.py:generate_result(request). Source policy permits at most 64 files, 256 KiB each and 1 MiB total. Symlinks, traversal and credential/cache paths are rejected.

Use the CLI managed-Harness guide to package local files and retain recovery receipts. The OpenAPI defines all source/runtime fields.

Prepare and admit

Preparation uses the exact saved IDs; acknowledgement does not certify runtime readiness. Inspect returned state and failures. Admission takes those IDs and the current expected_managed_run_profile_revision, plus optional existing compute_profile_id. The profile token is a concurrency precondition supplied by the server, not a number to choose.

Managed admission can return multiple individual executions according to policy. Inspect every returned ID through the results API. Admission is not completed generation/judging, and it does not activate a Harness.

Prepare managed-run.json with the saved harness_id and exact harness_version_id. Read GET /managed-run-profile and copy its integer data.revision into the request field expected_managed_run_profile_revision. Export BENCHMARK_URL and MANAGED_OPERATION_KEY; the latter identifies this logical admission command. These examples submit the file bytes once, without adding automatic retries.

Request managed execution
cURL
curl --fail-with-body \
  --header "Authorization: Bearer ${TEAMMATELY_API_KEY}" \
  --header 'Content-Type: application/json' \
  --header "Idempotency-Key: ${MANAGED_OPERATION_KEY}" \
  --data-binary @managed-run.json \
  "${BENCHMARK_URL}/managed-runs"

Found something unclear?

Report outdated, unsupported, or confusing docs so we can fix the source page.

Report a docs issue

Continue learning

Related docs