Update Record
Update an existing record.
Recipes
Add/remove value from record array
Add/remove value from record array
1. Set an update operator for an array field to add values to the array
add_to_set operator to an array field to add values to the array. Here, the add_to_set operator is applied to the films field with new values that should be added to the array.2. Set an update operator for another array field to remove values from the array
pull operator to the array field to remove values from the array. Here, the pull operator is applied to the ratings field with the values that should be removed from its array.3. As a result, the API returns the updated record.
films array and removed from the ratings array.Increment/append value of record array
Increment/append value of record array
1. Set an update operator for an array field to increment values of an array
inc operator to an array field to increment its values. Here, the inc operator is applied to the score_value and progress fields.2. Set an update operator for another array field to append values to it
push operator to the array to append values to it. Here, the push operator is applied to the completed_levels field with the values that should be appended.3. As a result, the API returns the updated record.
4 value is appended to the completed_levels array while the score_value and progress values are incremented by the 20 and 0.11.Update record array element by index
Update record array element by index
1. Set an array element
2. As a result, the API returns an updated array.
movie array is updated to Titanic.Update record
Update record
1. Set a new value for a field
game_mode_name field is set to rainbow dash.2. As a result, the API returns an updated record.
Add/remove value from record array with API key
Add/remove value from record array with API key
1. Use 'Authorization' header to pass API key
2. Set an update operator for an array field to add values to the array
add_to_set operator to an array field to add values to the array. Here, the add_to_set operator is applied to the films field with new values that should be added to the array.3. Set an update operator for another array field to remove values from the array
pull operator to the array field to remove values from the array. Here, the pull operator is applied to the ratings field with the values that should be removed from its array.4. As a result, the API returns the updated record.
films array and removed from the ratings array.Increment/append value of record array with API key
Increment/append value of record array with API key
1. Use 'Authorization' header to pass API key
2. Set an update operator for an array field to increment values of an array
inc operator to an array field to increment its values. Here, the inc operator is applied to the score_value and progress fields.3. Set an update operator for another array field to append values to it
push operator to the array to append values to it. Here, the push operator is applied to the completed_levels field with the values that should be appended.4. As a result, the API returns the updated record.
4 value is appended to the completed_levels array while the score_value and progress values are incremented by the 20 and 0.11.Update record array element by index with API key
Update record array element by index with API key
1. Use 'Authorization' header to pass API key
2. Set an array element
3. As a result, the API returns an updated array.
movie array is updated to Titanic.Update record with API key
Update record with API key
1. Use 'Authorization' header to pass API key
2. Set a new value for a field
game_mode_name field is set to rainbow dash.3. As a result, the API returns an updated record.
PUT request with application/json or
application/x-www-form-urlencoded content type of PUT/POST body. Received values will be casted according to
the class defined in QuickBlox Dashboard.
A field that is present in class but not specified in the PUT request has a null value. To nullify
the existing value you should specify null for application/x-www-/form-urlencoded, and null
for application/json content type.
An update request updates specified fields only (other fields will be left untouched).
For numeric fields Integer and Float, there is a special increment operator inc
that increments or decrements the numeric field.
Update operators
The request can contain next update operators:
Path Parameters
Body Parameters
cartoons[1]=Aladdin.permission.<CRUD_operation>.access=<value> permission.<CRUD_operation>.<option>=<value>CRUD operations: create, read, update, delete. CRUD access values:
open, owner, open_for_users_ids, open_for_groups. CRUD options:
ids, groups.Headers
ApiKey {your_api_key}. Must be used
either QB-Token or Authorization.