All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| deleteBranches | POST /api/v2/code-refs/repositories/{repo}/branch-delete-tasks | Delete branches |
| deleteRepository | DELETE /api/v2/code-refs/repositories/{repo} | Delete repository |
| getBranch | GET /api/v2/code-refs/repositories/{repo}/branches/{branch} | Get branch |
| getBranches | GET /api/v2/code-refs/repositories/{repo}/branches | List branches |
| getExtinctions | GET /api/v2/code-refs/extinctions | List extinctions |
| getRepositories | GET /api/v2/code-refs/repositories | List repositories |
| getRepository | GET /api/v2/code-refs/repositories/{repo} | Get repository |
| getRootStatistic | GET /api/v2/code-refs/statistics | Get links to code reference repositories for each project |
| getStatistics | GET /api/v2/code-refs/statistics/{projectKey} | Get code references statistics for flags |
| patchRepository | PATCH /api/v2/code-refs/repositories/{repo} | Update repository |
| postExtinction | POST /api/v2/code-refs/repositories/{repo}/branches/{branch}/extinction-events | Create extinction |
| postRepository | POST /api/v2/code-refs/repositories | Create repository |
| putBranch | PUT /api/v2/code-refs/repositories/{repo}/branches/{branch} | Upsert branch |
deleteBranches(requestBody)
Asynchronously delete a number of branches.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name to delete branches for. (default to undefined)
let requestBody: Array<string>; //
const { status, data } = await apiInstance.deleteBranches(
repo,
requestBody
);| Name | Type | Description | Notes |
|---|---|---|---|
| requestBody | Array | ||
| repo | [string] | The repository name to delete branches for. | defaults to undefined |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Action succeeded | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteRepository()
Delete a repository with the specified name.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
const { status, data } = await apiInstance.deleteRepository(
repo
);| Name | Type | Description | Notes |
|---|---|---|---|
| repo | [string] | The repository name | defaults to undefined |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Action succeeded | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BranchRep getBranch()
Get a specific branch in a repository.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
let branch: string; //The url-encoded branch name (default to undefined)
let projKey: string; //Filter results to a specific project (optional) (default to undefined)
let flagKey: string; //Filter results to a specific flag key (optional) (default to undefined)
const { status, data } = await apiInstance.getBranch(
repo,
branch,
projKey,
flagKey
);| Name | Type | Description | Notes |
|---|---|---|---|
| repo | [string] | The repository name | defaults to undefined |
| branch | [string] | The url-encoded branch name | defaults to undefined |
| projKey | [string] | Filter results to a specific project | (optional) defaults to undefined |
| flagKey | [string] | Filter results to a specific flag key | (optional) defaults to undefined |
BranchRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Branch response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BranchCollectionRep getBranches()
Get a list of branches.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
const { status, data } = await apiInstance.getBranches(
repo
);| Name | Type | Description | Notes |
|---|---|---|---|
| repo | [string] | The repository name | defaults to undefined |
BranchCollectionRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Branch collection response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExtinctionCollectionRep getExtinctions()
Get a list of all extinctions. LaunchDarkly creates an extinction event after you remove all code references to a flag. To learn more, read About extinction events.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repoName: string; //Filter results to a specific repository (optional) (default to undefined)
let branchName: string; //Filter results to a specific branch. By default, only the default branch will be queried for extinctions. (optional) (default to undefined)
let projKey: string; //Filter results to a specific project (optional) (default to undefined)
let flagKey: string; //Filter results to a specific flag key (optional) (default to undefined)
let from: number; //Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `to`. (optional) (default to undefined)
let to: number; //Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `from`. (optional) (default to undefined)
const { status, data } = await apiInstance.getExtinctions(
repoName,
branchName,
projKey,
flagKey,
from,
to
);| Name | Type | Description | Notes |
|---|---|---|---|
| repoName | [string] | Filter results to a specific repository | (optional) defaults to undefined |
| branchName | [string] | Filter results to a specific branch. By default, only the default branch will be queried for extinctions. | (optional) defaults to undefined |
| projKey | [string] | Filter results to a specific project | (optional) defaults to undefined |
| flagKey | [string] | Filter results to a specific flag key | (optional) defaults to undefined |
| from | [number] | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `to`. | (optional) defaults to undefined |
| to | [number] | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `from`. | (optional) defaults to undefined |
ExtinctionCollectionRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Extinction collection response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryCollectionRep getRepositories()
Get a list of connected repositories. Optionally, you can include branch metadata with the withBranches query parameter. Embed references for the default branch with ReferencesForDefaultBranch. You can also filter the list of code references by project key and flag key.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let withBranches: string; //If set to any value, the endpoint returns repositories with associated branch data (optional) (default to undefined)
let withReferencesForDefaultBranch: string; //If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch (optional) (default to undefined)
let projKey: string; //A LaunchDarkly project key. If provided, this filters code reference results to the specified project. (optional) (default to undefined)
let flagKey: string; //If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch (optional) (default to undefined)
const { status, data } = await apiInstance.getRepositories(
withBranches,
withReferencesForDefaultBranch,
projKey,
flagKey
);| Name | Type | Description | Notes |
|---|---|---|---|
| withBranches | [string] | If set to any value, the endpoint returns repositories with associated branch data | (optional) defaults to undefined |
| withReferencesForDefaultBranch | [string] | If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch | (optional) defaults to undefined |
| projKey | [string] | A LaunchDarkly project key. If provided, this filters code reference results to the specified project. | (optional) defaults to undefined |
| flagKey | [string] | If set to any value, the endpoint returns repositories with associated branch data, as well as code references for the default git branch | (optional) defaults to undefined |
RepositoryCollectionRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Repository collection response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep getRepository()
Get a single repository by name.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
const { status, data } = await apiInstance.getRepository(
repo
);| Name | Type | Description | Notes |
|---|---|---|---|
| repo | [string] | The repository name | defaults to undefined |
RepositoryRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Repository response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatisticsRoot getRootStatistic()
Get links for all projects that have code references.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
const { status, data } = await apiInstance.getRootStatistic();This endpoint does not have any parameters.
StatisticsRoot
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Statistic root response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatisticCollectionRep getStatistics()
Get statistics about all the code references across repositories for all flags in your project that have code references in the default branch, for example, main. Optionally, you can include the flagKey query parameter to limit your request to statistics about code references for a single flag. This endpoint returns the number of references to your flag keys in your repositories, as well as a link to each repository.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let projectKey: string; //The project key (default to undefined)
let flagKey: string; //Filter results to a specific flag key (optional) (default to undefined)
const { status, data } = await apiInstance.getStatistics(
projectKey,
flagKey
);| Name | Type | Description | Notes |
|---|---|---|---|
| projectKey | [string] | The project key | defaults to undefined |
| flagKey | [string] | Filter results to a specific flag key | (optional) defaults to undefined |
StatisticCollectionRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Statistic collection response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep patchRepository(patchOperation)
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.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
let patchOperation: Array<PatchOperation>; //
const { status, data } = await apiInstance.patchRepository(
repo,
patchOperation
);| Name | Type | Description | Notes |
|---|---|---|---|
| patchOperation | Array | ||
| repo | [string] | The repository name | defaults to undefined |
RepositoryRep
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Repository response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postExtinction(extinction)
Create a new extinction.
import {
CodeReferencesApi,
Configuration
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
let branch: string; //The URL-encoded branch name (default to undefined)
let extinction: Array<Extinction>; //
const { status, data } = await apiInstance.postExtinction(
repo,
branch,
extinction
);| Name | Type | Description | Notes |
|---|---|---|---|
| extinction | Array | ||
| repo | [string] | The repository name | defaults to undefined |
| branch | [string] | The URL-encoded branch name | defaults to undefined |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Action succeeded | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep postRepository(repositoryPost)
Create a repository with the specified name.
import {
CodeReferencesApi,
Configuration,
RepositoryPost
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repositoryPost: RepositoryPost; //
const { status, data } = await apiInstance.postRepository(
repositoryPost
);| Name | Type | Description | Notes |
|---|---|---|---|
| repositoryPost | RepositoryPost |
RepositoryRep
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Repository response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
putBranch(putBranch)
Create a new branch if it doesn't exist, or update the branch if it already exists.
import {
CodeReferencesApi,
Configuration,
PutBranch
} from 'launchdarkly-api-typescript';
const configuration = new Configuration();
const apiInstance = new CodeReferencesApi(configuration);
let repo: string; //The repository name (default to undefined)
let branch: string; //The URL-encoded branch name (default to undefined)
let putBranch: PutBranch; //
const { status, data } = await apiInstance.putBranch(
repo,
branch,
putBranch
);| Name | Type | Description | Notes |
|---|---|---|---|
| putBranch | PutBranch | ||
| repo | [string] | The repository name | defaults to undefined |
| branch | [string] | The URL-encoded branch name | defaults to undefined |
void (empty response body)
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Action succeeded | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]