Data Export destinations

Data Export is an add-on feature

Data Export is available as an add-on for customers on a Foundation or Enterprise plan. To learn more, read about our pricing. To upgrade your plan, contact Sales.

Data Export provides a real-time export of raw analytics data, including feature flag requests, analytics events, custom events, and more.

Data Export destinations are locations that receive exported data. The Data Export destinations API allows you to configure destinations so that your data can be exported.

Several of the endpoints in the Data Export destinations API require a Data Export destination ID. The Data Export destination ID is returned as part of the Create a Data Export destination and List destinations responses. It is the _id field, or the _id field of each element in the items array.

To learn more, read Data Export.

List destinations

Get a list of Data Export destinations configured across all projects and environments.

Responses
200

Destination collection response

401

Invalid access token

403

Forbidden

429

Rate limited

get/api/v2/destinations
Request samples
Response samples
application/json
{
  • "_links": {
    },
  • "items": [
    ]
}

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

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.
Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

Request Body schema: application/json
required
name
string

A human-readable name for your Data Export destination

kind
string

The type of Data Export destination

Enum: "google-pubsub" "kinesis" "mparticle" "segment" "azure-event-hubs"
config
any

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.

Responses
201

Destination response

400

Invalid request

401

Invalid access token

403

Forbidden

409

Status conflict

429

Rate limited

post/api/v2/destinations/{projectKey}/{environmentKey}
Request samples
application/json
{
  • "config": {
    },
  • "kind": "google-pubsub"
}
Response samples
application/json
{
  • "_id": "610addeadbeefaa86ec9a7d4",
  • "_links": {
    },
  • "name": "example-destination",
  • "kind": "google-pubsub",
  • "version": 1,
  • "config": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
  • "on": true,
  • "_access": {
    }
}

Get destination

Get a single Data Export destination by ID.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The Data Export destination ID

Responses
200

Destination response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

get/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Request samples
Response samples
application/json
{
  • "_id": "610addeadbeefaa86ec9a7d4",
  • "_links": {
    },
  • "name": "example-destination",
  • "kind": "google-pubsub",
  • "version": 1,
  • "config": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
  • "on": true,
  • "_access": {
    }
}

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.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The Data Export destination ID

Request Body schema: application/json
required
Array
op
required
string

The type of operation to perform

path
required
string

A JSON Pointer string specifying the part of the document to operate on

value
any

A JSON value used in "add", "replace", and "test" operations

Responses
200

Destination response

400

Invalid request

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

409

Status conflict

429

Rate limited

patch/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Request samples
application/json
[
  • {
    }
]
Response samples
application/json
{
  • "_id": "610addeadbeefaa86ec9a7d4",
  • "_links": {
    },
  • "name": "example-destination",
  • "kind": "google-pubsub",
  • "version": 1,
  • "config": "{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}",
  • "on": true,
  • "_access": {
    }
}

Delete Data Export destination

Delete a Data Export destination by ID.

Request
path Parameters
projectKey
required
string <string>

The project key

environmentKey
required
string <string>

The environment key

id
required
string <string>

The Data Export destination ID

Responses
204

Destination response

401

Invalid access token

403

Forbidden

404

Invalid resource identifier

429

Rate limited

delete/api/v2/destinations/{projectKey}/{environmentKey}/{id}
Request samples
Response samples
application/json
{
  • "code": "unauthorized",
  • "message": "Invalid access token"
}