Skip to main content
POST
/
pipelines
/
{id}
/
preview
/
enable
Enable pipeline preview
curl --request POST \
  --url https://api.sevalla.com/v3/pipelines/{id}/preview/enable \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repo_url": "https://github.com/user/repo",
  "auto_create_app": false,
  "delete_stale_apps": false,
  "stale_app_days": 5
}
'
{
  "message": "Pipeline preview stage has been enabled"
}

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

Pipeline 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"

Body

application/json
repo_url
string<uri>

Git repository URL to connect to the pipeline. Required if the pipeline does not already have a repository configured.

Example:

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

auto_create_app
boolean
default:false

Automatically create a preview app when a pull request is opened

Example:

false

delete_stale_apps
boolean
default:false

Automatically delete preview apps that have not been deployed for longer than the stale app threshold

Example:

false

stale_app_days
integer
default:5

Number of days after the last deployment before a preview app is considered stale

Required range: 1 <= x <= 365
Example:

5

Response

Default Response

message
string
required

Confirmation message

Example:

"Pipeline preview stage has been enabled"