_id, user_id, parent_id, created_at, and updated_at.
Allowed data types: Integer (or Array of Integer); String (or Array of String); Float (or Array of Float); Boolean (or Array of Boolean); Location (Array of [< longitude >, < latitude >]); File; Date.
Visit Key Concepts page to learn the most important QuickBlox concepts.
Before you begin
- Register a QuickBlox account. This is a matter of a few minutes and you will be able to use this account to build your apps.
- Configure QuickBlox SDK for your app. Check out Setup page for more details.
- Create a user session to be able to use QuickBlox functionality. See Authentication page to learn how to do it.
Create class
To start using Custom Objects module, create a class:- Go to QuickBlox Dashboard.
- Follow Custom => Add => Add new class direction. As a result, Add new class popup will appear.
- Enter a class name, add any fields you want.

- Click Create class button to create a new class.

Create records
Here is the easiest way to create a new record from the QuickBlox Dashboard:- Follow Custom => Current class => Your Class direction.
- Click Add => Add record button.
- Fill in any fields you want.
- Click Add record button and a new record will be added and shown in the table.
create() method. To create a single record, use the code snippet below.
JavaScript
JavaScript
Retrieve records by IDs
You can get records with a particular record ID using thelist() method.
JavaScript
Retrieve records
You can search for records of a particular class. The request below will return records of theNote class with specific IDs in the array.
JavaScript
If you want to retrieve only records updated after some specific date time and order the search results, you can apply operators. Thus, you can apply search and sort operators to list records on the page so that it is easier to view specific records.
If you want to get a paginated list of dialogs from the server, you can set the following fields of the
filter:
Search operators
You can use search operators to get more specific search results. The request below will return two records of theGameOfThrones by the age field with a value greater than 20, limited to 2 records on the page.
JavaScript
Sort operators
You can use sort operators to order the search results. The request below will return records ofGameOfThrones class sorted in descending order by the created_at field.
JavaScript
Aggregation operators
You can use an aggregation operator to count search results. The request below will return a count of all records of theGameOfThrones class.
JavaScript
Update records
You can update a single record using theupdate() method. You should know the record ID in this case.
JavaScript
JavaScript
Delete records
To delete a record/records, use thedelete() method. To delete a single record, use the code snippet below.
JavaScript
To delete multiple records, use the code snippet below.
JavaScript
To delete a record by criteria, use the code snippet below.
JavaScript
Relations
It is possible to create a relation between objects of two different classes via_parent_id field.
For example, we have the class Rating that contains score, review, and comment fields. We also have a Movie class. So we can create a record of class Rating that will point to the record of the class Movie via its _parent_id field, so the _parent_id field will contain the ID of record from class Movie.
Permissions
Access control list (ACL) is a list of permissions attached to some object. An ACL specifies which users have access to objects as well as what operations are allowed on given objects. Each entry in a typical ACL specifies a subject and an operation. ACL models may be applied to collections of objects as well as to individual entities within the system hierarchy.Permission schema
QuickBlox Permission schema contains five permissions levels:- Open (open) Such permission schema means that any user within the application can access the record/records in the class and is allowed to perform an action with the current permission level.
- Owner (owner) Owner permission level means that only Owner (a user who created a record) is allowed to perform action with the current permission level.
- Not allowed (not_allowed) No one (except for the Account Administrator) can make a chosen action.
- Open for groups (open_for_groups) Users having a specified tag/tags (see more info about how to set tags for the user in Users will be included in the group that is allowed to perform an action with the current permission level. The current permission level can consist of one or several groups (number of groups is not limited). Tags can be added/deleted in the user’s profile.
- Open for user ids (open_for_users_ids) Only users that are specified in the permission level can make a required action with a record. One or several users can be specified (the number of users is not limited).
Actions available for the entity
- Create Create a record.
- Read Retrieve and read the info about the chosen record.
- Update Update any parameter for the chosen record (only those parameters that can be set by the user can be updated).
- Delete Delete a record.
Permission levels
There are two access levels in the Permissions schema: Class and Record.Class entity
Only the Account Administrator can create a class in the Custom object module and make all possible actions with it. Operations with Class entity are not allowed in API. All actions (Create, Read, Update, and Delete) are available for the class entity and are applicable for all records in the class. Every action has a separate permission level available. The exception is a Create action that is not available for the Owner permission level. To set a permission schema for the Class, do the following:- Go to the Custom Objects tab.
- Open a required class.
- Click Edit permissions button to open a class and edit it.

- Create: Open
- Read: Open
- Update: Owner
- Delete: Owner
Mark checkboxes to enable class permissions.
Record entity
A record is an entity within the class in the Custom Objects module that has its own permission levels. You can create a record in the Dashboard and API (see Create Record request for more details). All permission levels except for the Not Allowed are available for the record and there are only three actions available and applicable for the record: Read, Update, and Delete. Default Record permission schema is used while creating a class:- Read: Open
- Update: Owner
- Delete: Owner

Choosing a permission schema
Only one permission level can be applicable to the record: class permission schema or record permission schema. To apply class permission levels to all records in the class, tick the checkbox in the Use Class permissions column near the required Action in the Dashboard.
Using a class permission schema means that a record permission schema will not affect a reсord.
Create record with permissions
Let’s create a record with the next permissions:- READ: Open.
- UPDATE: Users in groups golf, man.
- DELETE: Users with IDs 3060, 63635.
JavaScript
Update record permissions
Let’s update record permissions to next:- READ: Users in groups car, developers.
- UPDATE: Owner.
- DELETE: Owner.
JavaScript
Files
Custom Objects module supports theFile field type. It is created to work easily with content from the Custom Objects module. There is an ability to upload, download, update and delete the content of file fields.
Upload/Update file
Use the code lines below to upload/update a file.JavaScript
Download file
To download a file, use the code snippet below.JavaScript
Delete file
To delete a file, use the code snippet below.JavaScript