Contributors: brettkrueger, umajeric, amydinsyahira
Tags: json, api, multisite
Requires at least: 5.1
Requires PHP: 7.0
Tested up to: 6.5.5
Stable tag: v1.3.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
This plugin provides several endpoints for creating, listing, updating, and deleting WordPress multisites. It aims to make headless WordPress multisite environments not only possible, but practical.
You can install this using all the usual methods. The only difference is that this plugin must be network activated.
multisite-rest-api.zip
from your computermultisite-rest-api.zip
multisite-rest-api
directory to your computermultisite-rest-api
directory to the /wp-content/plugins/
directoryUpgrades are pushed through WordPress.org.
All endpoints require authentication from an existing WordPress user. We suggest using JWT through something like simple-jwt-login.
curl -X GET /wp-json/wp/v2/sites -H "Authorization: JWT_TOKEN"
curl -X GET /wp-json/wp/v2/sites/13 -H "Authorization: JWT_TOKEN"
curl -X POST /wp-json/wp/v2/sites/create\?domain\=DOMAIN\&path\=PATH\&title\=TITLE\&email\=EMAIL\&password\=PASSWORD -H "Authorization: JWT_TOKEN"
curl -X PUT /wp-json/wp/v2/sites/update\?blog_id=13&\domain\=testing13.domain.local\&admin_email\=testing13@domain.local\&title\=TESTING_13 -H "Authorization: JWT_TOKEN"
curl -X DELETE /wp-json/wp/v2/sites/delete\?blog_id\=13 -H "Authorization: JWT_TOKEN"
curl -X DELETE /wp-json/wp/v2/sites/delete/13 -H "Authorization: JWT_TOKEN"
curl -X PATCH /wp-json/wp/v2/sites/assign\?blog_id\=13 -H "Authorization: JWT_TOKEN"
curl -X PATCH /wp-json/wp/v2/sites/assign\?user_id=3&\?blog_id\=13 -H "Authorization: JWT_TOKEN"