Skip to main content
PUT
/
data
/
{class_name}
/
multi.json
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: c3cd44309db1405472627e7a5cb436278e012bba" \
-d '{
  "record":{
    "1":{
      "id":"5d866b53a28f9a5ad51cb562",
      "score_value":"1000"
    },
    "2":{
      "id":"5d867291a0eb473ed96099c4",
      "progress":"0.3",
      "completed_levels":[
        1,
        2,
        3
      ]
    }
  }
}' \
https://api.quickblox.com/data/ScoreTable/multi.json
{
  "class_name": "ScoreTable",
  "not_found": {
    "ids": []
  },
  "items": [
    {
      "_id": "5d866b53a28f9a5ad51cb562",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3,
        4
      ],
      "created_at": 1569090387,
      "date": "2019-09-21T21:21:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.23,
      "score_value": 1000,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": [
        11.13,
        45.52
      ],
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    },
    {
      "_id": "5d867291a0eb473ed96099c4",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3
      ],
      "created_at": 1569092241,
      "date": "2019-09-21T21:25:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.3,
      "score_value": 3021,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": null,
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    }
  ]
}

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

1

1. Use 'Authorization' header to pass API key

curl -X PUT \
-H "Content-Type: application/json" \
-H "Authorization: ApiKey 28irlNAGasWDSupO9Vw0BBMZfuHrAUYKpmroS9yBORI" \
-d '{
  "record":{
    "1":{
      "id":"5d866b53a28f9a5ad51cb562",
      "score_value":"1000"
    },
    "2":{
      "id":"5d867291a0eb473ed96099c4",
      "progress":"0.3",
      "completed_levels":[
        1,
        2,
        3
      ]
    }
  }
}' \
https://api.quickblox.com/data/ScoreTable/multi.json
2

2. As a result, the API returns the updated records.

{
  "class_name": "ScoreTable",
  "not_found": {
    "ids": []
  },
  "items": [
    {
      "_id": "5d866b53a28f9a5ad51cb562",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3,
        4
      ],
      "created_at": 1569090387,
      "date": "2019-09-21T21:21:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.23,
      "score_value": 1000,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": [
        11.13,
        45.52
      ],
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    },
    {
      "_id": "5d867291a0eb473ed96099c4",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3
      ],
      "created_at": 1569092241,
      "date": "2019-09-21T21:25:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.3,
      "score_value": 3021,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": null,
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    }
  ]
}
Allowed permissions
PermissionSyntaxExample
Openpermissions.<CRUD_operation>.accesspermissions.read.access=open
Ownerpermissions.<CRUD_operation>.accesspermissions.read.access=owner
Open for users IDspermissions.<CRUD_operation>.access=open_for_users_ids permissions.<CRUD_operation>.ids=id_1,id_2,id_3,…permissions.update.access=open_for_users_ids permissions.update.ids=3,12
Open for groupspermissions.<CRUD_operation>.access=open_for_groups permissions.<CRUD_operation>.groups=group_name_1,group_name_2permissions.delete.access=open_for_groups permissions.delete.groups=experience,rate

Path Parameters

class_name
string
required
Custom object class name.

Body Parameters

record
object

Headers

QB-Token
string
required
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.
On-Behalf-Of
string
User ID. The user ID of the user on whose behalf the request is being made.

Responses

A successful response
class_name
string
not_found
object
items
array of objects
An error response
curl -X PUT \
-H "Content-Type: application/json" \
-H "QB-Token: c3cd44309db1405472627e7a5cb436278e012bba" \
-d '{
  "record":{
    "1":{
      "id":"5d866b53a28f9a5ad51cb562",
      "score_value":"1000"
    },
    "2":{
      "id":"5d867291a0eb473ed96099c4",
      "progress":"0.3",
      "completed_levels":[
        1,
        2,
        3
      ]
    }
  }
}' \
https://api.quickblox.com/data/ScoreTable/multi.json
{
  "class_name": "ScoreTable",
  "not_found": {
    "ids": []
  },
  "items": [
    {
      "_id": "5d866b53a28f9a5ad51cb562",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3,
        4
      ],
      "created_at": 1569090387,
      "date": "2019-09-21T21:21:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.23,
      "score_value": 1000,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": [
        11.13,
        45.52
      ],
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    },
    {
      "_id": "5d867291a0eb473ed96099c4",
      "_parent_id": null,
      "completed_levels": [
        1,
        2,
        3
      ],
      "created_at": 1569092241,
      "date": "2019-09-21T21:25:00Z",
      "expert_mode": false,
      "game_mode_name": "beta testing",
      "progress": 0.3,
      "score_value": 3021,
      "updated_at": 1569178320,
      "user_avatar": null,
      "user_id": 96753878,
      "user_location": null,
      "permissions": {
        "read": {
          "access": "open"
        },
        "update": {
          "access": "owner"
        },
        "delete": {
          "access": "owner"
        }
      }
    }
  ]
}