[ 'status' => 401, 'title' => $GLOBALS['lang']['unauthorized'], 'detail' => $GLOBALS['lang']['error-permissiondenied'] ]] ); } update_user_access(0, ["last_browser" => isset($_SERVER["HTTP_USER_AGENT"]) ? substr($_SERVER["HTTP_USER_AGENT"], 0, 250) : "API"]); set_sysvar("last_api_access",date("Y-m-d H:i")); } } debug("API: Executing API call"); echo execute_api_call($query, $pretty); debug("API: finished execute_api_call({$query});");