如何从 SharePoint URL 路径中获取所有文件,该路径中包含 shared%20Documents?

How do I get all files from a SharePoint URL path which has shared%20Documents in its path?

我正在尝试从 SharePoint 中的文件夹中获取所有文件。我正在查找存储在“Shared%20Ducuments”路径下的所有文件。

我正在 Postman 中对 URL 执行 GET 请求:https://{server_name}/sites/{sub_site}/_api/web/GetFolderByServerRelativeUrl ('/Shared%20Documents')/文件

但是它说:

    <m:code>-2147024809, System.ArgumentException</m:code>
    <m:message xml:lang="en-US">Server relative urls must start with SPWeb.ServerRelativeUrl</m:message>

我的 SharePoint 文件夹的 URL 路径是:

https://{server_name}/sites/{sub_site}/Shared%20Documents/Forms/AllItems.aspx?AD={一些超长的随机字符组合结束}

尝试使用此端点,在 GetFolderByRelativeUrl 函数中添加 /sites/sub_site:

_api/web/GetFolderByServerRelativeUrl('/sites/sub_sitename/Shared%20Documents')/Files