Skip to content

Latest commit

 

History

History
91 lines (57 loc) · 2.73 KB

ContextSettingsApi.md

File metadata and controls

91 lines (57 loc) · 2.73 KB

\ContextSettingsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
PutContextFlagSetting Put /api/v2/projects/{projectKey}/environments/{environmentKey}/contexts/{contextKind}/{contextKey}/flags/{featureFlagKey} Update flag settings for context

PutContextFlagSetting

PutContextFlagSetting(ctx, projectKey, environmentKey, contextKind, contextKey, featureFlagKey).ValuePut(valuePut).Execute()

Update flag settings for context

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "./openapi"
)

func main() {
    projectKey := "projectKey_example" // string | The project key
    environmentKey := "environmentKey_example" // string | The environment key
    contextKind := "contextKind_example" // string | The context kind
    contextKey := "contextKey_example" // string | The context key
    featureFlagKey := "featureFlagKey_example" // string | The feature flag key
    valuePut := *openapiclient.NewValuePut() // ValuePut | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.ContextSettingsApi.PutContextFlagSetting(context.Background(), projectKey, environmentKey, contextKind, contextKey, featureFlagKey).ValuePut(valuePut).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `ContextSettingsApi.PutContextFlagSetting``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

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
contextKind string The context kind
contextKey string The context key
featureFlagKey string The feature flag key

Other Parameters

Other parameters are passed through a pointer to a apiPutContextFlagSettingRequest struct via the builder pattern

Name Type Description Notes

valuePut | ValuePut | |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]