Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 7589

REST Response Formatting Difference Folderproperties and other queries

$
0
0

Hi,

anyone has an explanation why the response for a /Properties call is formatted different to most of the other calls.

For example:

http://sphost/sites/DennisDevSite/_api/Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib/')/Properties

<?xml version="1.0" encoding="utf-8"?>
<entry xml:base="http://sphost/sites/DennisDevSite/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
  <id>Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib/')/Properties</id>
  <category term="SP.PropertyValues" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
  <link rel="edit" href="Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib/')/Properties" />
  <title />
  <updated>2015-02-10T12:13:58Z</updated>
  <author>
    <name />
  </author>
  <content type="application/xml">
    <m:properties>
      <d:vti_x005f_hassubdirs>true</d:vti_x005f_hassubdirs>
      <d:vti_x005f_listbasetype m:type="Edm.Int32">1</d:vti_x005f_listbasetype>
      <d:vti_x005f_listrequirecheckout>false</d:vti_x005f_listrequirecheckout>
      <d:vti_x005f_dirlateststamp m:type="Edm.DateTime">2015-02-10T12:08:54</d:vti_x005f_dirlateststamp>
      <d:vti_x005f_isexecutable>false</d:vti_x005f_isexecutable>
      <d:vti_x005f_replid>rid:{AAC2DB73-39FC-4E2E-8E01-875B3040960F}</d:vti_x005f_replid>
      <d:vti_x005f_rtag>rt:AAC2DB73-39FC-4E2E-8E01-875B3040960F@00000000000</d:vti_x005f_rtag>
      <d:vti_x005f_isbrowsable>true</d:vti_x005f_isbrowsable>
      <d:vti_x005f_listservertemplate m:type="Edm.Int32">101</d:vti_x005f_listservertemplate>
      <d:vti_x005f_modifiedby>i:0#.w|nfsp\user1</d:vti_x005f_modifiedby>
      <d:vti_x005f_docstoretype m:type="Edm.Int32">1</d:vti_x005f_docstoretype>
      <d:docid_x005f_msft_x005f_hier_x005f_list_x005f_siteid>04e5fb5e-b335-4622-8317-769b12ab4398</d:docid_x005f_msft_x005f_hier_x005f_list_x005f_siteid>
      <d:vti_x005f_listenableminorversions>false</d:vti_x005f_listenableminorversions>
      <d:vti_x005f_level m:type="Edm.Int32">1</d:vti_x005f_level>
      <d:vti_x005f_isscriptable>false</d:vti_x005f_isscriptable>
      <d:docid_x005f_msft_x005f_hier_x005f_list_x005f_guid>805e17b027284b30a889a7e8f025696b</d:docid_x005f_msft_x005f_hier_x005f_list_x005f_guid>
      <d:vti_x005f_listenablemoderation>false</d:vti_x005f_listenablemoderation>
      <d:vti_x005f_foldersubfolderitemcount m:type="Edm.Int32">2</d:vti_x005f_foldersubfolderitemcount>
      <d:vti_x005f_listtitle>alib</d:vti_x005f_listtitle>
      <d:vti_x005f_metainfoversion m:type="Edm.Int32">3</d:vti_x005f_metainfoversion>
      <d:IsAttachmentLibrary m:type="Edm.Int32">0</d:IsAttachmentLibrary>
      <d:vti_x005f_folderitemcount m:type="Edm.Int32">27</d:vti_x005f_folderitemcount>
      <d:docid_x005f_msft_x005f_hier_x005f_listid m:type="Edm.Int32">4</d:docid_x005f_msft_x005f_hier_x005f_listid>
      <d:vti_x005f_timelastmodified m:type="Edm.DateTime">2015-02-04T12:22:15</d:vti_x005f_timelastmodified>
      <d:vti_x005f_nexttolasttimemodified m:type="Edm.DateTime">2015-02-02T08:57:15</d:vti_x005f_nexttolasttimemodified>
      <d:vti_x005f_parentid>{3DB81064-00CC-4483-813E-DE194A773279}</d:vti_x005f_parentid>
      <d:vti_x005f_candeleteversion>true</d:vti_x005f_candeleteversion>
      <d:vti_x005f_listenableversioning>false</d:vti_x005f_listenableversioning>
      <d:vti_x005f_listname>{805E17B0-2728-4B30-A889-A7E8F025696B}</d:vti_x005f_listname>
      <d:vti_x005f_etag>"{AAC2DB73-39FC-4E2E-8E01-875B3040960F},0"</d:vti_x005f_etag>
      <d:vti_x005f_timecreated m:type="Edm.DateTime">2014-08-13T14:00:15</d:vti_x005f_timecreated>
    </m:properties>
  </content>
</entry>

And now compared a filter - Respond

http://sphost/sites/DennisDevSite/_api/Web/GetFolderByServerRelativeUrl('/sites/DennisDevSite/alib/')/Files?$filter=Name%20eq%20%27a.pdf%27

<?xml version="1.0" encoding="utf-8"?>
<feed xml:base="http://sphost/sites/DennisDevSite/_api/" xmlns="http://www.w3.org/2005/Atom" xmlns:d="http://schemas.microsoft.com/ado/2007/08/dataservices" xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" xmlns:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml">
  <id>6e784be3-1fc3-4386-b34c-47e173877266</id>
  <title />
  <updated>2015-02-10T12:19:36Z</updated>
  <entry>
    <id>Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')</id>
    <category term="SP.File" scheme="http://schemas.microsoft.com/ado/2007/08/dataservices/scheme" />
    <link rel="edit" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Author" type="application/atom+xml;type=entry" title="Author" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/Author" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/CheckedOutByUser" type="application/atom+xml;type=entry" title="CheckedOutByUser" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/CheckedOutByUser" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ListItemAllFields" type="application/atom+xml;type=entry" title="ListItemAllFields" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/ListItemAllFields" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/LockedByUser" type="application/atom+xml;type=entry" title="LockedByUser" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/LockedByUser" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/ModifiedBy" type="application/atom+xml;type=entry" title="ModifiedBy" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/ModifiedBy" />
    <link rel="http://schemas.microsoft.com/ado/2007/08/dataservices/related/Versions" type="application/atom+xml;type=feed" title="Versions" href="Web/GetFileByServerRelativeUrl('/sites/DennisDevSite/alib/a.pdf')/Versions" />
    <title />
    <updated>2015-02-10T12:19:36Z</updated>
    <author>
      <name />
    </author>
    <content type="application/xml">
      <m:properties>
        <d:CheckInComment></d:CheckInComment>
        <d:CheckOutType m:type="Edm.Int32">2</d:CheckOutType>
        <d:ContentTag>{07DCA659-1E2F-401C-B71E-62299F5C922C},9,1</d:ContentTag>
        <d:CustomizedPageStatus m:type="Edm.Int32">0</d:CustomizedPageStatus>
        <d:ETag>"{07DCA659-1E2F-401C-B71E-62299F5C922C},9"</d:ETag>
        <d:Exists m:type="Edm.Boolean">true</d:Exists>
        <d:Length m:type="Edm.Int64">828661</d:Length>
        <d:Level m:type="Edm.Byte">1</d:Level>
        <d:MajorVersion m:type="Edm.Int32">1</d:MajorVersion>
        <d:MinorVersion m:type="Edm.Int32">0</d:MinorVersion>
        <d:Name>a.pdf</d:Name>
        <d:ServerRelativeUrl>/sites/DennisDevSite/alib/a.pdf</d:ServerRelativeUrl>
        <d:TimeCreated m:type="Edm.DateTime">2014-08-13T14:00:59Z</d:TimeCreated>
        <d:TimeLastModified m:type="Edm.DateTime">2015-02-10T12:19:18Z</d:TimeLastModified>
        <d:Title></d:Title>
        <d:UIVersion m:type="Edm.Int32">512</d:UIVersion>
        <d:UIVersionLabel>1.0</d:UIVersionLabel>
      </m:properties>
    </content>
  </entry>
</feed>

What i mean is, that the tags in the second response are somewhat human readable whilst the tags in the first respond are somewhat left technical.

am I doing something wrong?

Thx in advance


Dennis




Viewing all articles
Browse latest Browse all 7589

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>