lib/jamf/api/mixins/change_log.rb
# The change and note history for this resource.
# This is a collection of objects as a sub-resource of some
# primary resource. As such, retriving the change log returns
# an array of objects, and can be paged, sorted and filtered.
#
# This method is very similar to CollectionResource.all, see the
# docs for that method for more details
#
# @param sort [String, Array<String>] Server-side sorting criteria in the format:
#   property:direction, where direction is 'asc' or 'desc'. Multiple
#   properties are supported, either as separate strings in an Array, or
#   a single string, comma separated.
#
# @param filter [String] An RSQL filter string. Not all change_log resources
#   currently support filters, and if they don't, this will be ignored.
#
# @param paged [Boolean] Defaults to false. Returns only the first page of
#   `page_size` log entries. Use {.next_page_of_change_log} to retrieve each
# successive page.
#
# @param page_size [Integer] How many log entries are returned per page?
#   Minimum is 1, maximum is 2000, default is 100. Ignored unless paged: is
#   truthy.
#   Note: the final page may contain fewer entries than the page_size
#
# @param refresh [Boolean] re-fetch and re-cache the full list of all entries.
#   Ignored if paged:, page_size:, sort:, or filter: are used.
#
# @param cnx [Jamf::Connection] The API connection to use, default: Jamf.cnx.
#   If this is an instance of a Collection Resource, this is always
#   the connection from which it was fetched.
#
# @return [Array<Jamf::ChangeLogEntry>] The change log entries requested
#
The change and note history for this resource.
This is a collection of objects as a sub-resource of some
primary resource. As such, retriving the change log returns
an array of objects, and can be paged, sorted and filtered.

This method is very similar to CollectionResource.all, see the
docs for that method for more details
The change and note history for this resource . This is a collection of objects as a sub - resource of some primary resource . As such retriving the change log returns an array of objects and can be paged sorted and filtered . This method is very similar to CollectionResource . all see the docs for that method for more details
def change_log(sort: nil, filter: nil, paged: nil, page_size: nil, refresh: false, cnx: Jamf.cnx)
      cnx = @cnx if @cnx
      return cached_change_log(refresh, cnx) if !paged && !sort && !filter
      sort = parse_change_log_sort(sort)
      filter &&= "&filter=#{CGI.escape filter.to_s}"
      return first_change_log_page(page_size, sort, filter, cnx) if paged
      fetch_all_change_log_entries(sort, filter, cnx)
    end
def change_log ( sort : nil , filter : nil , paged : nil , page_size : nil , refresh : false , cnx : Jamf . cnx ) cnx = @cnx if @cnx return cached_change_log ( refresh , cnx ) if ! paged && ! sort && ! filter sort = parse_change_log_sort ( sort ) filter &&= "&filter=#{CGI.escape filter.to_s}" return first_change_log_page ( page_size , sort , filter , cnx ) if paged fetch_all_change_log_entries ( sort , filter , cnx ) end
The change and note history for this resource.
The change and note history for this resource .
# this should only be true for instances of CollectionResources # use the cache if not paging, filtering or sorting
The change log entries requested
The change log entries requested
Array<Jamf::ChangeLogEntry>
sort
Server-side sorting criteria in the format: property:direction, where direction is 'asc' or 'desc'. Multiple properties are supported, either as separate strings in an Array, or a single string, comma separated.
Server - side sorting criteria in the format : property : direction where direction is ' asc ' or ' desc ' . Multiple properties are supported either as separate strings in an Array or a single string comma separated .
filter
An RSQL filter string. Not all change_log resources currently support filters, and if they don't, this will be ignored.
An RSQL filter string . Not all change_log resources currently support filters and if they don ' t this will be ignored .
paged
Defaults to false. Returns only the first page of `page_size` log entries. Use {.next_page_of_change_log} to retrieve each successive page.
Defaults to false . Returns only the first page of ` page_size ` log entries . Use { . next_page_of_change_log } to retrieve each successive page .
page_size
None
refresh
re-fetch and re-cache the full list of all entries. Ignored if paged:, page_size:, sort:, or filter: are used.
re - fetch and re - cache the full list of all entries . Ignored if paged : page_size : sort : or filter : are used .
cnx
The API connection to use, default: Jamf.cnx. If this is an instance of a Collection Resource, this is always the connection from which it was fetched.
The API connection to use default : Jamf . cnx . If this is an instance of a Collection Resource this is always the connection from which it was fetched .