How can I get an Id of document from a document library using JavaScript REST API?

I have an ajax call: http://site/_api/web/GetFolderByServerRelativeUrl('DOCUMENT_LIBRARY_NAME')/Files

And it returns to me following data: enter image description here

But I need an ID, how to get it?


Try below API:

/_api/web/getfolderbyserverrelativeurl('url of doc library')/Files?$expand=ListItemAllFields

Returns files properties along with associated list item properties.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.