aSiteCollection statement
The aSiteCollection statement returns metadata for the specified sites.
<aSiteCollection tableName="" filter=""> <from type=""></from> <fields></fields> <where></where> </aSiteCollection>aSiteCollection attributes
Section titled “aSiteCollection attributes”filter
Section titled “filter”Specify the option for filtering the sites retrieved by the statement.
| Filter | Description |
| AllSitesInCollection | The default value. Returns all sites in the collection. |
| SpecifiedSite | Returns this site only. |
| DescendantSites | Returns specified site and all its descendant sites. |
aSiteCollection elements
Section titled “aSiteCollection elements”Specify one or more web sites from which to retrieve the site collection. The type attribute will indicate how site urls are specified.
| Type | Description |
| Url | Specify one or more relative site url separated by a comma. A report’s parameter may be specified instead of a literal value. |
| ResultSet | Specify the tableName value of another statement. The resulting data from the statement must contain a column named “relativeSiteUrl”. |
The following statement will return the properties for both “/sites/demo/” and “/sites/ersdetest” sites.
Sample
<aSiteCollection tableName="SiteCollection" filter="SpecifiedSite"> <from type="Url">/sites/demo/,/sites/ersdetest/</from> <fields>*</fields> <where></where> </aSiteCollection>In the following example, the query will return information about all sites specified in another result set called “MergingList”. The “MergingList” result set contains data returned by a list statement that queries the “Merging List” SharePoint list.
The SharePoint list “Merging list” must contain a column called “RelativeSiteUrl” that contains relative urls that point to SharePoint sites.
The aSiteCollection statement will retrieve site information for each item in the “MergingList” result set based on the “RelativeSiteUrl” column’s value.
Sample
<root xmlns="http://enesyssoftware.com/schemas"> <list title="Merging list" relativeSiteUrl="/sites/demo/" tableName="Merginglist"> <fields>relativeSiteUrl</fields> <query></query> </list> <aSiteCollection tableName="aSiteCollection"> <from type="ResultSet">Merginglist</from> <fields></fields> <where></where> </aSiteCollection> <resultSet>aSiteCollection</resultSet> </root>fields
Section titled “fields”Specify the fields to be returned by the statement.
| Field | Description |
|---|---|
| Title | The title of the site. |
| Url | The absolute URL for the Web site. |
| Description | The description of the site |
| WebID | The GUID of the site (enclosed in curly braces). |
| Author | A string specifying the creator of the site. |
| Language | The Language code identifier of the site. |
| LastModified | The UTC date and time when the site collection containing the site was last modified. |
| LastModifiedForceRecrawl | The date and time when the site was last modified for indexing. |
| NoIndex | Specifies whether the site can be crawled for indexing, or for items to record in a search catalog. |
| ValidSecurityInfo | Boolean variable that specifies whether the site has valid security information. |
| InheritedSecurity | Boolean variable that specifies whether the site inherits security from the parent site. |
| AllowAnonymousAccess | Specifies whether anonymous users have access permissions for the site. |
| AnonymousViewListItems | Specifies whether anonymous users have ViewListItem permission for the site. |
| Permissions | The permissions for web site. |
| ExternalSecurity | Boolean variable that specifies whether an external security provider is provided for the site. |
| CategoryId | The GUID of the site. |
| CategoryName | The name of the site. |
| CategoryIdPath | A colon-delimited list of the GUIDs that represent the web application, all the parent sites and the site itself. |
| IsBucketWeb | Boolean value that specifies whether the site is a bucket Web. |
| UsedInAutocat | Boolean value that specifies whether the site has categories. |
| CategoryBucketID | The ID of the bucket web that contains the site. |
SQL Where clause used to filter the resulting data.
The following query returns information about sites (located in the “/sites/demo” site collection) where the security is not inherited from the parent site:
Sample
<root xmlns="http://enesyssoftware.com/schemas"> <aSiteCollection tableName="aSiteCollection1" filter="AllSitesInCollection"> <from type="Url">/sites/demo/</from> <fields></fields> <where>NOT InheritedSecurity</where> </aSiteCollection> <resultSet>aSiteCollection1</resultSet> </root>