---
title: "Get Custom Harness"
method: GET
path: "/v1/custom-harnesses/{harness_id}"
tags: ["Diamond", "custom-harnesses"]
---

# Get Custom Harness

`GET /v1/custom-harnesses/{harness_id}`

Get a single custom harness by ID with optional workflow status.

Returns the harness (business status: DRAFT/ACTIVE/ARCHIVED) enriched with
workflow status (execution state: RUNNING/SUCCEEDED/FAILED) if a workflow exists.

Client interpretation:
- harness.status=DRAFT + no workflow = Not started yet
- harness.status=DRAFT + workflow.status=RUNNING = Generation in progress
- harness.status=DRAFT + workflow.status=FAILED = Generation failed, can retry
- harness.status=ACTIVE = Generation completed successfully

Requires agent:read permission.

## Path parameters

- `harness_id` string, uuid, required

## Query parameters

- `team_id` string, uuid, nullable — Team ID (required)

## Response `200`

Successful Response

- CustomHarnessResponse — Response model for custom harness with optional workflow status.
  - `harness` CustomHarness, required — Domain model for a custom harness (test configuration). A custom harness is a test configuration that combines an agent, personas, and policies. The backend generates evaluation prompts based on this configuration. Stored as metadata.json in S3.
    - `id` string, uuid, required
    - `team_id` string, uuid, required
    - `name` string, required
    - `description` string, nullable
    - `agent_id` string, uuid, required
    - `persona_ids` string[]
    - `policy_ids` string[]
    - `status` 'draft' | 'active' | 'archived' | 'failed' — Status values for custom harnesses.
    - `workflow_id` string, uuid, nullable — Reference to the latest workflow that generated this harness. Enables lookup of workflow status by harness_id. Supports future 'regenerate harness' scenarios.
    - `s3_key` string, nullable
    - `generated_at` integer, nullable
    - `prompt_count` integer, nullable
    - `created_at` integer, required
    - `updated_at` integer, required
    - `created_by` string, uuid, required
    - `creation_error` string, nullable
  - `workflow` WorkflowStatusInfo — Workflow status information for enrichment. For custom harness workflows, task_id and session_id (when present) are persisted in the workflow S3 file under workflow_specific_fields and exposed here for cancel/debugging.
    - `status` 'created' | 'starting' | 'running' | 'succeeded' | 'failed' | 'cancelled', required — Core lifecycle states for workflows. These are universal statuses that apply to all workflow types. Workflow-specific phases can be tracked using the optional `phase` field.
    - `phase` string, nullable
    - `error_message` string, nullable
    - `task_id` string, nullable
    - `session_id` string, nullable

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/vijilai/apis/vijil-console-api-combined.md) · [All operations](https://skmtc.net/vijilai/apis/vijil-console-api-combined/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/vijilai/vijil-console-api-combined/versions/a8b2ee2b2d06/schema)
