curl --request POST \
--url http://127.0.0.1/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"workflow": "<string>",
"access": "<string>",
"inputs": {}
}
'import requests
url = "http://127.0.0.1/v1/jobs"
payload = {
"workflow": "<string>",
"access": "<string>",
"inputs": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({workflow: '<string>', access: '<string>', inputs: {}})
};
fetch('http://127.0.0.1/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://127.0.0.1/v1/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => '<string>',
'access' => '<string>',
'inputs' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1/v1/jobs"
payload := strings.NewReader("{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1/v1/jobs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": {
"reason": "write_failed",
"status": "mirror_lost"
},
"execution_id": "<string>",
"outputs": {},
"receipt": {
"execution_id": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_digest": "<string>",
"trace_id": "<string>",
"chain_head": "<string>",
"origin": {
"kind": "manual"
}
},
"settlement": {
"cause": "normal",
"spend": {
"priced_calls": 1,
"qualifier": "priced",
"unpriced_calls": 1,
"by_source": {},
"pricing_as_of": "<string>",
"total_cost_usd": 1
},
"status": "succeeded",
"elapsed_ms": 1,
"error": {
"code": "<string>",
"message": "<string>",
"task": "<string>"
},
"tasks": {
"cancelled": 1,
"failed": 1,
"never_started": 1,
"ok": 1,
"recovered": 1,
"skipped": 1,
"total": 1
}
},
"trace_id": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": {
"reason": "write_failed",
"status": "mirror_lost"
},
"execution_id": "<string>",
"outputs": {},
"receipt": {
"execution_id": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_digest": "<string>",
"trace_id": "<string>",
"chain_head": "<string>",
"origin": {
"kind": "manual"
}
},
"settlement": {
"cause": "normal",
"spend": {
"priced_calls": 1,
"qualifier": "priced",
"unpriced_calls": 1,
"by_source": {},
"pricing_as_of": "<string>",
"total_cost_usd": 1
},
"status": "succeeded",
"elapsed_ms": 1,
"error": {
"code": "<string>",
"message": "<string>",
"task": "<string>"
},
"tasks": {
"cancelled": 1,
"failed": 1,
"never_started": 1,
"ok": 1,
"recovered": 1,
"skipped": 1,
"total": 1
}
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Admit a workflow as a durable job — by served name, or as immutable snapshot bytes
Two forms, one admission (ADR-131). {"workflow": "<name>"} names a workflow the served registry lists: the resident captures its world through ExecutionService, exactly as a schedule does. Optional access on that form is CLI --access for this job only. A snapshot body is the world nika check <file> --json --sdk-snapshot prints, decoded and readmitted through the same ExecutionService; its digests are optional caller-supplied integrity digests (a content assertion, never a signature). Snapshot jobs inherit the resident’s unpinned plan. The server never interprets a caller filesystem path. Idempotency binds to the exact request bytes.
curl --request POST \
--url http://127.0.0.1/v1/jobs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"workflow": "<string>",
"access": "<string>",
"inputs": {}
}
'import requests
url = "http://127.0.0.1/v1/jobs"
payload = {
"workflow": "<string>",
"access": "<string>",
"inputs": {}
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({workflow: '<string>', access: '<string>', inputs: {}})
};
fetch('http://127.0.0.1/v1/jobs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "http://127.0.0.1/v1/jobs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => '<string>',
'access' => '<string>',
'inputs' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "http://127.0.0.1/v1/jobs"
payload := strings.NewReader("{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("http://127.0.0.1/v1/jobs")
.header("Idempotency-Key", "<idempotency-key>")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("http://127.0.0.1/v1/jobs")
http = Net::HTTP.new(url.host, url.port)
request = Net::HTTP::Post.new(url)
request["Idempotency-Key"] = '<idempotency-key>'
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": \"<string>\",\n \"access\": \"<string>\",\n \"inputs\": {}\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": {
"reason": "write_failed",
"status": "mirror_lost"
},
"execution_id": "<string>",
"outputs": {},
"receipt": {
"execution_id": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_digest": "<string>",
"trace_id": "<string>",
"chain_head": "<string>",
"origin": {
"kind": "manual"
}
},
"settlement": {
"cause": "normal",
"spend": {
"priced_calls": 1,
"qualifier": "priced",
"unpriced_calls": 1,
"by_source": {},
"pricing_as_of": "<string>",
"total_cost_usd": 1
},
"status": "succeeded",
"elapsed_ms": 1,
"error": {
"code": "<string>",
"message": "<string>",
"task": "<string>"
},
"tasks": {
"cancelled": 1,
"failed": 1,
"never_started": 1,
"ok": 1,
"recovered": 1,
"skipped": 1,
"total": 1
}
},
"trace_id": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"evidence": {
"reason": "write_failed",
"status": "mirror_lost"
},
"execution_id": "<string>",
"outputs": {},
"receipt": {
"execution_id": "<string>",
"job_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"snapshot_digest": "<string>",
"trace_id": "<string>",
"chain_head": "<string>",
"origin": {
"kind": "manual"
}
},
"settlement": {
"cause": "normal",
"spend": {
"priced_calls": 1,
"qualifier": "priced",
"unpriced_calls": 1,
"by_source": {},
"pricing_as_of": "<string>",
"total_cost_usd": 1
},
"status": "succeeded",
"elapsed_ms": 1,
"error": {
"code": "<string>",
"message": "<string>",
"task": "<string>"
},
"tasks": {
"cancelled": 1,
"failed": 1,
"never_started": 1,
"ok": 1,
"recovered": 1,
"skipped": 1,
"total": 1
}
},
"trace_id": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
Exactly one Authorization: Bearer value from the token file
Headers
1 - 255Body
- Option 1
- Option 2
The by-name form (ADR-131): a workflow the served registry lists (GET /v1/workflows · project-root-relative, .nika). The resident captures its world exactly as a schedule does — the one owner of the snapshot and its digest domain. Idempotency binds to these request bytes. Optional access is the same pin as CLI --access (a pin is a pin). Absent: the resident's unpinned plan. Snapshot bodies reject both access and inputs overlays, including null or empty maps. Optional inputs are literal JSON values checked against declared keys, types and required values before a job exists; strings are never CLI @env instructions or expressions.
1 - 4096Access pin, same vocabulary as --access (class or harness id). A pin never silently substitutes a metered seat.
1 - 64Literal JSON overrides for declared workflow inputs. Unknown keys, wrong types and missing required values refuse with 422; defaults remain authored. A present null is refused. Inputs bind exact request identity and survive durable queue recovery; workflow bytes are unchanged.
Response
Idempotent replay
queued and running: the resident owns the execution. interrupted: execution ownership was lost and effect settlement is unknown — an EVIDENCE state (the journal is INCOMPLETE), never a run state (ADR-129). paused, succeeded, failed and cancelled: the run's own settlement, the words its terminal frame carries (ADR-128).
queued, running, interrupted, paused, succeeded, failed, cancelled Show child attributes
Show child attributes
Reported journal delivery loss, independent of execution status. The reason classifies the mirror's first error without exposing OS text or paths. Absence is not a claim that a journal exists.
Show child attributes
Show child attributes
Declared workflow outputs; present only after settlement when supplied by the execution adapter
Terminal binding to the exact immutable admitted execution
Show child attributes
Show child attributes
The run's settlement (ADR-128), built once by the runtime and projected whole: the state word every door speaks, why, the elapsed time on the kernel clock, the task tally, the spend with its qualifier, the failure named. Unknown cost is never zero: total_cost_usd is absent when nothing was metered. Present on the terminal event and durable job response of a job whose runtime settled; absent when the resident lost the execution (interrupted) or refused it before any task. Reattachment and idempotent admission replay project the same hash-bound terminal event, never a new settlement.
Show child attributes
Show child attributes
Was this page helpful?