How to use the fields flag to /api/users to select a single app_metadata item instead of all of it

To save on bandwidth I would like to read a list of users, including just their email and ‘title’ (which is part of the app_metadata).

I have tried several things in the ‘fields’ parameter, however, the only way I can get it to work is “fields=email,app_metadata”. Unfortunately this returns all metadata for each user.
Is there a syntax I can use to request just the named app_metadata.

e.g.
“fields=email,app_metadata[title]”

or

“fields=email,app_metadata-title”

etc.?

Hi!

In my tests you should be able to do something like this:

fields=email,app_metadata.title

note that it seems to be case sensitive

{
    "email": "myemail@domain.com",
    "user_metadata": {
      "Title": "Boss"
    }
3 Likes

Thanks for helping with this one Marcus!