Skip to content

Latest commit

 

History

History
312 lines (198 loc) · 8.69 KB

FlagLinksBetaApi.md

File metadata and controls

312 lines (198 loc) · 8.69 KB

\FlagLinksBetaApi

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

Method HTTP request Description
CreateFlagLink Post /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} Create flag link
DeleteFlagLink Delete /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Delete flag link
GetFlagLinks Get /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} List flag links
UpdateFlagLink Patch /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} Update flag link

CreateFlagLink

FlagLinkRep CreateFlagLink(ctx, projectKey, featureFlagKey).FlagLinkPost(flagLinkPost).Execute()

Create flag link

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    featureFlagKey := "featureFlagKey_example" // string | The feature flag key
    flagLinkPost := *openapiclient.NewFlagLinkPost() // FlagLinkPost | 

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectKey string The project key
featureFlagKey string The feature flag key

Other Parameters

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

Name Type Description Notes

flagLinkPost | FlagLinkPost | |

Return type

FlagLinkRep

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]

DeleteFlagLink

DeleteFlagLink(ctx, projectKey, featureFlagKey, id).Execute()

Delete flag link

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    featureFlagKey := "featureFlagKey_example" // string | The feature flag key
    id := "id_example" // string | The flag link ID or Key

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FlagLinksBetaApi.DeleteFlagLink(context.Background(), projectKey, featureFlagKey, id).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.DeleteFlagLink``: %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
featureFlagKey string The feature flag key
id string The flag link ID or Key

Other Parameters

Other parameters are passed through a pointer to a apiDeleteFlagLinkRequest 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]

GetFlagLinks

FlagLinkCollectionRep GetFlagLinks(ctx, projectKey, featureFlagKey).Execute()

List flag links

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    featureFlagKey := "featureFlagKey_example" // string | The feature flag key

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectKey string The project key
featureFlagKey string The feature flag key

Other Parameters

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

Name Type Description Notes

Return type

FlagLinkCollectionRep

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]

UpdateFlagLink

FlagLinkRep UpdateFlagLink(ctx, projectKey, featureFlagKey, id).PatchOperation(patchOperation).Execute()

Update flag link

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    featureFlagKey := "featureFlagKey_example" // string | The feature flag key
    id := "id_example" // string | The flag link ID
    patchOperation := []openapiclient.PatchOperation{*openapiclient.NewPatchOperation("replace", "/exampleField")} // []PatchOperation | 

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.FlagLinksBetaApi.UpdateFlagLink(context.Background(), projectKey, featureFlagKey, id).PatchOperation(patchOperation).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `FlagLinksBetaApi.UpdateFlagLink``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `UpdateFlagLink`: FlagLinkRep
    fmt.Fprintf(os.Stdout, "Response from `FlagLinksBetaApi.UpdateFlagLink`: %v\n", resp)
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectKey string The project key
featureFlagKey string The feature flag key
id string The flag link ID

Other Parameters

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

Name Type Description Notes

patchOperation | []PatchOperation | |

Return type

FlagLinkRep

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]