All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
CreateFlagLink | Post /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} | Create flag link |
DeleteFlagLink | Delete /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} | Delete flag link |
GetFlagLinks | Get /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} | List flag links |
UpdateFlagLink | Patch /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} | Update flag link |
FlagLinkRep CreateFlagLink(ctx, projectKey, featureFlagKey).FlagLinkPost(flagLinkPost).Execute()
Create flag link
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
flagLinkPost := *openapiclient.NewFlagLinkPost() // FlagLinkPost |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagLinksBetaApi.CreateFlagLink(context.Background(), projectKey, featureFlagKey).FlagLinkPost(flagLinkPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.CreateFlagLink``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateFlagLink`: FlagLinkRep
fmt.Fprintf(os.Stdout, "Response from `FlagLinksBetaApi.CreateFlagLink`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key | |
featureFlagKey | string | The feature flag key |
Other parameters are passed through a pointer to a apiCreateFlagLinkRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
flagLinkPost | FlagLinkPost | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteFlagLink(ctx, projectKey, featureFlagKey, id).Execute()
Delete flag link
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
id := "id_example" // string | The flag link ID or Key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagLinksBetaApi.DeleteFlagLink(context.Background(), projectKey, featureFlagKey, id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.DeleteFlagLink``: %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. | |
projectKey | string | The project key | |
featureFlagKey | string | The feature flag key | |
id | string | The flag link ID or Key |
Other parameters are passed through a pointer to a apiDeleteFlagLinkRequest 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]
FlagLinkCollectionRep GetFlagLinks(ctx, projectKey, featureFlagKey).Execute()
List flag links
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagLinksBetaApi.GetFlagLinks(context.Background(), projectKey, featureFlagKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.GetFlagLinks``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetFlagLinks`: FlagLinkCollectionRep
fmt.Fprintf(os.Stdout, "Response from `FlagLinksBetaApi.GetFlagLinks`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key | |
featureFlagKey | string | The feature flag key |
Other parameters are passed through a pointer to a apiGetFlagLinksRequest 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]
FlagLinkRep UpdateFlagLink(ctx, projectKey, featureFlagKey, id).PatchOperation(patchOperation).Execute()
Update flag link
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
id := "id_example" // string | The flag link ID
patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField")} // []PatchOperation |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagLinksBetaApi.UpdateFlagLink(context.Background(), projectKey, featureFlagKey, id).PatchOperation(patchOperation).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.UpdateFlagLink``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateFlagLink`: FlagLinkRep
fmt.Fprintf(os.Stdout, "Response from `FlagLinksBetaApi.UpdateFlagLink`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
projectKey | string | The project key | |
featureFlagKey | string | The feature flag key | |
id | string | The flag link ID |
Other parameters are passed through a pointer to a apiUpdateFlagLinkRequest 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]