Quintic
WordPress & REST

REST (which stands for Representational State Transfer) is a standard architecture for transferring data between a Server and a Client, particularly Web Servers and Web Clients.

As a concept it has been around since 2000, and relatively quickly became main-stream. Certainly by 2005 it was being used throughout the Web Industry.

As a data transfer protocol it is not surprising that its predominance is in area the of data retrieval and data uploading, and in this arena it is typically paired with JSON, which is an system of serializing JavaScript objects.

WordPress core has had support for REST since 2015 in the form of the REST API. The REST API provides a mechanism whereby Themes, Plugins, Widgets can provide a REST I/F.

If your web-site, indeed any WordPress web-site has enabeld ‘Pretty Permlinks’ then the following url will elicit at list of the REST routes & endpoints presently supported by that site:

http://www.yourwebsite.com/wp-json

So, for example for this site, entering https://www.quintic.co.uk/wp-json in a browser will produce the following:

Don’t worry about what the content above means, only that it demonstrates that a JSON response was obtained. (As an aside, there is a LOT of content in the above. The > indicate a tree of data, and each > can be expanded to reveal more information. If you view the Page Source you will see just how much data has been transferred)

Q5-DVD

My sojourn into REST within WordPress was to produce a plugin that would provide information about DVDs. Basically, the idea is to allow users to enter a barcode, and the system would then retrieve details about the film (Title, Description, Cast, Year of Production, Genre.. ) on the DVD.

If the system does not recognise the barcode then the user can instead upload the DVD details along with the Barcode.

The whole thing is to be developed as a Plugin, which I have called Q5-DVD

Next ->