curl --request POST \
--url https://harness.example.com/session-uploads/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"harness": "<string>",
"session_id": "codex-session-20260827",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"size_bytes": 48217,
"content_type": "application/x-ndjson"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
harness: '<string>',
session_id: 'codex-session-20260827',
sha256: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
size_bytes: 48217,
content_type: 'application/x-ndjson'
})
};
fetch('https://harness.example.com/session-uploads/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/session-uploads/presign"
payload = {
"harness": "<string>",
"session_id": "codex-session-20260827",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"size_bytes": 48217,
"content_type": "application/x-ndjson"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"headers": {},
"upload_url": "<string>",
"method": "PUT",
"complete_url": "<string>"
}Create a short-lived session artifact upload request
Reference path for the global session_upload.presign_url. Implementations may host this endpoint elsewhere. A typical AWS implementation returns an S3 presigned PUT and any headers that were included in its signature.
curl --request POST \
--url https://harness.example.com/session-uploads/presign \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"harness": "<string>",
"session_id": "codex-session-20260827",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"size_bytes": 48217,
"content_type": "application/x-ndjson"
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
harness: '<string>',
session_id: 'codex-session-20260827',
sha256: '0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef',
size_bytes: 48217,
content_type: 'application/x-ndjson'
})
};
fetch('https://harness.example.com/session-uploads/presign', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://harness.example.com/session-uploads/presign"
payload = {
"harness": "<string>",
"session_id": "codex-session-20260827",
"sha256": "0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef",
"size_bytes": 48217,
"content_type": "application/x-ndjson"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"upload_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "pending",
"headers": {},
"upload_url": "<string>",
"method": "PUT",
"complete_url": "<string>"
}Authorizations
OAuth 2.0 access token obtained through RFC 8628 at /api/auth/device/code and /api/auth/oauth2/token. The API enforces governance:read, session:write, and client-status:write as appropriate.
Body
Harness key from the compiled registry
"codex-session-20260827"
^[a-f0-9]{64}$"0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef"
48217
"application/x-ndjson"
Compiled harness adapter profile that produced the upload. When omitted, the upload is recorded without a profile.
"claude-v1"
legacy-raw, blue-session-bundle-v1 2561024x >= 040964096Response
Short-lived provider-specific upload request
pending, complete Show child attributes
Show child attributes
PUT, POST, null Authenticated endpoint called after blob upload
