Class OpenBiListRequest
- Namespace
- BiExcellence.OpenBi.Api
- Assembly
- BiExcellence.OpenBi.Api.Client.dll
Builds the OData-style $select/$top/$skip/$count/$orderby/$filter/$search
query string understood by every OpenBI REST API list endpoint.
public sealed class OpenBiListRequest
- Inheritance
-
objectOpenBiListRequest
Methods
Create()
Creates an empty list request. Use the fluent methods to configure it.
public static OpenBiListRequest Create()
Returns
Filter(string)
Adds a filter expression ($filter). Call multiple times to AND several expressions together.
public OpenBiListRequest Filter(string filterExpression)
Parameters
filterExpressionstring
Returns
IncludeTotalCount(bool)
Asks the server to also return the total number of matching items via the X-Total-Count response header ($count).
public OpenBiListRequest IncludeTotalCount(bool includeTotalCount = true)
Parameters
includeTotalCountbool
Returns
OrderBy(string, bool)
Adds a sort key ($orderby). Call multiple times to sort by more than one field.
public OpenBiListRequest OrderBy(string field, bool descending = false)
Parameters
fieldstringdescendingbool
Returns
Search(string)
Adds a free-text search expression ($search).
public OpenBiListRequest Search(string searchExpression)
Parameters
searchExpressionstring
Returns
Select(params string[])
Requests only the given fields be returned for each item ($select).
public OpenBiListRequest Select(params string[] fields)
Parameters
fieldsstring[]
Returns
Skip(int)
Skips the given number of items before returning results ($skip).
public OpenBiListRequest Skip(int skip)
Parameters
skipint
Returns
ToQuery()
The same options as a request body, for the QUERY-method form of a list route - which takes
filters that are too long or too awkward to put in a URL.
public OpenBiListQuery ToQuery()
Returns
ToQueryString()
Renders this request as a URL query string (including the leading ?), or an empty string when nothing was configured.
public string ToQueryString()
Returns
- string
Top(int)
Limits the number of items returned ($top).
public OpenBiListRequest Top(int top)
Parameters
topint