-
Notifications
You must be signed in to change notification settings - Fork 32
Home
In order to perform calls to the API, you have to send http request to the public directory. For example, if you have installed your API in under the "TC-JSON-API" directory inside your local web server main directory, you have to perform an http request to:
http://localhost/TC-JSON-API/public/route
replacing /route with whatever you are looking for. Example:
http://localhost/TC-JSON-API/public/creature/template/6
Below are listed all available resources provided by the API routes.
Given the numeric creature_template.entry {id} of a creature, retrieve all creature template fields using:
/creature/template/{id}
Given a string {name}, retrieve all creatures having the string {name} in their creature_template.name:
/creature/template/{name}
It is possible to optionally pass a string {subname?} in order to further filtering the results, retrieving all creatures having {name} in their creature_template.name and {subname?} in their creature_template.subname:
/creature/template/{name}/{subname?}
For further informations about creature_template fields see TrinityCore documentation of creature_template table.
You can look for creature spawns by passing the {id} of the creature template (creature_template.entry) and retrieving all spawns of the creature {id}:
/creature/spawn/id/{id}
or by passing the GUID which globally identifies each single spawn:
/creature/spawn/guid/{guid}
Given the numeric gameobject_template.entry {id} of a gameobject, retrieve all gameobject template fields using:
/gameobject/template/{id}
Given a string {name}, retrieve all gameobjects having the string {name} in their gameobject_template.name:
/gameobject/template/{name}
For further informations about gameobject_template fields see TrinityCore documentation of gameobject_template table.
You can look for gameobject spawns by passing the {id} of the gameobject template (gameobject_template.entry) and retrieving all spawns of the gameobject {id}:
/gameobject/spawn/id/{id}
or by passing the GUID which globally identifies each single spawn:
/gameobject/spawn/guid/{guid}
Given the numeric item_template.entry {id} of an item, retrieve all item template fields using:
/item/template/{id}
Given a string {name}, retrieve all items having the string {name} in their item_template.name:
/item/template/{name}
For further informations about item_template fields see TrinityCore documentation of item_template table.
Given the numeric quest_template.id {id} of a quest, retrieve all quest template fields using:
/quest/template/{id}
Given a string {name}, retrieve all quests having the string {name} in their quest_template.title:
/quest/template/{name}
For further informations about quest_template fields see TrinityCore documentation of quest_template table.
You can look for quest starter relations by passing the numeric {id} of the creature/gameobject (creature_template.entry or gameobject_template.entry):
/creature/queststarter/id/{id}
/gameobject/queststarter/id/{id}
or by passing the numeric {id} of the quest (quest_template.id):
/creature/queststarter/quest/{id}
/gameobject/queststarter/quest/{id}
You can look for quest ender relations by passing the numeric {id} of the creature (creature_template.entry):
/creature/questender/id/{id}
or by passing the numeric {id} of the quest (quest_template.id):
/creature/questender/quest/{id}
You can look for vendor relations by passing the {id} of the creature (creature_template.entry) and retrieving all items sold by the creature {id}:
/vendor/creature/{id}
or by passing the {id} of the item, retrieving all creatures that sold the item {id}:
/vendor/item/{id}
For further informations about npc_vendor fields see TrinityCore documentation of npc_vendor table.
There are several types of loot templates, all of them and their fields are documented at the TrinityCore documentation of *_loot_template tables.
This API supports the following types of loot templates with the very same syntax:
- creature
- reference
- gameobject
- item
- fishing
- disenchant
- prospecting
- milling
- pickpocketing
- skinning
- spell
The syntax is the same for all of them, the loot template routes start with /loot/ followed by the type of the loot template, for example /loot/creature/...
The following examples are showed for the creature loot template, but they are valid for all types of loot templates.
Given the numeric {id} of a creature, you can retrieve the loot template of that creature using:
/loot/creature/{id}
Given the numeric {id} of an item, you can retrieve all the creatures having that item in their loot template using:
/loot/creature/item/{id}
As said before, the syntax for all types of loot template is the same, below there are few examples to enforce this concept.
Retrieve the loot template of the reference {id}:
/loot/reference/{id}
Retrieve all gameobject having an item {id} in their gameobject loot template:
/loot/gameobject/item/{id}
Retrieve all fishing loot template of the fishing zone {id}:
/loot/fishing/{id}
And so on.