Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Heartbeat Alchemy deploy lease

PATCH/v1/projects/{projectId}/branches/{branchId}/alchemy-state/leaseHeartbeat Alchemy deploy lease

⚠️ Experimental endpoint: this API is in active development and may change at any time without notice. ⚠️

Extends the unexpired deploy lease addressed by the Alchemy-State-Lease-Id header from now. A missing, replaced, or expired lease returns 404 — the lost-lease signal; an expired lease can never be revived.

Parameters

projectIdstringpathrequired

pattern ^(proj_)?([cC][^\s-]{8,}|[a-z0-9]+)$

branchIdstringpathrequired

pattern ^(br_)?([cC][^\s-]{8,}|[a-z0-9]+)$

alchemy-state-lease-idstringheaderrequired

Deploy-lease id returned by the lease acquire endpoint. Addresses the lease on heartbeat and release, and authorizes every state operation.

pattern ^(aslease_)?([cC][^\s-]{8,}|[a-z0-9]+)$

Request body

application/json
object
ttlSecondsinteger

Requested lease TTL in seconds. Default 60, clamped to [30, 300].

exclusiveMinimum 0

Example request
{
  "ttlSeconds": 0
}

Responses

200Extended the deploy lease.application/json
object
dataobjectrequired
Show child attributes
expiresAtstringrequired

Lease expiry as an ISO-8601 timestamp.

leaseIdstringrequired

Capability token for the deploy lease. Send it in the Alchemy-State-Lease-Id header with every state operation; do not log it.

Example response
{
  "data": {
    "expiresAt": "string",
    "leaseId": "string"
  }
}
401Missing or invalid authorization token.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
404Project, branch, or unexpired lease not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
413Request body exceeds this endpoint's size cap.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
Documentation menu