Class: LaunchDarklyApi::AuditLogApi
- Inherits:
-
Object
- Object
- LaunchDarklyApi::AuditLogApi
- Defined in:
- lib/launchdarkly_api/api/audit_log_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#get_audit_log_entries(opts = {}) ⇒ AuditLogEntries
Get a list of all audit log entries.
-
#get_audit_log_entries_with_http_info(opts = {}) ⇒ Array<(AuditLogEntries, Fixnum, Hash)>
Get a list of all audit log entries.
-
#get_audit_log_entry(resource_id, opts = {}) ⇒ AuditLogEntry
Use this endpoint to fetch a single audit log entry by its resouce ID.
-
#get_audit_log_entry_with_http_info(resource_id, opts = {}) ⇒ Array<(AuditLogEntry, Fixnum, Hash)>
Use this endpoint to fetch a single audit log entry by its resouce ID.
-
#initialize(api_client = ApiClient.default) ⇒ AuditLogApi
constructor
A new instance of AuditLogApi.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ AuditLogApi
Returns a new instance of AuditLogApi.
19 20 21 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#get_audit_log_entries(opts = {}) ⇒ AuditLogEntries
Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
32 33 34 35 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 32 def get_audit_log_entries(opts = {}) data, _status_code, _headers = get_audit_log_entries_with_http_info(opts) return data end |
#get_audit_log_entries_with_http_info(opts = {}) ⇒ Array<(AuditLogEntries, Fixnum, Hash)>
Get a list of all audit log entries. The query parameters allow you to restrict the returned results by date ranges, resource specifiers, or a full-text search query.
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 46 def get_audit_log_entries_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AuditLogApi.get_audit_log_entries ..." end # resource path local_var_path = "/auditlog" # query parameters query_params = {} query_params[:'before'] = opts[:'before'] if !opts[:'before'].nil? query_params[:'after'] = opts[:'after'] if !opts[:'after'].nil? query_params[:'q'] = opts[:'q'] if !opts[:'q'].nil? query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil? query_params[:'spec'] = opts[:'spec'] if !opts[:'spec'].nil? # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuditLogEntries') if @api_client.config.debugging @api_client.config.logger.debug "API called: AuditLogApi#get_audit_log_entries\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_audit_log_entry(resource_id, opts = {}) ⇒ AuditLogEntry
Use this endpoint to fetch a single audit log entry by its resouce ID.
92 93 94 95 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 92 def get_audit_log_entry(resource_id, opts = {}) data, _status_code, _headers = get_audit_log_entry_with_http_info(resource_id, opts) return data end |
#get_audit_log_entry_with_http_info(resource_id, opts = {}) ⇒ Array<(AuditLogEntry, Fixnum, Hash)>
Use this endpoint to fetch a single audit log entry by its resouce ID.
102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/launchdarkly_api/api/audit_log_api.rb', line 102 def get_audit_log_entry_with_http_info(resource_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug "Calling API: AuditLogApi.get_audit_log_entry ..." end # verify the required parameter 'resource_id' is set if @api_client.config.client_side_validation && resource_id.nil? fail ArgumentError, "Missing the required parameter 'resource_id' when calling AuditLogApi.get_audit_log_entry" end # resource path local_var_path = "/auditlog/{resourceId}".sub('{' + 'resourceId' + '}', resource_id.to_s) # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = {} # http body (model) post_body = nil auth_names = ['Token'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'AuditLogEntry') if @api_client.config.debugging @api_client.config.logger.debug "API called: AuditLogApi#get_audit_log_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |