Console
Database

Action

Perform a get, set, or delete on a named JSON database belonging to your app. Data is shared across all users of the app — no user token required.

POST /api/database/action.php
Requires Authorization: AppID:AppKey — no user token needed

Request body

FieldTypeRequiredDescription
actionstringrequired"get", "set", or "delete"
namestringrequiredDatabase name (e.g. "leaderboard")
pathstringoptionalSlash-separated path within the JSON (e.g. "top1/score"). Only for get.
dataanyrequired for setJSON value to store — object, array, string, or number

Response — action: get 200

{
  "success": true,
  "name": "leaderboard",
  "path": null,
  "data": {
    "top1": { "user": "Vanelton", "score": 9999 },
    "top2": { "user": "Maria",    "score": 8500 }
  }
}

Response — action: get with path 200

{ "success": true, "name": "leaderboard", "path": "top1/score", "data": 9999 }

Response — action: set 200

{ "success": true, "message": "Database saved successfully.", "name": "leaderboard" }

Response — action: delete 200

{ "success": true, "message": "Database deleted successfully.", "name": "leaderboard" }

Errors

CodeMessageCause
401Authorization header with appid:appkey is required.Missing header
401Invalid app credentials.Wrong AppID or AppKey
400Missing required fields.action or name not provided
400Invalid action.action is not get/set/delete
404Data not found for the specified name and path.Name doesn't exist or path not found