Intelligent threat detection and prevention in REST APIs using machine learning

Sohail, Muhammad (2025) Intelligent threat detection and prevention in REST APIs using machine learning. International Journal of Science and Research Archive, 15 (2). 012-027. ISSN 2582-8185

[thumbnail of IJSRA-2025-1281.pdf] Article PDF
IJSRA-2025-1281.pdf - Published Version
Available under License Creative Commons Attribution Non-commercial Share Alike.

Download ( 617kB)

Abstract

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.

Item Type: Article
Official URL: https://doi.org/10.30574/ijsra.2025.15.2.1281
Uncontrolled Keywords: Anomaly Detection; API Security; Machine Learning; REST APIs; Threat Prevention
Depositing User: Editor IJSRA
Date Deposited: 22 Jul 2025 23:39
Related URLs:
URI: https://eprint.scholarsrepository.com/id/eprint/1736