Retrieving user information via REST API

Apparently the admin user route isn’t documented in the API Docs. I’ll make sure that route is added.

If you GET /admin/users/{id}.json it will return these fields which are close to what you are after:

flags_given_count
flags_received_count
warnings_received_count
suspended (boolean)

I would start with the Discourse Data Explorer Plugin where you can create a saved query that you can send an API call to and pass it a user id to return exactly what you are after. But yes, creating a plugin that creates a new route to expose those fields is also an option.

6 Likes