Add support for path in API endpoint