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
Create child record with API key
1. Use 'Authorization' header to pass API key
curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d '{
"name": "Bob"
}'\
https://api.quikblox.com/data/user/617817b94dd9626e64022fdd/friends.json
2. Set record fields.
You can set as many fields as you need for a new child record. curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d '{
"name": "Bob"
}'\
https://api.quikblox.com/data/user/617817b94dd9626e64022fdd/friends.json
3. Set a parent class, parent record ID, and child class name.
Specify the parent class name, parent record ID, and child class name in the URL. Here, the parent class is user, the parent record ID is 617817b94dd9626e64022fdd, and the child class is friends. curl -X POST \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d '{
"name": "Bob"
}'\
https://api.quikblox.com/data/user/617817b94dd9626e64022fdd/friends.json
4. As a result, the API returns a newly created child record.
{
"_id" : "617819e24dd96270083a270c" ,
"_parent_id" : "617817b94dd9626e64022fdd" ,
"created_at" : 1635260898 ,
"name" : "Bob" ,
"updated_at" : 1635260898 ,
"user_id" : 579 ,
"permissions" : {
"read" : {
"access" : "open"
},
"update" : {
"access" : "owner"
},
"delete" : {
"access" : "owner"
}
}
}
A child record type is a record that refers to another record that has already
been created, a parent. When a record is created, it is assigned a record ID.
Thus, you can create a new record, a child, and attach it to the parent record
by pointing to its ID.
Path Parameters
A class name of the parent custom object.
An ID of the parent custom object.
A class name of the child custom object.
Body Parameters
Set value to the field defined in Custom Object class. Can be many 1..N.
Record permissions. Format:
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.
A user or application session token. See Authentication
page to learn more about session tokens. Must be used either QB-Token or Authorization.
Authorization
string
default: "ApiKey {your_api_key}"
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.
Responses
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 00b4daecf2f3cc13687515977f81e3613d000335" \
-d '{
"name": "Bob"
}' \
https://api.quikblox.com/data/user/617817b94dd9626e64022fdd/friends.json
{
"_id" : "617819e24dd96270083a270c" ,
"_parent_id" : "617817b94dd9626e64022fdd" ,
"created_at" : 1635260898 ,
"name" : "Bob" ,
"updated_at" : 1635260898 ,
"user_id" : 579 ,
"permissions" : {
"read" : {
"access" : "open"
},
"update" : {
"access" : "owner"
},
"delete" : {
"access" : "owner"
}
}
}