Department of Computer Science, Shaheed Zulfikar Ali Bhutto Institute of Science and Technology, Dubai Campus, UAE.
International Journal of Science and Research Archive, 2025, 15(02), 012-027
Article DOI: 10.30574/ijsra.2025.15.2.1281
Received on 22 March 2025; revised on 27 April 2025; accepted on 30 April 2025
With the increasing adoption of RESTful APIs as the backbone of modern web and mobile applications, ensuring their security has become a critical concern. Traditional security mechanisms such as rule-based firewalls and static rate-limiting policies are often ineffective against sophisticated, evolving threats like zero-day attacks, automated bot traffic, and API abuse patterns.
This research proposes an intelligent, machine learning-based framework to detect and prevent malicious activity in REST API traffic. The approach involves collecting and preprocessing real-time API request logs to extract behavioural and contextual features. Supervised and unsupervised machine learning models such as isolation forests, LSTM-based anomaly detectors, and decision trees are evaluated for their effectiveness in detecting anomalies, injection attacks, and abnormal usage behavior.
Furthermore, the study incorporates reinforcement learning to dynamically adjust security policies (e.g., rate limits, IP bans) in response to detected threats without impacting legitimate users. A proof-of-concept prototype will be developed and deployed in a controlled environment to evaluate performance in terms of detection accuracy, false positive rates, and system latency.
The outcome of this research aims to advance the state-of-the-art in API security by introducing adaptive, self-learning mechanisms capable of protecting APIs from modern security threats while maintaining usability and performance.
Anomaly Detection; API Security; Machine Learning; REST APIs; Threat Prevention
Preview Article PDF
Muhammad Sohail. Intelligent threat detection and prevention in REST APIs using machine learning. International Journal of Science and Research Archive, 2025, 15(02), 012-027. Article DOI: https://doi.org/10.30574/ijsra.2025.15.2.1281.
Copyright © 2025 Author(s) retain the copyright of this article. This article is published under the terms of the Creative Commons Attribution Liscense 4.0







