Class: BrickFTP::RESTfulAPI::RetrieveFileHistory

Inherits:
Object
  • Object
show all
Includes:
Command, RetrieveHistory
Defined in:
lib/brick_ftp/restful_api/retrieve_file_history.rb

Overview

Retrieve file history

Params

PARAMETER TYPE DESCRIPTION
page integer Optional page number of items to return in this request.
per_page integer Optional requested number of items returned per request. Default: 1000, maximum: 10000. Leave blank for default (strongly recommended).
start_at datetime Optional date and time in the history to start from.

Constant Summary

Constants included from RetrieveHistory

BrickFTP::RESTfulAPI::RetrieveHistory::MAX_PER_PAGE

Instance Method Summary collapse

Methods included from RetrieveHistory

#build_query, #retrieve, #validate_page!, #validate_per_page!, #validate_start_at!

Methods included from Command

included, #initialize

Instance Method Details

#call(path, page: nil, per_page: nil, start_at: nil) ⇒ Array<BrickFTP::Types::History>

Returns all history for a specific file.

  • The history starts with the most recent entries and proceeds back in time.
  • There is a maximum number of records that will be returned with a single request (default 1000 or whatever value you provide as the per_page parameter, up to a maximum of 10,000).

Parameters:

  • path (String)

    Path of the file or folder associated with the history entry.

  • page (Integer) (defaults to: nil)

    Optional page number of items to return in this request.

  • per_page (Integer) (defaults to: nil)

    Optional requested number of items returned per request. Default: 1000, maximum: 10000. Leave blank for default (strongly recommended).

  • start_at (Time) (defaults to: nil)

    Optional date and time in the history to start from.

Returns:



37
38
39
# File 'lib/brick_ftp/restful_api/retrieve_file_history.rb', line 37

def call(path, page: nil, per_page: nil, start_at: nil)
  retrieve("/api/rest/v1/history/files/#{ERB::Util.url_encode(path)}", page, per_page, start_at)
end