API:2/guild/:id/teams

From Guild Wars 2 Wiki
< API:2‎ | guild‎ | :id
Jump to navigationJump to search

/v2/guild/:id/teams

HTTP method
GET
Format
json
API version
version 2
Release date
2016-02-23
Scope
account
guilds
Optional
none

This resource returns information about the teams in a guild. The endpoint requires the scope guilds, and will only work if the API key is from the guild leader's account.

Response

The endpoint must be requested with :id replaced with a valid guild ID. The endpoint will return an array of objects, each describing a team. Each object has the following properties:

  • id (number) - the team ID, only unique within a guild.
  • members (array of objects).
  • name (string) - The team name
  • state (string) - "Active"
  • aggregate (object) - matches the format of /v2/pvp/stats.
  • ladders (object) - matches the format of /v2/pvp/stats.
  • games (array of objects) - matches the format of /v2/pvp/games with profession omitted.
  • seasons (optional, array of objects) - Amount of items in this slot.
    • id (string).
    • wins (number).
    • losses (number).
    • rating (number).

Example

https://api.guildwars2.com/v2/guild/4BBB52AA-D768-4FC6-8EDE-C299F2822F0F/teams
[
 {
  "id" : 1,
  "members" : [
   {
    "name" : "Lawton.9413",
    "role" : "Captain"
   },
   {
    "name" : "NotLawton.3149",
    "role" : "Member"
   }
  ],
  "name" : "1v1 Me Bro",
  "state": "Active",
  "aggregate" : {
   "wins"       : 3,
   "losses"     : 0,
   "desertions" : 0,
   "byes"       : 0,
   "forfeits"   : 0
  },
  "ladders" : {
   "unranked" : {
    "wins"       : 3,
    "losses"     : 0,
    "desertions" : 0,
    "byes"       : 0,
    "forfeits"   : 0
   }
  },
  "games" : [
   {
    "id": "98EBE4DC-E36B-4A6C-A38C-A5B898AF53A4",
    "map_id": 549,
    "started": "2015-08-29T13:42:45.000Z",
    "ended": "2015-08-29T13:53:49.000Z",
    "result": "Victory",
    "team": "Blue",
    "scores": {
     "red": 344,
     "blue": 500
    },
    "rating_type" : "Ranked"
   }
  ],
  "seasons" : [
   {
    "id" : "44B85826-B5ED-4890-8C77-82DDF9F2CF2B",
    "wins" : 1,
    "losses" : 0,
    "rating" : 1437
   }
  ]
 }
]