nasa/cumulus-dashboard

Change the stats/count endpoint

Closed this issue · 3 comments

This url gets blocked by ublock origin for some reason. Probably a good idea to change it to something that doesn't get blocked.

screen shot 2017-04-13 at 7 45 46 pm

@mileswwatkins can you coordinate with @scisco to change the API and then change the dashboard url's for this endpoint, and confirm that it no longer gets blocked by the ad blocker)? Since you're in the same time zone, it'll be easier to coordinate.

The uBlock Origin debugger shows that it's an issue with the /count/?type= pattern. This is in the EasyPrivacy list, which is pretty common across ad-blockers.

screen shot 2017-04-17 at 08 44 49

Two options:

  1. Since there is always an implicit or explicit limit to our API calls at that endpoint, we could force all our requests' querystrings to start with an explicit ?limit=. This is the expedient solution.
  2. We could rename the stats/count endpoint to something less straightforward. I'm also fine with this, and it seems like it'd leave the Cumulus API with marginally fewer "gotchas" going forward.

Yeah I feel better about renaming stats/count, even though we'd probably end up with a worse url path. I had a quick talk with @scisco and it's very straightforward to do in the API, so y'all just need to coordinate when you make the switch and deploys (and also what the new path should be... stats/aggregate I think was my initial idea).