Class: AlfrescoAPI::AuditApi

Inherits:
Object
  • Object
show all
Defined in:
lib/alfresco_api/api/audit_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ AuditApi

Returns a new instance of AuditApi.



19
20
21
# File 'lib/alfresco_api/api/audit_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/alfresco_api/api/audit_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_audit_entries_for_audit_app(audit_application_id, where, opts = {}) ⇒ nil

Permanently delete audit entries for an audit application Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete audit entries for an audit application auditApplicationId. The where clause must be specified, either with an inclusive time period or for an inclusive range of ids. The delete is within the context of the given audit application. For example: * “‘where=(createdAt BETWEEN (’2017-06-02T12:13:51.593+01:00’ , ‘2017-06-04T10:05:16.536+01:00’)“‘ * “`where=(id BETWEEN (’1234’, ‘4321’)“‘ You must have admin rights to delete audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • where

    Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids. For example: * ```where=(createdAt BETWEEN ('2017-06-02T12:13:51.593+01:00' , '2017-06-04T10:05:16.536+01:00')``` * ```where=(id BETWEEN ('1234', '4321')```

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


29
30
31
32
# File 'lib/alfresco_api/api/audit_api.rb', line 29

def delete_audit_entries_for_audit_app(audit_application_id, where, opts = {})
  delete_audit_entries_for_audit_app_with_http_info(audit_application_id, where, opts)
  return nil
end

#delete_audit_entries_for_audit_app_with_http_info(audit_application_id, where, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Permanently delete audit entries for an audit application Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete audit entries for an audit application auditApplicationId. The where clause must be specified, either with an inclusive time period or for an inclusive range of ids. The delete is within the context of the given audit application. For example: * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(id BETWEEN (&#39;1234&#39;, &#39;4321&#39;)&#x60;&#x60;&#x60; You must have admin rights to delete audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • where

    Audit entries to permanently delete for an audit application, given an inclusive time period or range of ids. For example: * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(id BETWEEN (&#39;1234&#39;, &#39;4321&#39;)&#x60;&#x60;&#x60;

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



40
41
42
43
44
45
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
# File 'lib/alfresco_api/api/audit_api.rb', line 40

def delete_audit_entries_for_audit_app_with_http_info(audit_application_id, where, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.delete_audit_entries_for_audit_app ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.delete_audit_entries_for_audit_app"
  end
  # verify the required parameter 'where' is set
  if @api_client.config.client_side_validation && where.nil?
    fail ArgumentError, "Missing the required parameter 'where' when calling AuditApi.delete_audit_entries_for_audit_app"
  end
  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}/audit-entries".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'where'] = where

  # 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 = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#delete_audit_entries_for_audit_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#delete_audit_entry(audit_application_id, audit_entry_id, opts = {}) ⇒ nil

Permanently delete an audit entry Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete a single audit entry auditEntryId. You must have admin rights to delete audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_entry_id

    The identifier of an audit entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


90
91
92
93
# File 'lib/alfresco_api/api/audit_api.rb', line 90

def delete_audit_entry(audit_application_id, audit_entry_id, opts = {})
  delete_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts)
  return nil
end

#delete_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts = {}) ⇒ Array<(nil, Fixnum, Hash)>

Permanently delete an audit entry Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Permanently delete a single audit entry auditEntryId. You must have admin rights to delete audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_entry_id

    The identifier of an audit entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Fixnum, Hash)>)

    nil, response status code and response headers



101
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
141
142
# File 'lib/alfresco_api/api/audit_api.rb', line 101

def delete_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.delete_audit_entry ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.delete_audit_entry"
  end
  # verify the required parameter 'audit_entry_id' is set
  if @api_client.config.client_side_validation && audit_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_entry_id' when calling AuditApi.delete_audit_entry"
  end
  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s).sub('{' + 'auditEntryId' + '}', audit_entry_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 = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#delete_audit_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_audit_app(audit_application_id, opts = {}) ⇒ AuditApp

Get audit application info Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Get status of an audit application auditApplicationId. You must have admin rights to retrieve audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



150
151
152
153
# File 'lib/alfresco_api/api/audit_api.rb', line 150

def get_audit_app(audit_application_id, opts = {})
  data, _status_code, _headers = get_audit_app_with_http_info(audit_application_id, opts)
  return data
end

#get_audit_app_with_http_info(audit_application_id, opts = {}) ⇒ Array<(AuditApp, Fixnum, Hash)>

Get audit application info Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Get status of an audit application auditApplicationId. You must have admin rights to retrieve audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditApp, Fixnum, Hash)>)

    AuditApp data, response status code and response headers



161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
# File 'lib/alfresco_api/api/audit_api.rb', line 161

def get_audit_app_with_http_info(audit_application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audit_app ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.get_audit_app"
  end
  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = ['basicAuth']
  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 => 'AuditApp')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audit_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#get_audit_entry(audit_application_id, audit_entry_id, opts = {}) ⇒ AuditEntryEntry

Get audit entry Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets audit entry auditEntryId. You must have admin rights to access audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_entry_id

    The identifier of an audit entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



209
210
211
212
# File 'lib/alfresco_api/api/audit_api.rb', line 209

def get_audit_entry(audit_application_id, audit_entry_id, opts = {})
  data, _status_code, _headers = get_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts)
  return data
end

#get_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts = {}) ⇒ Array<(AuditEntryEntry, Fixnum, Hash)>

Get audit entry Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets audit entry auditEntryId. You must have admin rights to access audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_entry_id

    The identifier of an audit entry.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditEntryEntry, Fixnum, Hash)>)

    AuditEntryEntry data, response status code and response headers



221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/alfresco_api/api/audit_api.rb', line 221

def get_audit_entry_with_http_info(audit_application_id, audit_entry_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.get_audit_entry ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.get_audit_entry"
  end
  # verify the required parameter 'audit_entry_id' is set
  if @api_client.config.client_side_validation && audit_entry_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_entry_id' when calling AuditApi.get_audit_entry"
  end
  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}/audit-entries/{auditEntryId}".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s).sub('{' + 'auditEntryId' + '}', audit_entry_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = ['basicAuth']
  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 => 'AuditEntryEntry')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#get_audit_entry\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_audit_apps(opts = {}) ⇒ AuditAppPaging

List audit applications Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit applications in this repository. This list may include pre-configured audit applications, if enabled, such as: * alfresco-access * CMISChangeLog * Alfresco Tagging Service * Alfresco Sync Service (used by Enterprise Cloud Sync) You must have admin rights to retrieve audit information.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



273
274
275
276
# File 'lib/alfresco_api/api/audit_api.rb', line 273

def list_audit_apps(opts = {})
  data, _status_code, _headers = list_audit_apps_with_http_info(opts)
  return data
end

#list_audit_apps_with_http_info(opts = {}) ⇒ Array<(AuditAppPaging, Fixnum, Hash)>

List audit applications Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit applications in this repository. This list may include pre-configured audit applications, if enabled, such as: * alfresco-access * CMISChangeLog * Alfresco Tagging Service * Alfresco Sync Service (used by Enterprise Cloud Sync) You must have admin rights to retrieve audit information.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditAppPaging, Fixnum, Hash)>)

    AuditAppPaging data, response status code and response headers



285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
# File 'lib/alfresco_api/api/audit_api.rb', line 285

def list_audit_apps_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.list_audit_apps ..."
  end
  if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
    fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling AuditApi.list_audit_apps, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
    fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling AuditApi.list_audit_apps, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/audit-applications"

  # query parameters
  query_params = {}
  query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
  query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = ['basicAuth']
  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 => 'AuditAppPaging')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#list_audit_apps\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_audit_entries_for_audit_app(audit_application_id, opts = {}) ⇒ AuditEntryPaging

List audit entries for an audit application Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for audit application auditApplicationId. You can use the include parameter to return additional values information. The list can be filtered by one or more of: * createdByUser person id * createdAt inclusive time period * id inclusive range of ids * valuesKey audit entry values contains the exact matching key * valuesValue audit entry values contains the exact matching value The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying “‘orderBy=createdAt DESC“` returns audit entries in descending createdAt order. You must have admin rights to retrieve audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)

  • :order_by (Array<String>)

    A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :where (String)

    Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(id BETWEEN (&#39;1234&#39;, &#39;4321&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39; and createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(valuesKey&#x3D;&#39;/alfresco-access/login/user&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(valuesKey&#x3D;&#39;/alfresco-access/transaction/action&#39; and valuesValue&#x3D;&#39;DELETE&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the audit entry. The following optional fields can be requested: * values

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



343
344
345
346
# File 'lib/alfresco_api/api/audit_api.rb', line 343

def list_audit_entries_for_audit_app(audit_application_id, opts = {})
  data, _status_code, _headers = list_audit_entries_for_audit_app_with_http_info(audit_application_id, opts)
  return data
end

#list_audit_entries_for_audit_app_with_http_info(audit_application_id, opts = {}) ⇒ Array<(AuditEntryPaging, Fixnum, Hash)>

List audit entries for an audit application Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for audit application auditApplicationId. You can use the include parameter to return additional values information. The list can be filtered by one or more of: * createdByUser person id * createdAt inclusive time period * id inclusive range of ids * valuesKey audit entry values contains the exact matching key * valuesValue audit entry values contains the exact matching value The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying &#x60;&#x60;&#x60;orderBy&#x3D;createdAt DESC&#x60;&#x60;&#x60; returns audit entries in descending createdAt order. You must have admin rights to retrieve audit information.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :order_by (Array<String>)

    A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :where (String)

    Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(id BETWEEN (&#39;1234&#39;, &#39;4321&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39; and createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(valuesKey&#x3D;&#39;/alfresco-access/login/user&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(valuesKey&#x3D;&#39;/alfresco-access/transaction/action&#39; and valuesValue&#x3D;&#39;DELETE&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the audit entry. The following optional fields can be requested: * values

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditEntryPaging, Fixnum, Hash)>)

    AuditEntryPaging data, response status code and response headers



359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
# File 'lib/alfresco_api/api/audit_api.rb', line 359

def list_audit_entries_for_audit_app_with_http_info(audit_application_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.list_audit_entries_for_audit_app ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.list_audit_entries_for_audit_app"
  end
  if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
    fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling AuditApi.list_audit_entries_for_audit_app, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
    fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling AuditApi.list_audit_entries_for_audit_app, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}/audit-entries".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
  query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil?
  query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = ['basicAuth']
  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 => 'AuditEntryPaging')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#list_audit_entries_for_audit_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#list_audit_entries_for_node(node_id, opts = {}) ⇒ AuditEntryPaging

List audit entries for a node Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for node nodeId. The list can be filtered by createdByUser and for a given inclusive time period. The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying “‘orderBy=createdAt DESC“` returns audit entries in descending createdAt order. This relies on the pre-configured ’alfresco-access’ audit application.

Parameters:

  • node_id

    The identifier of a node.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. (default to 0)

  • :order_by (Array<String>)

    A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100)

  • :where (String)

    Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;-me-&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39; and createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the audit entry. The following optional fields can be requested: * values

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



424
425
426
427
# File 'lib/alfresco_api/api/audit_api.rb', line 424

def list_audit_entries_for_node(node_id, opts = {})
  data, _status_code, _headers = list_audit_entries_for_node_with_http_info(node_id, opts)
  return data
end

#list_audit_entries_for_node_with_http_info(node_id, opts = {}) ⇒ Array<(AuditEntryPaging, Fixnum, Hash)>

List audit entries for a node Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Gets a list of audit entries for node nodeId. The list can be filtered by createdByUser and for a given inclusive time period. The default sort order is createdAt ascending, but you can use an optional ASC or DESC modifier to specify an ascending or descending sort order. For example, specifying &#x60;&#x60;&#x60;orderBy&#x3D;createdAt DESC&#x60;&#x60;&#x60; returns audit entries in descending createdAt order. This relies on the pre-configured &#39;alfresco-access&#39; audit application.

Parameters:

  • node_id

    The identifier of a node.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :skip_count (Integer)

    The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0.

  • :order_by (Array<String>)

    A string to control the order of the entities returned in a list. You can use the orderBy parameter to sort the list by one or more fields. Each field has a default sort order, which is normally ascending order. Read the API method implementation notes above to check if any fields used in this method have a descending default search order. To sort the entities in a specific order, you can use the ASC and DESC keywords for any field.

  • :max_items (Integer)

    The maximum number of items to return in the list. If not supplied then the default value is 100.

  • :where (String)

    Optionally filter the list. Here are some examples: * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;-me-&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60; * &#x60;&#x60;&#x60;where&#x3D;(createdByUser&#x3D;&#39;jbloggs&#39; and createdAt BETWEEN (&#39;2017-06-02T12:13:51.593+01:00&#39; , &#39;2017-06-04T10:05:16.536+01:00&#39;)&#x60;&#x60;&#x60;

  • :include (Array<String>)

    Returns additional information about the audit entry. The following optional fields can be requested: * values

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditEntryPaging, Fixnum, Hash)>)

    AuditEntryPaging data, response status code and response headers



440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
# File 'lib/alfresco_api/api/audit_api.rb', line 440

def list_audit_entries_for_node_with_http_info(node_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.list_audit_entries_for_node ..."
  end
  # verify the required parameter 'node_id' is set
  if @api_client.config.client_side_validation && node_id.nil?
    fail ArgumentError, "Missing the required parameter 'node_id' when calling AuditApi.list_audit_entries_for_node"
  end
  if @api_client.config.client_side_validation && !opts[:'skip_count'].nil? && opts[:'skip_count'] < 0
    fail ArgumentError, 'invalid value for "opts[:"skip_count"]" when calling AuditApi.list_audit_entries_for_node, must be greater than or equal to 0.'
  end

  if @api_client.config.client_side_validation && !opts[:'max_items'].nil? && opts[:'max_items'] < 1
    fail ArgumentError, 'invalid value for "opts[:"max_items"]" when calling AuditApi.list_audit_entries_for_node, must be greater than or equal to 1.'
  end

  # resource path
  local_var_path = "/nodes/{nodeId}/audit-entries".sub('{' + 'nodeId' + '}', node_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'skipCount'] = opts[:'skip_count'] if !opts[:'skip_count'].nil?
  query_params[:'orderBy'] = @api_client.build_collection_param(opts[:'order_by'], :csv) if !opts[:'order_by'].nil?
  query_params[:'maxItems'] = opts[:'max_items'] if !opts[:'max_items'].nil?
  query_params[:'where'] = opts[:'where'] if !opts[:'where'].nil?
  query_params[:'include'] = @api_client.build_collection_param(opts[:'include'], :csv) if !opts[:'include'].nil?
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = ['basicAuth']
  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 => 'AuditEntryPaging')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#list_audit_entries_for_node\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#update_audit_app(audit_application_id, audit_app_body_update, opts = {}) ⇒ AuditApp

Update audit application info Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Disable or re-enable the audit application auditApplicationId. New audit entries will not be created for a disabled audit application until it is re-enabled (and system-wide auditing is also enabled). Note, it is still possible to query &/or delete any existing audit entries even if auditing is disabled for the audit application. You must have admin rights to update audit application.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_app_body_update

    The audit application to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:



501
502
503
504
# File 'lib/alfresco_api/api/audit_api.rb', line 501

def update_audit_app(audit_application_id, audit_app_body_update, opts = {})
  data, _status_code, _headers = update_audit_app_with_http_info(audit_application_id, audit_app_body_update, opts)
  return data
end

#update_audit_app_with_http_info(audit_application_id, audit_app_body_update, opts = {}) ⇒ Array<(AuditApp, Fixnum, Hash)>

Update audit application info Note: this endpoint is available in Alfresco 5.2.2 and newer versions. Disable or re-enable the audit application auditApplicationId. New audit entries will not be created for a disabled audit application until it is re-enabled (and system-wide auditing is also enabled). Note, it is still possible to query &amp;/or delete any existing audit entries even if auditing is disabled for the audit application. You must have admin rights to update audit application.

Parameters:

  • audit_application_id

    The identifier of an audit application.

  • audit_app_body_update

    The audit application to update.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :fields (Array<String>)

    A list of field names. You can use this parameter to restrict the fields returned within a response if, for example, you want to save on overall bandwidth. The list applies to a returned individual entity or entries within a collection. If the API method also supports the include parameter, then the fields specified in the include parameter are returned in addition to those specified in the fields parameter.

Returns:

  • (Array<(AuditApp, Fixnum, Hash)>)

    AuditApp data, response status code and response headers



513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
# File 'lib/alfresco_api/api/audit_api.rb', line 513

def update_audit_app_with_http_info(audit_application_id, audit_app_body_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug "Calling API: AuditApi.update_audit_app ..."
  end
  # verify the required parameter 'audit_application_id' is set
  if @api_client.config.client_side_validation && audit_application_id.nil?
    fail ArgumentError, "Missing the required parameter 'audit_application_id' when calling AuditApi.update_audit_app"
  end
  # verify the required parameter 'audit_app_body_update' is set
  if @api_client.config.client_side_validation && audit_app_body_update.nil?
    fail ArgumentError, "Missing the required parameter 'audit_app_body_update' when calling AuditApi.update_audit_app"
  end
  # resource path
  local_var_path = "/audit-applications/{auditApplicationId}".sub('{' + 'auditApplicationId' + '}', audit_application_id.to_s)

  # query parameters
  query_params = {}
  query_params[:'fields'] = @api_client.build_collection_param(opts[:'fields'], :csv) if !opts[:'fields'].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 = @api_client.object_to_http_body(audit_app_body_update)
  auth_names = ['basicAuth']
  data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => 'AuditApp')
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: AuditApi#update_audit_app\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end