# History ## Example History Object ``` { "id": 1, "path": "", "when": "2000-01-01T01:00:00Z", "destination": "/to_path", "display": "Actual text of the action here.", "ip": "192.283.128.182", "source": "/from_path", "targets": null, "user_id": 1, "username": "user", "user_is_from_parent_site": true, "action": "create", "failure_type": "none", "interface": "web" } ``` * `id` (int64): Action ID * `path` (string): Path. This must be slash-delimited, but it must neither start nor end with a slash. Maximum of 5000 characters. * `when` (date-time): Action occurrence date/time * `destination` (string): The destination path for this action, if applicable * `display` (string): Friendly displayed output * `ip` (string): IP Address that performed this action * `source` (string): The source path for this action, if applicable * `targets` (object): Targets * `user_id` (int64): User ID * `username` (string): Username * `user_is_from_parent_site` (boolean): true if this change was performed by a user on a parent site. * `action` (string): Type of action * `failure_type` (string): Failure type. If action was a user login or session failure, why did it fail? * `interface` (string): Interface on which this action occurred. --- ## List history for specific file ``` Files::History.list_for_file(path, display: "Actual text of the action here." ) ``` ### Parameters * `start_at` (string): Leave blank or set to a date/time to filter earlier entries. * `end_at` (string): Leave blank or set to a date/time to filter later entries. * `display` (string): Display format. Leave blank or set to `full` or `parent`. * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `path` and `created_at`. * `path` (string): Required - Path to operate on. --- ## List history for specific folder ``` Files::History.list_for_folder(path, display: "Actual text of the action here." ) ``` ### Parameters * `start_at` (string): Leave blank or set to a date/time to filter earlier entries. * `end_at` (string): Leave blank or set to a date/time to filter later entries. * `display` (string): Display format. Leave blank or set to `full` or `parent`. * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`. * `path` (string): Required - Path to operate on. --- ## List history for specific user ``` Files::History.list_for_user(user_id, display: "Actual text of the action here." ) ``` ### Parameters * `start_at` (string): Leave blank or set to a date/time to filter earlier entries. * `end_at` (string): Leave blank or set to a date/time to filter later entries. * `display` (string): Display format. Leave blank or set to `full` or `parent`. * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `user_id` and `created_at`. * `user_id` (int64): Required - User ID. --- ## List site login history ``` Files::History.list_logins( display: "Actual text of the action here." ) ``` ### Parameters * `start_at` (string): Leave blank or set to a date/time to filter earlier entries. * `end_at` (string): Leave blank or set to a date/time to filter later entries. * `display` (string): Display format. Leave blank or set to `full` or `parent`. * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `created_at`. --- ## List site full action history ``` Files::History.list( display: "Actual text of the action here." ) ``` ### Parameters * `start_at` (string): Leave blank or set to a date/time to filter earlier entries. * `end_at` (string): Leave blank or set to a date/time to filter later entries. * `display` (string): Display format. Leave blank or set to `full` or `parent`. * `cursor` (string): Used for pagination. When a list request has more records available, cursors are provided in the response headers `X-Files-Cursor-Next` and `X-Files-Cursor-Prev`. Send one of those cursor value here to resume an existing list from the next available record. Note: many of our SDKs have iterator methods that will automatically handle cursor-based pagination. * `per_page` (int64): Number of records to show per page. (Max: 10,000, 1,000 or less is recommended). * `sort_by` (object): If set, sort records by the specified field in either `asc` or `desc` direction. Valid fields are `path`, `created_at` or `user_id`. * `filter` (object): If set, return records where the specified field is equal to the supplied value. Valid fields are `user_id`, `folder` or `path`. Valid field combinations are `[ ]`, `[ path ]`, `[ path ]` or `[ path ]`. * `filter_prefix` (object): If set, return records where the specified field is prefixed by the supplied value. Valid fields are `path`.