API:2/guild/:id/ranks

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

/v2/guild/:id/ranks

HTTP method
GET
Format
json
API version
version 2
Release date
2015-12-14
Scope
account
guilds
Optional
none

This resource returns information about the ranks of a specified 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 guild rank. Each object has the following properties:

  • id (string) - The ID and name of the rank.
  • order (number) - A number given to each rank to specify how they should be sorted, lowest being the first and highest being the last.
  • permissions (array) - An array of permission ids from /v2/guild/permissions that have been given to this rank.
  • icon (string) - A URL pointing to the image currently assigned to this rank.

Example

https://api.guildwars2.com/v2/guild/4BBB52AA-D768-4FC6-8EDE-C299F2822F0F/ranks
[
  {
    id: "Leader",
    order: 1,
    permissions: [
      "Admin",
      "EditRoles",
      "ClaimableEditOptions",
      ...
    ],
    icon: "..."
  },
  {
    id: "Member",
    order: 3,
    permissions: [
      "StartingRole"
    ],
    icon: "..."
  },
  {
    id: "Officer",
    order: 2,
    permissions: [
      "Admin"
    ],
    icon: "..."
  }
]