Open
Description
💡 Summary
Replace the existing TSQL function with a new REST endpoint that does the same thing
Specifically: Convert "insert_shodan_data()" TSQL query to an API endpoint
Motivation and context
There are two major reasons to use endpoints in place of sql queries.
- Replace the need to know t-sql
- Off load data aggregation to fastapi parallel workers
Implementation notes
- Gather existing queries from code.
- Create new endpoints at fastapi.
- Secure new endpoints in same fashion as existing endpoint.
Acceptance criteria
- home/models.py model created
- dataAPI/schemas.py schema created
- dataAPI/views.py functions created
- dataAPI/tasks.py function created (if applicable)
- Verified endpoint is working
- pushed to api extended/staging branch