Skip to content

Latest commit

 

History

History
330 lines (226 loc) · 12.7 KB

DataExportDestinationsApi.md

File metadata and controls

330 lines (226 loc) · 12.7 KB

LaunchDarklyApi.DataExportDestinationsApi

All URIs are relative to https://app.launchdarkly.com

Method HTTP request Description
deleteDestination DELETE /api/v2/destinations/{projectKey}/{environmentKey}/{id} Delete Data Export destination
getDestination GET /api/v2/destinations/{projectKey}/{environmentKey}/{id} Get destination
getDestinations GET /api/v2/destinations List destinations
patchDestination PATCH /api/v2/destinations/{projectKey}/{environmentKey}/{id} Update Data Export destination
postDestination POST /api/v2/destinations/{projectKey}/{environmentKey} Create Data Export destination
postGenerateWarehouseDestinationKeyPair POST /api/v2/destinations/generate-warehouse-destination-key-pair Generate Snowflake destination key pair

deleteDestination

deleteDestination(projectKey, environmentKey, id)

Delete Data Export destination

Delete a Data Export destination by ID.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
let projectKey = "projectKey_example"; // String | The project key
let environmentKey = "environmentKey_example"; // String | The environment key
let id = "id_example"; // String | The Data Export destination ID
apiInstance.deleteDestination(projectKey, environmentKey, id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String The environment key
id String The Data Export destination ID

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getDestination

Destination getDestination(projectKey, environmentKey, id)

Get destination

Get a single Data Export destination by ID.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
let projectKey = "projectKey_example"; // String | The project key
let environmentKey = "environmentKey_example"; // String | The environment key
let id = "id_example"; // String | The Data Export destination ID
apiInstance.getDestination(projectKey, environmentKey, id, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String The environment key
id String The Data Export destination ID

Return type

Destination

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

getDestinations

Destinations getDestinations()

List destinations

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

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
apiInstance.getDestinations((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

Destinations

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

patchDestination

Destination patchDestination(projectKey, environmentKey, id, patchOperation)

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.

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
let projectKey = "projectKey_example"; // String | The project key
let environmentKey = "environmentKey_example"; // String | The environment key
let id = "id_example"; // String | The Data Export destination ID
let patchOperation = [{"op":"replace","path":"/config/topic","value":"ld-pubsub-test-192302"}]; // [PatchOperation] | 
apiInstance.patchDestination(projectKey, environmentKey, id, patchOperation, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String The environment key
id String The Data Export destination ID
patchOperation [PatchOperation]

Return type

Destination

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postDestination

Destination postDestination(projectKey, environmentKey, destinationPost)

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. <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 response. It is the `public_key` field. * `snowflakeHostAddress`: Your Snowflake account URL. </details>

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
let projectKey = "projectKey_example"; // String | The project key
let environmentKey = "environmentKey_example"; // String | The environment key
let destinationPost = {"config":{"project":"test-prod","topic":"ld-pubsub-test-192301"},"kind":"google-pubsub"}; // DestinationPost | 
apiInstance.postDestination(projectKey, environmentKey, destinationPost, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
environmentKey String The environment key
destinationPost DestinationPost

Return type

Destination

Authorization

ApiKey

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

postGenerateWarehouseDestinationKeyPair

GenerateWarehouseDestinationKeyPairPostRep postGenerateWarehouseDestinationKeyPair()

Generate Snowflake destination key pair

Generate key pair to allow Data Export to authenticate into a Snowflake warehouse destination

Example

import LaunchDarklyApi from 'launchdarkly-api';
let defaultClient = LaunchDarklyApi.ApiClient.instance;
// Configure API key authorization: ApiKey
let ApiKey = defaultClient.authentications['ApiKey'];
ApiKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//ApiKey.apiKeyPrefix = 'Token';

let apiInstance = new LaunchDarklyApi.DataExportDestinationsApi();
apiInstance.postGenerateWarehouseDestinationKeyPair((error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
});

Parameters

This endpoint does not need any parameter.

Return type

GenerateWarehouseDestinationKeyPairPostRep

Authorization

ApiKey

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json