All URIs are relative to https://app.launchdarkly.com
Method | HTTP request | Description |
---|---|---|
createFlagLink | POST /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} | Create flag link |
deleteFlagLink | DELETE /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} | Delete flag link |
getFlagLinks | GET /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey} | List flag links |
updateFlagLink | PATCH /api/v2/flag-links/projects/{projectKey}/flags/{featureFlagKey}/{id} | Update flag link |
FlagLinkRep createFlagLink(projectKey, featureFlagKey, flagLinkPost)
Create flag link
Create a new flag link. Flag links let you reference external resources and associate them with your flags.
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.FlagLinksBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
let flagLinkPost = {"deepLink":"https://example.com/archives/123123123","description":"Example link description","key":"flag-link-key-123abc","title":"Example link title"}; // FlagLinkPost |
apiInstance.createFlagLink(projectKey, featureFlagKey, flagLinkPost, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
flagLinkPost | FlagLinkPost |
- Content-Type: application/json
- Accept: application/json
deleteFlagLink(projectKey, featureFlagKey, id)
Delete flag link
Delete a flag link by ID or key.
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.FlagLinksBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
let id = "id_example"; // String | The flag link ID or Key
apiInstance.deleteFlagLink(projectKey, featureFlagKey, id, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully.');
}
});
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
id | String | The flag link ID or Key |
null (empty response body)
- Content-Type: Not defined
- Accept: application/json
FlagLinkCollectionRep getFlagLinks(projectKey, featureFlagKey)
List flag links
Get a list of all flag links.
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.FlagLinksBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
apiInstance.getFlagLinks(projectKey, featureFlagKey, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key |
- Content-Type: Not defined
- Accept: application/json
FlagLinkRep updateFlagLink(projectKey, featureFlagKey, id, patchOperation)
Update flag link
Update a flag link. Updating a flag link uses a JSON patch representation of the desired changes. To learn more, read Updates.
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.FlagLinksBetaApi();
let projectKey = "projectKey_example"; // String | The project key
let featureFlagKey = "featureFlagKey_example"; // String | The feature flag key
let id = "id_example"; // String | The flag link ID
let patchOperation = [{"op":"replace","path":"/title","value":"Updated flag link title"}]; // [PatchOperation] |
apiInstance.updateFlagLink(projectKey, featureFlagKey, id, patchOperation, (error, data, response) => {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
});
Name | Type | Description | Notes |
---|---|---|---|
projectKey | String | The project key | |
featureFlagKey | String | The feature flag key | |
id | String | The flag link ID | |
patchOperation | [PatchOperation] |
- Content-Type: application/json
- Accept: application/json