arenanet / api-cdi

Collaborative Development Initiative for Public APIs
252 stars 41 forks source link

Add `updated_at` to /worlds #666

Open moso opened 4 years ago

moso commented 4 years ago

To track server population status, it would be nice with an updated_at timestamp. Maybe not for each server, however, a general timestamp on when the server population was updated last would be nice.

Example:


[
  {
    "id": 1001,
    "name": "Anvil Rock",
    "population": "Full"
  },
  {
    "id": 1002,
    "name": "Borlis Pass",
    "population": "High"
  },
  {
    "id": 1003,
    "name": "Yak's Bend",
    "population": "Full"
  },
  {
    "id": 1004,
    "name": "Henge of Denravi",
    "population": "High"
  },

  "updated_at": "2020-01-27T15:54:01.932Z"
]
rediche commented 4 years ago

Since the endpoint returns an array of servers at the moment, maybe it would be better do add a response header with the timestamp such that there will be no breaking changes in how the current data structure of the response looks.

Could probably be achieved using the Last-Modified-header.