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.
Hello,
I think it will be easiest if I start with an example. There is a car rental website where you can search for and book a rental. You put the dates in and the page will look for availability and prices. The provider of that website does not seem to publish its API details anywhere.
My understanding of how web apps work is that once I fill in all my criteria my browser then makes a call to the backend servers to fetch the results which it will then present to me.
If that is the case is it possible to use my browser debug/developer windows and check the communication that the browser is performing and capture the API call that it's running to the backed so that I could reuse it in a script that I would like to create?
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...
Programmatic way to get all API endpoints for my instance?
Script to get all possible Rest endpoints
web application - How I can enumerate all endpoints of an API? - Information Security Stack Exchange
Where to do I find the endpoint URL?
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.