Official Content > News

Unleashing a HTTP-based API for the Soldat Lobby

<< < (4/8) > >>

machina:

--- Quote from: jrgp on April 19, 2017, 11:10:41 am ---Hmm soldat.pl shouldn't be redirecting directly to soldat.pl/pl/:

$ curl -I https://soldat.pl
HTTP/1.1 302 Found
Date: Wed, 19 Apr 2017 16:07:32 GMT
Location: https://soldat.pl/en/

--- End quote ---
I tested that using a browser (FF precisely) and it doesn't behave this way i.e. redirecting to /en. That's weird though as I had tested that also on Postman this time and it returned an English version. Maybe these are some browser cached language preferences but really dunno why ???


--- Quote from: jrgp on April 19, 2017, 11:10:41 am ---Sorting by players descending also makes sense for the site. Not sure about ingame because that way you might have really high ping servers at the top rather than ones that you'll be able to play on comfortably.

--- End quote ---
Well, if sorted by ping than you most likely get plenty of empty servers on the top.

Recently, players living in "weirder" locations of the globe have become a problem. They usually don't have servers located close enough to their place where players would attend frequently enough. This makes them join popular European servers but for the price of lags and ruining fun of other players. On the other hand I don't necessirly want to banish them for that as it is not entirely their fault.

jrgp:
Just added a wiki doc: https://wiki.soldat.pl/index.php/Lobby_HTTP_API

Also made the frontpage have a link to that instead of just showing 404: http://api.soldat.pl/

Also made the /players endpoints support Windows servers instead of just Linux ones. (line endings)

pewpew:
I'm getting a 403 forbidden code when I try to get a player list (with /players in url). :'(

Is this just for me or is it a problem with the API? Or maybe it's being worked on?  ???

machina:

--- Quote from: pewpew on November 04, 2017, 08:45:58 pm ---I'm getting a 403 forbidden code when I try to get a player list (with /players in url). :'(

Is this just for me or is it a problem with the API? Or maybe it's being worked on?  ???

--- End quote ---
I've just checked and I also encounter this problem. E.g.: http://api.soldat.pl/v0/server/45.76.84.88/23075/players -> 403

jrgp:

--- Quote from: pewpew on November 04, 2017, 08:45:58 pm ---I'm getting a 403 forbidden code when I try to get a player list (with /players in url). :'(

Is this just for me or is it a problem with the API? Or maybe it's being worked on?  ???

--- End quote ---


--- Quote from: machina on November 05, 2017, 03:06:06 pm ---
--- Quote from: pewpew on November 04, 2017, 08:45:58 pm ---I'm getting a 403 forbidden code when I try to get a player list (with /players in url). :'(

Is this just for me or is it a problem with the API? Or maybe it's being worked on?  ???

--- End quote ---
I've just checked and I also encounter this problem. E.g.: http://api.soldat.pl/v0/server/45.76.84.88/23075/players -> 403

--- End quote ---

Hey,

I blocked that endpoint due to it being a potential attack vector during the Soldat server attacks over the past few weeks. Technically it should not have been—as it will only hit the same soldat server once every 30 seconds due to caching—but I disabled it anyway.

I just removed the block so now the players endpoint will work. I will add the block back if it gets abused again.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version