Skip to main content
POST
/
applications
/
{id}
/
deployments
/
rollback
Rollback deployment
curl --request POST \
  --url https://api.sevalla.com/v3/applications/{id}/deployments/rollback \
  --header 'Authorization: Bearer <token>'
{
  "id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "app_id": "fb5e5168-4281-4bec-94c5-0d1584e9e657",
  "status": "success",
  "type": "manual",
  "trigger": "MANUAL_DEPLOY",
  "steps": [
    "rollout"
  ],
  "docker_image_url": "us-central1-docker.pkg.dev/project/repo/image:abc123",
  "git_type": "github",
  "repo_url": "https://github.com/user/repo",
  "branch": "main",
  "commit_sha": "a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2",
  "commit_message": "feat: add new feature",
  "author_login": "octocat",
  "author_img": "https://avatars.githubusercontent.com/u/583231",
  "started_at": "2025-01-30T00:00:00.000Z",
  "finished_at": "2025-01-30T00:05:00.000Z",
  "created_at": "2025-01-30T00:00:00.000Z",
  "updated_at": "2025-01-30T00:00:00.000Z"
}

Authorizations

Authorization
string
header
required

API key authentication. Pass your API key as a Bearer token in the Authorization header.

Path Parameters

id
string<uuid>
required

Application identifier

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

Response

Default Response

id
string<uuid>
required

Unique identifier for the deployment

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

app_id
string<uuid> | null
required

Identifier of the application this deployment belongs to

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$
Example:

"fb5e5168-4281-4bec-94c5-0d1584e9e657"

status
enum<string> | null
required

Current status of the deployment in its lifecycle

Available options:
waiting,
inProgress,
success,
failed,
cancelled,
skipped
Example:

"success"

type
enum<string> | null
required

How the deployment was initiated. manual - triggered by a user or API call. automatic - triggered automatically by a git push or webhook.

Available options:
manual,
automatic
Example:

"manual"

trigger
string | null
required

Specific action that initiated the deployment, such as MANUAL_DEPLOY, ROLLBACK_DEPLOYMENT, AUTO_DEPLOY_ON_PUSH, or RESTART

Example:

"MANUAL_DEPLOY"

steps
enum<string>[]
required

Ordered list of pipeline steps this deployment will execute. checkout - clone the repository. build - build the application image. rollout - deploy the image to the cluster. syncConnections - synchronize database and service connections.

Available options:
checkout,
build,
rollout,
syncConnections
Example:
["rollout"]
docker_image_url
string | null
required

Full URL of the Docker image built or used for this deployment, including the registry path and tag

Example:

"us-central1-docker.pkg.dev/project/repo/image:abc123"

git_type
enum<string> | null
required

Git hosting provider for the source repository. github - GitHub. bitbucket - Bitbucket. gitlab - GitLab. Null for Docker image deployments.

Available options:
github,
bitbucket,
gitlab
Example:

"github"

repo_url
string | null
required

Full URL of the Git repository used for this deployment. Null for Docker image deployments.

Example:

"https://github.com/user/repo"

branch
string | null
required

Git branch that was deployed. Null for Docker image deployments.

Example:

"main"

commit_sha
string | null
required

Full SHA hash of the Git commit that was deployed

Example:

"a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2"

commit_message
string | null
required

Commit message of the deployed Git commit, truncated to 1000 characters

Example:

"feat: add new feature"

author_login
string | null
required

Username of the Git commit author on the hosting provider

Example:

"octocat"

author_img
string | null
required

Avatar URL of the Git commit author on the hosting provider

Example:

"https://avatars.githubusercontent.com/u/583231"

started_at
string<date-time> | null
required

Timestamp when the deployment started executing, in ISO 8601 format. Null if still waiting.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-30T00:00:00.000Z"

finished_at
string<date-time> | null
required

Timestamp when the deployment finished (succeeded, failed, or was cancelled), in ISO 8601 format. Null if still in progress.

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-30T00:05:00.000Z"

created_at
string<date-time>
required

Timestamp when the deployment was created, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-30T00:00:00.000Z"

updated_at
string<date-time>
required

Timestamp when the deployment was last modified, in ISO 8601 format

Pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$
Example:

"2025-01-30T00:00:00.000Z"