today I needed to query a document library using the REST api. I found that simply calling
_api/web/list/getbytitle('foo')/items would not return me either the filename or full path.
The secret is to call FieldValuesAsText - here FileRef (the server relative path) and FileLeafRef are present. One can either call it directly or expand it. Additionally, it is possible to get a nice Icon to display.
See lines 1,2 and 3 respectively:
size in line 3 can be
1 - for small or large images respectively.