Skip to content

Latest commit

 

History

History
359 lines (227 loc) · 9.65 KB

FeatureAPI.md

File metadata and controls

359 lines (227 loc) · 9.65 KB

\FeatureAPI

All URIs are relative to https://subdomain.okta.com

Method HTTP request Description
GetFeature Get /api/v1/features/{featureId} Retrieve a Feature
ListFeatureDependencies Get /api/v1/features/{featureId}/dependencies List all dependencies
ListFeatureDependents Get /api/v1/features/{featureId}/dependents List all dependents
ListFeatures Get /api/v1/features List all Features
UpdateFeatureLifecycle Post /api/v1/features/{featureId}/{lifecycle} Update a Feature lifecycle

GetFeature

Feature GetFeature(ctx, featureId).Execute()

Retrieve a Feature

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    featureId := "R5HjqNn1pEqWGy48E9jg" // string | `id` of the feature

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureId string `id` of the feature

Other Parameters

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

Name Type Description Notes

Return type

Feature

Authorization

apiToken, oauth2

HTTP request headers

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

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

ListFeatureDependencies

[]Feature ListFeatureDependencies(ctx, featureId).Execute()

List all dependencies

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    featureId := "R5HjqNn1pEqWGy48E9jg" // string | `id` of the feature

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureId string `id` of the feature

Other Parameters

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

Name Type Description Notes

Return type

[]Feature

Authorization

apiToken, oauth2

HTTP request headers

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

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

ListFeatureDependents

[]Feature ListFeatureDependents(ctx, featureId).Execute()

List all dependents

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    featureId := "R5HjqNn1pEqWGy48E9jg" // string | `id` of the feature

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureId string `id` of the feature

Other Parameters

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

Name Type Description Notes

Return type

[]Feature

Authorization

apiToken, oauth2

HTTP request headers

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

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

ListFeatures

[]Feature ListFeatures(ctx).Execute()

List all Features

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {

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

Path Parameters

This endpoint does not need any parameter.

Other Parameters

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

Return type

[]Feature

Authorization

apiToken, oauth2

HTTP request headers

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

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

UpdateFeatureLifecycle

Feature UpdateFeatureLifecycle(ctx, featureId, lifecycle).Mode(mode).Execute()

Update a Feature lifecycle

Example

package main

import (
    "context"
    "fmt"
    "os"
    openapiclient "github.com/okta/okta-sdk-golang"
)

func main() {
    featureId := "R5HjqNn1pEqWGy48E9jg" // string | `id` of the feature
    lifecycle := openapiclient.FeatureLifecycle("DISABLE") // FeatureLifecycle | Whether to `ENABLE` or `DISABLE` the feature
    mode := "mode_example" // string | Indicates if you want to force enable or disable a feature. Supported value is `force`. (optional)

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
featureId string `id` of the feature
lifecycle FeatureLifecycle Whether to `ENABLE` or `DISABLE` the feature

Other Parameters

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

Name Type Description Notes

mode | string | Indicates if you want to force enable or disable a feature. Supported value is `force`. |

Return type

Feature

Authorization

apiToken, oauth2

HTTP request headers

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

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