Index


About

This page exists to document information about the upcoming V2 API and is intended to be viewed by GW2.NET developers only.

https://api.guildwars2.com/v2

Usage

The API follows the general pattern of enumerating possible values of the subsequent path segment, with the fully qualified path yielding a JSON object of the type being enumerated.

For example, /v2/colors will yield:
[1, 2, 3, ... ]

which can be used to create the fully qualified path of:
/v2/colors/1

Endpoints

The following paths are exposed by this API:
  • /v2/accounts (disabled)
  • /v2/build (disabled)
  • /v2/colors (localizable) (disabled)
  • /v2/commerce/exchange (disabled)
  • /v2/commerce/listings (disabled)
  • /v2/continents (disabled)
  • /v2/events (localizable) (disabled)
  • /v2/events-state (disabled)
  • /v2/files (disabled)
  • /v2/floors (localizable) (disabled)
  • /v2/items (localizable) (disabled)
  • /v2/leaderboards (disabled)
  • /v2/maps (localizable) (disabled)
  • /v2/recipes (disabled)
  • /v2/skins (localizable) (disabled)
  • /v2/worlds (localizable) (disabled)
  • /v2/wvw/matches (disabled)
  • /v2/wvw/objectives (localizable) (disabled)

Locale

APIs that are locale aware accept the ?lang=<langId> option. For example:
/v2/colors/1?lang=fr

Possible locale 'langId' values include:
  • en
  • es
  • de
  • fr
  • ko
  • zh

Bulk Expansion

All APIs offer bulk expansion. There are several ways to do so. The simplest is by specifying multiple ids via query parameter, as in:
/v2/colors?ids=1,2,3

One may also specify 'all' to expand all ids. For example:
/v2/colors?ids=all

Important: not all APIs support the 'all' keyword as it may be too expensive.

Another approach to bulk expansion is through pages. Use the ?page=<page#> parameter to specify the requeste page. Optionally, you can also provide a &page_size=<page size> value to adjust to your preferred page size.

Sample usage is:
/v2/colors?page=0&page_size=10

Pay attention to response headers which provide additional metadata about the underlying collection, pagination info, and links.

Responses

Success

Successful requests will result in HTTP status code 200 (OK).
The response content is a JSON object that describes the requested data.

Errors

Failed requests will result in HTTP status code 400 (Bad request).
The response content is a JSON object that describes the error message. Error messages are always in English.

{
  "text" : "This human-readable text describes an error."
}

Last edited Jun 18, 2014 at 10:53 AM by StevenLiekens, version 7