Chat
List Dialogs
Retrieve a list of chat dialogs. You can list dialogs using specific search criteria.
GET
Documentation Index
Fetch the complete documentation index at: https://docs.quickblox.com/llms.txt
Use this file to discover all available pages before exploring further.
Recipes
Filter dialogs by custom field
Filter dialogs by custom field
1. Set a custom object class
You need to refer to the specific custom object class in the request.In this case, we refer to the
CoolDialog custom object class.See this section to learn how to create a custom object class.2. Set a custom object field
Refer to a specific custom object field in the query.Here, we refer to the
friends field of the CoolDialog custom object class.Display total number of all dialogs
Display total number of all dialogs
Get dialog by dialog ID
Get dialog by dialog ID
Filter dialogs by type
Filter dialogs by type
1. Set a search operator for a field
Use a search operator to perform a query. Here, the
in operator is applied to a type field.2. Set a sort operator for a field
Use a sort operator to order the search results by the field. Here, the
sort_desc operator is applied to the last_message_date_sent field.3. Set a limit for a number of dialogs on the page
You can limit search results on the page using the
limit parameter.Here, the number of dialogs on the page is limited to 3.| Operator | Description |
|---|---|
| lt | Less Than operator Types: number, string, date Applicable to fields: last_message_date_sent, created_at, updated_at Example: ?updated_at[lt]=1556829805 Will return dialogs with updated_at less than 1556829805. |
| lte | Less Than or Equal to operator Types: number, string, date Applicable to fields: last_message_date_sent, created_at, updated_at Example: ?last_message_date_sent[lte]=1556735709 Will return dialogs with last_message_date_sent less than or equal 1556735709. |
| gt | Greater Than operator Types: number, string, date Applicable to fields: last_message_date_sent, created_at, updated_at Example: ?last_message_date_sent[gt]=1556735709 Will return dialogs with last_message_date_sent greater than 1556735709. |
| gte | Greater Than or Equal to operator Types: number, string, date Applicable to fields: last_message_date_sent, created_at, updated_at Example: ?last_message_date_sent[gt]=1556735709 Will return dialogs with last_message_date_sent greater than 1556735709. |
| ne | Not Equal to operator Types: number, string, date Applicable to fields: _id, name, last_message_date_sent Example: ?_id[ne]=5cc9bb58a28f9a406659d777 Will return dialogs with _id not equal to 5cc9bb58a28f9a406659d777. |
| in | Contained IN array operator Types: number, string, date Applicable to fields: type, last_message_date_sent, name Example: ?type[in]=1,2 Will return dialogs with type equal to 1 and equal to 2. |
| nin | Not contained IN array operator Types: number, string, date Applicable to fields: last_message_date_sent Example: ?last_message_date_sent[nin]=1556739654, 1556739987 Will return dialogs with last_message_date_sent not equal to 1556739654 and 1556739987. |
| all | ALL contained IN array Types: number Applicable to fields: occupants_ids, admin_ids Example: ?occupants_ids[all]=91103344,91142495 Will return dialogs with occupants_ids equal to 91103344 and 91142495 (both). |
| ctn | Contains substring operator Types: string Applicable to field: name Example: ?name[ctn]=party Returns dialogs whose name contains the word “party”. |
| Operator | Description |
|---|---|
| sort_asc | Types: all types Example: sort_asc=field_name Search results will be sorted by the specified field in ascending order. |
| sort_desc | Types: all types Example: sort_desc=field_name Search results will be sorted by the specified field in descending order. |
Query Parameters
Search records with the field that contains the specified value. Can be many 1..N.
Filters records with field that contains the value according to the specified value and operator. Can be many 1..N.
Unread message count is calculated for dialogs by default. Set to 0 to skip calculation, which will speed up the request.
Added in v2.4.5.
Added in v2.4.5.
Limit search results to N records. Useful for pagination.
Skip N records in search results. Useful for pagination.
Count search results. Set to 1 to apply. Response will contain only count of records found. If not passed, the response will contain all available dialog records along with their count.
Search results will be sorted by the specified field in descending order.
Search results will be sorted by the specified field in ascending order.
Class name in Custom Objects.
Field name of class in Custom Objects. Can be many 1..N.
Headers
A user or application session token. See Authentication page to learn more about session tokens. Must be used either QB-Token or Authorization.
API key from Dashboard. Expected format:
ApiKey {your_api_key}. Must be used either QB-Token or Authorization.User ID. The user ID of the user on whose behalf the request is being made.