Skip to content

Latest commit

 

History

History
2914 lines (1859 loc) · 82.5 KB

FeaturesApi.md

File metadata and controls

2914 lines (1859 loc) · 82.5 KB

\FeaturesApi

All URIs are relative to http://localhost

Method HTTP request Description
AddFavoriteFeature Post /api/admin/projects/{projectId}/features/{featureName}/favorites
AddFavoriteProject Post /api/admin/projects/{projectId}/favorites
AddFeatureStrategy Post /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies
AddTag Post /api/admin/features/{featureName}/tags Adds a tag to a feature.
ArchiveFeature Delete /api/admin/projects/{projectId}/features/{featureName} Archive a feature.
ArchiveFeatures Post /api/admin/projects/{projectId}/archive Archives a list of features
BulkToggleFeaturesEnvironmentOff Post /api/admin/projects/{projectId}/bulk_features/environments/{environment}/off Bulk disabled a list of features.
BulkToggleFeaturesEnvironmentOn Post /api/admin/projects/{projectId}/bulk_features/environments/{environment}/on Bulk enable a list of features.
CloneFeature Post /api/admin/projects/{projectId}/features/{featureName}/clone
CreateFeature Post /api/admin/projects/{projectId}/features
DeleteFeatureStrategy Delete /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}
GetAllFeatureTypes Get /api/admin/feature-types
GetAllToggles Get /api/admin/features
GetEnvironmentFeatureVariants Get /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/variants Get variants for a feature in an environment
GetFeature Get /api/admin/projects/{projectId}/features/{featureName} Get a feature.
GetFeatureEnvironment Get /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}
GetFeatureStrategies Get /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies
GetFeatureStrategy Get /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}
GetFeatureVariants Get /api/admin/projects/{projectId}/features/{featureName}/variants Retrieve variants for a feature (deprecated)
GetFeatures Get /api/admin/projects/{projectId}/features
ListTags Get /api/admin/features/{featureName}/tags Get all tags for a feature.
OverwriteEnvironmentFeatureVariants Put /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/variants Create (overwrite) variants for a feature in an environment
OverwriteFeatureVariants Put /api/admin/projects/{projectId}/features/{featureName}/variants Create (overwrite) variants for a feature toggle in all environments
OverwriteFeatureVariantsOnEnvironments Put /api/admin/projects/{projectId}/features/{featureName}/variants-batch
PatchEnvironmentsFeatureVariants Patch /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/variants Patch a feature's variants in an environment
PatchFeature Patch /api/admin/projects/{projectId}/features/{featureName}
PatchFeatureStrategy Patch /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}
PatchFeatureVariants Patch /api/admin/projects/{projectId}/features/{featureName}/variants Apply a patch to a feature's variants (in all environments).
RemoveFavoriteFeature Delete /api/admin/projects/{projectId}/features/{featureName}/favorites
RemoveFavoriteProject Delete /api/admin/projects/{projectId}/favorites
RemoveTag Delete /api/admin/features/{featureName}/tags/{type}/{value} Removes a tag from a feature.
SetStrategySortOrder Post /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/set-sort-order
StaleFeatures Post /api/admin/projects/{projectId}/stale Stales a list of features
ToggleFeatureEnvironmentOff Post /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/off
ToggleFeatureEnvironmentOn Post /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/on
UpdateFeature Put /api/admin/projects/{projectId}/features/{featureName}
UpdateFeatureStrategy Put /api/admin/projects/{projectId}/features/{featureName}/environments/{environment}/strategies/{strategyId}
UpdateTags Put /api/admin/features/{featureName}/tags Updates multiple tags for a feature.
ValidateConstraint Post /api/admin/constraints/validate
ValidateFeature Post /api/admin/features/validate

AddFavoriteFeature

AddFavoriteFeature(ctx, projectId, featureName).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.AddFavoriteFeature(context.Background(), projectId, featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.AddFavoriteFeature``: %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.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

AddFavoriteProject

AddFavoriteProject(ctx, projectId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.AddFavoriteProject(context.Background(), projectId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.AddFavoriteProject``: %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.
projectId string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

AddFeatureStrategy

FeatureStrategySchema AddFeatureStrategy(ctx, projectId, featureName, environment).CreateFeatureStrategySchema(createFeatureStrategySchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    createFeatureStrategySchema := *openapiclient.NewCreateFeatureStrategySchema("flexibleRollout") // CreateFeatureStrategySchema | createFeatureStrategySchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.AddFeatureStrategy(context.Background(), projectId, featureName, environment).CreateFeatureStrategySchema(createFeatureStrategySchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.AddFeatureStrategy``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AddFeatureStrategy`: FeatureStrategySchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.AddFeatureStrategy`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

createFeatureStrategySchema | CreateFeatureStrategySchema | createFeatureStrategySchema |

Return type

FeatureStrategySchema

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]

AddTag

TagSchema AddTag(ctx, featureName).TagSchema(tagSchema).Execute()

Adds a tag to a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    featureName := "featureName_example" // string | 
    tagSchema := *openapiclient.NewTagSchema("a-tag-value", "simple") // TagSchema | tagSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.AddTag(context.Background(), featureName).TagSchema(tagSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.AddTag``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `AddTag`: TagSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.AddTag`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureName string

Other Parameters

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

Name Type Description Notes

tagSchema | TagSchema | tagSchema |

Return type

TagSchema

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]

ArchiveFeature

ArchiveFeature(ctx, projectId, featureName).Execute()

Archive a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.ArchiveFeature(context.Background(), projectId, featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ArchiveFeature``: %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.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

ArchiveFeatures

ArchiveFeatures(ctx, projectId).BatchFeaturesSchema(batchFeaturesSchema).Execute()

Archives a list of features

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    batchFeaturesSchema := *openapiclient.NewBatchFeaturesSchema([]string{"Features_example"}) // BatchFeaturesSchema | batchFeaturesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.ArchiveFeatures(context.Background(), projectId).BatchFeaturesSchema(batchFeaturesSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ArchiveFeatures``: %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.
projectId string

Other Parameters

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

Name Type Description Notes

batchFeaturesSchema | BatchFeaturesSchema | batchFeaturesSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

BulkToggleFeaturesEnvironmentOff

BulkToggleFeaturesEnvironmentOff(ctx, projectId, environment).BulkToggleFeaturesSchema(bulkToggleFeaturesSchema).Execute()

Bulk disabled a list of features.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    environment := "environment_example" // string | 
    bulkToggleFeaturesSchema := *openapiclient.NewBulkToggleFeaturesSchema([]string{"Features_example"}) // BulkToggleFeaturesSchema | bulkToggleFeaturesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.BulkToggleFeaturesEnvironmentOff(context.Background(), projectId, environment).BulkToggleFeaturesSchema(bulkToggleFeaturesSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.BulkToggleFeaturesEnvironmentOff``: %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.
projectId string
environment string

Other Parameters

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

Name Type Description Notes

bulkToggleFeaturesSchema | BulkToggleFeaturesSchema | bulkToggleFeaturesSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

BulkToggleFeaturesEnvironmentOn

BulkToggleFeaturesEnvironmentOn(ctx, projectId, environment).BulkToggleFeaturesSchema(bulkToggleFeaturesSchema).Execute()

Bulk enable a list of features.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    environment := "environment_example" // string | 
    bulkToggleFeaturesSchema := *openapiclient.NewBulkToggleFeaturesSchema([]string{"Features_example"}) // BulkToggleFeaturesSchema | bulkToggleFeaturesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.BulkToggleFeaturesEnvironmentOn(context.Background(), projectId, environment).BulkToggleFeaturesSchema(bulkToggleFeaturesSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.BulkToggleFeaturesEnvironmentOn``: %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.
projectId string
environment string

Other Parameters

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

Name Type Description Notes

bulkToggleFeaturesSchema | BulkToggleFeaturesSchema | bulkToggleFeaturesSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

CloneFeature

FeatureSchema CloneFeature(ctx, projectId, featureName).CloneFeatureSchema(cloneFeatureSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    cloneFeatureSchema := *openapiclient.NewCloneFeatureSchema("Name_example") // CloneFeatureSchema | cloneFeatureSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.CloneFeature(context.Background(), projectId, featureName).CloneFeatureSchema(cloneFeatureSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.CloneFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CloneFeature`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.CloneFeature`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

cloneFeatureSchema | CloneFeatureSchema | cloneFeatureSchema |

Return type

FeatureSchema

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]

CreateFeature

FeatureSchema CreateFeature(ctx, projectId).CreateFeatureSchema(createFeatureSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    createFeatureSchema := *openapiclient.NewCreateFeatureSchema("Name_example") // CreateFeatureSchema | createFeatureSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.CreateFeature(context.Background(), projectId).CreateFeatureSchema(createFeatureSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.CreateFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `CreateFeature`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.CreateFeature`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string

Other Parameters

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

Name Type Description Notes

createFeatureSchema | CreateFeatureSchema | createFeatureSchema |

Return type

FeatureSchema

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]

DeleteFeatureStrategy

DeleteFeatureStrategy(ctx, projectId, featureName, environment, strategyId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    strategyId := "strategyId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.DeleteFeatureStrategy(context.Background(), projectId, featureName, environment, strategyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.DeleteFeatureStrategy``: %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.
projectId string
featureName string
environment string
strategyId string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

GetAllFeatureTypes

FeatureTypesSchema GetAllFeatureTypes(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetAllFeatureTypes(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetAllFeatureTypes``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetAllFeatureTypes`: FeatureTypesSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetAllFeatureTypes`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

FeatureTypesSchema

Authorization

apiKey

HTTP request headers

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

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

GetAllToggles

FeaturesSchema GetAllToggles(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetAllToggles(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetAllToggles``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetAllToggles`: FeaturesSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetAllToggles`: %v\n", resp)
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

FeaturesSchema

Authorization

apiKey

HTTP request headers

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

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

GetEnvironmentFeatureVariants

FeatureVariantsSchema GetEnvironmentFeatureVariants(ctx, projectId, featureName, environment).Execute()

Get variants for a feature in an environment

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetEnvironmentFeatureVariants(context.Background(), projectId, featureName, environment).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetEnvironmentFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetEnvironmentFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetEnvironmentFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

Return type

FeatureVariantsSchema

Authorization

apiKey

HTTP request headers

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

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

GetFeature

FeatureSchema GetFeature(ctx, projectId, featureName).Execute()

Get a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeature(context.Background(), projectId, featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeature`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeature`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

Return type

FeatureSchema

Authorization

apiKey

HTTP request headers

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

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

GetFeatureEnvironment

FeatureEnvironmentSchema GetFeatureEnvironment(ctx, projectId, featureName, environment).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeatureEnvironment(context.Background(), projectId, featureName, environment).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeatureEnvironment``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeatureEnvironment`: FeatureEnvironmentSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeatureEnvironment`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

Return type

FeatureEnvironmentSchema

Authorization

apiKey

HTTP request headers

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

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

GetFeatureStrategies

FeatureStrategySchema GetFeatureStrategies(ctx, projectId, featureName, environment).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeatureStrategies(context.Background(), projectId, featureName, environment).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeatureStrategies``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeatureStrategies`: FeatureStrategySchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeatureStrategies`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

Return type

FeatureStrategySchema

Authorization

apiKey

HTTP request headers

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

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

GetFeatureStrategy

FeatureStrategySchema GetFeatureStrategy(ctx, projectId, featureName, environment, strategyId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    strategyId := "strategyId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeatureStrategy(context.Background(), projectId, featureName, environment, strategyId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeatureStrategy``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeatureStrategy`: FeatureStrategySchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeatureStrategy`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string
strategyId string

Other Parameters

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

Name Type Description Notes

Return type

FeatureStrategySchema

Authorization

apiKey

HTTP request headers

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

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

GetFeatureVariants

FeatureVariantsSchema GetFeatureVariants(ctx, projectId, featureName).Execute()

Retrieve variants for a feature (deprecated)

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeatureVariants(context.Background(), projectId, featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

Return type

FeatureVariantsSchema

Authorization

apiKey

HTTP request headers

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

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

GetFeatures

FeaturesSchema GetFeatures(ctx, projectId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.GetFeatures(context.Background(), projectId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.GetFeatures``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetFeatures`: FeaturesSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.GetFeatures`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string

Other Parameters

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

Name Type Description Notes

Return type

FeaturesSchema

Authorization

apiKey

HTTP request headers

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

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

ListTags

TagsSchema ListTags(ctx, featureName).Execute()

Get all tags for a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.ListTags(context.Background(), featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ListTags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ListTags`: TagsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.ListTags`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureName string

Other Parameters

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

Name Type Description Notes

Return type

TagsSchema

Authorization

apiKey

HTTP request headers

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

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

OverwriteEnvironmentFeatureVariants

FeatureVariantsSchema OverwriteEnvironmentFeatureVariants(ctx, projectId, featureName, environment).VariantSchema(variantSchema).Execute()

Create (overwrite) variants for a feature in an environment

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    variantSchema := []openapiclient.VariantSchema{*openapiclient.NewVariantSchema("blue_group", float32(123))} // []VariantSchema | variantsSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.OverwriteEnvironmentFeatureVariants(context.Background(), projectId, featureName, environment).VariantSchema(variantSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.OverwriteEnvironmentFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OverwriteEnvironmentFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.OverwriteEnvironmentFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

variantSchema | []VariantSchema | variantsSchema |

Return type

FeatureVariantsSchema

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]

OverwriteFeatureVariants

FeatureVariantsSchema OverwriteFeatureVariants(ctx, projectId, featureName).VariantSchema(variantSchema).Execute()

Create (overwrite) variants for a feature toggle in all environments

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    variantSchema := []openapiclient.VariantSchema{*openapiclient.NewVariantSchema("blue_group", float32(123))} // []VariantSchema | variantsSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.OverwriteFeatureVariants(context.Background(), projectId, featureName).VariantSchema(variantSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.OverwriteFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OverwriteFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.OverwriteFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

variantSchema | []VariantSchema | variantsSchema |

Return type

FeatureVariantsSchema

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]

OverwriteFeatureVariantsOnEnvironments

FeatureVariantsSchema OverwriteFeatureVariantsOnEnvironments(ctx, projectId, featureName).PushVariantsSchema(pushVariantsSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    pushVariantsSchema := *openapiclient.NewPushVariantsSchema() // PushVariantsSchema | pushVariantsSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.OverwriteFeatureVariantsOnEnvironments(context.Background(), projectId, featureName).PushVariantsSchema(pushVariantsSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.OverwriteFeatureVariantsOnEnvironments``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `OverwriteFeatureVariantsOnEnvironments`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.OverwriteFeatureVariantsOnEnvironments`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

pushVariantsSchema | PushVariantsSchema | pushVariantsSchema |

Return type

FeatureVariantsSchema

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]

PatchEnvironmentsFeatureVariants

FeatureVariantsSchema PatchEnvironmentsFeatureVariants(ctx, projectId, featureName, environment).PatchSchema(patchSchema).Execute()

Patch a feature's variants in an environment

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    patchSchema := []openapiclient.PatchSchema{*openapiclient.NewPatchSchema("Path_example", "Op_example")} // []PatchSchema | patchesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.PatchEnvironmentsFeatureVariants(context.Background(), projectId, featureName, environment).PatchSchema(patchSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.PatchEnvironmentsFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchEnvironmentsFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.PatchEnvironmentsFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

patchSchema | []PatchSchema | patchesSchema |

Return type

FeatureVariantsSchema

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]

PatchFeature

FeatureSchema PatchFeature(ctx, projectId, featureName).PatchSchema(patchSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    patchSchema := []openapiclient.PatchSchema{*openapiclient.NewPatchSchema("Path_example", "Op_example")} // []PatchSchema | patchesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.PatchFeature(context.Background(), projectId, featureName).PatchSchema(patchSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.PatchFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchFeature`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.PatchFeature`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

patchSchema | []PatchSchema | patchesSchema |

Return type

FeatureSchema

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]

PatchFeatureStrategy

FeatureStrategySchema PatchFeatureStrategy(ctx, projectId, featureName, environment, strategyId).PatchSchema(patchSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    strategyId := "strategyId_example" // string | 
    patchSchema := []openapiclient.PatchSchema{*openapiclient.NewPatchSchema("Path_example", "Op_example")} // []PatchSchema | patchesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.PatchFeatureStrategy(context.Background(), projectId, featureName, environment, strategyId).PatchSchema(patchSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.PatchFeatureStrategy``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchFeatureStrategy`: FeatureStrategySchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.PatchFeatureStrategy`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string
strategyId string

Other Parameters

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

Name Type Description Notes

patchSchema | []PatchSchema | patchesSchema |

Return type

FeatureStrategySchema

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]

PatchFeatureVariants

FeatureVariantsSchema PatchFeatureVariants(ctx, projectId, featureName).PatchSchema(patchSchema).Execute()

Apply a patch to a feature's variants (in all environments).

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    patchSchema := []openapiclient.PatchSchema{*openapiclient.NewPatchSchema("Path_example", "Op_example")} // []PatchSchema | patchesSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.PatchFeatureVariants(context.Background(), projectId, featureName).PatchSchema(patchSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.PatchFeatureVariants``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `PatchFeatureVariants`: FeatureVariantsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.PatchFeatureVariants`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

patchSchema | []PatchSchema | patchesSchema |

Return type

FeatureVariantsSchema

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]

RemoveFavoriteFeature

RemoveFavoriteFeature(ctx, projectId, featureName).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.RemoveFavoriteFeature(context.Background(), projectId, featureName).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.RemoveFavoriteFeature``: %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.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

RemoveFavoriteProject

RemoveFavoriteProject(ctx, projectId).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.RemoveFavoriteProject(context.Background(), projectId).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.RemoveFavoriteProject``: %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.
projectId string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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

RemoveTag

RemoveTag(ctx, featureName, type_, value).Execute()

Removes a tag from a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    featureName := "featureName_example" // string | 
    type_ := "type__example" // string | 
    value := "value_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.RemoveTag(context.Background(), featureName, type_, value).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.RemoveTag``: %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.
featureName string
type_ string
value string

Other Parameters

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

Name Type Description Notes

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

SetStrategySortOrder

SetStrategySortOrder(ctx, projectId, featureName, environment).SetStrategySortOrderSchemaInner(setStrategySortOrderSchemaInner).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    setStrategySortOrderSchemaInner := []openapiclient.SetStrategySortOrderSchemaInner{*openapiclient.NewSetStrategySortOrderSchemaInner("Id_example", float32(123))} // []SetStrategySortOrderSchemaInner | setStrategySortOrderSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.SetStrategySortOrder(context.Background(), projectId, featureName, environment).SetStrategySortOrderSchemaInner(setStrategySortOrderSchemaInner).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.SetStrategySortOrder``: %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.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

setStrategySortOrderSchemaInner | []SetStrategySortOrderSchemaInner | setStrategySortOrderSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

StaleFeatures

StaleFeatures(ctx, projectId).BatchStaleSchema(batchStaleSchema).Execute()

Stales a list of features

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    batchStaleSchema := *openapiclient.NewBatchStaleSchema([]string{"Features_example"}, false) // BatchStaleSchema | batchStaleSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.StaleFeatures(context.Background(), projectId).BatchStaleSchema(batchStaleSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.StaleFeatures``: %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.
projectId string

Other Parameters

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

Name Type Description Notes

batchStaleSchema | BatchStaleSchema | batchStaleSchema |

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

ToggleFeatureEnvironmentOff

FeatureSchema ToggleFeatureEnvironmentOff(ctx, projectId, featureName, environment).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.ToggleFeatureEnvironmentOff(context.Background(), projectId, featureName, environment).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ToggleFeatureEnvironmentOff``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ToggleFeatureEnvironmentOff`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.ToggleFeatureEnvironmentOff`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

Return type

FeatureSchema

Authorization

apiKey

HTTP request headers

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

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

ToggleFeatureEnvironmentOn

FeatureSchema ToggleFeatureEnvironmentOn(ctx, projectId, featureName, environment).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.ToggleFeatureEnvironmentOn(context.Background(), projectId, featureName, environment).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ToggleFeatureEnvironmentOn``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `ToggleFeatureEnvironmentOn`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.ToggleFeatureEnvironmentOn`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string

Other Parameters

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

Name Type Description Notes

Return type

FeatureSchema

Authorization

apiKey

HTTP request headers

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

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

UpdateFeature

FeatureSchema UpdateFeature(ctx, projectId, featureName).UpdateFeatureSchema(updateFeatureSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    updateFeatureSchema := *openapiclient.NewUpdateFeatureSchema("Name_example") // UpdateFeatureSchema | updateFeatureSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.UpdateFeature(context.Background(), projectId, featureName).UpdateFeatureSchema(updateFeatureSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.UpdateFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateFeature`: FeatureSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.UpdateFeature`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string

Other Parameters

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

Name Type Description Notes

updateFeatureSchema | UpdateFeatureSchema | updateFeatureSchema |

Return type

FeatureSchema

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]

UpdateFeatureStrategy

FeatureStrategySchema UpdateFeatureStrategy(ctx, projectId, featureName, environment, strategyId).UpdateFeatureStrategySchema(updateFeatureStrategySchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    projectId := "projectId_example" // string | 
    featureName := "featureName_example" // string | 
    environment := "environment_example" // string | 
    strategyId := "strategyId_example" // string | 
    updateFeatureStrategySchema := *openapiclient.NewUpdateFeatureStrategySchema() // UpdateFeatureStrategySchema | updateFeatureStrategySchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.UpdateFeatureStrategy(context.Background(), projectId, featureName, environment, strategyId).UpdateFeatureStrategySchema(updateFeatureStrategySchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.UpdateFeatureStrategy``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateFeatureStrategy`: FeatureStrategySchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.UpdateFeatureStrategy`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectId string
featureName string
environment string
strategyId string

Other Parameters

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

Name Type Description Notes

updateFeatureStrategySchema | UpdateFeatureStrategySchema | updateFeatureStrategySchema |

Return type

FeatureStrategySchema

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]

UpdateTags

TagsSchema UpdateTags(ctx, featureName).UpdateTagsSchema(updateTagsSchema).Execute()

Updates multiple tags for a feature.

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    featureName := "featureName_example" // string | 
    updateTagsSchema := *openapiclient.NewUpdateTagsSchema([]openapiclient.TagSchema{*openapiclient.NewTagSchema("a-tag-value", "simple")}, []openapiclient.TagSchema{*openapiclient.NewTagSchema("a-tag-value", "simple")}) // UpdateTagsSchema | updateTagsSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FeaturesApi.UpdateTags(context.Background(), featureName).UpdateTagsSchema(updateTagsSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.UpdateTags``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateTags`: TagsSchema
    fmt.Fprintf(os.Stdout, "Response from `FeaturesApi.UpdateTags`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureName string

Other Parameters

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

Name Type Description Notes

updateTagsSchema | UpdateTagsSchema | updateTagsSchema |

Return type

TagsSchema

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]

ValidateConstraint

ValidateConstraint(ctx).ConstraintSchema(constraintSchema).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {
    constraintSchema := *openapiclient.NewConstraintSchema("appName", "IN") // ConstraintSchema | constraintSchema

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.ValidateConstraint(context.Background()).ConstraintSchema(constraintSchema).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ValidateConstraint``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Other Parameters

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

Name Type Description Notes
constraintSchema ConstraintSchema constraintSchema

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

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

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

ValidateFeature

ValidateFeature(ctx).Execute()

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/Unleash/unleash-server-api-go/client"
)

func main() {

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    r, err := apiClient.FeaturesApi.ValidateFeature(context.Background()).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FeaturesApi.ValidateFeature``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

(empty response body)

Authorization

apiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

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