Api Resource - Id and name

For every doctype it has default api/resource/doctype.
I am not giving any naming series in the doctype. While hitting the api it has default name with random numbers. I want the form name and id in the data list. having id i will loop the data and display the form name in the page. How to get the id and also name in api???

Thank you in advance