Indeed you can! We’ve fleshed out the documentation for the filter setting to better explain this.
The gist is, you use | to separate the field|operator|value checks for each filter setting. So, in your example, the REST API request would be something like
Is there a way to merge multiple filters into a single line in this context, or are there different keys which are accepted as “filter”, or any similar solution?
Aside: I also tried to “hack” it like this, but it seems read() doesn’t use the RESTAPI URL as its data source. Likely too confusing and unsustainable to be worth using, even if it did work.
Pending an all-in-one solution, allow me to share this alternative get-each-and-combine solution for anyone who many have a similar need.
function getRequirements() {
// Invoke LiveWhale.
global $_LW;
// Parameters.
$data_type = 'profiles';
$types_to_use = ['Major','Minor','Program'];
// Query LW for requirements data.
// No caching here, given this is part of a larger process.
$args = [
'type'=>'Major & Minor Requirements',
'paginate' => 999,
'exclude_tag' => 'exclude-from-majors-minors-page',
];
// Can't get all three at once, so must get separately...
$results = [];
foreach ($types_to_use as $type) {
$args['filter'] = 'profiles_315|equals|'.$type;
$results[$type] = $_LW->read($data_type, $args);
}
//...and merge into one.
$requirements = [];
foreach ($results as $set) { // avoids overlapping keys (0,1,2...)
foreach ($set as $profile) {
$requirements[$profile['id']] = $profile; // take opportunity to use id as key
}
}
// Return array
return $requirements;
}