Say you query a ListItem
from the API
_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)
and Let's say the item is a Page
, and the Response
looks like below.
{
"d": {
"__metadata": {
"id": "ce0f35a3-0644-4346-8819-52ec87d70f91",
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)",
"etag": "\"4\"",
"type": "SP.Data.SitePagesItem"
},
"FirstUniqueAncestorSecurableObject": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/FirstUniqueAncestorSecurableObject"
}
},
"RoleAssignments": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/RoleAssignments"
}
},
"AttachmentFiles": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/AttachmentFiles"
}
},
"ContentType": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/ContentType"
}
},
"FieldValuesAsHtml": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/FieldValuesAsHtml"
}
},
"FieldValuesAsText": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/FieldValuesAsText"
}
},
"FieldValuesForEdit": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/FieldValuesForEdit"
}
},
"File": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/File"
}
},
"Folder": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/Folder"
}
},
"ParentList": {
"__deferred": {
"uri": "https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/ParentList"
}
},
"FileSystemObjectType": 0,
"Id": 1,
"ContentTypeId": "0x01010800A17AD719CAA5FD488DE4BE6975C27838",
"WikiField": "<div class=\"ExternalClassF6F68F52E1E4476EAC56AA39304E040F\">\r\n <table id=\"layoutsTable\" style=\"width:100%;\">\r\n <tbody>\r\n <tr style=\"vertical-align:top;\">\r\n <td colspan=\"2\"><div class=\"ms-rte-layoutszone-outer\" style=\"width:100%;\"><div class=\"ms-rte-layoutszone-inner\" style=\"word-wrap:break-word;margin:0px;border:0px;\"><div class=\"ms-rtestate-read ms-rte-wpbox\"><div class=\"ms-rtestate-read e572e784-7389-4c16-b560-b23a3f5f8c6f\" id=\"div_e572e784-7389-4c16-b560-b23a3f5f8c6f\"></div>\n <div class=\"ms-rtestate-read\" id=\"vid_e572e784-7389-4c16-b560-b23a3f5f8c6f\" style=\"display:none;\"></div>\n</div>\n</div></div></td>\r\n </tr>\r\n <tr style=\"vertical-align:top;\">\r\n <td style=\"width:49.95%;\"><div class=\"ms-rte-layoutszone-outer\" style=\"width:100%;\"><div class=\"ms-rte-layoutszone-inner\" style=\"word-wrap:break-word;margin:0px;border:0px;\"><div class=\"ms-rtestate-read ms-rte-wpbox\"><div class=\"ms-rtestate-read 37952ec8-18c0-480f-9427-98988341f8e7\" id=\"div_37952ec8-18c0-480f-9427-98988341f8e7\"></div>\n <div class=\"ms-rtestate-read\" id=\"vid_37952ec8-18c0-480f-9427-98988341f8e7\" style=\"display:none;\"></div>\n</div>\n</div></div></td>\r\n <td class=\"ms-wiki-columnSpacing\" style=\"width:49.95%;\"><div class=\"ms-rte-layoutszone-outer\" style=\"width:100%;\"><div class=\"ms-rte-layoutszone-inner\" style=\"word-wrap:break-word;margin:0px;border:0px;\"><div class=\"ms-rtestate-read ms-rte-wpbox\"><div class=\"ms-rtestate-read 0f00075e-2352-43d8-8477-f2fb51cf2739\" id=\"div_0f00075e-2352-43d8-8477-f2fb51cf2739\"></div>\n <div class=\"ms-rtestate-read\" id=\"vid_0f00075e-2352-43d8-8477-f2fb51cf2739\" style=\"display:none;\"></div>\n</div>\n</div></div></td>\r\n </tr>\r\n </tbody>\r\n </table>\r\n <span id=\"layoutsData\" style=\"display:none;\">true,false,2</span></div>",
"Title": null,
"ID": 1,
"Created": "2014-09-01T05:48:04Z",
"AuthorId": 1073741823,
"Modified": "2014-09-01T05:48:18Z",
"EditorId": 1073741823,
"OData__CopySource": null,
"CheckoutUserId": null,
"OData__UIVersionString": "1.0",
"GUID": "2f0c04dc-dfa7-4154-8e87-d11d5d91cbf6"
}
}
I was trying to find document to explain the response structure in the MSDN
.
So far I didn't found any read. I try to understand like below .but I am not sure if it is right . Please help to review it .
- The ["d"]["__metadata"]["uri"] represents the RestAPI url of request to query the current
ListItem
? - The ["__deferred"]["uri"] represent the RestAPI url to query other information of
ListItem
. eg:File
url is"https://beyondhard.sharepoint.com/sites/TestPrivate/_api/Web/Lists(guid'c5689c37-a28a-4122-bedb-b2ec7c44204f')/Items(1)/File
? - Some of the properties like
Created
,Id
etc can be returned from query. But some of the properties likeContentType
need to be query withuri
to know the detail.Right ?
Thanks,
Joe