adapt api path to relative path