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(ctx, repo).RequestBody(requestBody).Execute()
Delete branches
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name to delete branches for.
requestBody := []string{"Property_example"} // []string |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.DeleteBranches(context.Background(), repo).RequestBody(requestBody).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.DeleteBranches``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name to delete branches for. |
Other parameters are passed through a pointer to a apiDeleteBranchesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
requestBody | []string | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteRepository(ctx, repo).Execute()
Delete repository
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.DeleteRepository(context.Background(), repo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.DeleteRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name |
Other parameters are passed through a pointer to a apiDeleteRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
(empty response body)
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BranchRep GetBranch(ctx, repo, branch).ProjKey(projKey).FlagKey(flagKey).Execute()
Get branch
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
branch := "branch_example" // string | The url-encoded branch name
projKey := "projKey_example" // string | Filter results to a specific project (optional)
flagKey := "flagKey_example" // string | Filter results to a specific flag key (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetBranch(context.Background(), repo, branch).ProjKey(projKey).FlagKey(flagKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetBranch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBranch`: BranchRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetBranch`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name | |
branch | string | The url-encoded branch name |
Other parameters are passed through a pointer to a apiGetBranchRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
projKey | string | Filter results to a specific project | flagKey | string | Filter results to a specific flag key |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
BranchCollectionRep GetBranches(ctx, repo).Execute()
List branches
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetBranches(context.Background(), repo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetBranches``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetBranches`: BranchCollectionRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetBranches`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name |
Other parameters are passed through a pointer to a apiGetBranchesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
ExtinctionCollectionRep GetExtinctions(ctx).RepoName(repoName).BranchName(branchName).ProjKey(projKey).FlagKey(flagKey).From(from).To(to).Execute()
List extinctions
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repoName := "repoName_example" // string | Filter results to a specific repository (optional)
branchName := "branchName_example" // string | Filter results to a specific branch. By default, only the default branch will be queried for extinctions. (optional)
projKey := "projKey_example" // string | Filter results to a specific project (optional)
flagKey := "flagKey_example" // string | Filter results to a specific flag key (optional)
from := int64(789) // int64 | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `to`. (optional)
to := int64(789) // int64 | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `from`. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetExtinctions(context.Background()).RepoName(repoName).BranchName(branchName).ProjKey(projKey).FlagKey(flagKey).From(from).To(to).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetExtinctions``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetExtinctions`: ExtinctionCollectionRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetExtinctions`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetExtinctionsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
repoName | string | Filter results to a specific repository | |
branchName | string | Filter results to a specific branch. By default, only the default branch will be queried for extinctions. | |
projKey | string | Filter results to a specific project | |
flagKey | string | Filter results to a specific flag key | |
from | int64 | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `to`. | |
to | int64 | Filter results to a specific timeframe based on commit time, expressed as a Unix epoch time in milliseconds. Must be used with `from`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryCollectionRep GetRepositories(ctx).WithBranches(withBranches).WithReferencesForDefaultBranch(withReferencesForDefaultBranch).ProjKey(projKey).FlagKey(flagKey).Execute()
List repositories
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
withBranches := "withBranches_example" // string | If set to any value, the endpoint returns repositories with associated branch data (optional)
withReferencesForDefaultBranch := "withReferencesForDefaultBranch_example" // 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)
projKey := "projKey_example" // string | A LaunchDarkly project key. If provided, this filters code reference results to the specified project. (optional)
flagKey := "flagKey_example" // 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)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetRepositories(context.Background()).WithBranches(withBranches).WithReferencesForDefaultBranch(withReferencesForDefaultBranch).ProjKey(projKey).FlagKey(flagKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetRepositories``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRepositories`: RepositoryCollectionRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetRepositories`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiGetRepositoriesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
withBranches | string | If set to any value, the endpoint returns repositories with associated branch data | |
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 | |
projKey | string | A LaunchDarkly project key. If provided, this filters code reference results to the specified project. | |
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 |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep GetRepository(ctx, repo).Execute()
Get repository
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetRepository(context.Background(), repo).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRepository`: RepositoryRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetRepository`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name |
Other parameters are passed through a pointer to a apiGetRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatisticsRoot GetRootStatistic(ctx).Execute()
Get links to code reference repositories for each project
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetRootStatistic(context.Background()).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetRootStatistic``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetRootStatistic`: StatisticsRoot
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetRootStatistic`: %v\n", resp)
}
This endpoint does not need any parameter.
Other parameters are passed through a pointer to a apiGetRootStatisticRequest struct via the builder pattern
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
StatisticCollectionRep GetStatistics(ctx, projectKey).FlagKey(flagKey).Execute()
Get code references statistics for flags
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
flagKey := "flagKey_example" // string | Filter results to a specific flag key (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.GetStatistics(context.Background(), projectKey).FlagKey(flagKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.GetStatistics``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetStatistics`: StatisticCollectionRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.GetStatistics`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key |
Other parameters are passed through a pointer to a apiGetStatisticsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
flagKey | string | Filter results to a specific flag key |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep PatchRepository(ctx, repo).PatchOperation(patchOperation).Execute()
Update repository
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField", interface{}(new example value))} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.PatchRepository(context.Background(), repo).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.PatchRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchRepository`: RepositoryRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.PatchRepository`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name |
Other parameters are passed through a pointer to a apiPatchRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
patchOperation | []PatchOperation | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PostExtinction(ctx, repo, branch).Extinction(extinction).Execute()
Create extinction
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
branch := "branch_example" // string | The URL-encoded branch name
extinction := []openapiclient.Extinction{*openapiclient.NewExtinction("a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", "Remove flag for launched feature", int64(123), "enable-feature", "default")} // []Extinction |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.PostExtinction(context.Background(), repo, branch).Extinction(extinction).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.PostExtinction``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name | |
branch | string | The URL-encoded branch name |
Other parameters are passed through a pointer to a apiPostExtinctionRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
extinction | []Extinction | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
RepositoryRep PostRepository(ctx).RepositoryPost(repositoryPost).Execute()
Create repository
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repositoryPost := *openapiclient.NewRepositoryPost("LaunchDarkly-Docs") // RepositoryPost |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.PostRepository(context.Background()).RepositoryPost(repositoryPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.PostRepository``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostRepository`: RepositoryRep
fmt.Fprintf(os.Stdout, "Response from `CodeReferencesApi.PostRepository`: %v\n", resp)
}
Other parameters are passed through a pointer to a apiPostRepositoryRequest struct via the builder pattern
Name | Type | Description | Notes |
---|---|---|---|
repositoryPost | RepositoryPost |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
PutBranch(ctx, repo, branch).PutBranch(putBranch).Execute()
Upsert branch
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
repo := "repo_example" // string | The repository name
branch := "branch_example" // string | The URL-encoded branch name
putBranch := *openapiclient.NewPutBranch("main", "a94a8fe5ccb19ba61c4c0873d391e987982fbbd3", int64(123)) // PutBranch |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.CodeReferencesApi.PutBranch(context.Background(), repo, branch).PutBranch(putBranch).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `CodeReferencesApi.PutBranch``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repo | string | The repository name | |
branch | string | The URL-encoded branch name |
Other parameters are passed through a pointer to a apiPutBranchRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
putBranch | PutBranch | |
(empty response body)
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]