API:2/guild/:id/log

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

/v2/guild/:id/log

HTTP method
GET
Format
json
API version
version 2
Release date
2016-02-04
Scope
account
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, optional) - The account name of the guild member who generated this log entry.
    • Known not to return a user key when the type is equal to upgrade and action is queued.
  • 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 who invited the player.
    • invite_declined - user invite to the guild has been declined. Additional fields include:
      • declined_by (string, optional) - Account name of the guild member who declined the invite, or missing if user declined.
    • kick - user has been kicked from the guild. Additional fields include:
      • kicked_by (string) - Account name of the guild member who kicked the player.
    • rank_change - Rank for user has been changed. Additional fields include:
      • changed_by (string) - Account name of the guild member who 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.
      • item_id (number, optional) - May be added if the upgrade was created by consuming an item, such as a decoration.
    • influence - The guild's influence (legacy currency) increased or decreased. Additional fields include:
      • activity (string) - Possible values:
        • daily_login - Influence was awarded to the guild by each character as it logs in. The guild's attendance log was only updated once per day.
        • gifted - A guild member increased the guild's influence, such as by consuming a Letter of Influence.
      • participants (number) - How many members participated in the activity.
      • total_participants (string array) - The user IDs of the members who participated in the activity.
    • mission - A guild mission started or ended. Additional fields include:
      • state (string) - the mission transitioned to this state. Possible values:
        • start
        • success
        • fail
      • user (string, optional) - The account name of the guild member who started the mission (only specified when state is start)
      • influence (number) - The amount of guild influence awarded for completing the mission.

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"
    }
 ]

Notes

Some guild upgrades don't have a completed log item. (ref)