Requesting a list of files or folders in a working directory using SelectFiles
The following request asks for a list of files and folders in the working directory that match certain criteria. ResultDef specifies the information to return about each file. The request in this example asks for items such as the file ID, name, file type, and version number.
The Recursive element directs BIRT iHub to search subdirectories of the working folder. Search sets the FetchSize and CountLimit.
<SOAP-ENV:Body>
<SelectFiles>
<WorkingFolderName>/</WorkingFolderName>
<Recursive>true</Recursive>
<LatestVersionOnly>true</LatestVersionOnly>
<ResultDef>
<String>Id</String>
<String>FileType</String>
<String>Version</String>
<String>Name</String>
<String>Size</String>
<String>PageCount</String>
</ResultDef>
<Search>
<FetchSize>500</FetchSize>
<CountLimit>530</CountLimit>
</Search>
</SelectFiles>
</SOAP-ENV:Body>
The response to the preceding request is a list of files that match the search conditions. For each file, the response displays the information requested in ResultDef. If the item is a folder, Version, Size, and PageCount return zero (0).
<SOAP-ENV:Body>
<SelectFilesResponse>
<ItemList>
<File>
<Id>1</Id>
<Name>/</Name>
<FileType>Directory</FileType>
<Version>0</Version>
<Size>0</Size>
<PageCount>0</PageCount>
</File>
<File>
<Id>11</Id>
<Name>/Regional Forecasts/mltd.rptdocument</Name>
<FileType>RPTDOCUMENT</FileType>
<Version>1</Version>
<Size>19594</Size>
<PageCount>6</PageCount>
</File>
…
</ItemList>
<TotalCount>38</TotalCount>
</SelectFilesResponse>
</SOAP-ENV:Body
You can use file IDs in subsequent requests to move, copy, update, delete, or work in another way with one or more of these files.