Data Export destinations

Create Data Export destination

POST
/api/v2/destinations/{projectKey}/{environmentKey}

Create a new Data Export destination.

In the config request body parameter, the fields required depend on the type of Data Export destination.

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:

Authorization

ApiKey read, write
Authorization<token>

In: header

Scope: read, write

Path Parameters

projectKey*string

The project key

Formatstring
environmentKey*string

The environment key

Formatstring

Request Body

application/json

name?string

A human-readable name for your Data Export destination

kind?string

The type of Data Export destination

Value in

  • "google-pubsub"
  • "kinesis"
  • "mparticle"
  • "segment"
  • "azure-event-hubs"
  • "snowflake-v2"
  • "databricks"
  • "bigquery"
  • "redshift"
config?unknown

An object with the configuration parameters required for the destination type

on?boolean

Whether the export is on. Displayed as the integration status in the LaunchDarkly UI.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/v2/destinations/string/string" \  -H "Content-Type: application/json" \  -d '{    "config": {      "project": "test-prod",      "topic": "ld-pubsub-test-192301"    },    "kind": "google-pubsub"  }'
{  "_id": "610addeadbeefaa86ec9a7d4",  "_links": {    "parent": {      "href": "/api/v2/destinations",      "type": "application/json"    },    "self": {      "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4",      "type": "application/json"    }  },  "name": "example-destination",  "kind": "google-pubsub",  "version": 1,  "config": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",  "on": true,  "createdAt": "1628001602644",  "maintainerId": "569f183514f4432160000007",  "_access": {    "denied": [      {        "action": "string",        "reason": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ],    "allowed": [      {        "action": "string",        "reason": {          "resources": [            "proj/*:env/*;qa_*:/flag/*"          ],          "notResources": [            "string"          ],          "actions": [            "*"          ],          "notActions": [            "string"          ],          "effect": "allow",          "role_name": "string"        }      }    ]  },  "completedArtifacts": {    "sqlSetupScript": "string",    "s3BucketName": "string"  }}