API IMPLEMENTATION
API IMPLEMENTATION
This API not only simplifies the process of utilizing the machine learning
model but also enhances data management by recording and storing the
results in a structured and accessible database. Moreover, the adaptability of
this API to different communication protocols makes it a versatile tool for a
wide range of applications and clients.
API ENDPOINTS
API Endpoints serve as the gateways to an application's functionality and
data. These endpoints are essential for interacting with our API, and they are
configured to handle POST requests, making it seamless for various
interfaces and systems to utilize our SMS message classification service. In
our API, we have defined the following endpoints:
1. '/predict' (POST): This endpoint facilitates the connection of web page
forms to our API function using the HTTP POST method. It is linked to
our model, enabling the detection of whether an SMS message is
"smishing" or "legitimate". The figure below shows the code of page
post method and the endpoint of the API:
Figure 1 Shows the URL for the API Endpoint in the web page form