Skip to content

Latest commit

 

History

History
338 lines (233 loc) · 12.9 KB

FlagImportConfigurationsBetaApi.md

File metadata and controls

338 lines (233 loc) · 12.9 KB

LaunchDarklyApi.FlagImportConfigurationsBetaApi

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

Method HTTP request Description
createFlagImportConfiguration POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey} Create a flag import configuration
deleteFlagImportConfiguration DELETE /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Delete a flag import configuration
getFlagImportConfiguration GET /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Get a single flag import configuration
getFlagImportConfigurations GET /api/v2/integration-capabilities/flag-import List all flag import configurations
patchFlagImportConfiguration PATCH /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId} Update a flag import configuration
triggerFlagImportJob POST /api/v2/integration-capabilities/flag-import/{projectKey}/{integrationKey}/{integrationId}/trigger Trigger a single flag import run

createFlagImportConfiguration

FlagImportIntegration createFlagImportConfiguration(projectKey, integrationKey, flagImportConfigurationPost)

Create a flag import configuration

Create a new flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`. The `config` object in the request body schema is described by the global integration settings, as specified by the <code>formVariables</code> in the <code>manifest.json</code> for this integration. It varies slightly based on the `integrationKey`.

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.FlagImportConfigurationsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let integrationKey = "integrationKey_example"; // String | The integration key
let flagImportConfigurationPost = {"config":{"environmentId":"The ID of the environment in the external system","ldApiKey":"An API key with create flag permissions in your LaunchDarkly account","ldMaintainer":"The ID of the member who will be the maintainer of the imported flags","ldTag":"A tag to apply to all flags imported to LaunchDarkly","splitTag":"If provided, imports only the flags from the external system with this tag. Leave blank to import all flags.","workspaceApiKey":"An API key with read permissions in the external feature management system","workspaceId":"The ID of the workspace in the external system"},"name":"Sample configuration","tags":["example-tag"]}; // FlagImportConfigurationPost | 
apiInstance.createFlagImportConfiguration(projectKey, integrationKey, flagImportConfigurationPost, (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
integrationKey String The integration key
flagImportConfigurationPost FlagImportConfigurationPost

Return type

FlagImportIntegration

Authorization

ApiKey

HTTP request headers

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

deleteFlagImportConfiguration

deleteFlagImportConfiguration(projectKey, integrationKey, integrationId)

Delete a flag import configuration

Delete a flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.

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.FlagImportConfigurationsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let integrationKey = "integrationKey_example"; // String | The integration key
let integrationId = "integrationId_example"; // String | The integration ID
apiInstance.deleteFlagImportConfiguration(projectKey, integrationKey, integrationId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
integrationKey String The integration key
integrationId String The integration ID

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

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

getFlagImportConfiguration

FlagImportIntegration getFlagImportConfiguration(projectKey, integrationKey, integrationId)

Get a single flag import configuration

Get a single flag import configuration by ID. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.

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.FlagImportConfigurationsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let integrationKey = "integrationKey_example"; // String | The integration key, for example, `split`
let integrationId = "integrationId_example"; // String | The integration ID
apiInstance.getFlagImportConfiguration(projectKey, integrationKey, integrationId, (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
integrationKey String The integration key, for example, `split`
integrationId String The integration ID

Return type

FlagImportIntegration

Authorization

ApiKey

HTTP request headers

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

getFlagImportConfigurations

FlagImportIntegrationCollection getFlagImportConfigurations()

List all flag import configurations

List all flag import configurations.

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.FlagImportConfigurationsBetaApi();
apiInstance.getFlagImportConfigurations((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

FlagImportIntegrationCollection

Authorization

ApiKey

HTTP request headers

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

patchFlagImportConfiguration

FlagImportIntegration patchFlagImportConfiguration(projectKey, integrationKey, integrationId, patchOperation)

Update a flag import configuration

Updating a flag import configuration uses a JSON patch representation of the desired changes. To learn more, read Updates.<br/><br/>To add an element to the import configuration fields that are arrays, set the `path` to the name of the field and then append `/<array index>`. Use `/0` to add to the beginning of the array. Use `/-` to add to the end of the array.<br/><br/>You can update the `config`, `tags`, and `name` of the flag import configuration.

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.FlagImportConfigurationsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let integrationKey = "integrationKey_example"; // String | The integration key
let integrationId = "integrationId_example"; // String | The integration ID
let patchOperation = [new LaunchDarklyApi.PatchOperation()]; // [PatchOperation] | 
apiInstance.patchFlagImportConfiguration(projectKey, integrationKey, integrationId, 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
integrationKey String The integration key
integrationId String The integration ID
patchOperation [PatchOperation]

Return type

FlagImportIntegration

Authorization

ApiKey

HTTP request headers

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

triggerFlagImportJob

triggerFlagImportJob(projectKey, integrationKey, integrationId)

Trigger a single flag import run

Trigger a single flag import run for an existing flag import configuration. The `integrationKey` path parameter identifies the feature management system from which the import occurs, for example, `split`.

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.FlagImportConfigurationsBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let integrationKey = "integrationKey_example"; // String | The integration key
let integrationId = "integrationId_example"; // String | The integration ID
apiInstance.triggerFlagImportJob(projectKey, integrationKey, integrationId, (error, data, response) => {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully.');
  }
});

Parameters

Name Type Description Notes
projectKey String The project key
integrationKey String The integration key
integrationId String The integration ID

Return type

null (empty response body)

Authorization

ApiKey

HTTP request headers

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