There is no way of programmatically discovering REST services as they do not have a standard registry service.
Apart from doing something insane brute-force search there is no way of finding the right URLs ( not to mention the right parameters). So the only option is documenting your API. For that the best choice I have seen so far is:
- Swagger
- And people also like API Blueprint.
java - Is there a way to discover all endpoints of a REST API? - Stack Overflow
List of API endpoints?
Script to get all possible Rest endpoints
node.js - Loopback - get list of API endpoints via REST - Stack Overflow
There is no way of programmatically discovering REST services as they do not have a standard registry service.
Apart from doing something insane brute-force search there is no way of finding the right URLs ( not to mention the right parameters). So the only option is documenting your API. For that the best choice I have seen so far is:
- Swagger
- And people also like API Blueprint.
Some RESTful APIs publish a Web Application Description Language resource (WADL - pronounced like the walk that ducks do - for short). JAX-RS, or at least Jersy webapps will do this by default at the application root URL /application.wadl. It doesn't appear that Twitter's API is one of these. Many REST purists would argue that the API should be self describing and self discoverable simply by interacting with it and seeing what other endpoints it will give you.
More about WADL from wikipedia...
Anyone know of a script or robot that can take a rest API base and search for all possible end points via brute force? For example I tell it to go to abc.com/rest/api/3/ and it fetches all possible endings to that which could be either a GET or other method.
The LoopBack explorer uses Swagger JSON to generate the UI you see.
If you watch the XHR requests using your browser debugger, you can grab the direct URL to the raw Swagger. This data should contain what you need, though not in quite as concise a format as you probably want.
A bit late, but I found this really useful, you can export to many formats, for example to generate a documentation in html you can do
openapi-generator-cli generate -g html -i http://localhost:3000/openapi.json -o ./html
and you get a nice page wich has a section Table of Contents with the exact list what you are asking for.
There are many generators, you can check all in https://openapi-generator.tech/docs/generators/
For example there are for documentation, to make a client like angular, or a server like python-flask.