#API Changes
1 messages · Page 1 of 1 (latest)
maybe it'd be cool to add the raid info from /api/database/guild to the /api/guild/ shit
these are good suggestions!
i'd be down to add them the next time i work on the api
(i have free time in june, in case i don't get to it in may)
having a whole separate endpoint for guild stuff was only supposed to be during testing phase, and then i forgot to merge things to a single endpoint 😂
(did that bc data was stored on multiple machines but i agree with you on having things in one place!)
happens
also @tender ocean, is the ratelimit shown in the docs accurate? keep-alive header suggests its 100 ratelimit
for which endpoint?
just checked the backend, technically it's 3/sec, yielding a net total of 180 per min
so perhaps you did a burst of request in the interval of a sec and only 3 went through? it depends on how your request is set up
other than that, there could be something funky with the load balancers i set up last month (for the web game that was deployed), im not sure if that's related tho, need to investigate further
i dont think i've hit ratelimits, was just manually looking, as I'd like to ratelimit myself to not get ratelimited by the api
mmm i see
about half of those endpoints are actually rated by second, with exceptions like get item is 300/min
if anything i'd like to get keep-alive or another header to reflect the current ratelimit remaining, and also x/min makes much more sense than /second
its the same thing at the end of the day, but limiting myself is easier when i have a bigger number to work with
that's fair, I don't remember the exact reason they were made in /s instead of /min. if i had to guess, it was designed to protect backend's stability and latency, for some endpoints there were an absurd amount of requests in burst, but guild wasn't one of them.
that's a valid point, i can make those endpoints for querying stats /min based, if that makes your life easier.
noted that down
yeah I can assume that sending 180 requests in a 10s interval would be a bit hard to process
haha, if it's just 180 in 10s it should be okay, but at one point i was getting a couple thousands in a split second
mostly for item-related stuff
could be yeah, the api is fully public so i rlly don't block anyone unless its malicious.
i've seen someone's in-game macro would scan pages of items in their bank/market and request item analysis via nori in bulk
anyway, let's keep this thread open, I am hoping to get to these in the next month or so, after the crowdsourcing mod's server handling is full integrated i would say.
rawfish69#0: api things - merge guild info, add uuid to players, add guild uuid query, change rate limit to /min based. <t:1748458329:R>
also i just noticed, this isnt a big thing but multiple responses is getting killed
id assume its also happening on other endpoints
back to back, im seemingly getting a http code 200 for a server error, which is odd because when I request the same url that its failing on in my browser it works normally
2025-05-01 20:58:51 - INFO - discord: https://nori.fish/api/player/e4b79fc5-a5f3-4fa5-a7e4-667167473d63,
2025-05-01 20:58:52 - WARNING - discord: True
2025-05-01 20:58:52 - WARNING - discord: <Response [200]>
2025-05-01 20:58:52 - INFO - discord: {'error': {'msg': 'Expecting value', 'doc': '\n<!doctype html>\n<html lang="en">\n<head>\n <title>Server Error (500)</title>\n</head>\n<body>\n <h1>Server Error (500)</h1><p></p>\n</body>\n</html>\n', 'pos': 1, 'lineno': 2, 'colno': 1, 'response': None, 'request': None}}
the prints in question just being
url, arbitrary boleen based on response code, request, then request.json()
oh what
that's weird
I could take a look over the weekend, still a bit occupied as of now, thanks for letting me know.
okay disregard this.
it seems i had a misplaced comma.
though it still shouildve repsponded 500
@tender ocean api things - merge guild info, add uuid to players, add guild uuid query, change rate limit to /min based.
@tender oceanthoughts on this og
oh hey soz it's been a while, haven't really touched nori in a hot minute
been on vacation and other stuff after a big project
rawfish69#0: [Backend] revisit api changes <t:1751098588:R>
allg dw
just happened to start trying to optimize my api usage and rethought about this
yeah fair, the thing is that once I changed endpoint stuff things may break for existing apps, so those would need to be handled as well
it shouldnt be toooo bad, just changing from x/s to x/m, the header will require existing apps to adapt to though
and the bad 200 requests
@tender ocean [Backend] revisit api changes
ohh that
I was talking about the guild endpoint merge haha, if it's not desperately needed I'd rather leave it as is for now. We are trying to get an endpoint for market stuff at one point so that comes first
The rate limiting I'll take care of tonight very soon (currently out atm, will be home tmrw nite)
Oh I forgot about endpoint merging
that one might break a few things
very possibly
Hey @static lion, I added some changes to the throttling rules - for the database/guild endpoint rate limit is raised to 300/m, instead of 3/s, the same applies for all leaderboard endpoints (player, profession, and guild) as well as server uptime. (not sure who needs uptime 300 times a min..)
however player and guild endpoint are reduced to 90/m (due to poor optimization atm), you may want to use official player/guild endpoint as fallback in case the limit is hit.
sry for the massive delay to this smol change i have not been touching wynn related stuff at all for months
goated, will there be a header signifying the ratelimit remaining?
not as of now, could be something in the future work. the number 1 priority rn is to get the Crowdsourcing mod with the whole workflow going so pool and market data can be collected easily
not time sensitive at all, just adding this because uuid is better than prefix searching, but guild uuid searching is a goated add
also a bit of 500's on guild endpoint, doesnt seem to be on player endpoint atleast I havent ran into it
happened a few times in the past hour
does it happen around a specific time, if it's just a minute or so out of the hour, it could be you guys requesting /guild while database/guild runs the bulk fetch and update (from official wynn), smth could have gone wrong, i will have to check that part. i thought lowering the rate would reduce that tbh
tho the db runs on a separate pool of IPs
yeah knowing the timestamp and if there's a pattern would help
i run a bunch of jank on my server so one of the apps could have spiked the resources or smth
times dont look out of the ordinary
though i guess they are usually more torwards the end of the minute
hmmm idk tbh will have to dig a bit deeper