gpt4 book ai didi

odata - Sharepoint 2013 REST API GetFolderByServerRelativeUrl 不会返回作者详细信息

转载 作者:行者123 更新时间:2023-12-04 09:43:47 24 4
gpt4 key购买 nike

我查看了其他有同样问题的答案,但这些答案似乎并没有解决这个问题。如何获得包含作者姓名的请求?尽管此请求在响应中返回作者,但它没有实际的作者详细信息。

我是否遗漏了请求中的某些内容或是否需要进行一些配置调整?

设置我们在前提下使用 Sharepoint 2013 配置了 ADFS。

我到达的终点 https://SHAREPOINTURL/_api/web/GetFolderByServerRelativeUrl ('文档')?$select=Author/Id,Author/Name,Author/Title,Editor/Id,Editor/Name,Editor/Title,*&$expand=Files/Author,Editor

响应

{
"d": {
"__metadata": {
"id": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')",
"uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')",
"type": "SP.Folder"
},
"Files": {
"results": [
{
"__metadata": {
"id": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')",
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')",
"type": "SP.File"
},
"Author": {
"__metadata": {
"id": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author",
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author",
"type": "SP.User"
},
"Groups": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Author/Groups"
}
},
"Id": 1073741823,
"IsHiddenInUI": false,
"LoginName": "SHAREPOINT\\system",
"Title": "System Account",
"PrincipalType": 1,
"Email": "",
"IsSiteAdmin": false,
"UserId": {
"__metadata": {
"type": "SP.UserIdInfo"
},
"NameId": "S-1-0-0",
"NameIdIssuer": "urn:office:idp:activedirectory"
}
},
"CheckedOutByUser": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/CheckedOutByUser"
}
},
"ListItemAllFields": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/ListItemAllFields"
}
},
"LockedByUser": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/LockedByUser"
}
},
"ModifiedBy": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/ModifiedBy"
}
},
"Versions": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFileByServerRelativeUrl('Documents/FILENAME.xls')/Versions"
}
},
"CheckInComment": "",
"CheckOutType": 2,
"ContentTag": "{71501108-7ACC-46F6-82D7-33E5C5F0124C},3,4",
"CustomizedPageStatus": 0,
"ETag": "\"{71501108-7ACC-46F6-82D7-33E5C5F0124C},3\"",
"Exists": true,
"Length": "390144",
"Level": 1,
"MajorVersion": 1,
"MinorVersion": 0,
"Name": "FILENAME.xls",
"ServerRelativeUrl": "Documents/FILENAME.xls",
"TimeCreated": "2013-07-10T13:55:39Z",
"TimeLastModified": "2013-07-10T13:55:39Z",
"Title": "",
"UIVersion": 512,
"UIVersionLabel": "1.0"
}
]
},
"ListItemAllFields": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/ListItemAllFields"
}
},
"ParentFolder": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/ParentFolder"
}
},
"Properties": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/Properties"
}
},
"Folders": {
"__deferred": {
"uri": "https://SHAREPOINT_URL/_api/Web/GetFolderByServerRelativeUrl('Documents')/Folders"
}
},
"ItemCount": 18,
"Name": "Documents",
"ServerRelativeUrl": "Documents",
"WelcomePage": ""
}

最佳答案

试试这个。我在 MSDN 论坛上找到了这个。 https://social.msdn.microsoft.com/Forums/office/en-US/04fc252c-adb9-4f50-b9b0-c326f88ad69e/retriving-author-name-using-rest-api?forum=appsforsharepoint

-----更新https://{SITE_URL}/_api/web/Lists/getbytitle('{DOCUMENT_PATH}')/items?$select=Title,Author/ID,Author/FirstName,Author/LastName,Author/Title,Author/Department,作者/EMail&$expand=作者/ID

关于odata - Sharepoint 2013 REST API GetFolderByServerRelativeUrl 不会返回作者详细信息,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52860909/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com