IPWorks Cloud 2020 Python Edition

Questions / Feedback?

search Method

Searches for resources that match the specified query.

Syntax

def search(query: str) -> None: ...

Remarks

This method searches for resources that match the given Query, which the server will match against names, descriptions, file contents, etc.

Advanced searches can be performed by adding additional query parameters using the add_query_param method. Here are examples of some of the more common query parameters:

Query Parameter Name Example Value Description
type folder Restrict results to resources of the given type.
file_extensions png,docx,pdf Restrict results to files with one of the given extensions.
ancestor_folder_ids d:12345,d:0,d:67890 Restrict results to resources within (recursively) one or more of the specified folders

Box supports many other query parameters not shown here. Refer to the Box API documentation for an exhaustive list of possible query parameters.

Calling this method will fire the on_resource_list event once for each search result, and will also populate the Resource* properties.

If there are still more search results available to list when this method returns, the search_marker property will be populated. Continue to call this method until search_marker is empty to accumulate all pages of results in the Resource* properties.

The MaxSearchResults configuration setting can be used to control the maximum number of results to return at once.

Copyright (c) 2022 /n software inc. - All rights reserved.
IPWorks Cloud 2020 Python Edition - Version 20.0 [Build 8265]