Forum Discussion
Sharepoint Rest: Get library url
Can you try below?
/_api/web/lists/getbytitle('Document Library Name')/Items?$select=Title,FileLeafRef,EncodedAbsThumbnailUrl,EncodedAbsUrl |
The example above returns information about your file such as the name, full url and the internal “Title”:

For instances where you want to know the “type” of document library it is (example Picture Library vs Document Library), use:
1 | /_api/web/lists/getbytitle('Document Library Name')/BaseTemplate |
Although some information regarding document libraries require an entirely new endpoint. This includes file paths, subfolders, thumbnails and such.
1 | /_api/web/GetFolderByServerRelativeUrl('"Folder Name"')/Files |
The above contains an entire new set of information regarding your library.
Hi,
Thanks!
There is a little difference with the proposal you posted. I need to get the list of all libraries that is why I am using:
url: appweburl + "/_api/SP.AppContextSite(@target)/web/lists?@target='" + hostweburl + "'"
without pointing to a specific library.
The result I am getting doesn't contains "EncodedAbsUrl" in the respons.
This is the response for one of the libraries:
Best regards
Americo