Introduction
You can use additional parameters to filter UAPI output.
api.filter
Boolean Whether to enable filtering.
- 1 — Enable filtering.
- 0 — Disable filtering.
api.filter_column
The return to match against. The name of one of the function's returns.
api.filter_term
The value to match. An integer or string value.
api.filter_type
The match type.
If the api.filterterm value is an integer, use a numeric operator. If the api.filterterm value is a string, use a string operator. This parameter defaults to contains.
Numeric operators
- eq — The column equals to the match value.
- lt — The column is less than the match value. This match type cannot handle unlimited values.
- lt handle unlimited — The column is less than the match value. This match type can handle unlimited values.
- gt — The column is greater than the match value. This match type cannot handle unlimited values.
-
gt_handle_unlimited
— The column is greater than the match value. This match type can handle unlimited values. - ne — The column does not equal to the match value.
Note:
We introduced the ne operator in cPanel & WHM version 56.
String operators
- contains — The column contains the match value's string. Not case-sensitive.
- begins — The column begins with the match value's string. Not case-sensitive.
- ends — The column ends with the match value's string. Not case-sensitive.
- matches — The column matches the value as a regular expression.
Other operators
- defined — The column contains a value.
- undefined — The column does not contain a value.
Note:
We introduced the defined and undefined operators in cPanel & WHM version 58.