Acquire lease
acquire_leaseClaim one unit of work so concurrent agents do not perform it twice. The first writer receives an owner token and a monotonic fencing token. A later caller receives held, conflict or a reusable completed result. Contention is a normal result. Use a private namespace, or supply a high-entropy unscoped key. No authentication is required.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Work identity. With a namespace it may be a short URL-safe name. Without one it must be a caller-generated high-entropy secret of at least 32 characters. | |
| namespace | No | Optional 256-bit namespace from create_lease_namespace. Keep it secret. | |
| fingerprint | No | Optional stable description or digest that binds this key to the same work. | |
| ttl_seconds | No | Ownership period, capped by the absolute 24 hour lifetime. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| error | No | ||
| result | No | ||
| status | Yes | ||
| owner_token | No | ||
| ttl_seconds | No | ||
| completed_at | No | ||
| fencing_token | No | ||
| lease_expires_at | No | ||
| absolute_expires_at | No | ||
| retry_after_seconds | No | ||
| completed_at_timestamp | No | ||
| lease_expires_at_timestamp | No | ||
| absolute_expires_at_timestamp | No |