Adding permissions for json APIs.