All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
GetAllHoldouts | Get /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts | Get all holdouts |
GetHoldout | Get /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey} | Get holdout |
GetHoldoutById | Get /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/id/{holdoutId} | Get Holdout by Id |
PatchHoldout | Patch /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts/{holdoutKey} | Patch holdout |
PostHoldout | Post /api/v2/projects/{projectKey}/environments/{environmentKey}/holdouts | Create holdout |
HoldoutsCollectionRep GetAllHoldouts(ctx, projectKey, environmentKey).Limit(limit).Offset(offset).Execute()
Get all holdouts
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
limit := int64(789) // int64 | The number of holdouts to return in the response. Defaults to 20 (optional)
offset := int64(789) // int64 | Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HoldoutsBetaApi.GetAllHoldouts(context.Background(), projectKey, environmentKey).Limit(limit).Offset(offset).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HoldoutsBetaApi.GetAllHoldouts``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetAllHoldouts`: HoldoutsCollectionRep
fmt.Fprintf(os.Stdout, "Response from `HoldoutsBetaApi.GetAllHoldouts`: %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 |
Other parameters are passed through a pointer to a apiGetAllHoldoutsRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
limit | int64 | The number of holdouts to return in the response. Defaults to 20 | offset | int64 | Where to start in the list. Use this with pagination. For example, an `offset` of 10 skips the first ten items and then returns the next items in the list, up to the query `limit`. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HoldoutDetailRep GetHoldout(ctx, projectKey, environmentKey, holdoutKey).Expand(expand).Execute()
Get holdout
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
holdoutKey := "holdoutKey_example" // string | The holdout experiment key
expand := "expand_example" // string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HoldoutsBetaApi.GetHoldout(context.Background(), projectKey, environmentKey, holdoutKey).Expand(expand).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HoldoutsBetaApi.GetHoldout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHoldout`: HoldoutDetailRep
fmt.Fprintf(os.Stdout, "Response from `HoldoutsBetaApi.GetHoldout`: %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 | |
holdoutKey | string | The holdout experiment key |
Other parameters are passed through a pointer to a apiGetHoldoutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
expand | string | A comma-separated list of properties that can reveal additional information in the response. Supported fields are explained above. Holdout experiment expansion fields have no prefix. Related experiment expansion fields have `rel-` as a prefix. |
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HoldoutRep GetHoldoutById(ctx, projectKey, environmentKey, holdoutId).Execute()
Get Holdout by Id
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
holdoutId := "holdoutId_example" // string | The holdout experiment ID
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HoldoutsBetaApi.GetHoldoutById(context.Background(), projectKey, environmentKey, holdoutId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HoldoutsBetaApi.GetHoldoutById``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetHoldoutById`: HoldoutRep
fmt.Fprintf(os.Stdout, "Response from `HoldoutsBetaApi.GetHoldoutById`: %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 | |
holdoutId | string | The holdout experiment ID |
Other parameters are passed through a pointer to a apiGetHoldoutByIdRequest 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]
HoldoutRep PatchHoldout(ctx, projectKey, environmentKey, holdoutKey).HoldoutPatchInput(holdoutPatchInput).Execute()
Patch holdout
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
holdoutKey := "holdoutKey_example" // string | The holdout key
holdoutPatchInput := *openapiclient.NewHoldoutPatchInput([]map[string]interface{}{map[string]interface{}{"key": interface{}(123)}}) // HoldoutPatchInput |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HoldoutsBetaApi.PatchHoldout(context.Background(), projectKey, environmentKey, holdoutKey).HoldoutPatchInput(holdoutPatchInput).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HoldoutsBetaApi.PatchHoldout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PatchHoldout`: HoldoutRep
fmt.Fprintf(os.Stdout, "Response from `HoldoutsBetaApi.PatchHoldout`: %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 | |
holdoutKey | string | The holdout key |
Other parameters are passed through a pointer to a apiPatchHoldoutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
holdoutPatchInput | HoldoutPatchInput | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
HoldoutRep PostHoldout(ctx, projectKey, environmentKey).HoldoutPostRequest(holdoutPostRequest).Execute()
Create holdout
package main
import (
"context"
"fmt"
"os"
openapiclient "./openapi"
)
func main() {
projectKey := "projectKey_example" // string | The project key
environmentKey := "environmentKey_example" // string | The environment key
holdoutPostRequest := *openapiclient.NewHoldoutPostRequest() // HoldoutPostRequest |
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.HoldoutsBetaApi.PostHoldout(context.Background(), projectKey, environmentKey).HoldoutPostRequest(holdoutPostRequest).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `HoldoutsBetaApi.PostHoldout``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostHoldout`: HoldoutRep
fmt.Fprintf(os.Stdout, "Response from `HoldoutsBetaApi.PostHoldout`: %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 |
Other parameters are passed through a pointer to a apiPostHoldoutRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
holdoutPostRequest | HoldoutPostRequest | |
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]