Table of Contents

Lists

Every list endpoint takes the same options, built with OpenBiListRequest and sent as the OData-style $select, $filter, $search, $orderby, $top, $skip and $count query parameters.

var request = OpenBiListRequest.Create()
    .Select("id", "firstname", "lastname")
    .Filter("lastname eq 'Smith' or lastname eq 'Miller'")
    .OrderBy("lastname")
    .OrderBy("firstname", descending: true)
    .Skip(100)
    .Top(50)
    .IncludeTotalCount();

var page = await client.GetUsersAsync(request, cancellationToken);
  • Field names are the JSON names of the resource, as the API reference lists them for each property.
  • Filter compares a field with eq, ne, gt, ge, lt, le, cp (contains), np (does not contain), sw (starts with) or ew (ends with), and combines comparisons with and and or. Text values go in single quotes; dates as ISO 8601. Calling it more than once ANDs the expressions.
  • Search is a free-text search over the resource's text fields.
  • IncludeTotalCount asks for the number of all matching items, which the result carries as TotalCount - for paging without reading everything.

The result, OpenBiListResult<T>, is an IReadOnlyList<T> of the page.

Filters too long for a URL

Users, usergroups, roles, organisations, permissions, host headers and language texts also have a Query...Async method, for example QueryUsersAsync. It takes the same OpenBiListRequest but sends it as the body of an HTTP QUERY request rather than in the URL, so a filter with many values does not run into URL length limits.