Skip to main content
POST
/
api
/
v2
/
destinations
/
{projectKey}
/
{environmentKey}
Create Data Export destination
curl --request POST \
  --url https://app.launchdarkly.com/api/v2/destinations/{projectKey}/{environmentKey} \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "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,
  "_access": {
    "denied": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ],
    "allowed": [
      {
        "action": "<string>",
        "reason": {
          "effect": "allow",
          "resources": [
            "proj/*:env/*;qa_*:/flag/*"
          ],
          "notResources": [
            "<string>"
          ],
          "actions": [
            "*"
          ],
          "notActions": [
            "<string>"
          ],
          "role_name": "<string>"
        }
      }
    ]
  }
}

Documentation Index

Fetch the complete documentation index at: https://launchdarkly-preview.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Path Parameters

projectKey
string<string>
required

The project key

environmentKey
string<string>
required

The environment key

Body

application/json
name
string

A human-readable name for your Data Export destination

Example:

"example-destination"

kind
enum<string>

The type of Data Export destination

Available options:
google-pubsub,
kinesis,
mparticle,
segment,
azure-event-hubs,
snowflake-v2,
databricks,
bigquery,
redshift
Example:

"google-pubsub"

config
any

An object with the configuration parameters required for the destination type

Example:

"{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}"

on
boolean

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

Example:

true

Response

Destination response

_id
string

The ID of this Data Export destination

Example:

"610addeadbeefaa86ec9a7d4"

The location and content type of related resources

Example:
{
  "parent": {
    "href": "/api/v2/destinations",
    "type": "application/json"
  },
  "self": {
    "href": "/api/v2/destinations/my-project/my-environment/610addeadbeefaa86ec9a7d4",
    "type": "application/json"
  }
}
name
string

A human-readable name for your Data Export destination

Example:

"example-destination"

kind
enum<string>

The type of Data Export destination

Available options:
google-pubsub,
kinesis,
mparticle,
segment,
azure-event-hubs,
snowflake-v2,
databricks,
bigquery,
redshift
Example:

"google-pubsub"

version
number
Example:

1

config
any

An object with the configuration parameters required for the destination type

Example:

"{\"project\":\"test-prod\",\"topic\":\"ld-pubsub-test-192301\"}"

on
boolean

Whether the export is on, that is, the status of the integration

Example:

true

_access
object

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