Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.40 KB | None | 0 0
  1. http://mywebsite-dev/blog/_api/web/lists/getByTitle('Posts')/items?$select=Title,Body,Id,LikesCount,NumCommentsId
  2.  
  3. {
  4. "d": {
  5. "results": [
  6. {
  7. "__metadata": {
  8. "id": "Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(2)",
  9. "uri": "http://mywebsite-dev/blog/_api/Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(2)",
  10. "etag": ""1"",
  11. "type": "SP.Data.PostsListItem"
  12. },
  13. "Id": 2,
  14. "Title": "Blog 1",
  15. "Body": "<div class="ExternalClass30B2DE63AD2D4EE1AC4DD2735266245C"><p>This is my blog 1•</p></div>",
  16. "NumCommentsId": 0,
  17. "LikesCount": null,
  18. "ID": 2
  19. },
  20. {
  21. "__metadata": {
  22. "id": "Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(3)",
  23. "uri": "http://mywebsite-dev/blog/_api/Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(3)",
  24. "etag": ""1"",
  25. "type": "SP.Data.PostsListItem"
  26. },
  27. "Id": 3,
  28. "Title": "Blog 2",
  29. "Body": "<div class="ExternalClass9FDE8E9403FF43F3BEE2BC24798EDA16"><p>This is second cloud blog•</p></div>",
  30. "NumCommentsId": 3,
  31. "LikesCount": null,
  32. "ID": 3
  33. }
  34. ]
  35. }
  36. }
  37.  
  38. {
  39. "d": {
  40. "results": [
  41. {
  42. "__metadata": {
  43. "id": "Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(2)",
  44. "uri": "http://mywebsite-dev/blog/_api/Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(2)",
  45. "etag": ""1"",
  46. "type": "SP.Data.PostsListItem"
  47. },
  48. "Id": 2,
  49. "Title": "Blog 1",
  50. "Body": "<div class="ExternalClass30B2DE63AD2D4EE1AC4DD2735266245C"><p>This is my blog 1•</p></div>",
  51. "NumCommentsId": 0,
  52. "Comments":{}
  53. "LikesCount": null,
  54. "ID": 2
  55. },
  56. {
  57. "__metadata": {
  58. "id": "Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(3)",
  59. "uri": "http://mywebsite-dev/blog/_api/Web/Lists(guid'862870c0-e56b-48ca-9da4-b337d05984aa')/Items(3)",
  60. "etag": ""1"",
  61. "type": "SP.Data.PostsListItem"
  62. },
  63. "Id": 3,
  64. "Title": "Blog 2",
  65. "Body": "<div class="ExternalClass9FDE8E9403FF43F3BEE2BC24798EDA16"><p>This is second cloud blog•</p></div>",
  66. "NumCommentsId": 3,
  67. "Comments":[
  68. {
  69. "Id":1,
  70. "Title":"My Comment Title",
  71. "Body":"My Comment Body"
  72. },
  73. {
  74. "Id":2,
  75. "Title":"My second Comment Title",
  76. "Body":"My second Comment Body"
  77. },
  78.  
  79. {
  80. "Id":3,
  81. "Title":"My third Comment Title",
  82. "Body":"My third Comment Body"
  83. },
  84. ]
  85. "LikesCount": null,
  86. "ID": 3
  87. }
  88. ]
  89. }
  90. }
  91.  
  92. $select=Title,Body,Id,LikesCount,NumCommentsId,Comments&$expand=Comments
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement