Set the preview environment config
Creates the config the first time and updates it afterwards. Omitted fields keep their current value; on a first call they fall back to the defaults documented per field. Preview environments only work for applications deployed with the github method.
Authorizations
Bearer token for authentication. Format: 'Bearer {token}'
Headers
Workspace ID (uses default workspace if not provided)
Path Parameters
Application UUID
Body
Set the preview environment config
Create preview environments for this application. Defaults to false
parent reuses the application's resource, existing requires resource_id. Defaults to parent
parent, existing UUID of the resource preview environments run on. Required when resource_mode is existing
UUID of the project preview environments land in. Omit to follow the parent application
pull_request creates one per pull request, every_branch creates one per pushed branch. Defaults to pull_request
pull_request, every_branch Which pull requests qualify: auto (all non-draft), label, branch_pattern or pr_name_pattern. Defaults to auto
auto, label, branch_pattern, pr_name_pattern Pull request label that triggers creation. Required when trigger_filter is label
Glob matched against the branch name, e.g. feature/*. Required when trigger_filter is branch_pattern
Glob matched against the pull request title, e.g. feat:*. Required when trigger_filter is pr_name_pattern
Redeploy on every push to the tracked branch. Defaults to true
Destroy when the pull request is merged. Defaults to true
Destroy when the pull request is closed unmerged. Defaults to false
Destroy when the branch is deleted. Defaults to false
Destroy after inactivity_days without a commit. Defaults to false
Days without a commit before cleanup. Defaults to 14
Days a preview environment is kept before it expires. Defaults to 7
after_pr_close counts from the pull request closing, from_creation counts from creation. Defaults to after_pr_close
after_pr_close, from_creation Post the preview environment URL as a pull request comment. Defaults to true, and is forced off in every_branch mode
What is copied from the parent application. clone_variables, clone_secret_files and clone_security default to true when absent; addons and cronjobs default to copying all
Response
Set the preview environment config
Api_V1_Entities_PreviewEnvironmentConfig model
Whether preview environments are created for this application
parent (reuse the application's resource) or existing (use resource_id)
UUID of the resource preview environments run on, when resource_mode is existing
UUID of the project preview environments land in. Null means they follow the parent application
pull_request or every_branch
auto, label, branch_pattern or pr_name_pattern
Pull request label that triggers creation, when trigger_filter is label
Glob matched against the branch name, when trigger_filter is branch_pattern
Glob matched against the pull request title, when trigger_filter is pr_name_pattern
Redeploy the preview environment on every push to its branch
Destroy the preview environment when the pull request is merged
Destroy the preview environment when the pull request is closed unmerged
Destroy the preview environment when its branch is deleted
Destroy the preview environment after inactivity_days without a commit
Days without a commit before cleanup, when cleanup_on_inactivity is on
Days a preview environment is kept before it expires
after_pr_close (count from PR close) or from_creation
Post the preview environment URL as a pull request comment. Always off in every_branch mode
What is copied from the parent application. Keys clone_variables, clone_secret_files and clone_security default to true when absent; addons and cronjobs default to copying all
Creation timestamp
Last update timestamp

