Skip to content
This repository has been archived by the owner on Apr 7, 2020. It is now read-only.

Clean up the API #101

Open
ryanhugh opened this issue Sep 8, 2019 · 1 comment
Open

Clean up the API #101

ryanhugh opened this issue Sep 8, 2019 · 1 comment
Assignees

Comments

@ryanhugh
Copy link
Owner

ryanhugh commented Sep 8, 2019

Right now, we are SCPing up all these files to prod:

  • allTerms.json to load the data into elasticsearch
  • employeeDump.json to load the data into elasticsearch
  • all the files in public/getTermDump/ for the API
  • employees.json for the API

Would it be possible to load the data from either the first two files (or elasticsearch directly) when someone hits the API? This way we can avoid SCPing up a lot of duplicate files to the production server.

https://github.com/ryanhugh/searchneu/blob/master/docs/API.md

@dajinchu
Copy link
Contributor

dajinchu commented Oct 7, 2019

So I think ideally we add a /classes/:school/:termId/:subject/:classId endpoint and hit Elasticsearch (notice that the path is literally the classHash). So for example GET /classes/neu.edu/201930/CS/2500

Additionally, we could support collection URLs like GET /classes/neu.edu/201930 to return all Fall course data, and even GET /classes/neu.edu. All of these would hit Elasticsearch.To avoid bricking the server with these potentially massive payloads, we would probably paginate these queries.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants