API referencev1
Execute a model-fusion harness task
FusionKit calls this HTTP/JSON seam to ask a harness executor to run a coding task and return persisted JSON Schema audit records.
Request Body
application/jsonRequiredrequest_idRequiredstringtask_idRequiredstringsource_repoRequiredstringbase_git_shaRequiredstringPattern:
"^[0-9a-f]{40}$"harness_kindRequiredstringprompt_hashRequiredstringPattern:
"^sha256:[0-9a-f]{64}$"allowed_toolsRequiredarray<string>side_effectsRequiredstringharness_run_requestRequiredobjectResponse Body
Harness execution completed or reached a terminal skipped/failed status.
TypeScript Definitions
Use the response body type in TypeScript.
request_idRequiredstringresult_idRequiredstringstatusRequiredstringcandidate_idsRequiredarray<string>artifactsarray<object>harness_run_resultRequiredobjectInvalid request shape or unsupported harness contract.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredstringcodestringExecutor is unavailable or missing explicitly requested live credentials.
TypeScript Definitions
Use the response body type in TypeScript.
errorRequiredstringcodestringcurl -X POST "https://example.com/v1/harness-executions" \
-H "Content-Type: application/json" \
-d '{
"request_id": "string",
"task_id": "string",
"source_repo": "string",
"base_git_sha": "string",
"harness_kind": "string",
"prompt_hash": "string",
"allowed_tools": [
"string"
],
"side_effects": "string",
"harness_run_request": {
"schema": "harness-run-request.v1",
"schema_version": "v1",
"schema_bundle_hash": "string",
"persisted_json": {}
}
}'const body = JSON.stringify({
"request_id": "string",
"task_id": "string",
"source_repo": "string",
"base_git_sha": "string",
"harness_kind": "string",
"prompt_hash": "string",
"allowed_tools": [
"string"
],
"side_effects": "string",
"harness_run_request": {
"schema": "harness-run-request.v1",
"schema_version": "v1",
"schema_bundle_hash": "string",
"persisted_json": {}
}
})
fetch("https://example.com/v1/harness-executions", {
body
})package main
import (
"fmt"
"net/http"
"io/ioutil"
"strings"
)
func main() {
url := "https://example.com/v1/harness-executions"
body := strings.NewReader(`{
"request_id": "string",
"task_id": "string",
"source_repo": "string",
"base_git_sha": "string",
"harness_kind": "string",
"prompt_hash": "string",
"allowed_tools": [
"string"
],
"side_effects": "string",
"harness_run_request": {
"schema": "harness-run-request.v1",
"schema_version": "v1",
"schema_bundle_hash": "string",
"persisted_json": {}
}
}`)
req, _ := http.NewRequest("POST", url, body)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(res)
fmt.Println(string(body))
}import requests
url = "https://example.com/v1/harness-executions"
body = {
"request_id": "string",
"task_id": "string",
"source_repo": "string",
"base_git_sha": "string",
"harness_kind": "string",
"prompt_hash": "string",
"allowed_tools": [
"string"
],
"side_effects": "string",
"harness_run_request": {
"schema": "harness-run-request.v1",
"schema_version": "v1",
"schema_bundle_hash": "string",
"persisted_json": {}
}
}
response = requests.request("POST", url, json = body, headers = {
"Content-Type": "application/json"
})
print(response.text){
"request_id": "string",
"result_id": "string",
"status": "string",
"candidate_ids": [
"string"
],
"artifacts": [
{
"artifact_id": "string",
"kind": "string",
"hash": "string",
"redaction_status": "synthetic"
}
],
"harness_run_result": {
"schema": "harness-run-request.v1",
"schema_version": "v1",
"schema_bundle_hash": "string",
"persisted_json": {}
}
}{
"error": "string",
"code": "string"
}{
"error": "string",
"code": "string"
}