Skip to main content
Prisma Documentation Docs

Search documentation

Type to search this documentation.

Delete Alchemy stack state

DELETE/v1/projects/{projectId}/branches/{branchId}/alchemy-state/state/stacks/{stack}Delete Alchemy stack state

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

Deletes every resource-state and output row of the stack, or only the given stage's rows when the stage query parameter is set. Requires a live deploy lease on the affected stage; without a stage it additionally requires that no other stage of the stack holds a live lease, so one stage's deploy can never delete state another stage's deploy is using. Idempotent.

Parameters

projectIdstringpathrequired

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

branchIdstringpathrequired

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

stackstringpathrequired

maxLength 200 · minLength 1

stagestringquery

maxLength 200 · minLength 1

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]+)$

Responses

204Deleted (or already absent).
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 or branch not found.application/json
object
errorobjectrequired
Show child attributes
codestringrequired
hintstring
messagestringrequired
Example response
{
  "error": {
    "code": "string",
    "hint": "string",
    "message": "string"
  }
}
409No live deploy lease held for this stack and stage.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