provider Code references PUT /api/v2/code-refs/repositories/{repo}/branches/{branch}
@utdk/launchdarkly /api/v2/code-refs/repositories/{repo}/branches/{branch}
Upsert branch
Create a new branch if it doesn't exist, or update the branch if it already exists.
repo path required
The repository name
string
branch path required
The URL-encoded branch name
string

Try it

Authentication
Configure credentials for LaunchDarkly REST API
Gateway
The gateway proxies requests and injects credentials server-side. Configure credentials above, then enter your gateway URL.

Saved automatically to browser storage.

putbranch
PUT/api/v2/code-refs/repositories/{repo}/branches/{branch}
Create a new branch if it doesn't exist, or update the branch if it already exists.

Parameters

required

The repository name

required

The URL-encoded branch name

Input

required

The branch name

required

An ID representing the branch HEAD. For example, a commit SHA.

An optional ID used to prevent older data from overwriting newer data. If no sequence ID is included, the newly submitted data will always be saved.

required

An array of flag references found on the branch

Enter a gateway URL above to enable sending.

Code snippet
Updates live as you fill in the form above.

TypeScript

import launchdarkly from '@utdk/launchdarkly';

await launchdarkly.putbranch()