All URIs are relative to https://app.launchdarkly.com.
Method | HTTP request | Description |
---|---|---|
deleteWebhook() | DELETE /api/v2/webhooks/{id} | Delete webhook |
getAllWebhooks() | GET /api/v2/webhooks | List webhooks |
getWebhook() | GET /api/v2/webhooks/{id} | Get webhook |
patchWebhook() | PATCH /api/v2/webhooks/{id} | Update webhook |
postWebhook() | POST /api/v2/webhooks | Creates a webhook |
deleteWebhook($id)
Delete webhook
Delete a webhook by ID.
<?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\WebhooksApi(
// 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
);
$id = 'id_example'; // string | The ID of the webhook to delete
try {
$apiInstance->deleteWebhook($id);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->deleteWebhook: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the webhook to delete |
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]
getAllWebhooks(): \LaunchDarklyApi\Model\Webhooks
List webhooks
Fetch a list of all webhooks.
<?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\WebhooksApi(
// 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
);
try {
$result = $apiInstance->getAllWebhooks();
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->getAllWebhooks: ', $e->getMessage(), PHP_EOL;
}
This endpoint does not need any parameter.
\LaunchDarklyApi\Model\Webhooks
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
getWebhook($id): \LaunchDarklyApi\Model\Webhook
Get webhook
Get a single webhook by ID.
<?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\WebhooksApi(
// 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
);
$id = 'id_example'; // string | The ID of the webhook
try {
$result = $apiInstance->getWebhook($id);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->getWebhook: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the webhook |
\LaunchDarklyApi\Model\Webhook
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
patchWebhook($id, $patch_operation): \LaunchDarklyApi\Model\Webhook
Update webhook
Update a webhook's settings. Updating webhook settings 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\WebhooksApi(
// 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
);
$id = 'id_example'; // string | The ID of the webhook to update
$patch_operation = [{"op":"replace","path":"/on","value":false}]; // \LaunchDarklyApi\Model\PatchOperation[]
try {
$result = $apiInstance->patchWebhook($id, $patch_operation);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->patchWebhook: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
id | string | The ID of the webhook to update | |
patch_operation | \LaunchDarklyApi\Model\PatchOperation[] |
\LaunchDarklyApi\Model\Webhook
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
postWebhook($webhook_post): \LaunchDarklyApi\Model\Webhook
Creates a webhook
Create a new webhook.
<?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\WebhooksApi(
// 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
);
$webhook_post = {"name":"apidocs test webhook","on":true,"sign":false,"statements":[{"actions":["*"],"effect":"allow","resources":["proj/test"]}],"tags":["example-tag"],"url":"https://example.com"}; // \LaunchDarklyApi\Model\WebhookPost
try {
$result = $apiInstance->postWebhook($webhook_post);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling WebhooksApi->postWebhook: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
webhook_post | \LaunchDarklyApi\Model\WebhookPost |
\LaunchDarklyApi\Model\Webhook
- Content-Type:
application/json
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]