Skip to content
This repository was archived by the owner on Sep 24, 2018. It is now read-only.
This repository was archived by the owner on Sep 24, 2018. It is now read-only.

Add roles param for GET /wp/v2/users #386

Description

@kadamwhite

I can get all users for a single role fairly easily, via the filter query parameter:

/wp-json/users?filter[role]=contributor

However, filter[role] doesn't seem to support the comma syntax that I can use in other commands:

// Doesn't work:
/wp-json/users?filter[role]=contributor,author
// I'd have expected it to work like this:
/wp-json/posts?filter[author]=17,4,164

Is there any way through the API to query for users of multiple roles? At present I'm having to do this by chaining batches of queries, and even with promises that request syntax is nasty. I'd much prefer to get them as a single collection.

Related #924

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions