api rule and method matching