How to make mongotop/mongostat work for a specific database user that does not have an admin role?

i can see privileges in this doc. but how to add it to an useraccount?

in which property should i add privilege?

i found some clue in this doc https://docs.mongodb.com/manual/reference/resource-document/#resource-document .

i think it could be added like this, but iam not so sure as i don’t find the syntax for it in createUser method

{ role: "<role>", db: "<database>" ,actions: [ "serverStatus","top"] }

please let me know