For the complete documentation index, see llms.txt. For the full documentation snapshot, see llms-full.txt.
Create a new branch if it doesn’t exist, or update the branch if it already exists.
curl --request PUT \
--url https://app.launchdarkly.com/api/v2/code-refs/repositories/{repo}/branches/{branch} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "main",
"head": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"syncTime": "1636558831870",
"updateSequenceId": 25,
"references": [
{
"path": "/main/index.js",
"hunks": [
{
"startingLineNumber": 45,
"lines": "var enableFeature = 'enable-feature';",
"projKey": "default",
"flagKey": "enable-feature",
"aliases": [
"enableFeature",
"EnableFeature"
]
}
],
"hint": "javascript"
}
],
"commitTime": "1636558831870"
}
EOF{
"code": "invalid_request",
"message": "Invalid request body"
}Documentation Index
Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
The repository name
The URL-encoded branch name
The branch name
"main"
An ID representing the branch HEAD. For example, a commit SHA.
"a94a8fe5ccb19ba61c4c0873d391e987982fbbd3"
A timestamp indicating when the branch was last synced
"1636558831870"
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.
25
An array of flag references found on the branch
Show child attributes
A timestamp of the current commit
"1636558831870"
Action succeeded
curl --request PUT \
--url https://app.launchdarkly.com/api/v2/code-refs/repositories/{repo}/branches/{branch} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data @- <<EOF
{
"name": "main",
"head": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"syncTime": "1636558831870",
"updateSequenceId": 25,
"references": [
{
"path": "/main/index.js",
"hunks": [
{
"startingLineNumber": 45,
"lines": "var enableFeature = 'enable-feature';",
"projKey": "default",
"flagKey": "enable-feature",
"aliases": [
"enableFeature",
"EnableFeature"
]
}
],
"hint": "javascript"
}
],
"commitTime": "1636558831870"
}
EOF{
"code": "invalid_request",
"message": "Invalid request body"
}