[wp-trac] [WordPress Trac] #40365: Introduce a REST API endpoint for sites

WordPress Trac noreply at wordpress.org
Wed Apr 5 00:18:19 UTC 2017


#40365: Introduce a REST API endpoint for sites
-------------------------+-------------------------------------------------
 Reporter:  jeremyfelt   |      Owner:
     Type:  task         |     Status:  new
  (blessed)              |  Milestone:  Future Release
 Priority:  normal       |    Version:
Component:  Networks     |   Keywords:  needs-patch dev-feedback needs-
  and Sites              |  unit-tests
 Severity:  normal       |
  Focuses:  multisite,   |
  rest-api               |
-------------------------+-------------------------------------------------
 It should be possible to manage sites in a multisite configuration through
 the REST API.

 * List sites: `GET wp/v2/sites/`
 * Retrieve a site: `GET wp/v2/sites/<id>`
 * Create a site: `POST wp/v2/sites/`
 * Update a site: `PUT wp/v2/sites/<id>`
 * Delete a site: `DELETE wp/v2/sites/<id>`

 Data included in a site object should at least mirror the data available
 for the site in `wp_blogs`. Additional ideal pieces of data for a site
 include `blogname`, `blogdescription`, `home`, and `siteurl`. It's
 possible that creating a new meta table for sites can help developers
 register meta for inclusion with a site object (See #37923).

 Sites should be accessible by default for authenticated users only.
 Network (global) admins should have access to all sites. Site users should
 have access to the sites they are members of. The "My Sites" list is a
 great candidate for exploring how this will work. See #15317.

 As of the introduction of `get_sites()` in 4.6.0, retrieving sites is a
 much better experience. The methods used to create, update, and delete
 sites in multisite are not as pleasant right now. We should investigate
 each of these and determine what can be done to streamline the process.
 The first improvement is probably in creating a site. See #40364.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/40365>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list