You are on page 1of 2

Assignment 4

SQL and Postgres


11th August, 2023

Goals

1. Basic Goal
a. Instead of saving the user details in-memory, use postgres and ensure that the
API to create a User is working properly. This is in continuation with your old
assignment.
b. Everytime you make a call to news API (in any of your APIs), record the
endpoint, request, response and time taken in a database table.

2. Stretch Goal
a. Create an API to generate a report on New API endpoints and add as many
metrics as possible (average time taken, p99 time taken, number of calls etc.).
Use your imagination
b. Create an API over the table in 1(b) to return a bill for API usage. Assume each
API costs the following :

S.No. Cost (Rupees)

1 /v2/everything Rs. 10.50

2 /v2/top-headlines Rs. 5.50

3 /v2/top-headlines/sources Rs. 200.00

Expectation
1. You need to independently demonstrate all goals 1(a), 1(b), 2(a), 2(a) and 2(b).
2. Lab instructors will not be available to help you out in the assignment
3. Try to finish the assignment by 6:45 PM - 7:00 PM. An instructor will grade you post
that
4. If you are unable to finish some goals, demonstrate what you have done, rest you
can demonstrate tomorrow along with the assignment for tomorrow.
5. Please make sure your raise a pull request for the code that you are witting. You
instructors will check this.

You might also like