0

I have a multisite and I’m able to use the rest api for posts/tags/etc for specific sites but I was wondering if there’s a away to get a list of sites on the network using the rest api?

something like this: REST API for Multisite but without a plugin?

1

There is no built-in endpoint for sites on a multisite network. As can be seen in the documentation, the built-in endpoints are:

+----------------+-------------------+
| Posts          | /wp/v2/posts      |
+----------------+-------------------+
| Post Revisions | /wp/v2/revisions  |
+----------------+-------------------+
| Categories     | /wp/v2/categories |
+----------------+-------------------+
| Tags           | /wp/v2/tags       |
+----------------+-------------------+
| Pages          | /wp/v2/pages      |
+----------------+-------------------+
| Comments       | /wp/v2/comments   |
+----------------+-------------------+
| Taxonomies     | /wp/v2/taxonomies |
+----------------+-------------------+
| Media          | /wp/v2/media      |
+----------------+-------------------+
| Users          | /wp/v2/users      |
+----------------+-------------------+
| Post Types     | /wp/v2/types      |
+----------------+-------------------+
| Post Statuses  | /wp/v2/statuses   |
+----------------+-------------------+
| Settings       | /wp/v2/settings   |
+----------------+-------------------+

Accessing sites via a REST API endpoint will require a plugin. Either one you'd write yourself, or one that's already available.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.