对单个lib的不同项的REST调用会返回具有不同结构的共振. [英] REST calls to different items of single lib return resonses with different structures.

查看:61
本文介绍了对单个lib的不同项的REST调用会返回具有不同结构的共振.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么?

对不起.你好! :)

SP 2016内部部署.

SP 2016 on-prem.

我有一个测试Word文档库.呼叫其中的一部分将返回如下响应:

I have a test  library of word documents. Calling to part of them return a response like:

{
  "d": {
    "__metadata": {
      "id": "716369bb-3f0e-48fb-845f-d4774d6198ac",
      "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)",
      "etag": "\"1\"",
      "type": "SP.Data.Shared_x0020_DocumentsItem"
    },
    "FirstUniqueAncestorSecurableObject": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/FirstUniqueAncestorSecurableObject"
      }
    },
    "RoleAssignments": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/RoleAssignments"
      }
    },
    "AttachmentFiles": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/AttachmentFiles"
      }
    },
    "ContentType": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/ContentType"
      }
    },
    "GetDlpPolicyTip": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/GetDlpPolicyTip"
      }
    },
    "FieldValuesAsHtml": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/FieldValuesAsHtml"
      }
    },
    "FieldValuesAsText": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/FieldValuesAsText"
      }
    },
    "FieldValuesForEdit": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/FieldValuesForEdit"
      }
    },
    "File": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/File"
      }
    },
    "Folder": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/Folder"
      }
    },
    "ParentList": {
      "__deferred": {
        "uri": "http://sptest/_api/Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(7)/ParentList"
      }
    },
    "FileSystemObjectType": 0,
    "Id": 7,
    "ContentTypeId": "0x0101003563CADD50FAD7458CC556B82DE76824",
    "Title": null,
    "SharedWithUsersId": null,
    "A": null,
    "ID": 7,
    "Created": "2018-01-19T11:27:17Z",
    "AuthorId": 1,
    "Modified": "2018-01-19T11:27:17Z",
    "EditorId": 1,
    "OData__CopySource": null,
    "CheckoutUserId": null,
    "OData__UIVersionString": "1.0",
    "GUID": "18de94b1-25d2-4bc6-9218-4c7ac04fcc58"
  }
}

另一个不返回任何d对象,就像:

The other returns no d-object just smth like:

  "odata.metadata": "http://sptest/_api/$metadata#SP.ListData.Shared_x0020_DocumentsItems/@Element",
  "odata.type": "SP.Data.Shared_x0020_DocumentsItem",
  "odata.id": "7948157f-bd75-4be3-a138-31b03df1ec86",
  "odata.etag": "\"2\"",
  "odata.editLink": "Web/Lists(guid'0161e46c-50ab-4c7d-b098-ff16d3623784')/Items(5)",
  "FileSystemObjectType": 0,
  "Id": 5,
  "ContentTypeId": "0x0101003563CADD50FAD7458CC556B82DE76824",
  "Title": null,
  "SharedWithUsersId": null,
  "A": false,
  "ID": 5,
  "Created": "2018-01-19T11:27:15Z",
  "AuthorId": 1,
  "Modified": "2018-02-25T10:08:48Z",
  "EditorId": 1,
  "OData__CopySource": null,
  "CheckoutUserId": null,
  "OData__UIVersionString": "2.0",
  "GUID": "fb980029-1420-41c1-8ab4-326dbd05828a"
}

而且我不知道为什么.  什么原因造成的?

And i have no idea why.   What could cause this?

推荐答案

第二份文件的状态是什么?我注意到版本不同.

what is the second document's status? I notice the versions are different.


这篇关于对单个lib的不同项的REST调用会返回具有不同结构的共振.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆