[wp-trac] [WordPress Trac] #39544: REST API: Improve users endpoint in multisite

WordPress Trac noreply at wordpress.org
Wed Apr 12 11:48:50 UTC 2017


#39544: REST API: Improve users endpoint in multisite
----------------------------+-----------------------------
 Reporter:  flixos90        |       Owner:
     Type:  task (blessed)  |      Status:  new
 Priority:  normal          |   Milestone:  Future Release
Component:  REST API        |     Version:
 Severity:  normal          |  Resolution:
 Keywords:  2nd-opinion     |     Focuses:  multisite
----------------------------+-----------------------------

Comment (by jnylen0):

 Quoting myself from ticket:40263#comment:2:

  By default (in the absence of a special parameter like `global=true`),
 the REST API should behave as though multisite does not exist, and clients
 should not have to care about it.

 To me this implies:

 1. We should not make this differentiation and instead handle support
 based on capabilities.
 2. It's fine if an API operation in "default, non-multisite" mode actually
 implies some behind-the-scenes global operations.  The important thing is
 that clients don't have to care about that, so I think '''creating''' a
 user via `POST /wp/v2/users` is fine.

 Addressing a couple of the other tricky points of creating a user:

 > I think it would be best if we had `POST wp/v2/users?global=true` for
 creating a global user _without_ adding them to a site

 This seems OK to me, but possibly with an extra parameter like
 `add_to_site=false` (the default behavior being to add the user to the
 site currently being operated on).

 > `POST wp/v2/users` to add a user to a site

 I'm not so sure about this bit, whether it's done by email address by a
 site administrator, or some other way (username) by a network
 administrator.

 These last couple of points seem closely related to how we will handle
 displaying and manipulating the list of sites of which a user is a member.
 I think fleshing out the rest of this will help clarify the best approach
 to your specific concerns, and it's probably OK to handle those tasks
 later on after some more basic things (other items in the list of
 requests/endpoints above).

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39544#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list