Jump to: navigation, search

Filtering and sorting users by fields and subresources

This is part of the API Basics section of the Web Services API.

Overview

This section provides additional details on the filtering functionality described in Pagination and Subresources.

Important
The limit parameter in this request is mandatory.

The request accepts comma-delimited list of fields as a sortBy parameter.

This allows an API user to specify multiple sorting fields so that sorting is done by the first field specified, then by the second field specified, and so on.

Important
Limitation: An API user can specify the order (Ascending/Descending) for all fields at once but it is not possible to specify ascending for first field, descending for the second, or similar.

Example

Here is the sample request which returns users sorted by voice channel state and inside users with same state sorted by lastName.

Tip
Default sort order is Ascending.
GET ...api/v2/users?subresources=statistics&limit=100&sortBy=statistics.channels.voice.state,lastName

The list of user properties which can be used for filtering:

  • firstName
  • lastName
  • userName
  • enabled
  • roles

The list of subresources fields what can be used for filtering:

Subresource Description
devices.phoneNumber Search for user which has assigned device with provided phone number. Please note that server stores for search purposes phone numbers in fixed format which contains digits only, thus value should not contain any non-digits.
skills.name Search for user(s) which have an assigned skill with the name provided.
skills.level Search for users(s) which have assigned skills with provided skillLevel.
statistics.channels.voice.state Search for users with specified voice channel states.
  • Accepts a comma-delimited list of values.
statistics.channels.voice.displayNameSearch for users with specified voice channel display names.
  • Accepts a comma-delimited list of values.
statistics.channels.voice.activity Search for users with specified voice channel activites.
  • Accepts a comma-delimited list of values.
statistics.channels.voice.workMode Search for users with specified voice channel workModes.
  • Accepts a comma-delimited list of values.

Here is the list of available sort fields:

  • userName
  • firstName
  • lastName
  • enabled
  • roles
  • devices.phoneNumber
  • skills.name
  • skills.level
  • statistics.channels.voice.state
  • statistics.channels.voice.activity
  • statistics.channels.voice.displayName
  • statistics.channels.voice.workMode
  • statistics.<statisticName>.value

The statistics.<statisticName>.value is the value of simple statistic with name <statisticName> as defined in statistics.yaml.

This page was last edited on October 31, 2023, at 13:29.
Comments or questions about this documentation? Contact us for support!