All URIs are relative to https://app.launchdarkly.com/api/v2
Method | HTTP request | Description |
---|---|---|
delete_webhook | DELETE /webhooks/{resourceId} | Delete a webhook by ID. |
get_webhook | GET /webhooks/{resourceId} | Get a webhook by ID. |
get_webhooks | GET /webhooks | Fetch a list of all webhooks. |
patch_webhook | PATCH /webhooks/{resourceId} | Modify a webhook by ID. |
post_webhook | POST /webhooks | Create a webhook. |
delete_webhook(resource_id, )
Delete a webhook by ID.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::WebhooksApi.new
resource_id = 'resource_id_example' # String | The resource ID.
begin
#Delete a webhook by ID.
api_instance.delete_webhook(resource_id, )
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling WebhooksApi->delete_webhook: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
resource_id | String | The resource ID. |
nil (empty response body)
- Content-Type: application/json
- Accept: application/json
Webhook get_webhook(resource_id, )
Get a webhook by ID.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::WebhooksApi.new
resource_id = 'resource_id_example' # String | The resource ID.
begin
#Get a webhook by ID.
result = api_instance.get_webhook(resource_id, )
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling WebhooksApi->get_webhook: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
resource_id | String | The resource ID. |
- Content-Type: application/json
- Accept: application/json
Webhooks get_webhooks
Fetch a list of all webhooks.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::WebhooksApi.new
begin
#Fetch a list of all webhooks.
result = api_instance.get_webhooks
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling WebhooksApi->get_webhooks: #{e}"
end
This endpoint does not need any parameter.
- Content-Type: application/json
- Accept: application/json
Webhook patch_webhook(resource_id, patch_delta)
Modify a webhook by ID.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::WebhooksApi.new
resource_id = 'resource_id_example' # String | The resource ID.
patch_delta = [LaunchDarklyApi::PatchOperation.new] # Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/'
begin
#Modify a webhook by ID.
result = api_instance.patch_webhook(resource_id, patch_delta)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling WebhooksApi->patch_webhook: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
resource_id | String | The resource ID. | |
patch_delta | Array<PatchOperation> | Requires a JSON Patch representation of the desired changes to the project. 'http://jsonpatch.com/' |
- Content-Type: application/json
- Accept: application/json
Webhook post_webhook(webhook_body)
Create a webhook.
# load the gem
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: Token
config.api_key['Authorization'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Authorization'] = 'Bearer'
end
api_instance = LaunchDarklyApi::WebhooksApi.new
webhook_body = LaunchDarklyApi::WebhookBody.new # WebhookBody | New webhook.
begin
#Create a webhook.
result = api_instance.post_webhook(webhook_body)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Exception when calling WebhooksApi->post_webhook: #{e}"
end
Name | Type | Description | Notes |
---|---|---|---|
webhook_body | WebhookBody | New webhook. |
- Content-Type: application/json
- Accept: application/json