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

Generate warehouse destination setup script

POST
/api/v2/destinations/projects/:projKey/environments/:envKey/kinds/:kind/setup
POST
/api/v2/destinations/projects/:projKey/environments/:envKey/kinds/:kind/setup
$curl -X POST https://app.launchdarkly.com/api/v2/destinations/projects/projKey/environments/envKey/kinds/kind/setup \
> -H "Authorization: <apiKey>" \
> -H "Content-Type: application/json" \
> -d '{}'
1{
2 "script": "string",
3 "publicKey": "string",
4 "publicKeyPkcs8": "string",
5 "redshiftIAMPermissionsPolicy": "string",
6 "redshiftIAMTrustPolicy": "string"
7}
Generate the SQL setup script required to prepare a warehouse for LaunchDarkly Data Export. For Snowflake, this also generates a key pair. Custom Snowflake object names may be provided. If omitted, defaults are used.
Was this page helpful?
Previous

Get destination

Next
Built with

Authentication

Authorizationstring
API Key authentication via header

Path parameters

projKeystringRequiredformat: "string"
The project key
envKeystringRequiredformat: "string"
The environment key
kindstringRequiredformat: "string"

The destination kind (snowflake-v2, redshift)

Request

This endpoint expects an object.
namestringOptional
snowflakeHostAddressstringOptional
databaseNamestringOptional
warehouseNamestringOptional
roleNamestringOptional
schemaNamestringOptional
userNamestringOptional
includeNetworkPolicybooleanOptional
clusterIdentifierstringOptional
clusterRegionstringOptional
clusterAwsAccountIdstringOptional

Response

Generate warehouse destination setup script response
scriptstring
The SQL setup script to run in your data warehouse
publicKeystring

The RSA public key (Snowflake only) to store as the destination public_key

publicKeyPkcs8string

The PKCS8 RSA public key (Snowflake only)

redshiftIAMPermissionsPolicystring
For Redshift, present only when clusterIdentifier, clusterRegion, and clusterAwsAccountId are supplied in the request body.
redshiftIAMTrustPolicystring
For Redshift, present only when clusterIdentifier, clusterRegion, and clusterAwsAccountId are supplied in the request body.

Errors

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