[api] Added helper method for determining if a path is a valid resource