hngprojects / hng_boilerplate_python_fastapi_web

Apache License 2.0
154 stars 137 forks source link

feat: implement status page endpoints #953

Closed JoshuaOloton closed 3 weeks ago

JoshuaOloton commented 3 weeks ago

Description

This pull request implements a backend API for the API Status Page. It includes endpoints to update and retrieve API status information, a database model to store the data, and a script to parse and post results from Newman test runs. ​

Related Issue (Link to issue ticket)

952

Motivation and Context

This change is required to create a robust backend system that can efficiently process, store, and serve API health data. It solves the problem of real-time monitoring and displaying the health of various API groups, enabling automatic updates every 15 minutes on all projects and boilerplates. ​

How Has This Been Tested?

Unit tests were written and carried out on the GET and POST endpoints using the Pytest library

Screenshots (if appropriate - Postman, etc):

SWAGGER UI

image

FETCH SUCCESSFUL

image

POST SUCCESSFUL

image

RUNNING PYTHON SCRIPT TO PARSE NEWMAN JSON AND POST TO ENDPOINT

image

Types of changes

Checklist: