I am working on a web project in which i have to fetch the records from the database and show them on the menu of web page. I have tried to fetch them using the api (rbv_api.selectQuery) but it's not working and also when i tried this with javascript then its giving me the "uncaught ReferenceError:rbv_api is not defined".
rbv_api lives on Rollbase server. You cannot use rbv_api in JavaScript added to HTML page.
Use Page Editor and ass Script Component to your page. In that component you can use server-side APIs.
You also can use Client-side APIs on HTML pages. But it is important to understand the difference.