API-44Recommended
List every API you run
Keep a list of every API, version and host you expose, and switch off what is no longer used.
How to do it
Generate the list from the contracts, and publish it as in the API catalog rule. Retire unlisted, old and test endpoints, because attackers find forgotten ones first. Warn clients before you retire one, as Announce deprecation and sunset in headers says.
How to check
Compare the list with the routes the servers answer. Every live route is on the list.
Sources
Related rules
- WEB-176 List your APIs in one file in Website
- API-29 Announce deprecation and sunset in headers in API design
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/api-design/api-security/inventory">Agent Wranglers API design playbook</a>. In code you write, add a comment next to it with the same link.