All URIs are relative to https://app.launchdarkly.com
| Method | HTTP request | Description |
|---|---|---|
| get_audit_log_entries | GET /api/v2/auditlog | List audit log entries |
| get_audit_log_entry | GET /api/v2/auditlog/{id} | Get audit log entry |
| post_audit_log_entries | POST /api/v2/auditlog | Search audit log entries |
| post_audit_log_entry_counts | POST /api/v2/auditlog/counts | Get audit log entry counts |
get_audit_log_entries(opts)
List audit log entries
Get a list of all audit log entries. The query parameters let you restrict the results that return by date ranges, resource specifiers, or a full-text search query. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read About the resource specifier syntax.
require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: ApiKey
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::AuditLogApi.new
opts = {
before: 789, # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp.
after: 789, # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp.
q: 'q_example', # String | Text to search for. You can search for the full or partial name of the resource.
limit: 789, # Integer | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.
spec: 'spec_example' # String | A resource specifier that lets you filter audit log listings by resource
}
begin
# List audit log entries
result = api_instance.get_audit_log_entries(opts)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->get_audit_log_entries: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_audit_log_entries_with_http_info(opts)
begin
# List audit log entries
data, status_code, headers = api_instance.get_audit_log_entries_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <AuditLogEntryListingRepCollection>
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->get_audit_log_entries_with_http_info: #{e}"
end
| Name | Type | Description | Notes |
|---|---|---|---|
| before | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred before the timestamp. | [optional] |
| after | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries this returns occurred after the timestamp. | [optional] |
| q | String | Text to search for. You can search for the full or partial name of the resource. | [optional] |
| limit | Integer | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | [optional] |
| spec | String | A resource specifier that lets you filter audit log listings by resource | [optional] |
AuditLogEntryListingRepCollection
- Content-Type: Not defined
- Accept: application/json
get_audit_log_entry(id)
Get audit log entry
Fetch a detailed audit log entry representation. The detailed representation includes several fields that are not present in the summary representation, including: - previousVersion: a JSON representation of the previous version of the entity. - currentVersion: a JSON representation of the current version of the entity. - delta: the JSON patch body that was used in the request to update the entity. This is only included if the update was made through a JSON patch. It is null when the update was made using semantic patch. Because most flag updates are made using semantic patch, this field is rarely returned.
require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: ApiKey
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::AuditLogApi.new
id = 'id_example' # String | The ID of the audit log entry
begin
# Get audit log entry
result = api_instance.get_audit_log_entry(id)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->get_audit_log_entry: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> get_audit_log_entry_with_http_info(id)
begin
# Get audit log entry
data, status_code, headers = api_instance.get_audit_log_entry_with_http_info(id)
p status_code # => 2xx
p headers # => { ... }
p data # => <AuditLogEntryRep>
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->get_audit_log_entry_with_http_info: #{e}"
end
| Name | Type | Description | Notes |
|---|---|---|---|
| id | String | The ID of the audit log entry |
- Content-Type: Not defined
- Accept: application/json
post_audit_log_entries(opts)
Search audit log entries
Search your audit log entries. The query parameters let you restrict the results that return by date ranges, or a full-text search query. The request body lets you restrict the results that return by resource specifiers. LaunchDarkly uses a resource specifier syntax to name resources or collections of resources. To learn more, read About the resource specifier syntax.
require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: ApiKey
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::AuditLogApi.new
opts = {
before: 789, # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp.
after: 789, # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp.
q: 'q_example', # String | Text to search for. You can search for the full or partial name of the resource.
limit: 789, # Integer | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10.
statement_post: [LaunchDarklyApi::StatementPost.new({effect: 'allow'})] # Array<StatementPost> |
}
begin
# Search audit log entries
result = api_instance.post_audit_log_entries(opts)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->post_audit_log_entries: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> post_audit_log_entries_with_http_info(opts)
begin
# Search audit log entries
data, status_code, headers = api_instance.post_audit_log_entries_with_http_info(opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <AuditLogEntryListingRepCollection>
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->post_audit_log_entries_with_http_info: #{e}"
end
| Name | Type | Description | Notes |
|---|---|---|---|
| before | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred before the timestamp. | [optional] |
| after | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. All entries returned occurred after the timestamp. | [optional] |
| q | String | Text to search for. You can search for the full or partial name of the resource. | [optional] |
| limit | Integer | A limit on the number of audit log entries that return. Set between 1 and 20. The default is 10. | [optional] |
| statement_post | Array<StatementPost> | [optional] |
AuditLogEntryListingRepCollection
- Content-Type: application/json
- Accept: application/json
post_audit_log_entry_counts(after, statement_post, opts)
Get audit log entry counts
Returns aggregate counts of audit log entries per time bucket. Used for dashboard overlays that show flag targeting changes.
require 'time'
require 'launchdarkly_api'
# setup authorization
LaunchDarklyApi.configure do |config|
# Configure API key authorization: ApiKey
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::AuditLogApi.new
after = 789 # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. Required.
statement_post = [LaunchDarklyApi::StatementPost.new({effect: 'allow'})] # Array<StatementPost> |
opts = {
before: 789, # Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now.
buckets: 789 # Integer | Number of time buckets to divide the range into. Default 50, max 500.
}
begin
# Get audit log entry counts
result = api_instance.post_audit_log_entry_counts(after, statement_post, opts)
p result
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->post_audit_log_entry_counts: #{e}"
end
This returns an Array which contains the response data, status code and headers.
<Array(, Integer, Hash)> post_audit_log_entry_counts_with_http_info(after, statement_post, opts)
begin
# Get audit log entry counts
data, status_code, headers = api_instance.post_audit_log_entry_counts_with_http_info(after, statement_post, opts)
p status_code # => 2xx
p headers # => { ... }
p data # => <CountBucketsResult>
rescue LaunchDarklyApi::ApiError => e
puts "Error when calling AuditLogApi->post_audit_log_entry_counts_with_http_info: #{e}"
end
| Name | Type | Description | Notes |
|---|---|---|---|
| after | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. Required. | |
| statement_post | Array<StatementPost> | ||
| before | Integer | A timestamp filter, expressed as a Unix epoch time in milliseconds. Defaults to now. | [optional] |
| buckets | Integer | Number of time buckets to divide the range into. Default 50, max 500. | [optional] |
- Content-Type: application/json
- Accept: application/json