All URIs are relative to https://test-api.configcat.com
Method | HTTP request | Description |
---|---|---|
GetSettingValue | Get /v1/environments/{environmentId}/settings/{settingId}/value | Get value |
GetSettingValues | Get /v1/configs/{configId}/environments/{environmentId}/values | Get values |
PostSettingValues | Post /v1/configs/{configId}/environments/{environmentId}/values | Post values |
ReplaceSettingValue | Put /v1/environments/{environmentId}/settings/{settingId}/value | Replace value |
UpdateSettingValue | Patch /v1/environments/{environmentId}/settings/{settingId}/value | Update value |
SettingValueModel GetSettingValue(ctx, environmentId, settingId).Execute()
Get value
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Environment.
settingId := int32(56) // int32 | The id of the Setting.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FeatureFlagSettingValuesAPI.GetSettingValue(context.Background(), environmentId, settingId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagSettingValuesAPI.GetSettingValue``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSettingValue`: SettingValueModel
fmt.Fprintf(os.Stdout, "Response from `FeatureFlagSettingValuesAPI.GetSettingValue`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | The identifier of the Environment. | |
settingId | int32 | The id of the Setting. |
Other parameters are passed through a pointer to a apiGetSettingValueRequest 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]
ConfigSettingValuesModel GetSettingValues(ctx, configId, environmentId).Execute()
Get values
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
configId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Config.
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Environment.
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FeatureFlagSettingValuesAPI.GetSettingValues(context.Background(), configId, environmentId).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagSettingValuesAPI.GetSettingValues``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `GetSettingValues`: ConfigSettingValuesModel
fmt.Fprintf(os.Stdout, "Response from `FeatureFlagSettingValuesAPI.GetSettingValues`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
configId | string | The identifier of the Config. | |
environmentId | string | The identifier of the Environment. |
Other parameters are passed through a pointer to a apiGetSettingValuesRequest 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]
ConfigSettingValuesModel PostSettingValues(ctx, configId, environmentId).UpdateSettingValuesWithIdModel(updateSettingValuesWithIdModel).Reason(reason).Execute()
Post values
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
configId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Config.
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Environment.
updateSettingValuesWithIdModel := *openapiclient.NewUpdateSettingValuesWithIdModel() // UpdateSettingValuesWithIdModel |
reason := "reason_example" // string | The reason note for the Audit Log if the Product's \"Config changes require a reason\" preference is turned on. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FeatureFlagSettingValuesAPI.PostSettingValues(context.Background(), configId, environmentId).UpdateSettingValuesWithIdModel(updateSettingValuesWithIdModel).Reason(reason).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagSettingValuesAPI.PostSettingValues``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `PostSettingValues`: ConfigSettingValuesModel
fmt.Fprintf(os.Stdout, "Response from `FeatureFlagSettingValuesAPI.PostSettingValues`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
configId | string | The identifier of the Config. | |
environmentId | string | The identifier of the Environment. |
Other parameters are passed through a pointer to a apiPostSettingValuesRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateSettingValuesWithIdModel | UpdateSettingValuesWithIdModel | | reason | string | The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on. |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SettingValueModel ReplaceSettingValue(ctx, environmentId, settingId).UpdateSettingValueModel(updateSettingValueModel).Reason(reason).Execute()
Replace value
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Environment.
settingId := int32(56) // int32 | The id of the Setting.
updateSettingValueModel := *openapiclient.NewUpdateSettingValueModel() // UpdateSettingValueModel |
reason := "reason_example" // string | The reason note for the Audit Log if the Product's \"Config changes require a reason\" preference is turned on. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FeatureFlagSettingValuesAPI.ReplaceSettingValue(context.Background(), environmentId, settingId).UpdateSettingValueModel(updateSettingValueModel).Reason(reason).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagSettingValuesAPI.ReplaceSettingValue``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `ReplaceSettingValue`: SettingValueModel
fmt.Fprintf(os.Stdout, "Response from `FeatureFlagSettingValuesAPI.ReplaceSettingValue`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | The identifier of the Environment. | |
settingId | int32 | The id of the Setting. |
Other parameters are passed through a pointer to a apiReplaceSettingValueRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
updateSettingValueModel | UpdateSettingValueModel | | reason | string | The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on. |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
SettingValueModel UpdateSettingValue(ctx, environmentId, settingId).JsonPatchOperation(jsonPatchOperation).Reason(reason).Execute()
Update value
package main
import (
"context"
"fmt"
"os"
openapiclient "github.com/configcat/configcat-publicapi-go-client/v2"
)
func main() {
environmentId := "38400000-8cf0-11bd-b23e-10b96e4ef00d" // string | The identifier of the Environment.
settingId := int32(56) // int32 | The id of the Setting.
jsonPatchOperation := []openapiclient.JsonPatchOperation{*openapiclient.NewJsonPatchOperation(openapiclient.OperationType("unknown"), "Path_example")} // []JsonPatchOperation |
reason := "reason_example" // string | The reason note for the Audit Log if the Product's \"Config changes require a reason\" preference is turned on. (optional)
configuration := openapiclient.NewConfiguration()
apiClient := openapiclient.NewAPIClient(configuration)
resp, r, err := apiClient.FeatureFlagSettingValuesAPI.UpdateSettingValue(context.Background(), environmentId, settingId).JsonPatchOperation(jsonPatchOperation).Reason(reason).Execute()
if err != nil {
fmt.Fprintf(os.Stderr, "Error when calling `FeatureFlagSettingValuesAPI.UpdateSettingValue``: %v\n", err)
fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
}
// response from `UpdateSettingValue`: SettingValueModel
fmt.Fprintf(os.Stdout, "Response from `FeatureFlagSettingValuesAPI.UpdateSettingValue`: %v\n", resp)
}
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
environmentId | string | The identifier of the Environment. | |
settingId | int32 | The id of the Setting. |
Other parameters are passed through a pointer to a apiUpdateSettingValueRequest struct via the builder pattern
Name | Type | Description | Notes |
---|
jsonPatchOperation | []JsonPatchOperation | | reason | string | The reason note for the Audit Log if the Product's "Config changes require a reason" preference is turned on. |
- Content-Type: application/json, text/json, application/*+json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]