Вопрос

I am looking for the url syntax to get all the wiki pages in a SharePoint 2013 wiki library. I have tried numerous syntax's to no avail. for example, to get list items I use:

/_api/web/lists/GetByTitle('List name')/items

I thought it would be simple but everything I have tried has not worked. for example:

/_api/web/GetFolderByServerRelativeUrl('relative url')/Files

doesn't produce an error but doesn't return any of the pages in the library. Also, there are no folders in my wiki library.

Это было полезно?

Решение

You can use:

1. /_api/web/GetFolderByServerRelativeUrl('/LibraryName')/files. If this is not working for you, check the relative URL is correct. For eg: for a site collection starting with /sites/siteColl, relative URL would be /sites/SiteColl/SitePages. Also, navigate to the library to check the correct URL.

2. /_api/web/lists/getbytitle('LibName')/items

3. If both of the above, don't work for you try using, /_vti_bin/listdata.svc/LibName. Load /_vti_bin/lisdata.svc to check the proper list name and then call this with the proper name.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с sharepoint.stackexchange
scroll top