All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| CreateTriggerWorkflow | Post /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey} | Create flag trigger |
| DeleteTriggerWorkflow | Delete /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} | Delete flag trigger |
| GetTriggerWorkflowById | Get /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} | Get flag trigger by ID |
| GetTriggerWorkflows | Get /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey} | List flag triggers |
| PatchTriggerWorkflow | Patch /api/v2/flags/{projectKey}/{featureFlagKey}/triggers/{environmentKey}/{id} | Update flag trigger |
TriggerWorkflowRep CreateTriggerWorkflow(ctx, projectKey, environmentKey, featureFlagKey).TriggerPost(triggerPost).Execute()
Create flag trigger
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
triggerPost := *openapiclient.NewTriggerPost("generic-trigger") // TriggerPost |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagTriggersApi.CreateTriggerWorkflow(context.Background(), projectKey, environmentKey, featureFlagKey).TriggerPost(triggerPost).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagTriggersApi.CreateTriggerWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `CreateTriggerWorkflow`: TriggerWorkflowRep
fmt.Fprintf(os.Stdout, "Response from `FlagTriggersApi.CreateTriggerWorkflow`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectKey | string | The project key | |
| environmentKey | string | The environment key | |
| featureFlagKey | string | The feature flag key |
Other parameters are passed through a pointer to a apiCreateTriggerWorkflowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
triggerPost | TriggerPost | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
DeleteTriggerWorkflow(ctx, projectKey, environmentKey, featureFlagKey, id).Execute()
Delete flag trigger
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
id := "id_example" // string | The flag trigger ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
r, err := apiClient.FlagTriggersApi.DeleteTriggerWorkflow(context.Background(), projectKey, environmentKey, featureFlagKey, id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagTriggersApi.DeleteTriggerWorkflow``: %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 | |
| environmentKey | string | The environment key | |
| featureFlagKey | string | The feature flag key | |
| id | string | The flag trigger ID |
Other parameters are passed through a pointer to a apiDeleteTriggerWorkflowRequest 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]
TriggerWorkflowRep GetTriggerWorkflowById(ctx, projectKey, featureFlagKey, environmentKey, id).Execute()
Get flag trigger by ID
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
projectKey := "projectKey_example" // string | The project key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
environmentKey := "environmentKey_example" // string | The environment key
id := "id_example" // string | The flag trigger ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagTriggersApi.GetTriggerWorkflowById(context.Background(), projectKey, featureFlagKey, environmentKey, id).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagTriggersApi.GetTriggerWorkflowById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTriggerWorkflowById`: TriggerWorkflowRep
fmt.Fprintf(os.Stdout, "Response from `FlagTriggersApi.GetTriggerWorkflowById`: %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 | |
| environmentKey | string | The environment key | |
| id | string | The flag trigger ID |
Other parameters are passed through a pointer to a apiGetTriggerWorkflowByIdRequest 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]
TriggerWorkflowCollectionRep GetTriggerWorkflows(ctx, projectKey, environmentKey, featureFlagKey).Execute()
List flag triggers
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagTriggersApi.GetTriggerWorkflows(context.Background(), projectKey, environmentKey, featureFlagKey).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagTriggersApi.GetTriggerWorkflows``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetTriggerWorkflows`: TriggerWorkflowCollectionRep
fmt.Fprintf(os.Stdout, "Response from `FlagTriggersApi.GetTriggerWorkflows`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectKey | string | The project key | |
| environmentKey | string | The environment key | |
| featureFlagKey | string | The feature flag key |
Other parameters are passed through a pointer to a apiGetTriggerWorkflowsRequest 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]
TriggerWorkflowRep PatchTriggerWorkflow(ctx, projectKey, environmentKey, featureFlagKey, id).FlagTriggerInput(flagTriggerInput).Execute()
Update flag trigger
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/launchdarkly/api-client-go"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
featureFlagKey := "featureFlagKey_example" // string | The feature flag key
id := "id_example" // string | The flag trigger ID
flagTriggerInput := *openapiclient.NewFlagTriggerInput() // FlagTriggerInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FlagTriggersApi.PatchTriggerWorkflow(context.Background(), projectKey, environmentKey, featureFlagKey, id).FlagTriggerInput(flagTriggerInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FlagTriggersApi.PatchTriggerWorkflow``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchTriggerWorkflow`: TriggerWorkflowRep
fmt.Fprintf(os.Stdout, "Response from `FlagTriggersApi.PatchTriggerWorkflow`: %v\n", resp)
}| Name | Type | Description | Notes |
|---|---|---|---|
| ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
| projectKey | string | The project key | |
| environmentKey | string | The environment key | |
| featureFlagKey | string | The feature flag key | |
| id | string | The flag trigger ID |
Other parameters are passed through a pointer to a apiPatchTriggerWorkflowRequest struct via the builder pattern
| Name | Type | Description | Notes |
|---|
flagTriggerInput | FlagTriggerInput | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]