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 |
createFlagLink($project_key, $feature_flag_key, $flag_link_post): \LaunchDarklyApi\Model\FlagLinkRep
Create flag link
Create a new flag link. Flag links let you reference external resources and associate them with your flags.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new LaunchDarklyApi\Api\FlagLinksBetaApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_key = 'project_key_example'; // string | The project key
$feature_flag_key = 'feature_flag_key_example'; // string | The feature flag key
$flag_link_post = {"deepLink":"https://example.com/archives/123123123","description":"Example link description","key":"flag-link-key-123abc","title":"Example link title"}; // \LaunchDarklyApi\Model\FlagLinkPost
try {
$result = $apiInstance->createFlagLink($project_key, $feature_flag_key, $flag_link_post);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagLinksBetaApi->createFlagLink: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
project_key | string | The project key | |
feature_flag_key | string | The feature flag key | |
flag_link_post | \LaunchDarklyApi\Model\FlagLinkPost |
\LaunchDarklyApi\Model\FlagLinkRep
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
deleteFlagLink($project_key, $feature_flag_key, $id)
Delete flag link
Delete a flag link by ID or key.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new LaunchDarklyApi\Api\FlagLinksBetaApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_key = 'project_key_example'; // string | The project key
$feature_flag_key = 'feature_flag_key_example'; // string | The feature flag key
$id = 'id_example'; // string | The flag link ID or Key
try {
$apiInstance->deleteFlagLink($project_key, $feature_flag_key, $id);
} catch (Exception $e) {
echo 'Exception when calling FlagLinksBetaApi->deleteFlagLink: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
project_key | string | The project key | |
feature_flag_key | string | The feature flag key | |
id | string | The flag link ID or Key |
void (empty response body)
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getFlagLinks($project_key, $feature_flag_key): \LaunchDarklyApi\Model\FlagLinkCollectionRep
List flag links
Get a list of all flag links.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new LaunchDarklyApi\Api\FlagLinksBetaApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_key = 'project_key_example'; // string | The project key
$feature_flag_key = 'feature_flag_key_example'; // string | The feature flag key
try {
$result = $apiInstance->getFlagLinks($project_key, $feature_flag_key);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagLinksBetaApi->getFlagLinks: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
project_key | string | The project key | |
feature_flag_key | string | The feature flag key |
\LaunchDarklyApi\Model\FlagLinkCollectionRep
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
updateFlagLink($project_key, $feature_flag_key, $id, $patch_operation): \LaunchDarklyApi\Model\FlagLinkRep
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.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure API key authorization: ApiKey
$config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKey('Authorization', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = LaunchDarklyApi\Configuration::getDefaultConfiguration()->setApiKeyPrefix('Authorization', 'Bearer');
$apiInstance = new LaunchDarklyApi\Api\FlagLinksBetaApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$project_key = 'project_key_example'; // string | The project key
$feature_flag_key = 'feature_flag_key_example'; // string | The feature flag key
$id = 'id_example'; // string | The flag link ID
$patch_operation = [{"op":"replace","path":"/title","value":"Updated flag link title"}]; // \LaunchDarklyApi\Model\PatchOperation[]
try {
$result = $apiInstance->updateFlagLink($project_key, $feature_flag_key, $id, $patch_operation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling FlagLinksBetaApi->updateFlagLink: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
project_key | string | The project key | |
feature_flag_key | string | The feature flag key | |
id | string | The flag link ID | |
patch_operation | \LaunchDarklyApi\Model\PatchOperation[] |
\LaunchDarklyApi\Model\FlagLinkRep
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]