Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
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

Copy link
Copy link

Description

@kadamwhite
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.