Skip to content

Files

Latest commit

90389ec · May 30, 2025

History

History
68 lines (40 loc) · 2.21 KB

search.md

File metadata and controls

68 lines (40 loc) · 2.21 KB

SearchManager

Query files/folders by metadata

Create a search using SQL-like syntax to return items that match specific metadata.

By default, this endpoint returns only the most basic info about the items for which the query matches. To get additional fields for each item, including any of the metadata, use the fields attribute in the query.

This operation is performed by calling function searchByMetadataQuery.

See the endpoint docs at API Reference.

client.getSearch().searchByMetadataQuery(new MetadataQuery.MetadataQueryBuilder(searchFrom, "0").query("name = :name AND age < :age AND birthDate >= :birthDate AND countryCode = :countryCode AND sports = :sports").queryParams(mapOf(entryOf("name", "John"), entryOf("age", 50), entryOf("birthDate", "2001-01-01T02:20:10.120Z"), entryOf("countryCode", "US"), entryOf("sports", Arrays.asList("basketball", "tennis")))).build())

Arguments

  • requestBody MetadataQuery
    • Request body of searchByMetadataQuery method
  • headers SearchByMetadataQueryHeaders
    • Headers of searchByMetadataQuery method

Returns

This function returns a value of type MetadataQueryResults.

Returns a list of files and folders that match this metadata query.

Search for content

Searches for files, folders, web links, and shared files across the users content or across the entire enterprise.

This operation is performed by calling function searchForContent.

See the endpoint docs at API Reference.

Currently we don't have an example for calling searchForContent in integration tests

Arguments

  • queryParams SearchForContentQueryParams
    • Query parameters of searchForContent method
  • headers SearchForContentHeaders
    • Headers of searchForContent method

Returns

This function returns a value of type SearchResultsOrSearchResultsWithSharedLinks.

Returns a collection of search results. If there are no matching search results, the entries array will be empty.