cmu-db / dbdb.io

The On-line Database of Databases
https://dbdb.io
Apache License 2.0
492 stars 39 forks source link

REST API #62

Open jessicamrbr opened 5 years ago

jessicamrbr commented 5 years ago

I would like to access the full list of banks and information to try creates a comparative tool.

Do you make this data available in any way?

apavlo commented 5 years ago

What do you mean by "full list of banks"?

jessicamrbr commented 5 years ago

In the repository, initial data is available at:

dbdb.io/data/initial_data/

Would it be possible to access all current data?

apavlo commented 5 years ago

Let me see about adding a REST API.

apavlo commented 4 years ago

I started looking into adding djangorestframework but it as a bit more complex than what I had time for. The REST API should be strictly read-only:

https://github.com/cmu-db/dbdb.io/commit/1c4738dec906f932583fb2b85665ee8b9d0e46a9

pembo13 commented 4 years ago

@apavlo what data would you like exposed in the API? Based on this thread, it looks like you only want it to be read-only. Should it only be accessible to users with accounts?

apavlo commented 4 years ago

@pembo13 Yes, it should be read-only. The REST API can be open to the public.

pembo13 commented 4 years ago

@apavlo which models (data) do you want exposed? For example, I'm guessing System but not SystemVisit

apavlo commented 4 years ago

It should just be System.

pembo13 commented 4 years ago

@apavlo please take a look at the demo, I'd like to know if you'd like me to add more fields, for example, the meta data: http://dbdb.devpreviews.com/api/v202004/systems

I do have a few questions:

  1. Should the API limited to users only?
  2. If limited to users only, should I allow them to generate an API key?
  3. I've put in throttling to limit to 4 requests per second

The code is in this branch if you'd like to review: https://github.com/cmu-db/dbdb.io/tree/issue_62

pembo13 commented 4 years ago

Fixed the Travis build in this branch as well.