Remove redundant requirement on scarf.
Example configuration.
Use pathname to derive API.
Cache the potential paths.