Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Retrieve Shared Folders

Retrieve Shared Folders

Updated: October 9, 2012

Applies To: Windows Server 2012 Essentials

Retrieves a list of shared folders on the server.

URI Template

GET services/builtin/StorageManagement.svc/serverfolders/index/{index}/count/{count}

{index}
The numerical position of the first shared folder to be retrieved.

{count}
The number of shared folders to be retrieved.

Sample Request

GET https://www.contoso.com/services/builtin/StorageManagement.svc/serverfolders/index/0/count/2147483647 HTTP/1.1
Accept: application/xml
Cookie: ASP.NET_SessionId=********************
Canary: *********************
Host: domainname

Sample Response

HTTP/1.1 200 OK
Cache-Control: private
Content-Length: 1982
Content-Type: application/xml; charset=utf-8
Server: Microsoft-IIS/8.0
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET
X-Content-Type-Options: nosniff
Date: Mon, 19 Dec 2011 06:39:38 GMT
<PartialCollection_Of_FolderInfo
    xmlns="http://contracts.microsoft.com/WindowsServerSolutions/2011/09/ManagementWebApi"
    xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
  <CollectionChunk>
    <FolderInfo>
      <AccessPermission>2</AccessPermission>
      <CurrentStatus>Healthy</CurrentStatus>
      <Description>Client Computer Backups</Description>
      <DriveFreeSpace>157061951488</DriveFreeSpace>
      <DriveID>801f20f9-a2e4-4e9a-b117-aed325649676</DriveID>
      <FolderType>6</FolderType>
      <ID>a82b573d-3a97-4e43-a405-67d9e81a34ba</ID>
      <Name>Client Computer Backups</Name>
      <Path>C:\ServerFolders\Client Computer Backups</Path>
      <Shared>false</Shared>
    </FolderInfo>
    <FolderInfo>
      <AccessPermission>2</AccessPermission>
      <CurrentStatus>Healthy</CurrentStatus>
      <Description>Folder Redirection</Description>
      <DriveFreeSpace>157061951488</DriveFreeSpace>
      <DriveID>801f20f9-a2e4-4e9a-b117-aed325649676</DriveID>
      <FolderType>8</FolderType>
      <ID>243a0ef3-abfc-4f74-a652-2180c7098539</ID>
      <Name>Folder Redirection</Name>
      <Path>C:\ServerFolders\Folder Redirection</Path>
      <Shared>true</Shared>
    </FolderInfo>
    <FolderInfo>
      <AccessPermission>2</AccessPermission>
      <CurrentStatus>Healthy</CurrentStatus>
      <Description>File History Backups</Description>
      <DriveFreeSpace>157061951488</DriveFreeSpace>
      <DriveID>801f20f9-a2e4-4e9a-b117-aed325649676</DriveID>
      <FolderType>7</FolderType>
      <ID>1b838908-0c23-4d3a-860d-7931978dbd65</ID>
      <Name>File History Backups</Name>
      <Path>C:\ServerFolders\File History Backups</Path>
      <Shared>true</Shared>
    </FolderInfo>
    <FolderInfo>
      <AccessPermission>2</AccessPermission>
      <CurrentStatus>Healthy</CurrentStatus>
      <Description>Users</Description>
      <DriveFreeSpace>157061951488</DriveFreeSpace>
      <DriveID>801f20f9-a2e4-4e9a-b117-aed325649676</DriveID>
      <FolderType>10</FolderType>
      <ID>6b2c4cd0-9a34-493f-939c-f7641491b4ee</ID>
      <Name>Users</Name>
      <Path>C:\ServerFolders\Users</Path>
      <Shared>true</Shared>
    </FolderInfo>
    <FolderInfo>
      <AccessPermission>2</AccessPermission>
      <CurrentStatus>Healthy</CurrentStatus>
      <Description>Company</Description>
      <DriveFreeSpace>157061951488</DriveFreeSpace>
      <DriveID>801f20f9-a2e4-4e9a-b117-aed325649676</DriveID>
      <FolderType>9</FolderType>
      <ID>3f2ff46c-031e-4ade-bdeb-e101e9c3d33a</ID>
      <Name>Company</Name>
      <Path>C:\ServerFolders\Company</Path>
      <Shared>true</Shared>
    </FolderInfo>
  </CollectionChunk>
  <CollectionModified>2012-06-18T13:55:14.5901388+08:00</CollectionModified>
  <CollectionSize>5</CollectionSize>
</PartialCollection_Of_FolderInfo>

Error Codes

 

Error Code Error Message

400

One or more parameters are not valid.

401

Access is denied to the requested resource.

404

The path does not exist.

Remarks

This method can be called by standard users and domain administrators.

The AccessPermission element in the response can contain one of the following access permission values:

 

Enumeration Value Name Value Meaning

None

0

No access.

ReadOnly

1

Read-only access.

Full

2

Read/write access.

Other

3

Unknown or unspecified access.

The FolderType element in the response can contain one of the following folder type values:

 

Enumeration Value Name Value Meaning

NonPredefinedType

0

A non-predefined folder.

MusicType

1

A music folder.

PicturesType

2

A picture folder.

DocumentsType

3

A document folder.

VideosType

4

A video folder.

RecordedTVType

5

A recorded television folder.

BackupsType

6

A backup folder.

FileBackupsType

7

A file backup folder.

FolderRedirectionType

8

A folder redirection folder.

CompanyType

9

A company folder.

UserType

10

A user folder.

OtherType

11

A system or special use folder.

See Also

Show:
© 2015 Microsoft