API:2/guild/:id/log

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

/v2/guild/:id/log

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

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

Parameters

The optional parameter ?since can be added to a guild log query. The since parameter takes an event id value as a value. This will filter out all log entries not newer than the id given. Any events when an id is equal to, or less than ?since will be omitted.

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 log entry. The endpoint will return roughly the last 100 events of each type at max. Each object has the following properties:

  • id (number) - An ID to uniquely identify the log entry within the scope of the guild. Not globally unique.
  • time (string) - ISO-8601 standard timestamp for when the log entry was created.
  • user (string) - The account name of the guild member who generated this log entry.
  • type (string) - The type of log entry. Additional fields are given depending on the type. Possible values:
    • joined - user has joined the guild
    • invited - user has been invited to the guild. Additional fields include:
      • invited_by (string) - Account name of the guild member which invited the player.
    • kick - user has been kicked from the guild. Additional fields include:
      • kicked_by (string) - Account name of the guild member which kicked the player.
    • rank_change - Rank for user has been changed. Additional fields include:
      • changed_by (string) - Account name of the guild member which changed the player rank.
      • old_rank (string) - Old rank name.
      • new_rank (string) - New rank name.
    • treasury - A guild member has deposited an item into the guild's treasury. Additional fields include:
      • item_id (number) - The item ID that was deposited into the treasury.
      • count (number) - How many of the specified item was deposited.
    • stash - - A guild member has deposited/withdrawn an item into the guild stash. Additional fields include:
      • operation (string) - Possible values:
        • deposit
        • withdraw
        • move
      • item_id (number) - The item ID that was deposited into the treasury.
      • count (number) - How many of the specified item was deposited.
      • coins (number) - How many coins (in copper) were deposited.
    • motd - A guild member has changed the guild's MOTD. Additional fields include:
      • motd (string) - The new MOTD.
    • upgrade - A guild member has interacted with a guild upgrade. Additional fields include:
      • action (string) - The type of interaction had. Possible values:
        • queued
        • cancelled
        • completed - Having this action will also generate a new count field indicating how many upgrades were added.
        • sped_up
      • upgrade_id (number) - The upgrade ID which was completed.
      • recipe_id (number)(optional) - May be added if the upgrade was created through a scribe station by a scribe.

Example

https://api.guildwars2.com/v2/guild/4BBB52AA-D768-4FC6-8EDE-C299F2822F0F/log
[
  {
    "id": 1190,
    "time": "2015-12-10T23:58:49.106Z",
    "type": "treasury",
    "user": "Lawton Campbell.9413",
    "item_id": 24299,
    "count": 150
  },
  {
    "id": 1111,
    "time": "2015-12-10T23:52:01.099Z",
    "type": "motd",
    "user": "Lawton Campbell.9413",
    "motd": "FSFOSDFJS"
  }
  {
    "id": 1375,
    "time": "2016-02-16T01:08:07.538Z",
    "type": "invited",
    "user": "Lawton Campbell.9413",
    "invited_by": "Lawton Campbell.9413"
  }
  {
    "id": 1533,
    "time": "2016-03-04T18:54:02.785Z",
    "type": "stash",
    "user": "Lawton Campbell.9413",
    "operation": "deposit",
    "item_id": 0,
    "count": 0,
    "coins": 20000
  }
  {
    "id": 1286,
    "time": "2015-12-23T00:48:20.539Z",
    "type": "upgrade",
    "upgrade_id": 364,
    "action": "queued",
    "user": "Lawton Campbell.9413",
  }
]
 https://api.guildwars2.com/v2/guild/4BBB52AA-D768-4FC6-8EDE-C299F2822F0F/log?since=1285
 [
    {
      "id": 1286,
      "time": "2015-12-23T00:48:20.539Z",
      "type": "upgrade",
      "upgrade_id": 364,
      "action": "queued",
      "user": "Lawton Campbell.9413"
    },
    {
      "id": 1470,
      "time": "2016-12-19T20:36:03.000Z",
      "type": "upgrade",
      "recipe_id": 11856,
      "upgrade_id": 776,
      "count": 1,
      "action": "completed",
      "user": "Lawton Campbell.9413"
   },
   {
      "id": 1522,
      "time": "2016-12-19T20:48:11.000Z",
      "type": "upgrade",
      "upgrade_id": 78477,
      "count": 1,
      "action": "completed",
      "user": "Lawton Campbell.9413"
    }
 ]