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