Skip to content

Latest commit

 

History

History
322 lines (204 loc) · 9.23 KB

SegmentsBetaApi.md

File metadata and controls

322 lines (204 loc) · 9.23 KB

\SegmentsBetaApi

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

Method HTTP request Description
CreateBigSegmentExport Post /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports Create Big Segment export
CreateBigSegmentImport Post /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports Create Big Segment import
GetBigSegmentExport Get /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/exports/{exportID} Get Big Segment export
GetBigSegmentImport Get /api/v2/segments/{projectKey}/{environmentKey}/{segmentKey}/imports/{importID} Get Big Segment import

CreateBigSegmentExport

CreateBigSegmentExport(ctx, projectKey, environmentKey, segmentKey).Execute()

Create Big Segment export

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    environmentKey := "environmentKey_example" // string | The environment key
    segmentKey := "segmentKey_example" // string | The segment key

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

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectKey string The project key
environmentKey string The environment key
segmentKey string The segment key

Other Parameters

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

CreateBigSegmentImport

CreateBigSegmentImport(ctx, projectKey, environmentKey, segmentKey).File(file).Mode(mode).Execute()

Create Big Segment import

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    environmentKey := "environmentKey_example" // string | The environment key
    segmentKey := "segmentKey_example" // string | The segment key
    file := os.NewFile(1234, "some_file") // *os.File | CSV file containing keys (optional)
    mode := "mode_example" // string | Import mode. Use either `merge` or `replace` (optional)

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SegmentsBetaApi.CreateBigSegmentImport(context.Background(), projectKey, environmentKey, segmentKey).File(file).Mode(mode).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SegmentsBetaApi.CreateBigSegmentImport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
}

Path Parameters

Name Type Description Notes
ctx context.Context context for authentication, logging, cancellation, deadlines, tracing, etc.
projectKey string The project key
environmentKey string The environment key
segmentKey string The segment key

Other Parameters

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

Name Type Description Notes

file | *os.File | CSV file containing keys | mode | string | Import mode. Use either `merge` or `replace` |

Return type

(empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: multipart/form-data
  • Accept: application/json

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

GetBigSegmentExport

Export GetBigSegmentExport(ctx, projectKey, environmentKey, segmentKey, exportID).Execute()

Get Big Segment export

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    environmentKey := "environmentKey_example" // string | The environment key
    segmentKey := "segmentKey_example" // string | The segment key
    exportID := "exportID_example" // string | The export ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SegmentsBetaApi.GetBigSegmentExport(context.Background(), projectKey, environmentKey, segmentKey, exportID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SegmentsBetaApi.GetBigSegmentExport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetBigSegmentExport`: Export
    fmt.Fprintf(os.Stdout, "Response from `SegmentsBetaApi.GetBigSegmentExport`: %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
environmentKey string The environment key
segmentKey string The segment key
exportID string The export ID

Other Parameters

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

Name Type Description Notes

Return type

Export

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]

GetBigSegmentImport

Import GetBigSegmentImport(ctx, projectKey, environmentKey, segmentKey, importID).Execute()

Get Big Segment import

Example

package main

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

func main() {
    projectKey := "projectKey_example" // string | The project key
    environmentKey := "environmentKey_example" // string | The environment key
    segmentKey := "segmentKey_example" // string | The segment key
    importID := "importID_example" // string | The import ID

    configuration := openapiclient.NewConfiguration()
    apiClient := openapiclient.NewAPIClient(configuration)
    resp, r, err := apiClient.SegmentsBetaApi.GetBigSegmentImport(context.Background(), projectKey, environmentKey, segmentKey, importID).Execute()
    if err != nil {
        fmt.Fprintf(os.Stderr, "Error when calling `SegmentsBetaApi.GetBigSegmentImport``: %v\n", err)
        fmt.Fprintf(os.Stderr, "Full HTTP response: %v\n", r)
    }
    // response from `GetBigSegmentImport`: Import
    fmt.Fprintf(os.Stdout, "Response from `SegmentsBetaApi.GetBigSegmentImport`: %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
environmentKey string The environment key
segmentKey string The segment key
importID string The import ID

Other Parameters

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

Name Type Description Notes

Return type

Import

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]