Jump to content

Adding back in call to get full data set


Recommended Posts

@nome & @JesseB_Klei 

Hello :) 
 

A couple of us (people in a Discord server) were doing some testing with the new API calls you've all updated.
 

ie: https://lobby-v2-us-east-1.klei.com/lobby/read

Previously we have been able to make a call like this 

{
  "__gameId": "DontStarveTogether",
  "__token": "{{KLEI_TOKEN}}"
}

and it would return the entire dataset. Now we are getting the following

    "Error": {
       "Code": "E_FAIL_BUSINESS_LOGIC"
    }


It looks like we have to pass in the __rowId in order to get any data. Is there no longer any support for getting back the whole dataset of a region? A number of us (people in a Discord group and others like resamvi) use this functionality and it would be nice to be able to continue to use it.

Alternatively, we'd have to call https://lobby-v2-cdn.klei.com/us-east-1-Steam.json.gz (and the other lobbies) and use the __rowId from the response and then call the authenticated URL to get the data (which would result in hundreds of api calls instead of 4 - one for each of the lobbies). This seems inefficient on both ends. Is it at all possible for Klei to return the entire dataset?

 

Link to comment
Share on other sites

  • Developer

@X-lem A design goal was to have undefined behaviour removed so full data exporting of the entire database with one API call is no longer here. Character pick rates seem to be the primary interest the other data like regions is tertiary information. Would there be other information that you are interested in?

Link to comment
Share on other sites

@JesseB_Klei (it's not letting me quote you for some reason)

Thank you for the response :)

> Would there be other information that you are interested in?

I personally use the following data that I can only get from the authenticated api call.

  1. steamclanid
  2. mods_info
  3. data (so I can get all the day information)
  4. players
  5. desc

 

Link to comment
Share on other sites

Hey @JesseB_Klei 
 

  I would just throw in what I was using from the old API for https://dst.resamvi.io/ and what's missing now.

"Users":    
"__addr":,    <--- used
"__lastPing":,    
"__rowId":,    
"allownewplayers":,    
"clanonly":,    
"clienthosted":,    
"clientmodsoff":,    
"connected":,    <--- used
"data":,    <--- used, missing (helps with how "old" the server is)
"dedicated":,    
"desc":,    
"fo":,    
"guid":,    
"host":,    
"intent":,    <--- used
"lanonly":,    
"maxconnections":,    
"mode":,    <--- used
"mods":,    <--- used
"mods_info":,    
"name":,    <--- used
"nat":,    
"password":,    
"platform":,    <--- used
"players":,    <--- used, missing (helps with getting the player name and what character is played)
"port":,    
"pvp":,    
"season":,    <--- used
"serverpaused":,    
"session":,    
"steamid":,    
"steamroom":,    
"tags":,    
"tick":,    
"v":,    
"worldgen":,

I was counting how many  GET request I would have to do to klei.com/lobby/read and it would amount to 18566. This for getting the missing players and data field produces an unfortunate amount of traffic I reckon.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...