Skip to main content
POST
/
v1
/
functions
/
{functionId}
/
rollback
Roll back to a previous deployment
curl --request POST \
  --url https://api.zavu.dev/v1/functions/{functionId}/rollback \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "deploymentId": "fnd_abc123"
}
'
{
  "deployment": {
    "id": "fnd_abc123",
    "functionId": "<string>",
    "version": 123,
    "createdAt": "2023-11-07T05:31:56Z",
    "sourceCodeBytes": 123,
    "bundleBytes": 123,
    "errorMessage": "<string>",
    "deployedAt": "2023-11-07T05:31:56Z"
  },
  "rolledBackToVersion": 123,
  "previousDraft": {}
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

functionId
string
required

Zavu Function ID.

Body

application/json
deploymentId
string
required

ID of the deployment to roll back to.

Response

Rollback deployment queued.

deployment
object
required
rolledBackToVersion
integer
previousDraft
object | null

The draft that was replaced, so a UI can offer to restore it.