bellwood

Well-Known Member
PartnerNOC
Sep 25, 2012
84
36
143
New York
cPanel Access Level
DataCenter Provider
Working on the command line, I am using the following:

Code:
uapi --output=jsonpretty --user=$user Variables get_user_information api.filter=1 api.filter_column=suspended api.filter_term=1 api.filter_type=eq
For *any* user I test against, regardless of their suspension status (0/1), I get a complete JSON response.

Suspended is a numeric bool so I believe to be using the proper term and type?

I just want to know if the user I pass is suspended or not.

Reference Docs (could use some examples):
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
11,132
1,755
363
cPanel Access Level
Root Administrator
I heard back from the developers and they let me know the following information:

"The filtering functionality requires an API output that lists multiple sets of data. That is not the case for Variables::get_user_information.

These two options work for filtering if you want to see that in action:
whmapi1 listaccts api.filter.enable=1 api.filter.a.field=suspended api.filter.a.arg0=1 api.filter.a.type=eq
whmapi1 listaccts api.columns.enable=1 api.columns.a=user api.columns.b=suspended"

Does that help to clear things up?