Search Box files

box_search(query = "", content_types = c("name", "description",
  "file_content", "comments", "tags"), type = NULL,
  file_extensions = NULL, ancestor_folder_ids = NULL,
  created_at_range = NULL, updated_at_range = NULL,
  size_range = NULL, trash = FALSE, owner_user_ids = NULL,
  max = 200)

box_search_files(query, ...)

box_search_folders(query, ...)

box_search_trash(query, ...)

Arguments

query

The search term that you'd like to use

content_types

The content types you'd like to search. More than one can be supplied with a vector

type

The type of object you'd like returned. The default of NULL return all possible types. Other acceptable values are "file", "folder", or "weblink"

file_extensions

A vector of strings containing the file extensions (without dots) by which to narrow your search.

ancestor_folder_ids

If supplied, results are limited to one or more parent folders

created_at_range

Optional. Limit search to a range of created at times. A vector of two dates (coercible via as.POSIXct()).

updated_at_range

Optional. Limit search to a range of updated at times. A vector of two dates (coercible via as.POSIXct()).

size_range

Optional. Limit search to a range of file sizes, in bytes. A vector of two whole numbers (coerible via (coercible via as.numeric() and round())).

trash

Should the search be limited to the trash folder? logical().

owner_user_ids

Optional. Limit search to a files owned by a set of users. A vector if IDs, coercible with as.integer64().

max

numeric. Upper limit on the number of search results returned (protective measure for users with large numbers of files).

...

Parameters passed to box_search

Value

An object of class boxr_object_list. See boxr_S3_classes() for details.

Details

The box.com API supports a maximum of 200 results per request. If max > 200, then multiple requests will be sent to retrieve and combine 'paginated' results for you, behind the scenes.

See the box.com search description for details of the features of the service. Some notable details:

  • Full Text Searching - Is available for many source code file types, though not including R at the time of writing.

  • Boolean Operators Are Supported - Such as and, or, and not (upper or lower case)

  • Phrases Can Be Searched - By putting them in "quotation marks".

  • Search Availability - It takes around 10 minutes for a newly uploaded file to enter the search index.