Using Server Web Page



  • I've been poking around on the Web Portal page for a personal server. Is there a way for me to filter the graphs by individual players? Or is it just "humans" as a whole? For example, is there a way for me to see how many skills player X has learned in a period of time?


  • Dev Tier

    Hi,

    I'm not sure if you can do this with the pre-made graphs in the web interface. What you can do is can use the Eco API to do what you want.

    They do seem to work on a fresh local server just fine but return a value of 0 on my hosted server but it probably just has to be wiped.

    One thing you could try is just getting the playerstats, for example: http://SERVER_IP:PORT/api/v1/analysis/playerstats/USERNAME?startDay=7&endDay=14

    You will get a JSON encoded response back containing a list of the specified player's stats and one of those is Learn Skill which will say something like "Summary": "learned 78 skill points".

    That might not be exactly what you're looking for. If you want individual skills you can query them with the dataset/get API operation by sending a JSON encoded dataset like so:
    ["Humans","USERNAME","Learn Skill", "Surivalist"]
    OR
    ["Humans","USERNAME","Learn Skill", "Surivalist","Basic Crafting"]

    To view the API documentation you can go to http://SERVER_IP:PORT/swagger



  • Excellent, thank you. I"ll put together a GUI for this. Looking forward to spending some time with the API.



  • Is there documentation on the API for the Server Web Page somewhere? If not, could you point me to the services files and I can puzzle them out from there?

    Thanks



  • @vandermore said:

    Is there documentation on the API for the Server Web Page somewhere? If not, could you point me to the services files and I can puzzle them out from there?

    Thanks

    https://gyazo.com/d013bd3f64b231149e60c95aca444420

    To view the API do the following:

    1. Start a client(windows) on your machine and press new.Once the server has load up the world, tab out or set the game to windowed mode, and then tab out.

    2. Then go to your browser and paste in http://127.0.0.1:3001/swagger/ui/index#/



  • Thank you!



  • @vandermore Welcome! :)