curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 199b1d9ec0dedeb19d81283b3b2a32b80f012bba" \
-d '{
"record":{
"0":{
"score_value":3021,
"progress":"0.42",
"expert_mode":false,
"game_mode_name":"4x4",
"date":"2019-09-21 21:25:00",
"completed_levels":[
1,
2,
3,
4,
5,
6
]
},
"1":{
"score_value":1211,
"progress":"0.32",
"expert_mode":true,
"game_mode_name":"deathmatch",
"user_location":"21.23, 15.32",
"date":"2019-09-20 15:21:00",
"completed_levels":[
1,
2,
3,
4,
5
]
}
}
}' \
"https://api.quickblox.com/data/ScoreTable/multi.json"
{
"class_name": "ScoreTable",
"items": [
{
"_id": "5d867291a0eb473ed96099c4",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5,
6
],
"created_at": 1569092241,
"date": "2019-09-21T21:25:00Z",
"expert_mode": false,
"game_mode_name": "4x4",
"progress": 0.42,
"score_value": 3021,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": null,
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
},
{
"_id": "5d867291a0eb473ed96099c5",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5
],
"created_at": 1569092241,
"date": "2019-09-20T15:21:00Z",
"expert_mode": true,
"game_mode_name": "deathmatch",
"progress": 0.32,
"score_value": 1211,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": [
21.23,
15.32
],
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
}
]
}
Create multiple records.
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 199b1d9ec0dedeb19d81283b3b2a32b80f012bba" \
-d '{
"record":{
"0":{
"score_value":3021,
"progress":"0.42",
"expert_mode":false,
"game_mode_name":"4x4",
"date":"2019-09-21 21:25:00",
"completed_levels":[
1,
2,
3,
4,
5,
6
]
},
"1":{
"score_value":1211,
"progress":"0.32",
"expert_mode":true,
"game_mode_name":"deathmatch",
"user_location":"21.23, 15.32",
"date":"2019-09-20 15:21:00",
"completed_levels":[
1,
2,
3,
4,
5
]
}
}
}' \
"https://api.quickblox.com/data/ScoreTable/multi.json"
{
"class_name": "ScoreTable",
"items": [
{
"_id": "5d867291a0eb473ed96099c4",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5,
6
],
"created_at": 1569092241,
"date": "2019-09-21T21:25:00Z",
"expert_mode": false,
"game_mode_name": "4x4",
"progress": 0.42,
"score_value": 3021,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": null,
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
},
{
"_id": "5d867291a0eb473ed96099c5",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5
],
"created_at": 1569092241,
"date": "2019-09-20T15:21:00Z",
"expert_mode": true,
"game_mode_name": "deathmatch",
"progress": 0.32,
"score_value": 1211,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": [
21.23,
15.32
],
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
}
]
}
201
403
curl -X POST \
-H "Content-Type: application/json" \
-H "QB-Token: 199b1d9ec0dedeb19d81283b3b2a32b80f012bba" \
-d '{
"record":{
"0":{
"score_value":3021,
"progress":"0.42",
"expert_mode":false,
"game_mode_name":"4x4",
"date":"2019-09-21 21:25:00",
"completed_levels":[
1,
2,
3,
4,
5,
6
]
},
"1":{
"score_value":1211,
"progress":"0.32",
"expert_mode":true,
"game_mode_name":"deathmatch",
"user_location":"21.23, 15.32",
"date":"2019-09-20 15:21:00",
"completed_levels":[
1,
2,
3,
4,
5
]
}
}
}' \
"https://api.quickblox.com/data/ScoreTable/multi.json"
{
"class_name": "ScoreTable",
"items": [
{
"_id": "5d867291a0eb473ed96099c4",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5,
6
],
"created_at": 1569092241,
"date": "2019-09-21T21:25:00Z",
"expert_mode": false,
"game_mode_name": "4x4",
"progress": 0.42,
"score_value": 3021,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": null,
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
},
{
"_id": "5d867291a0eb473ed96099c5",
"_parent_id": null,
"completed_levels": [
1,
2,
3,
4,
5
],
"created_at": 1569092241,
"date": "2019-09-20T15:21:00Z",
"expert_mode": true,
"game_mode_name": "deathmatch",
"progress": 0.32,
"score_value": 1211,
"updated_at": 1569092241,
"user_avatar": null,
"user_id": 96753878,
"user_location": [
21.23,
15.32
],
"permissions": {
"read": {
"access": "open"
},
"update": {
"access": "owner"
},
"delete": {
"access": "owner"
}
}
}
]
}
Was this page helpful?