getCollection #
Available since 2.11.0
Returns the collection specified in the request.
Arguments #
getCollection (): string
Example #
const collection = request.getCollection();
// equivalent
const collection = request.input.args.collection;
//+ checks to make sure that "collection" is of the right type
// and throw standard API error when it's not the case
Edit this page on Github (opens new window)