added index parameter to api definition