Acquire a lock or semaphore permit (1 operation)

limit=1 is a mutex; limit>1 is a semaphore. Returns a strictly increasing fence. IMPORTANT: a TTL lock alone does NOT give mutual exclusion — a holder stalled past its TTL wakes still believing it holds the lock while another agent has legitimately taken it. Carry the fence into the resource you are protecting and reject lower values, or what you have is an advisory lock. A blocked acquire still costs an operation and returns retry_after; you are never charged when Soren itself fails. Re-acquiring as the same holder extends the permit rather than consuming a second one.

post/v1/coord/lock/{name}

Request

  • Base URL: https://soren.com
  • URL: https://soren.com/v1/coord/lock/{name}
  • Auth: none declared. Required headers: Authorization

Path parameters

namestring required

Your name for this lock/bucket/sequence. Namespaced to your wallet; never persisted.

Query parameters

nsstring

Optional sub-namespace, for running two independent fleets from one wallet.

holderstring required

A stable id for this agent. Identifies who holds the permit so renew and release work.

ttlinteger

Seconds until the permit lapses if not renewed.

limitinteger

Concurrent holders allowed. 1 is a mutex.

Headers

Authorizationstring required

Bearer <session_token> from POST /v1/coord/session.

Response

Result.

object required

Changes

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