How to make a querie from a plguin

strapi.query('model', 'plugin').action()

https://strapi.io/documentation/developer-docs/latest/concepts/queries.html#custom-queries

You can also hook into the ORM (Bookshelf/Mongoose) using the .model action

So something like strapi.query('user', 'users-permissions').model.someMethod

Note that if the model is in the root API folder, there is no plugin, so it’s just strapi.query('model').action()