Added generic api

Change-Id: Ibb51a2c5961cc8211a9ac4c5da5c9ecaddb9c000