API:2/professions

From Guild Wars 2 Wiki
Jump to: navigation, search

/v2/professions

HTTP method
GET
Format
json
API version
version 2
Release date
2016-03-09
Scope
none
Optional
none

This resource returns information about professions that are in the game.

Endpoints

  • None - Request the list of all available profession ids when the root endpoint (v2/professions) has been accessed.
  • id - (Optional) Request the profession for the specificed id when accessing the endpoint (v2/professions/id). Cannot be used when specifying the ids parameter.

Parameters

  • lang – (Optional) Request localized information.
  • page - (Optional; integer)
  • page_size - (Optional; integer)
  • ids - (Optional; Comma Delimited List|all) Request an array of professions for the specified ids or all professions. Cannot be used when using the id endpoint.

Response

For each requested profession id, an object with the following properties is returned:

  • id (string) (default/null value: "") - The profession id.
  • name (string) (default/null value: "") - The name of the profession.
  • icon (string) (default/null value: "") - The icon for the profession.
  • icon_big (string) (default/null value: "") - The large icon for the profession.
  • specializations (array of integer) (default/null value: 0) - List of API:2/specializations ids.
  • training (array of objects) (default/null value: {} empty array) - List of training details objects.
    • id (integer) (default/null value: 0) - The id of the API:2/skills or API:2/specializations inidcated by the category.
    • category (string) (default/null value: "") - The category for the training object. May include the following values:
    • name (string) (default/null value: "") - The name of the skill or specialization inidcated by the category and id.
    • track (array of objects) (default/null value: {} empty array) - List of skills and traits training details tracks objects. Includes the following objects:
      • cost (integer) (default/null value: 0) - The cost to train this skill or trait.
      • type (string) (default/null value: "") - Inidcates whether this is a skill or trait. May include the following values:
        • Trait
        • Skill
      • skill_id (integer) (default/null value: 0) - The API:2/skills id. This field is only present if type is Skill.
      • trait_id (integer) (default/null value: 0) - The API:2/traits id. This field is only present if type is Trait.
  • weapons (object) - The weapons available for this profession. The key indicates the weapon type, which is one of the following:

Each of the above weapons objects contain the following properties:

  • flag (array of string) - May be one of: "Mainhand", "Offhand", "TwoHand", "Aquatic".
  • specialization (integer) (default/null value: 0) - The API:2/specializations id of the required specialization to use this weapon. This field is only present if the weapon requires a specialization to be used.
  • skills (array of objects) (default/null value: {} empty array) - The list of weapon skills objects. Includes the following objects:
    • id (integer) (default/null value: 0) - The id of the API:2/skills.
    • slot (string) (default/null value: "") - The skill bar slot that this weapon skill can be used in. May include the following values:
      • Profession_1
      • Utility
      • Heal
      • Elite
    • offhand (string) (default/null value: "") - The name of the offhand weapon this skill requires to be equipped. This field is usually only present for Thief skills.
    • attunement (string) (default/null value: "") - The Elementalist attunement that this skill requires. This field is usually only present for Elementalist skills.
    • source (string) (default/null value: "") - The name of the class the skill was stolen from. This only applies to thief stolen skills.
  • flags (array of strings) - Can contain the following values:
    • NoRacialSkills - This profession cannot equip racial skills.
    • NoWeaponSwap - This profession can only use one weapon set.

Example

https://api.guildwars2.com/v2/professions

[
 "Guardian",
 "Warrior",
 "Engineer",
 "Ranger",
 "Thief",
 "Elementalist",
 "Mesmer",
 "Necromancer",
 "Revenant"
]

https://api.guildwars2.com/v2/professions/Engineer

{
 "id":"Engineer",
 "name":"Engineer",
 "icon":"https://render.guildwars2.com/file/5CCB361F44CCC7256132405D31E3A24DACCF440A/156632.png",
 "icon_big":"https://render.guildwars2.com/file/A94D00911BD47CDE39A104F90C7D07DE623554ED/156631.png",
 "specializations":[
  6,
  38,
  47,
  29,
  21,
  43
 ],
 "weapons":{
  "Hammer":{
   "specialization":43,
   "skills":[
    {
     "id":30501,
     "slot":"Weapon_1"
    },{
     "id":30088,
     "slot":"Weapon_2"
    }]
   },
   "Pistol":{
    "skills":[
     {
      "id":5827,
      "slot":"Weapon_1"
     }]
    }
   },
  "training":[
   {
    "id":21,
    "category":"Skills",
    "name":"Elixir Training",
    "track":[
     {
      "cost":2,
      "type":"Skill",
      "skill_id":5821
     },{
      "cost":5,
      "type":"Skill",
      "skill_id":5860
     }
    ]
   }
  "flags": ["NoWeaponSwap"],
  "skills": [
   {
       "id": 5834,
       "slot": "Heal",
       "type": "Heal"
   },
   ...
   {
   "id": 5818,
   "slot": "Utility",
   "type": "Utility"
   },
   ...
   {
   "id": 30800,
   "slot": "Elite",
   "type": "Elite"
   },
   ...
  ]
 }

https://api.guildwars2.com/v2/professions?ids=Necromancer

[
 {
  "id":"Necromancer",
  "name":"Necromancer",
  ...,
 }
]

https://api.guildwars2.com/v2/professions?ids=Necromancer,Warrior

[
 {
  "id":"Necromancer",
  "name":"Necromancer",
  ...,
 },{
  "id":"Warrior",
  "name":"Warrior",
  ...,
 }
]