Code references
Update repository
Update a repository's settings. Updating repository settings uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.
patch/api/v2/code-refs/repositories/{repo}
Path parameters
repostring string required
The repository name
The repository name
Request body
Example request
[
{
"op": "replace",
"path": "/exampleField",
"value": "new example value"
}
]Response
Repository response
Example response
{
"name": "LaunchDarkly-Docs",
"sourceLink": "https://github.com/launchdarkly/LaunchDarkly-Docs",
"commitUrlTemplate": "https://github.com/launchdarkly/LaunchDarkly-Docs/commit/${sha}",
"hunkUrlTemplate": "https://github.com/launchdarkly/LaunchDarkly-Docs/blob/${sha}/${filePath}#L${lineNumber}",
"type": "github",
"defaultBranch": "main",
"enabled": true,
"version": 3,
"branches": [
{
"name": "main",
"head": "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3",
"updateSequenceId": 25,
"references": [
{
"path": "/main/index.js",
"hint": "javascript",
"hunks": [
{
"startingLineNumber": 45,
"lines": "var enableFeature = 'enable-feature';",
"projKey": "default",
"flagKey": "enable-feature",
"aliases": [
"enableFeature",
"EnableFeature"
]
}
]
}
]
}
],
"_access": {
"denied": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
],
"allowed": [
{
"reason": {
"resources": [
"proj/*:env/*;qa_*:/flag/*"
],
"actions": [
"*"
],
"effect": "allow"
}
}
]
}
}