All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| delete_destination | DELETE /api/v2/destinations/{projectKey}/{environmentKey}/{id} | Delete Data Export destination |
| get_destination | GET /api/v2/destinations/{projectKey}/{environmentKey}/{id} | Get destination |
| get_destinations | GET /api/v2/destinations | List destinations |
| patch_destination | PATCH /api/v2/destinations/{projectKey}/{environmentKey}/{id} | Update Data Export destination |
| post_destination | POST /api/v2/destinations/{projectKey}/{environmentKey} | Create Data Export destination |
| post_generate_trust_policy | POST /api/v2/destinations/projects/{projKey}/environments/{envKey}/generate-trust-policy | Generate trust policy |
| post_generate_warehouse_destination_key_pair | POST /api/v2/destinations/generate-warehouse-destination-key-pair | Generate Snowflake destination key pair |
delete_destination(project_key, environment_key, id)
Delete Data Export destination
Delete a Data Export destination by ID.
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
project_key = 'project_key_example' # str | The project key
environment_key = 'environment_key_example' # str | The environment key
id = 'id_example' # str | The Data Export destination ID
try:
# Delete Data Export destination
api_instance.delete_destination(project_key, environment_key, id)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->delete_destination: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_key | str | The project key | |
| environment_key | str | The environment key | |
| id | str | The Data Export destination ID |
void (empty response body)
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 204 | Destination response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Destination get_destination(project_key, environment_key, id)
Get destination
Get a single Data Export destination by ID.
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.destination import Destination
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
project_key = 'project_key_example' # str | The project key
environment_key = 'environment_key_example' # str | The environment key
id = 'id_example' # str | The Data Export destination ID
try:
# Get destination
api_response = api_instance.get_destination(project_key, environment_key, id)
print("The response of DataExportDestinationsApi->get_destination:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->get_destination: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_key | str | The project key | |
| environment_key | str | The environment key | |
| id | str | The Data Export destination ID |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Destination response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Destinations get_destinations()
List destinations
Get a list of Data Export destinations configured across all projects and environments.
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.destinations import Destinations
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
try:
# List destinations
api_response = api_instance.get_destinations()
print("The response of DataExportDestinationsApi->get_destinations:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->get_destinations: %s\n" % e)This endpoint does not need any parameter.
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Destination collection response | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Destination patch_destination(project_key, environment_key, id, patch_operation)
Update Data Export destination
Update a Data Export destination. Updating a destination uses a JSON patch or JSON merge patch representation of the desired changes. To learn more, read Updates.
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.destination import Destination
from launchdarkly_api.models.patch_operation import PatchOperation
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
project_key = 'project_key_example' # str | The project key
environment_key = 'environment_key_example' # str | The environment key
id = 'id_example' # str | The Data Export destination ID
patch_operation = [{"op":"replace","path":"/config/topic","value":"ld-pubsub-test-192302"}] # List[PatchOperation] |
try:
# Update Data Export destination
api_response = api_instance.patch_destination(project_key, environment_key, id, patch_operation)
print("The response of DataExportDestinationsApi->patch_destination:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->patch_destination: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_key | str | The project key | |
| environment_key | str | The environment key | |
| id | str | The Data Export destination ID | |
| patch_operation | List[PatchOperation] |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 200 | Destination response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 404 | Invalid resource identifier | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
Destination post_destination(project_key, environment_key, destination_post)
Create Data Export destination
Create a new Data Export destination.
In the config request body parameter, the fields required depend on the type of Data Export destination.
Click to expand config parameter details
To create a Data Export destination with a kind of azure-event-hubs, the config object requires the following fields:
namespace: The Event Hub Namespace namename: The Event Hub namepolicyName: The shared access signature policy name. You can find your policy name in the settings of your Azure Event Hubs Namespace.policyKey: The shared access signature key. You can find your policy key in the settings of your Azure Event Hubs Namespace.
To create a Data Export destination with a kind of google-pubsub, the config object requires the following fields:
project: The Google PubSub project ID for the project to publish totopic: The Google PubSub topic ID for the topic to publish to
To create a Data Export destination with a kind of kinesis, the config object requires the following fields:
region: The Kinesis stream's AWS region keyroleArn: The Amazon Resource Name (ARN) of the AWS role that will be writing to KinesisstreamName: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream.
To create a Data Export destination with a kind of mparticle, the config object requires the following fields:
apiKey: The mParticle API keysecret: The mParticle API secretuserIdentity: The type of identifier you use to identify your end users in mParticleanonymousUserIdentity: The type of identifier you use to identify your anonymous end users in mParticle
To create a Data Export destination with a kind of segment, the config object requires the following fields:
writeKey: The Segment write key. This is used to authenticate LaunchDarkly's calls to Segment.
To create a Data Export destination with a kind of snowflake-v2, the config object requires the following fields:
publicKey: ThepublicKeyis returned as part of the Generate Snowflake destination key pair response. It is thepublic_keyfield.snowflakeHostAddress: Your Snowflake account URL.
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.destination import Destination
from launchdarkly_api.models.destination_post import DestinationPost
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
project_key = 'project_key_example' # str | The project key
environment_key = 'environment_key_example' # str | The environment key
destination_post = {"config":{"project":"test-prod","topic":"ld-pubsub-test-192301"},"kind":"google-pubsub"} # DestinationPost |
try:
# Create Data Export destination
api_response = api_instance.post_destination(project_key, environment_key, destination_post)
print("The response of DataExportDestinationsApi->post_destination:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->post_destination: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| project_key | str | The project key | |
| environment_key | str | The environment key | |
| destination_post | DestinationPost |
- Content-Type: application/json
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Destination response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateTrustPolicyPostRep post_generate_trust_policy(proj_key, env_key)
Generate trust policy
Trust policy to allow Data Export to assume the role and perform operations on AWS resources
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.generate_trust_policy_post_rep import GenerateTrustPolicyPostRep
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
proj_key = 'proj_key_example' # str | The project key
env_key = 'env_key_example' # str | The environment key
try:
# Generate trust policy
api_response = api_instance.post_generate_trust_policy(proj_key, env_key)
print("The response of DataExportDestinationsApi->post_generate_trust_policy:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->post_generate_trust_policy: %s\n" % e)| Name | Type | Description | Notes |
|---|---|---|---|
| proj_key | str | The project key | |
| env_key | str | The environment key |
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Generate trust policy response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]
GenerateWarehouseDestinationKeyPairPostRep post_generate_warehouse_destination_key_pair()
Generate Snowflake destination key pair
Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination
- Api Key Authentication (ApiKey):
import launchdarkly_api
from launchdarkly_api.models.generate_warehouse_destination_key_pair_post_rep import GenerateWarehouseDestinationKeyPairPostRep
from launchdarkly_api.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://app.launchdarkly.com
# See configuration.py for a list of all supported configuration parameters.
configuration = launchdarkly_api.Configuration(
host = "https://app.launchdarkly.com"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKey
configuration.api_key['ApiKey'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKey'] = 'Bearer'
# Enter a context with an instance of the API client
with launchdarkly_api.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = launchdarkly_api.DataExportDestinationsApi(api_client)
try:
# Generate Snowflake destination key pair
api_response = api_instance.post_generate_warehouse_destination_key_pair()
print("The response of DataExportDestinationsApi->post_generate_warehouse_destination_key_pair:\n")
pprint(api_response)
except Exception as e:
print("Exception when calling DataExportDestinationsApi->post_generate_warehouse_destination_key_pair: %s\n" % e)This endpoint does not need any parameter.
GenerateWarehouseDestinationKeyPairPostRep
- Content-Type: Not defined
- Accept: application/json
| Status code | Description | Response headers |
|---|---|---|
| 201 | Generate warehouse destination key pair response | - |
| 400 | Invalid request | - |
| 401 | Invalid access token | - |
| 403 | Forbidden | - |
| 409 | Status conflict | - |
| 429 | Rate limited | - |
[Back to top] [Back to API list] [Back to Model list] [Back to README]