magerun2-list-api-endpoints V1.0.0
We have just released the first version of our magerun2 plugin "bitexpert/magerun2-list-api-endpoints". The plugin will print out a list of all defined webapi endpoints including their routes and defined resources. You are able to filter those routes by their respective HTTP method and name as well.
The preferred way of installing the plugin is through Composer. Simply add bitexpert/magerun2-list-api-endpoints as a dev dependency:
composer.phar require --dev bitexpert/magerun2-list-api-endpoints
Then you can invoke the api:list:endpoints command via magerun2:
magerun2 api:list:endpoints
This will print out all defined webapi endpoints. To only see routes for the HTTP GET method, invoke magerun2 like this:
magerun2 api:list:endpoints --method=get
The --method argument takes a comma-separated list of HTTP methods. That means listing all endpoints for the GET and POST methods works like this:
magerun2 api:list:endpoints --method=get,post
If you are looking for specific urls use the --route parameter. Whatever string you pass is matched against the defined route urls. To only see customers routes, invoke magerun2 like this:
magerun2 api:list:endpoints --route=customers
Of course, both filters can be combined. To show only customers routes for the HTTP GET method, invoke magerun2 like this:
magerun2 api:list:endpoints --route=customers --method=get
If you like this plugin, let us know. If you miss a feature, let us know as well or provide a pull request on GitHub.