1. This forum section contains Blog style threads from the Developers, and/or threads with details about what they have been working on, previews of upcoming content, and sometimes backstory associated with the content. Players are permitted to reply to these threads if the developer has indicated it is permissible by leaving the thread unlocked. Please note that TOS applies, and any abuse or trolling will be moderated.
    Dismiss Notice

Public Stats API

Discussion in 'Developer Work and Blog posts' started by Undone, May 9, 2017.

Thread Status:
Not open for further replies.
  1. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    As many of you know, we log a great deal of data for internal analysis. For a few releases now we've been promising to make some of that data available to the public. But before we could make that happen a pipeline had to be developed to automatically sanitize the data of any sensitive information. All of the infrastructure is finally in place and we're ready to open it up to the public.

    HOWEVER, you should first understand what this API is, and what it is not. @Chris summed it up nicely in a recent post on his work blog:
    This API is an elasticsearch endpoint that currently contains location-based events from the past 30 days (less than that at the time of writing as we only started recording public data about a week ago). There are many ways one can pull data from elasticsearch and all of them will require some scripting knowledge. You cannot simply go to a webpage and pull down an excel spreadsheet worth of data (we leave that up to the community).

    Now you may be asking yourself how does my Avatar show up in these events? If you remember back a few releases (R40?) I added a mysterious option under your nameplate's context menu that reads "Show name in public stats":
    [​IMG]
    The purpose of this toggle is to allow your Avatar's name to be shown in the log entries accessible from this API. By default everyone is marked as anonymous; if you want to opt-in and have your name shown you must actively select this option in game. This toggle is not retroactive - meaning that for any past events where you were marked anonymous you will remain anonymous. The bottom line is: your Avatar's name is only anonymized at the time of the event.

    For those of you still around and interested in exploring the available data the API endpoint can be found at the following address: I've also put together a small repository of example scripts to help you get started which can be found here.

    DISCLAIMER: This is an experiment in sharing. We reserve the right to change our data retention time or disable the public endpoint completely.
     
  2. The Banker

    The Banker Avatar

    Messages:
    97
    Likes Received:
    214
    Trophy Points:
    8
    Pretty cool stuff

    What does it mean in English?
     
  3. Carlin the Druid Archer

    Carlin the Druid Archer Avatar

    Messages:
    833
    Likes Received:
    2,847
    Trophy Points:
    93
    Gender:
    Male
    Location:
    New Britannia
    awesome, can't wait to use this.
     
  4. Balec Fares deCani

    Balec Fares deCani Avatar

    Messages:
    1,343
    Likes Received:
    4,015
    Trophy Points:
    125
    Gender:
    Male
    It means some technically-savvy players will have a godlike view into all the following things that happened in Shroud in the past 30 days, and in some cases (refer to "Show name in Public Stats" above) the name of the specific Avatar(s) involved.
    • PositionUpdate
    • AdventureExperienceGained
    • PlayerDeath
    • PlayerKilledByPlayer
    • PlayerKilledByMonster
    • PlayerKilledBySelf
    • MonsterKilledByPlayer
    • MonsterKilledByMonster
    • MonsterKilledBySelf
    • LootGenerated
    • ItemGained_Crafting
    • ItemGained_CrownMerchant
    • ItemGained_ExplodeItem_Merchant
    • ItemGained_World
    • ItemGained_StartingChar
    • ItemGained_Merchant
    • ItemGained_LootGold
    • ItemGained_Merchant
    • ItemGained_StartingChar
    • ItemGained_World
    • ItemDestroyed_BankUpgrade
    • ItemDestroyed_Crafting
    • ItemDestroyed_CrownMerchant
    • ItemDestroyed_Merchant
    • ItemDestroyed_User
     
    Sole, strabo, Bom and 3 others like this.
  5. Ancev

    Ancev Avatar

    Messages:
    1,150
    Likes Received:
    1,956
    Trophy Points:
    113
    How can I explode an item merchant?
     
  6. that_shawn_guy

    that_shawn_guy Bug Hunter

    Messages:
    1,409
    Likes Received:
    3,738
    Trophy Points:
    125
    Location:
    earth... mostly
    How do we go about getting credentials to access it?

    Currently, anonymous_user does not have access.
     
  7. 2112Starman

    2112Starman Avatar

    Messages:
    3,613
    Likes Received:
    7,989
    Trophy Points:
    165
    Which does not matter at all since the default is off and you have to agree to opt in.
     
  8. Grimbone

    Grimbone Avatar

    Messages:
    575
    Likes Received:
    957
    Trophy Points:
    63
    Gender:
    Male
    Location:
    USA
    It could matter to players who may think that the toggle means to show yourself in a public scene to other players (this is exactly what my better half thought the toggle meant). I think the toggle name should be changed to something less confusing so it is not turned on by mistake thinking it means something else.
     
    Aeryk likes this.
  9. Balec Fares deCani

    Balec Fares deCani Avatar

    Messages:
    1,343
    Likes Received:
    4,015
    Trophy Points:
    125
    Gender:
    Male
    Matter or not, the question was what does it mean in English, which I attempted to answer. That being said, I couldn't tell you what my setting currently is. I remember seeing that and having no idea what it meant. I may have intentionally or accidentally clicked on it. Not that it matters :p

    Edit: (reading below)
    ...so it does matter?! :rolleyes:
     
    Last edited: May 9, 2017
  10. 2112Starman

    2112Starman Avatar

    Messages:
    3,613
    Likes Received:
    7,989
    Trophy Points:
    165
    That's kinda exaggerating just a lil bit. But, even so... beware what you click on in life right, you should know what you are doing before you agree to it. This isnt like a software agreement thats 20 pages long and needs a lawyer to read.
     
    Black Tortoise likes this.
  11. 2112Starman

    2112Starman Avatar

    Messages:
    3,613
    Likes Received:
    7,989
    Trophy Points:
    165
    "I remember seeing that and having no idea what it meant."

    I wouldn't suggest you try to use this argument in a court of law.

    Judge: "were you driving over the speed limit"
    You: "I remember seeing my odometer but I didn't know what the number meant".
    Judge: "Guilty"

    or even better:

    "I remember enabling the PvP flag and seeing it but didn't understand what it meant until some person stole everything I had while I sat there afk"
     
  12. Grimbone

    Grimbone Avatar

    Messages:
    575
    Likes Received:
    957
    Trophy Points:
    63
    Gender:
    Male
    Location:
    USA
    No exaggeration. This is exactly what my better half thought the toggle meant.
    Maybe it could have been explained better when it was 1st put in game so we could then make an intelligent decision to toggle or not to toggle?
     
    Last edited: May 9, 2017
    Aeryk and Balec Fares deCani like this.
  13. Grimbone

    Grimbone Avatar

    Messages:
    575
    Likes Received:
    957
    Trophy Points:
    63
    Gender:
    Male
    Location:
    USA
    If you didn't know what the number meant on your odometer you would not have your drivers license.
    If you been playing games for longer than a week you know the difference between pvp and pve.

    This toggle is different and can be confusing to some players. Now that it has been explained maybe the confusion will go away. Not everyone reads the forums tho so we will see. ;)
     
    Aeryk likes this.
  14. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    How are you trying to access it?
     
  15. 2112Starman

    2112Starman Avatar

    Messages:
    3,613
    Likes Received:
    7,989
    Trophy Points:
    165
    oh I agree, it should probably be in the options menu with a short dire warning if you check it (and even another confirmation warning).
     
  16. Balec Fares deCani

    Balec Fares deCani Avatar

    Messages:
    1,343
    Likes Received:
    4,015
    Trophy Points:
    125
    Gender:
    Male
    Posting a GET to http://www.shroudoftheavatar.com:9200 in Postman results in Could not get any response.

    Shouldn't we be able to put the endpoint address in a URL and get a basic response? That doesn't work either.
     
  17. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    Sorry it's not your normal endpoint, you can get a response with curl via
    Code:
    curl 'http://www.shroudoftheavatar.com:9200/*/'
    The other option would be to use my python examples linked in the original post.
     
  18. that_shawn_guy

    that_shawn_guy Bug Hunter

    Messages:
    1,409
    Likes Received:
    3,738
    Trophy Points:
    125
    Location:
    earth... mostly
    I'm getting a "403 Forbidden" when running the python examples.
     
  19. Undone

    Undone Trap Master Moderator SOTA Developer

    Messages:
    346
    Likes Received:
    848
    Trophy Points:
    43
    Can you provide the stack-trace? I just tried download_quick.py from my home machine (with no arguments) and had no issues.
     
  20. Violation Clauth

    Violation Clauth Avatar

    Messages:
    3,247
    Likes Received:
    7,594
    Trophy Points:
    165
    Gender:
    Male
    Nicely done team :)
     
Thread Status:
Not open for further replies.