This question is not specific enough for anyone to write any code. Also, note that web2py has nothing to do with Phonegap, so if you have questions about what to do on the Phonegap side of things, this may not be the best place to ask. We should be able to help with the server-side REST API, but we need more details regarding what you are looking to do, what you have tried, and what aspects of the web2py documentation are unclear to you.
Anthony