add API endpoint for creating and retrieving collections (bug 894643, bug 894587)