For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Sign inTry it free
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
DocsGuidesSDKsIntegrationsAPI docsTutorialsFlagship blog
  • REST API overview
    • Access Tokens
    • Account Members
    • Account Usage Beta
    • AI Configs
    • Announcements
    • Applications Beta
    • Approvals
    • Approvals Beta
    • Audit Log
    • Code References
    • Contexts
    • Context Settings
    • Custom Roles
    • Data Export Destinations
      • POSTComplete warehouse destination setup
      • POSTCreate Data Export destination
      • DELDelete Data Export destination
      • POSTGenerate Snowflake destination key pair
      • POSTGenerate Snowflake destination key pair
      • POSTGenerate trust policy
      • POSTGenerate warehouse destination setup script
      • GETGet destination
      • GETList destinations
      • PATCHUpdate Data Export destination
    • Environments
    • Experiments
    • Feature Flags
    • Feature Flags Beta
    • Flag Import Configurations Beta
    • Flag Links Beta
    • Flag Triggers
    • Follow Flags
    • Holdouts Beta
    • Insights Charts Beta
    • Insights Deployments Beta
    • Insights Flag Events Beta
    • Insights Pull Requests Beta
    • Insights Repositories Beta
    • Insights Scores Beta
    • Integration Audit Log Subscriptions
    • Integration Delivery Configurations Beta
    • Integrations Beta
    • Layers
    • Metrics
    • Metrics Beta
    • OAuth2 Clients
    • Persistent Store Integrations Beta
    • Projects
    • Relay Proxy Configurations
    • Release Pipelines Beta
    • Releases Beta
    • Scheduled Changes
    • Segments
    • Tags
    • Teams
    • Teams Beta
    • Users
    • Users Beta
    • User Settings
    • Views Beta
    • Webhooks
    • Workflows
    • Workflow Templates
    • Other
Sign inTry it free
LogoLogo
REST API overviewData Export Destinations

Create Data Export destination

POST
/api/v2/destinations/:projectKey/:environmentKey
POST
/api/v2/destinations/:projectKey/:environmentKey
$curl -X POST https://app.launchdarkly.com/api/v2/destinations/projectKey/environmentKey \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{
> "kind": "google-pubsub",
> "config": null
>}'
1{
2 "_id": "610addeadbeefaa86ec9a7d4",
3 "_links": {
4 "parent": {
5 "href": "/api/v2/destinations",
6 "type": "application/json"
7 },
8 "self": {
9 "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4",
10 "type": "application/json"
11 }
12 },
13 "name": "example-destination",
14 "kind": "google-pubsub",
15 "version": 1,
16 "config": null,
17 "on": true,
18 "createdAt": 1628001602644,
19 "_access": {
20 "denied": [
21 {
22 "action": "string",
23 "reason": {
24 "effect": "allow",
25 "resources": [
26 "proj/*:env/*;qa_*:/flag/*"
27 ],
28 "notResources": [
29 "string"
30 ],
31 "actions": [
32 "*"
33 ],
34 "notActions": [
35 "string"
36 ],
37 "role_name": "string"
38 }
39 }
40 ],
41 "allowed": [
42 {
43 "action": "string",
44 "reason": {
45 "effect": "allow",
46 "resources": [
47 "proj/*:env/*;qa_*:/flag/*"
48 ],
49 "notResources": [
50 "string"
51 ],
52 "actions": [
53 "*"
54 ],
55 "notActions": [
56 "string"
57 ],
58 "role_name": "string"
59 }
60 }
61 ]
62 }
63}
Create a new Data Export destination. In the `config` request body parameter, the fields required depend on the type of Data Export destination. <details> <summary>Click to expand <code>config</code> parameter details</summary> #### Azure Event Hubs 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 name * `name`: The Event Hub name * `policyName`: 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. #### Google Cloud Pub/Sub 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 to * `topic`: The Google PubSub topic ID for the topic to publish to #### Amazon Kinesis 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 key * `roleArn`: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis * `streamName`: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream. #### mParticle To create a Data Export destination with a `kind` of `mparticle`, the `config` object requires the following fields: * `apiKey`: The mParticle API key * `secret`: The mParticle API secret * `userIdentity`: The type of identifier you use to identify your end users in mParticle * `anonymousUserIdentity`: The type of identifier you use to identify your anonymous end users in mParticle #### Segment 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. #### Snowflake To create a Data Export destination with a `kind` of `snowflake-v2`, the `config` object requires the following fields: * `publicKey`: The `publicKey` is returned as part of the [Generate Snowflake destination key pair](https://launchdarkly.com/docs/api/data-export-destinations/post-generate-warehouse-destination-key-pair) response. It is the `public_key` field. * `snowflakeHostAddress`: Your Snowflake account URL. </details>
Was this page helpful?
Previous

Delete Data Export destination

Next
Built with

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

Azure Event Hubs

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 name
  • name: The Event Hub name
  • policyName: 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.

Google Cloud Pub/Sub

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 to
  • topic: The Google PubSub topic ID for the topic to publish to

Amazon Kinesis

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 key
  • roleArn: The Amazon Resource Name (ARN) of the AWS role that will be writing to Kinesis
  • streamName: The name of the Kinesis stream that LaunchDarkly is sending events to. This is not the ARN of the stream.

mParticle

To create a Data Export destination with a kind of mparticle, the config object requires the following fields:

  • apiKey: The mParticle API key
  • secret: The mParticle API secret
  • userIdentity: The type of identifier you use to identify your end users in mParticle
  • anonymousUserIdentity: The type of identifier you use to identify your anonymous end users in mParticle

Segment

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.

Snowflake

To create a Data Export destination with a kind of snowflake-v2, the config object requires the following fields:

  • publicKey: The publicKey is returned as part of the Generate Snowflake destination key pair response. It is the public_key field.
  • snowflakeHostAddress: Your Snowflake account URL.

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projectKeystringRequiredformat: "string"
The project key
environmentKeystringRequiredformat: "string"
The environment key

Request

This endpoint expects an object.
namestringOptional

A human-readable name for your Data Export destination

kindenumOptional
The type of Data Export destination
configanyOptional
An object with the configuration parameters required for the destination type
onbooleanOptional
Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.

Response

Destination response
_idstring
The ID of this Data Export destination
_linksmap from strings to objects
The location and content type of related resources
namestring

A human-readable name for your Data Export destination

kindenum
The type of Data Export destination
versiondouble
configany
An object with the configuration parameters required for the destination type
onboolean
Whether the export is on, that is, the status of the integration
createdAtlong

Timestamp of when the Data Export destination was created (as Unix milliseconds since epoch)

_accessobject
Details on the allowed and denied actions for this Data Export destination

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
409
Conflict Error
429
Too Many Requests Error