API:2/pvp/games
From Guild Wars 2 Wiki
Jump to navigationJump to search
/v2/pvp/games
- HTTP method
- GET
- Format
- json
- API version
- version 2
- Release date
- 2015-09-03
- Scope
- account
pvp - Optional
- none
This resource returns information about past PvP matches the player has participated in.
Parameters
access_token
- (optional) If the API key is not specified in the request header, it can be specified here.
Response
If the root endpoint (/v2/pvp/games
) is accessed without specifying an id, a list of all ids is returned. When multiple ids are requested using the ids
parameter, a list of response objects is returned. The endpoint will only return the 10 most recent games played.
For each requested item id, an object with the following properties is returned:
id
(string) - The game's UUID.map_id
(number) - The map the match was played on, cross-referenced from/v2/maps
.started
(string) - A timestamp of when the match started.ended
(string) - A timestamp of when the match ended.result
(string) - The result of the match.team
(string) - The team the player was on during the match.profession
(string) - The profession the player was playing during the match.scores
(object)red
(number) - The ending score of the red team.blue
(number) - The ending score of the blue team.
rating_type
(string) - The type of game mode played. Possible values:Ranked
Unranked
None
- For custom arenas
rating_change
(number) - Change in rating as a result of the observed game. Note that number can be negative in the case of a loss.season
(string) (optional) - Seasonid
, can be resolved against v2/pvp/season
Example
Request
https://api.guildwars2.com/v2/pvp/games?ids=ABCDE02B-8888-FEBA-1234-DE98765C7DEF Authorization: Bearer <access token>
Response
[ { "id": "ABCDE02B-8888-FEBA-1234-DE98765C7DEF", "map_id": 894, "started": "2015-07-08T21:29:50.000Z", "ended": "2015-07-08T21:37:02.000Z", "result": "Defeat", "team": "Red", "profession": "Guardian", "scores": { "red": 165, "blue":507 } "rating_type" : "Ranked", "rating_change" : -26, "season" : "49CCE661-9DCC-473B-B106-666FE9942721" } ]