sp-dev-docs icon indicating copy to clipboard operation
sp-dev-docs copied to clipboard

GET items in document library does not include .docx or .xlsx

Open matthewjd24 opened this issue 3 years ago • 3 comments

Hello, I am new to using the SharePoint API but I am having difficulty getting a list of items in our document library. When I GET _api/Web/Lists(guid'my_guid')/items it only returns the .doc files in the library, the .docx and .xlsx files are not included. I can GET /files, but I need the metadata about each file which I understand is the use for /items. It seems like this is a bug. Thank you.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

matthewjd24 avatar Jul 04 '22 22:07 matthewjd24

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

ghost avatar Jul 04 '22 22:07 ghost

I can get data about .docx items if I do GET https://{site_url}/_api/web/lists/GetByTitle('Test')/items({item_id})

matthewjd24 avatar Jul 04 '22 22:07 matthewjd24

The .docx and .xlsx items show up if I put a filter like the following. Just odd.

_api/Web/Lists/getbytitle('myDocLibrary')/items?$filter=(Id lt 1000)

matthewjd24 avatar Jul 04 '22 22:07 matthewjd24