 with all the many, many different things that you connect WordPress to. So third-party apps, microservices, and even physical, real-world things. Since WordPress, in its very nature, is already on the internet, a lot of the work has already been done in terms of connecting to other internet-related things. But there's a lot of really interesting use cases and things that before I did a little bit of research in this handle of thought of, especially due to the REST API. But before we jump into that specifically, just for the people who didn't put their hands up, I wanna do a quick introduction into what the REST API is. So WordPress, it's a software that actually powers the website, it's when you go online, when you log in at WP-Edmund, that's WordPress. Everything is generated using WordPress filters, code, all of those things. That's what we actually use to publish our content, right? Now REST API, API, in this context, just means the rules and the protocols that we use for different pieces of software to communicate. So any digital interaction that takes place is being possible through APIs. Usually, in this case, it's a RESTful API, which is kind of computer science-y term, about the specific type of API that it is. It's just one of the many architectures that an API can be set up. So altogether, the WordPress API, I think the plugin describes the best way, which is this plugin provides an easy use for the WordPress REST API, and grab your science data in simple JSON format, including users, posts, taxonomies, and more. So almost anything you can do, you can do with the REST API as well as the WordPress. So this is a quick example. This is the Bluehost blog, right? It's up right now, you can look at it, it's got some blog posts and things. So if I go to bluehost.com.blog, this is what I'm gonna see, right? Now if instead, I click over to the SEO category I'm gonna see all the pages with this. Now this is just what happens in a browser, right? So this is what I see. Okay, well if I was gonna do the same thing with the REST API, it would look more like this. The URL instead includes WPJson, WP version two, and then the rest of the URI specifies that I want posts and categories. In this case, the SEO category happens to be category number 10, and it returns a lot more information than this, but it returns the information in a format that's more easily digestible by other devices and other apps. So usually in terms of the REST API, it's not the end of what's happening, it's usually the first half, right? So anytime you're interacting with the REST API, usually it's the first half and then there's gonna be another piece, be that a client, an app, something else is gonna be digesting this, it's not the end all, but this is kind of what the data looks like and if nobody's ever tried it before, just go to that URL, just go to your website, if you've got a WordPress website, you can try it right now if you want and just add WPJson to the end of the URL on your website and you can see your browser will do a get request and it will come back and you'll see all of the endpoints that are available there. So starting in with posts. This endpoint here is just going to list of your posts, right? So that's gonna come back with meta about your posts, some of the content of them. If I want to specifically post number seven, right? Post ID, every post has an ID, right? So post ID number seven, I can do that. I can limit the number of results that come back, like oh, well, if you were gonna build out a widget, oh, I just want the three most recent posts. I can say per page equals three, right? Or I can run it to a specific category number. Everyone would have at least one where the one is the un-categorized category. So, and that's just posts. There's a lot of different things you can interact with. Just about anything that you can do with WordPress, you can interact that same way through this API. So I think you can post for visions, categories, tags, this list goes on and on. And each one of these endpoints has queries that you can add to it to change, manipulate, and filter to that. So if you want something specific. And the other thing that's interesting is the information goes two directions as well. So it's not just get requests, you can also update things, right? Some things would require authentication, but if I wanted to update a user, right? I can send a post request to the user endpoint and specify which user, specify where I want to update, specify the new information, all right? So the API exposes a simple yet powerful interface to WP query, the post API, and many more. Chances are if you can do it with WordPress, you can do it with the API. So now that we know what the API is, everyone's on the same page. These are some of the really cool things that you can do with it. And before we start in with that too, I want to point out that these are all real world examples. A lot of times when we're talking about internet and things and some of these emerging technologies that exist, there's a lot of speculative information and above. You'll see a lot of, I don't want to call it clickbait, but you'll see a lot of articles that are, okay here are the things that might come out of the internet and the things. Who are the things that might come out of AI or some of these things? Okay, so today we're only going to be talking about examples that currently right now exist in the real world. So 100% future predicting accuracy because these things don't really exist. We already know they're here, right? So we'll start out with wire.com. They're doing some interesting things. For one, they're sending the info out, right? So things like Apple News, which is an app that's built in JavaScript, they're sharing the information from wire.com to Apple News, right? And anyone can actually do that. They do get approved for plug-in. And what the plug-in will actually do is it will extend the WordPress API such that those, the endpoints that are expected by Apple News will exist and it's formatted in just the right way, right? So anyone can do that with this plug-in. You have to go through a approval process and everything like that. But that's one of the ways they're doing this. Another thing that's kind of interesting that I found is I thought I would recommend using ad blockers, but if you do, if you block some of the ads on their page, they will actually replace those ads with more content from their site, right? If the ads don't load for whatever reason, they will be replaced with more wire.com articles. Those articles are called in using JavaScript outlets that are using the REST API. So it's a really interesting fallback where it says, hey, try to load these ads and if it can't load, fall back to this information, right? So it's a really useful way that you could say something and you could do this to your own site, right? If it was built into your theme, you could say, hey, try to load this. If it doesn't load, make a little widget that pulls the latest three categories from in the news or whatever it is, the latest three posts from this category or this tag or whatever it is that you're trying to do. So another fun one is the New York Times. They had about at a certain point when they started there, one of the early adopters of WordPress at least at scale at different points in time, they had 80 different blogs on their namespace and it's kind of interesting too because they were one of the first people to be using WordPress as kind of an application layer for multiple things that were not a traditional, you know, land stack install. So one of the things that they did is in preparation for the 2014 midterm elections, they had things called live blogs. They still do this, right? But getting ready for this, they found that a lot of people, especially with elections and stuff, they want up to the minute this whole thing on and off things are happening because 10 minutes from now there could be some scandal that totally changes things or whatever. So people are constantly repressing and people are constantly looking. They wanted to build something out where you could just stay on the page, you could just leave it out all day, right? And they add a cycle through or whatever they're doing a cycle through but as new content would come in, it would automatically be added to the page, right? So that started using a version of the REST API. It's not exactly the same thing that's built into core now but had used a version of, you know, kind of a rudimentary version of the WordPress REST API to pull in that content so that as new stuff came out, it would just appear on the page and that's when they started doing things like their first draft blogs and their other live blogs in preparation for this or as much as possible because of this technology. So there's a really cool WordCamp talk on WordPress.tv, if you just search for the New York Times, you'll find it where they talk about all of the different ways that they've used, not just the REST API, but kind of a history of how the New York Times has, through a very complicated code base, evolved to use WordPress in kind of clouded ways. Another kind of interesting one that I found is the StoryCorp mobile app. So this is a website where anyone can share their stories online, but they needed something where the editing experience would be really easy and maintainable but it would scale to iOS devices and it would scale to Android apps and all of those things. So people could easily share their stories from their cell phones. That content gets synced up to WordPress on the backend and then the content is published on the website and people can get to it from their phone with these native apps they built using the REST API. This is an interesting project as well. npf.js.org, they actually use the REST API for security reasons. They wanted a secure way to deliver content to different areas of the webpage without having to access IP addresses that weren't white listed. And so this actually uses the REST API to populate the content on their website with a theme that doesn't load in the traditional way. The normal way, the traditional way I should say, the WordPress works in serving front of content is stuff is built on the backend and then PHP parses things and then outputs HTML and then HTML is shown in your browser. And WordPress does that from start to finish. There's some sort of web browser or web server rather that runs the PHP and then everything all the way through until the requests that are on your browser. Another different approach that you can take using the REST API is to have a native JavaScript app that uses these endpoints that are delivering just the REST API stuff. So you're returning back just the information about what's on the page, just the meta, those things and the app builds the page client side using those endpoints in JavaScript. That's only possible because of the REST API. Men, Muslim Engagement Development is a non-profit organization. They wanted an iOS app that would allow different users to comment and they had all kinds of different requirements for this project. It was actually a really interesting one because they needed something where the app would be able to look at where they were and pull in content based on that. And so what they did is all of their analytics and all of the location data is done on the app itself. And then based on that, the app then queries WordPress and says, hey, show me stuff that's relative to somebody from here, right? And so WordPress itself has no knowledge of where the user is, right? The app figures that out. And then the app is able to query WordPress returns whatever information is needed. And then all of this is made possible because of those two separated layers. So, and which, by the way, if there was a question that I actually got asked earlier by one of the attendees about this, saying how could we integrate something like Google Analytics or whatever that or something like that, some sort of tracking in place. Usually anything like that is going to be on the client side of things, right? Because whenever you're using the REST API there has to be at least the two layers, right? There's the client side of things that's actually building the content, using the content in some way. And then there's the REST API side which is saying what the content took to a session. That is going to be probably done on the client. So as I'm looking at all of these, a question that is often asked, especially by people who have not managed their camps, is what can happen to you in WordPress in these scenarios, right? When there's tons of ad builders out there, there's tons of things that you can do. There's a tons of CMSs in fact that already interact really well with things like Node and others. So, there's a lot of answers to this question. And I think anyone in this room that uses WordPress can probably answer a piece of.