Analyzing Status Code Misuses in REST API Specifications
Many web APIs rely on the REST architectural style, exploiting HTTP for client-server interactions. Clients typically interpret server responses using status codes, such as 200 OK (success) or 404 Not Found (unavailable resource). As REST does not enforce HTTP standards, servers may misuse status codes (e.g., using 500 for a client error instead of 4xx). Such misuses cause false positives during testing and confuse clients. In this paper, we explore the prevalence of status code misuses in REST APIs. We introduce SCOAS, a tool that detects status code misuses in OpenAPI specifications using 24 rules derived from HTTP standards. We demonstrate that status code misuses are systematic in REST APIs, with 17,767 rule violations detected across 60 specifications. We further discuss their implications and provide recommendations for testers and clients.
Authors
- Gilles Perrouin (ORCID: https://orcid.org/0000-0002-8431-0377)
- Mike Papadakis (ORCID: https://orcid.org/0000-0003-1852-2547)
- Alix; id_orcid 0009-0007-2641-5983 Decrop
Publication Details
- Journal
- Repository of the University of Namur
- Published
- 2026-04-15
- Primary Topic
- Software Testing and Debugging Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.00