In the documentation for named scope in loopback 3, , the named scope can be defined in boot script as
User.scope('top10Vips', {where: {vip: true}, limit: 10});
Which can be used asUser.top10Vips(function(err, vips) { });
But if I want it to be called by sending the scope name (top10Vips) in the GET query, it does not apply the scope filter.
I tried many variations of this query
http://localhost:8090/api/model/modelname?filter={"order":"timestamp DESC","limit":20,"scope":"top10Vips"}
I get the results without the top10Vips filter applied.
If I add the include filter, I get the error Relation "scope" is not defined for modelname
http://localhost:8090/api/model/Actions?filter={"order":"timestamp DESC","limit":20,"include":{"scope":"top10Vips"}
So what is the rest equivalent ofUser.top10Vips(function(err, vips) { });