checkifcovid / api-app

The API provides an interface to interact with the CheckIfCovid data sets.
https://checkifcovid.com
0 stars 1 forks source link

Decide on the endpoints structure #10

Closed iwoork closed 4 years ago

iwoork commented 4 years ago

Here's my proposal for the endpoints:

Option 1: Separate a Report and Probability endpoints

Option 2: Combine Report and Probability as one endpoint

rashnil-git commented 4 years ago

Option 1 was what I had in my architecture diagram. I prefer one as it makes the api lightweight and asynchronous. Client can just push the data and api can work on storing that. Otherwise if there are DB related issues, it will delay the stats response as well. client can make asynchronous calls to api endpoints and get the results back from probability endpoint.

rashnil-git commented 4 years ago

Also it will allow us to have different configurations for different types of workload and use cases.

iwoork commented 4 years ago

Let's go for Option 1. I guess call it 'Assess' or 'Probability' makes more sense?

POST /assess

rashnil-git commented 4 years ago

How about:

Endpoint 1 for submission:

POST /survey

Endpoint 2 for probability:

POST /stats?

iwoork commented 4 years ago

Sounds good. Let's do that.

rashnil-git commented 4 years ago

I have added tickets in project board. I will have them ready by this weekend.

rashnil-git commented 4 years ago

End Points created.

/stats : https://github.com/findthecluster/api-app/issues/12

rashnil-git commented 4 years ago

/survey endpoint : https://github.com/findthecluster/api-app/issues/11

rashnil-git commented 4 years ago

Wiki Page : https://github.com/findthecluster/api-app/wiki