class AlfrescoAPI::AuditApi

Attributes

api_client[RW]

Public Class Methods

new(api_client = ApiClient.default) click to toggle source
# File lib/alfresco_api/api/audit_api.rb, line 19
def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Public Instance Methods

delete_audit_entries_for_audit_app(audit_application_id, where, opts = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param 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')``` @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param 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; @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_entry_id The identifier of an audit entry. @param [Hash] opts the optional parameters @return [nil]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_entry_id The identifier of an audit entry. @param [Hash] opts the optional parameters @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [AuditApp]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(AuditApp, Fixnum, Hash)>] AuditApp data, response status code and response headers

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_entry_id The identifier of an audit entry. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [AuditEntryEntry]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_entry_id The identifier of an audit entry. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(AuditEntryEntry, Fixnum, Hash)>] AuditEntryEntry data, response status code and response headers

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count 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) @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [Array<String>] :fields 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. @return [AuditAppPaging]

# 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 = {}) click to toggle source

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. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [Array<String>] :fields 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. @return [Array<(AuditAppPaging, Fixnum, Hash)>] AuditAppPaging data, response status code and response headers

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count 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) @option opts [Array<String>] :order_by 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. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [String] :where 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; @option opts [Array<String>] :include Returns additional information about the audit entry. The following optional fields can be requested: * values @option opts [Array<String>] :fields 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. @return [AuditEntryPaging]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Array<String>] :order_by 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. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [String] :where 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; @option opts [Array<String>] :include Returns additional information about the audit entry. The following optional fields can be requested: * values @option opts [Array<String>] :fields 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. @return [Array<(AuditEntryPaging, Fixnum, Hash)>] AuditEntryPaging data, response status code and response headers

# 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 = {}) click to toggle source

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. @param node_id The identifier of a node. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count 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) @option opts [Array<String>] :order_by 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. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. (default to 100) @option opts [String] :where 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; @option opts [Array<String>] :include Returns additional information about the audit entry. The following optional fields can be requested: * values @option opts [Array<String>] :fields 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. @return [AuditEntryPaging]

# 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 = {}) click to toggle source

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. @param node_id The identifier of a node. @param [Hash] opts the optional parameters @option opts [Integer] :skip_count The number of entities that exist in the collection before those included in this list. If not supplied then the default value is 0. @option opts [Array<String>] :order_by 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. @option opts [Integer] :max_items The maximum number of items to return in the list. If not supplied then the default value is 100. @option opts [String] :where 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; @option opts [Array<String>] :include Returns additional information about the audit entry. The following optional fields can be requested: * values @option opts [Array<String>] :fields 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. @return [Array<(AuditEntryPaging, Fixnum, Hash)>] AuditEntryPaging data, response status code and response headers

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_app_body_update The audit application to update. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [AuditApp]

# 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 = {}) click to toggle source

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. @param audit_application_id The identifier of an audit application. @param audit_app_body_update The audit application to update. @param [Hash] opts the optional parameters @option opts [Array<String>] :fields 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. @return [Array<(AuditApp, Fixnum, Hash)>] AuditApp data, response status code and response headers

# 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