vault

Acquire the maintenance lease (owner-only)

Owner-only (gitvault.compact). One active lease per (vault, base head) AND one per ORGANIZATION, so two compactions can never run against the same pool. Admits while the org's pooled usage plus the reservation fits within the tier limit plus the computed cycle headroom. holder_token is returned ONCE — it is the liveness instrument for heartbeat, release, and consumption.

post/vaults/v1/{vault_id}/maintenance-leases

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/vaults/v1/{vault_id}/maintenance-leases
  • Auth: one of:
    • API key in header SIGN-IN-WITH-X
    • HTTP bearer

Path parameters

vault_idstring required

The vault id (src_<32 hex>); the wire field is repo_id (protocol D185).

Headers

SIGN-IN-WITH-Xstring required

SIWX auth header — base64-encoded JSON payload containing a signed CAIP-122 (EIP-4361) message. See https://docs.x402.org/extensions/sign-in-with-x.

Request body

base_head_sha256string required

64 lowercase hex — the head the cycle builds on.

current_checkpoint_hashstring nullable
r1_size_bytesstring required

Decimal byte count as a string (values exceed 2^53).

r2_cap_size_bytesstring required

Decimal byte count as a string (values exceed 2^53).

p_before_c1_size_bytesstring

Decimal byte count as a string (values exceed 2^53).

p_before_c2_size_bytesstring

Decimal byte count as a string (values exceed 2^53).

Response

Lease acquired; holder_token returned once

maintenance_lease_idstring
repo_idstring
base_head_sha256string
current_checkpoint_hashstring nullable
reservation_size_bytesstring

Decimal byte count as a string (values exceed 2^53).

maintenance_headroom_bytesstring

Decimal byte count as a string (values exceed 2^53).

holder_tokenstring

Returned ONCE.

expires_atstring date-time nullable
hard_deadline_atstring date-time nullable

Changes

No recorded changes to this operation across all 1 revision of this API.