The WordPress REST API is more than just a set of default routes.But you want to add your Custom Endpoints/routes to the WP REST API ? Fantastic! Let’ …
The WordPress REST API is more than just a set of default routes.But you want to add your Custom Endpoints/routes to the WP REST API ? Fantastic! Let’s get started with this plugin.
✅ Make a API in one second only
✅ API authentication with secret key
✅ Deactivate secret key incase
✅ Create Endpoint Url In 2 Seconds
✅ Capture Api Request/Response Log into system
✅ Creating Recent Activity
✅ Auto Deleteting Log by the system
☛ You probably understand we requires lots of hours of work to make a plugins and technical supports, So if you like this plugin, you can buy me an Ice-Cream here – http://wcra.gmnckkp.in/
OR,
Directly here – paypal.me/dipoo7
☛ Firstly a Secret Key is needed to call the Custom Endpoints URL, However Admin can create ‘New Secret Key’ on plugin interface in the backend. After creating a new access, the plugin will be providing a SECRET KEY, which will be needed on requests. By default, the plugin will be providing a ROOT SECRET KEY. You can see those in ‘Endpoint URLs’ tab.
☛ Now coming to the Custom Endpoints URLs.This plugin provides an easy or simple way to create a Custom Endpoints/route by just one click. When You are creating an endpoint, this plugin register that ROUTE automatically with parameters(request) defined by the users in ‘Endpoint URLs’ Tab and the plugin builds an endpoint instantly. If you hit that endpoint URL, you will get a ‘Connection OK’ response instantly.That Means your endpoint uRL/Route is ready.
☛ Now one question could appear in your mind that what’s need to create a Custom Endpoints URL, though I need to write my own custom code to make a API .
Yes, the answer is you could make a API in very less time with the Endpoint URLs, however you do not need to write/handle the API, you just hang your own code in the filter hook, provided by this plugin, once you have created an endpoint, and enjoy the response. You can find that in Endpoint Listing panel. After defining the FILTER hook in any function page, you will be started receiving all request parameters and make functioning your API and return your output.
☛ This plugin exposes a simple yet easy interface to all settings. Users can control settings from the settings panel.
☛ One of the most features of this plugin is that it records all requests/responses and create a log, if it is TURN ON in the settings panel.Also, the plugin will remove/delete previously captured log VIA CRON, if CRON is enabled in the settings panel. The users can select their desired options to delete log in the settings panel. Please note WordPress CRON is not a real-time auto job, it could be a delay.
☛ There is a Recent activity tab in the admin panel. All recent actions will be recorded by this plugin and the activity would be recorded for maximum last 6 days. Admin can change the number of days from the settings panel.
wp-custom-rest-api.zip
to the /wp-content/plugins/
directoryBasically, Endpoint URL is an API URL, Anyone can send a request to the server with that URL and will get a response from the server after processing the requests. However, Custom Endpoint is user defined in this plugin.
IN the description it has already mentioned, that after registering an endpoint in the backend, you will see an ‘INFO’ icon on ‘Filter Hook’ Column in Endpoint Listing. If you click on that icon, you will be prompted with a CODE snippet. Hence if you put that code in your any function PHP file, you will see a ‘$param’ variable is passing through that callback function. And that variable holding all request parameters.
If you put that code snippet and return your OBJECT/ARRAY/ STRING, then this plugin will return a JSON array and your ‘returned value’ will be on the DATA object.
For that this plugin providing you an option ‘CRON’, if you put those settings ON, the system will delete the previous log as you saved settings.For e.g.: if you set this ‘CRON will run on (Recurrence)’ to ‘Once Daily’, then the CRON job will run once in a day.
And if you set ‘Delete Log’ to ‘7 Days Before’, then it will delete all log from the very first to the last seven days.
Please find the link here: https://developer.wordpress.org/plugins/cron/
if you turn it on, all custom endpoints need no authentication, without secret key, it will be working.
Namespaces are the slugs in the URL before the endpoint. For e.g.: if your endpoint URL is ‘www.domain.com/wp-json/wpapi/v1/myapp/’.
Then ‘wpapi’ is your NAMESPACE. and it would remain the same on all the endpoint URL.
No, only that particular endpoints will be not working or would be invalid.
To generate a secret key, the plugin needs a user. For that, we used the only name and email.