How can I use the permission api?