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 '
{
"digest": "<string>",
"format_version": 1,
"root": "<string>",
"units": [
{
"bytes_hex": "<string>",
"digest": "<string>",
"kind": 1,
"path": "<string>"
}
]
}
'import requests
url = "http://127.0.0.1/v1/jobs"
payload = {
"digest": "<string>",
"format_version": 1,
"root": "<string>",
"units": [
{
"bytes_hex": "<string>",
"digest": "<string>",
"kind": 1,
"path": "<string>"
}
]
}
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({
digest: '<string>',
format_version: 1,
root: '<string>',
units: [{bytes_hex: '<string>', digest: '<string>', kind: 1, path: '<string>'}]
})
};
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([
'digest' => '<string>',
'format_version' => 1,
'root' => '<string>',
'units' => [
[
'bytes_hex' => '<string>',
'digest' => '<string>',
'kind' => 1,
'path' => '<string>'
]
]
]),
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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"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"
}
},
"trace_id": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"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"
}
},
"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 immutable snapshot bytes as a durable job
The server decodes and readmits this exact body through ExecutionService and never interprets a caller filesystem path. Idempotency binds to the exact snapshot payload 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 '
{
"digest": "<string>",
"format_version": 1,
"root": "<string>",
"units": [
{
"bytes_hex": "<string>",
"digest": "<string>",
"kind": 1,
"path": "<string>"
}
]
}
'import requests
url = "http://127.0.0.1/v1/jobs"
payload = {
"digest": "<string>",
"format_version": 1,
"root": "<string>",
"units": [
{
"bytes_hex": "<string>",
"digest": "<string>",
"kind": 1,
"path": "<string>"
}
]
}
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({
digest: '<string>',
format_version: 1,
root: '<string>',
units: [{bytes_hex: '<string>', digest: '<string>', kind: 1, path: '<string>'}]
})
};
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([
'digest' => '<string>',
'format_version' => 1,
'root' => '<string>',
'units' => [
[
'bytes_hex' => '<string>',
'digest' => '<string>',
'kind' => 1,
'path' => '<string>'
]
]
]),
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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\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 \"digest\": \"<string>\",\n \"format_version\": 1,\n \"root\": \"<string>\",\n \"units\": [\n {\n \"bytes_hex\": \"<string>\",\n \"digest\": \"<string>\",\n \"kind\": 1,\n \"path\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"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"
}
},
"trace_id": "<string>"
}{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "queued",
"error": {
"code": "<string>",
"message": "<string>"
},
"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"
}
},
"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
Immutable byte-owned execution world. Unit bytes are canonical lowercase hexadecimal and digests are canonical lowercase SHA-256. The decoded unit aggregate is limited to 16 MiB and the complete encoded request to 33 MiB. This object is the request body itself, not a path-bearing wrapper.
Response
Idempotent replay
queued, running, interrupted, paused, succeeded, failed, cancelled 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
Was this page helpful?