javascriptdatabasesdkkuzzle

searchUsers: unable to set option properly


I need to get all users from my kuzzle so I tried that:

// Getting Users
    const users = await kuzzle.security.searchUsers({ 
      options: {
        size: 25
      }
    });
    
    console.log(users)

but the output is The argument "options" is not allowed at this level of a search query. Why it says me that?


Solution

  • Ok so i just figure out that it is just 2 separate parameter

    So here is my working code :

    const users = await kuzzle.security.searchUsers({}, {
      size: 10000
    });