TaskLease
Operations
Every route this entity exposes. Each route links to its own reference on this page.
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
created, err := client.TaskLease(nil).Create(map[string]any{"swarm_id": "example", "task_id": "example"}, nil)
if err != nil {
panic(err)
}
fmt.Println(created)
Lua
Construct client as shown in the Lua setup, then call the operations:
local created, err = client:TaskLease():create({ swarm_id = "example", task_id = "example" })
PHP
Construct client as shown in the PHP setup, then call the operations:
$created = $client->TaskLease()->create(["swarm_id" => "example", "task_id" => "example"]);
Python
Construct client as shown in the Python setup, then call the operations:
created = client.TaskLease().create({ "swarm_id": "example", "task_id": "example" })
Ruby
Construct client as shown in the Ruby setup, then call the operations:
created = client.TaskLease.create({ "swarm_id" => "example", "task_id" => "example" })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const created = await client.TaskLease().create({ swarm_id: "example", task_id: "example" })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
id |
string |
No | Id |
create
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_jev
Operation ID: verify_jev_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
provider |
enum: openai |
No | |
request |
object |
Yes |
Responses
200: Bounded browser decision evaluation result
application/json
The response is object.
400: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
401: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
403: Forbidden
404: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
409: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
422: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
502: Bad gateway
503: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_knowledge
Operation ID: verify_knowledge_api_v1_swarm_task_lease.
Authentication: not required.
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
Yes | The active runner lease token |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
arguments |
object |
Yes | |
arguments.offset |
integer |
No | A nonzero byte offset requires the snapshot token returned by the first page |
arguments.path |
string |
Yes | |
arguments.refresh |
boolean |
No | Explicitly use a newer Git view without changing the original prompt or pin |
arguments.snapshot |
string |
No | Opaque snapshot returned by a prior read; use for stable pagination, never with refresh=true |
tool |
string |
Yes |
Responses
200: A UTF-8 page from the exact returned commit; reference data, not current-build evidence
application/json
| Property | Type | Required | Description |
|---|---|---|---|
commit |
string |
Yes | |
content |
string |
Yes | |
freshness |
enum: historical_reference |
Yes | |
next_offset |
integer,null |
Yes | |
path |
string |
Yes | |
snapshot |
string |
Yes |
400: Invalid read arguments or byte offset
401: Invalid lease credential
403: Forbidden
404: File or execution scope is unavailable
409: Lease is inactive or an operator correction requires an explicit refresh
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
enum: knowledge_changed |
No | |
error |
string |
Yes |
422: Current requester or account authority no longer permits the read
502: Bad gateway
503: Git knowledge is temporarily unavailable
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_learning
Operation ID: verify_learning_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
cleanup |
object |
No | |
cleanup.actions |
array of object |
Yes | |
cleanup.postcondition |
array of object |
Yes | |
cleanup.source |
enum: replayed, healed, model |
Yes | |
outcomes |
array of object |
No | |
outcomes[].outcome_index |
integer |
Yes | |
outcomes[].postcondition |
array of object |
Yes | |
outcomes[].source |
enum: replayed, model |
Yes | |
replay |
object |
Yes | |
replay.cleanup_replayed |
boolean |
No | |
replay.healed_actions |
integer |
Yes | |
replay.model_from_step |
integer,null |
No | |
replay.offered_outcomes |
integer |
No | |
replay.offered_steps |
integer |
Yes | |
replay.replay_ms |
integer,null |
No | |
replay.replayed_outcomes |
integer |
No | |
replay.replayed_steps |
integer |
Yes | |
steps |
array of object |
Yes | |
steps[].actions |
array of object |
Yes | |
steps[].postcondition |
array of object |
Yes | |
steps[].source |
enum: replayed, healed, model |
Yes | |
steps[].step_index |
integer |
Yes |
Responses
200: Success
application/json
The response is object.
204: Learning report stored with the ScenarioRun
401: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
403: Forbidden
404: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
409: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
422: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_sign_in
Operation ID: verify_sign_in_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
learned |
object |
No | |
learned.model |
string |
No | |
learned.reasoning_effort |
string |
No | |
learned.script |
string |
Yes | |
learned.sign_in_url |
string |
No | |
learned.usage |
object |
No | |
replayed |
object |
No | |
replayed.code |
string |
No | |
replayed.confirmed |
boolean |
No | Decisions confirmed the page is signed in. |
replayed.id |
string |
Yes | |
replayed.sha256 |
string |
Yes | |
replayed.signed_in |
boolean |
Yes | |
replayed.version |
integer |
Yes | The script version the run was offered. |
Responses
200: Success
application/json
The response is object.
204: Sign-in report recorded
401: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
403: Forbidden
404: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
409: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
422: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/browser_task_activity
Operation ID: browser_task_activity_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/claim
Operation ID: claim_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
lease_token |
string |
No | |
worker_identity |
object |
No | |
worker_identity.allocation_id |
string (uuid) |
Yes | |
worker_identity.process_id |
string (uuid) |
Yes | |
worker_identity.protocol |
enum: roder-worker-v1 |
Yes |
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/evidence
Operation ID: evidence_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/heartbeat
Operation ID: heartbeat_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/release
Operation ID: release_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/result
Operation ID: result_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
No | |
validate_only |
query |
boolean |
No | |
cancelled_recovery |
query |
boolean |
No | Retain browser evidence only for an already cancelled ScenarioRun within its recovery window. |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
result |
object |
Yes | |
result_contract |
string |
Yes |
Responses
200: Detached Roder result accepted or validated
application/json
The response is object or object.
400: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
401: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
403: Forbidden
404: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
409: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
422: Invalid agent swarm request
application/json
| Property | Type | Required | Description |
|---|---|---|---|
details |
array of string |
No | |
error |
string |
Yes |
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_mail
Operation ID: verify_mail_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases/{id}/verify_product_map
Operation ID: verify_product_map_api_v1_swarm_task_lease.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes | |
id |
path |
string |
Yes | |
X-Vex-Lease-Token |
header |
string |
No | Active worker lease credential; organization administrators may instead use their bearer authorization |
Request body
application/json
The request body is object or object or object or object or object or object or object or object.
Responses
200: Bounded history from the active Discovery lease scope; candidate paths require fresh replay
application/json
The response is object or object or object or object or object or object.
400: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
401: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
403: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
404: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
409: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
422: Map read refused or unavailable
application/json
| Property | Type | Required | Description |
|---|---|---|---|
code |
string |
No | |
error |
string |
Yes |
502: Bad gateway
POST /api/v1/agent/swarms/{swarm_id}/tasks/{task_id}/leases
Operation ID: api_v1_swarm_task_leases.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
swarm_id |
path |
string |
Yes | |
task_id |
path |
string |
Yes |
Request body
application/json
The request body is object.
Responses
200: Success
application/json
The response is object.