Leases
Compute lease lifecycle and providers.
Compute lease lifecycle and providers.
POSTPOSTGETGETGET
/attestation/requestRequest timekeeper attestation — Asks this node, acting as a timekeeper, to sign a timestamp over an identifier. Identifiers are 64 characters long — a lease hash, or a provider address for a performance-certificate benchmark — and must be bound to something real on this node: a lease in the created or accepted state, or an account registered in this node's directory. Anything else is refused.
/lease/requestCreate a lease from a provider offer — Operator-only. The node publishes a resource request to the marketplace, waits up to 30 seconds for a provider offer, then signs and submits a lease block from its own wallet — escrowing that wallet's XUSD. It does not merely quote. Because it spends and signs as the operator, it requires an admin bearer token (`Authorization: Bearer <token>`); the node must be started with `XE_API_ADMIN_TOKEN` set or the endpoint answers 403 for everyone.
/leasesList all leases — Every lease this node knows about. Paginated, and optionally filtered to a single lifecycle state.
/leases/{hash}Get lease by hash
/providersList providers — Providers whose resource advertisement this node has received over gossip, each joined with this node's lease view of that provider.
These endpoints are served by every node but are not yet in the OpenAPI spec above, so they are documented on their own pages:
- Get this node's certificate —
GET /certificate - Get a provider's certificate —
GET /certificate/{provider}
Leases move through the lifecycle by block submission, not by these endpoints:
lease, lease_accept, lease_settle, lease_cancel and lease_force_settle
are all under Blocks. The reads here report the state those
blocks produce. POST /lease/request is the one exception — it is an
operator-only convenience that signs and submits a lease block on the node's own
behalf, and needs an admin bearer token.