I am trying to build a wiki using Cockpit (thanks @artur for sharing this project). I want to listCollections but only those matching Group: wiki (or any other alternative).
It’s not possible by default, but you can write your own api endpoint and return the filterered collections. Create a file in /cockpit/config/api/collections/myOwnEndpoint.php
$collections = $this->module('collections')->getCollectionsInGroup();
// check the array
return $collections;
@raffaelj Thank you so much for replying so fast! I was looking at this method too (in RestApi.php) and I was wondering if it was possible to use the getCollectionsInGroup (as user)?
I’m not quite sure, what you mean. The function getCollectionsInGroup() returns only collections with the user group permissions. But if you don’t care about user groups, than do