Extending REST API

Now that you are comfortable with the default working of the default routes and methods, let’s discover how to add new data to the REST API or enhance and manipulate existing response objects in the Extending the REST API section.

Explore these videos for insights and tutorials on Extending REST API. This section comprises 6 modules with a combined duration of approximately 45 minutes.

Video ContentTime
Pt 1: Modifying the Response8:19
Pt 2: Modifying the Response8:53
Embedding Links7:36
register_rest_field()5:39
Adding Custom Endpoints9:36
More on Extending REST API04:57

Explore the videos for insights and tutorials on REST API Authentication. This section comprises 4 modules with a combined duration of approximately 20 minutes.

Video ContentTime
Introduction to Application Passwords3:51
Creating Posts Using REST API5:28
Updating & Deleting using REST API5:16
How WordPress Authenticates Requests5:43

Ideas to Explore:

  • What does WordPress use to make extenal API request? (Which library is used)
  • Can you change the REST base from wp-json to something else? If yes, what happens if you have hard-coded wp-json in the URLs?
  • How do you make internal (same website) REST calls in WordPress?
  • What is JSONP? Is it enabled in WP by default? If not, how do you enable it?

References