Interface SearchResources
- Namespace
- Smartsheet.Api
- Assembly
- smartsheet-csharp-sdk.dll
This interface provides methods to access search resources.
Thread Safety: Implementation of this interface must be thread safe.
public interface SearchResources
Methods
Search(string)
Searches all sheets that the user can access, for the specified text.
Mirrors to the following Smartsheet REST API method: GET /search
SearchResult Search(string query)
Parameters
query
string(required): Text with which to perform the search.
Returns
- SearchResult
SearchResult object that contains a maximum of 100 SearchResultems
Exceptions
- InvalidOperationException
if any argument is null or an empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
Search(string, IEnumerable<SearchInclusion>?, DateTime?, IEnumerable<SearchScope>?)
Searches all sheets that the user can access, for the specified text.
Mirrors to the following Smartsheet REST API method: GET /search
SearchResult Search(string query, IEnumerable<SearchInclusion>? includes = null, DateTime? modifiedSince = null, IEnumerable<SearchScope>? scopes = null)
Parameters
query
string(required): Text with which to perform the search.
includes
IEnumerable<SearchInclusion>includes enum set of inclusions
modifiedSince
DateTime?only return items modified since this date
scopes
IEnumerable<SearchScope>scopes enum set of search filters
Returns
- SearchResult
SearchResult object that contains a maximum of 100 SearchResultems
Exceptions
- InvalidOperationException
if any argument is null or an empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation
SearchSheet(long, string)
Searches a sheet for the specified text.
Mirrors to the following Smartsheet REST API method: GET /search/sheets/{sheetId}
SearchResult SearchSheet(long sheetId, string query)
Parameters
Returns
- SearchResult
SearchResult object that contains a maximum of 100 SearchResultems
Exceptions
- InvalidOperationException
if any argument is null or an empty string
- InvalidRequestException
if there is any problem with the REST API request
- AuthorizationException
if there is any problem with the REST API authorization (access token)
- ResourceNotFoundException
if the resource cannot be found
- ServiceUnavailableException
if the REST API service is not available (possibly due to rate limiting)
- SmartsheetException
if there is any other error during the operation