This software provides an easy to use RESTful API for TrinityCore available via HTTP, which delivers the most important database contents in simple JSON format. It is written using Laravel PHP framework.
Our goal is to build a strong, reliable base on which you can build awesome web applications for TrinityCore (e.g. search engines, visual database editors, server administration tools, armories, etc…).
The JSON API makes it easier to build your web applications, because you do not have to worry about accessing directly the database, and the datas are provided into a very friendly format for front-end web programming languages. Also, a single instance of the TrinityCore JSON API can be a data provider for multiple web applications, even among separated machines.
Example of applications using the TrinityCore JSON REST API:
This is a simple example of a web front-end application (still much incomplete) that uses the TrinityCore RESTful JSON API.
It’s a (currently)very-primitive search engine for world of warcraft, fetching data from TDB.
This one-page-application is entirely written in html/css/javascript, using AngularJS javascript framework, with no PHP or other server-side languages (the application just perform calls to the API to get the data).
This is a good way to separate different layers: one layer to provide the data (API), and an other one to show it (the web font-end application).
Pros: allow a safer and uniform access to the data and access to data that the database alone can’t provide
Cons: every call to the API is an additional load for the server, one may want to focus all the worldserver machine power to serve the game to players
External PHP API
Pro: easier to install (needs just the database and not the whole TrinityCore installed), can installed even on a separate machine than the worldserver and requires just mysql and a webserver (in short you can install it even in a simple web host, no need of an entire dedicated machine)
Cons: it can’t access to data ta the database alone can’t provide EDIT: it can now fetch data from DBC too
Honestly I don’t know which one I would choose, I think it depends on what I have to do with id. I would probably choose the external API if I have a worldserver already running a big load, while I could prefer the internal one for development purposes.
[ul][li]Multiple database connection support[/li][li]All world basic resources[/li][li]Some characters resources[/li][li]Basic search routes with multiple optional parameters[/li][li]Online players[/li][li]Display API and world database version[/li][/ul]
[ul][li]Added new world routes[/li][li]Allow to optionally retrieve extra fields[/li][li]Allow to run API and client web applications among separate machines[/li][/ul]
[ul][li]Implemented smart_scripts routes[/li][li]Added the ‘sqlite’ database to fetch DBC data (taken from Discover-'s SAI Editor)[/li][li]Implemented some DBC routes[/li][/ul]
Notes:
[ul][li]Implemented several DBC routes, including Search ones, and 6.x support of most of them[/li]
[li]Implemented *_questitem routes for Creatures and GameObjects[/li]
[li]Implemented quest_template_addon route[/li]
[li]Fit with latest TrinityCore DB structure changes[/li]
[/ul]
Notes:
[ul][li]Requires TDB 335.59 or newer (also TDB.58 with all updates until the date of this release is enough too)[/li][/ul] Installation instructions: https://github.com/S…3.5/INSTALL.md
I’m having a bit of trouble trying to get past this error “[COLOR=rgb(235,235,235)]ERROR: API not found, please edit your config.js file and set the path of your TrinityCore JSON API istance.”
As you can see the permissions for the directories are as they should be.
After giving the entire folder and subfolders 777, there are still no logs stored in that folder.
You are correct about the white page.
I checked apache logs and this is the latest entry:
[Sat Sep 12 01:46:06 2015] [error] [client 192.80.186.134] PHP Warning: require(/var/www/html/TC-JSON-API/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/TC-JSON-API/bootstrap/autoload.php on line 17
[Sat Sep 12 01:46:06 2015] [error] [client 192.80.186.134] PHP Fatal error: require(): Failed opening required '/var/www/html/TC-JSON-API/bootstrap/../vendor/autoload.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/TC-JSON-API/bootstrap/autoload.php on line 17
After giving the entire folder and subfolders 777, there are still no logs stored in that folder.
You are correct about the white page.
I checked apache logs and this is the latest entry:
[Sat Sep 12 01:46:06 2015] [error] [client 192.80.186.134] PHP Warning: require(/var/www/html/TC-JSON-API/bootstrap/…/vendor/autoload.php): failed to open stream: No such file or directory in /var/www/html/TC-JSON-API/bootstrap/autoload.php on line 17
[Sat Sep 12 01:46:06 2015] [error] [client 192.80.186.134] PHP Fatal error: require(): Failed opening required ‘/var/www/html/TC-JSON-API/bootstrap/…/vendor/autoload.php’ (include_path=‘.:/usr/share/pear:/usr/share/php’) in /var/www/html/TC-JSON-API/bootstrap/autoload.php on line 17
Did you install the TC-JSON-API from sources or did you download the full version?
However, this is about the TC-JSON-API installation and is not strictly releated with Keira2, it would be better to move this discussion to Help & Support.