API Call log question

I am using the API to retrieve the number of voicemail messages for each extension on my PBX. I would also like to retrieve information on the last couple of calls - Caller number, caller name, etc. Can I do through this through the API? I have looked through all of the documentation but I can’t seem to find anything that does this?

Also, I am looking to identify which lines are in use. I think I have to use this through the monitor capability?

Thanks.