You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When working with preview branches, you may need to target a specific branch when making API calls. This is particularly useful for managing environment variables or other resources that are scoped to individual preview branches.
102
+
103
+
To target a specific preview branch, include the `x-trigger-branch` header in your API requests with the branch name as the value:
This will set the `DATABASE_URL` environment variable specifically for the `feature-xyz` preview branch.
117
+
118
+
<Note>
119
+
The `x-trigger-branch` header is only relevant when working with the `preview` environment (`{env}` parameter set to `preview`). It has no effect when working with `dev`, `staging`, or `prod` environments.
120
+
</Note>
121
+
122
+
#### SDK usage with preview branches
123
+
124
+
When using the SDK to manage preview branch environment variables, the branch targeting is handled automatically when you're running in a preview environment with the `TRIGGER_PREVIEW_BRANCH` environment variable set. However, you can also specify the branch explicitly:
0 commit comments