How does management API "get clients" use filtering?... can I filter by client_metadata?

Using the Management API, how can I use the “Get clients” endpoint (/api/v2/clients) to find a client/application by some client_metadata attribute key or value?

It is unclear to me how to use the “mathing provided filters” part of this endpoint… especially with client_metadata being an object/map.

Hi @rust.brad,

Thanks for joining the Community!

The “matching provided filters” for the /api/v2/get_clients endpoint refers to the parameters listed in the docs.

Unfortunately, you cannot filter results by any field and you can’t filter by client metadata. You’d have to request all of the clients and then filter the results yourself.

You can filter by:

is_global: Whether or not to return just the global client settings for your tenant

is_first_party: Whether or not to return first-party applications

app_type: Filter by app type ( spa , native , non_interactive , or regular_web )

Other parameters

You can also paginate clients as well with page and per_page.

The rest of the parameters do not affect the number of results you’ll receive, but rather transforms the data you receive for each client.

fields: You can either include or exclude fields with this parameter
include_fields: This indicates whether your list of fields should be included or excluded

include_totals: If this is true, then instead of an array, you’ll receive an object with the totals as one of the properties.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.