Home Page > GET api/siteReport/get

Gets a list of all Governance Automation Online managed sites.

Examples

C#

string url = "https://iamgaoapiurl/api/siteReport/get";
            string logonToken = GetLogonToken();
            HttpWebRequest httpRequest = (HttpWebRequest)HttpWebRequest.Create(url);
            httpRequest.ContentType = "application/json";
            ServicePointManager.ServerCertificateValidationCallback += ((sender, certificate, chain, sslPolicyErrors) => true);
            httpRequest.Method = "GET";
            httpRequest.Headers.Set("X_GovernanceAutomation_Access_Token", logonToken);
            
            //Get response on the web request from Governance Automation Online Web API.
            JArray siteReportCollection = null;
            HttpWebResponse response = (HttpWebResponse)httpRequest.GetResponse();
            using (Stream responseStream = response.GetResponseStream())
            {
                using (StreamReader responseReader = new StreamReader(responseStream, Encoding.UTF8))
                {
                    string reply = responseReader.ReadToEnd();
                    siteReportCollection = JsonConvert.DeserializeObject(reply) as JArray;
                }
            }
            foreach(var reportObj in siteReportCollection)
            {
                JObject siteReport = reportObj as JObject;
                string siteURL = scReport.GetValue("URL").Value ();
            };

Response Information

Collection of APISiteReport

Request Information

URI Parameters

NameDescriptionType
URL

Gets or sets a site URL.

string
Department

Gets or sets a site department.

string
Title

Gets or sets a site title.

string
SiteTemplate

Gets or sets the site template that is applied to a site.

string
PrimarySiteContact

Gets or sets the primary site contact.

string
SecondarySiteContact

Gets or sets the secondary site contact.

string
MetadataValues

Gets or sets the custom metadata that is applied to a site.

Dictionary of string [key] and string [value]
Status

Gets or set the status of a site.

APIWebStatus
Description

Gets or sets a site description.

string
CreatedTime

Gets the time when a site is created.

date

Response Formats

application/json, text/json

Sample:
[
  {
    "URL": "sample string 1",
    "Department": "sample string 2",
    "Title": "sample string 3",
    "SiteTemplate": "sample string 4",
    "PrimarySiteContact": "sample string 5",
    "SecondarySiteContact": "sample string 6",
    "MetadataValues": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Status": 0,
    "Description": "sample string 7",
    "CreatedTime": "2015-04-16T15:25:49.0875501+08:00",
  },
  {
    "URL": "sample string 1",
    "Department": "sample string 2",
    "Title": "sample string 3",
    "SiteTemplate": "sample string 4",
    "PrimarySiteContact": "sample string 5",
    "SecondarySiteContact": "sample string 6",
    "MetadataValues": {
      "sample string 1": "sample string 2",
      "sample string 3": "sample string 4"
    },
    "Status": 0,
    "Description": "sample string 7",
    "CreatedTime": "2015-04-16T15:25:49.0875501+08:00",
  }
]

application/xml, text/xml

Sample:
<ArrayOfAPISiteReport xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AvePoint.GA.WebAPI.Models">
  <APISiteReport>
    <Department>sample string 2</Department>
    <Description>sample string 7</Description>
    <MetadataValues xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </MetadataValues>
    <PrimarySiteContact>sample string 5</PrimarySiteContact>
    <SecondarySiteContact>sample string 6</SecondarySiteContact>
    <SiteTemplate>sample string 4</SiteTemplate>
    <Status>Active</Status>
    <Title>sample string 3</Title>
    <URL>sample string 1</URL>
    <CreatedTime>2015-04-16T15:25:49.0875501+08:00</CreatedTime>
  </APISiteReport>
  <APISiteReport>
    <Department>sample string 2</Department>
    <Description>sample string 7</Description>
    <MetadataValues xmlns:d3p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 1</d3p1:Key>
        <d3p1:Value>sample string 2</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
      <d3p1:KeyValueOfstringstring>
        <d3p1:Key>sample string 3</d3p1:Key>
        <d3p1:Value>sample string 4</d3p1:Value>
      </d3p1:KeyValueOfstringstring>
    </MetadataValues>
    <PrimarySiteContact>sample string 5</PrimarySiteContact>
    <SecondarySiteContact>sample string 6</SecondarySiteContact>
    <SiteTemplate>sample string 4</SiteTemplate>
    <Status>Active</Status>
    <Title>sample string 3</Title>
    <URL>sample string 1</URL>
    <CreatedTime>2015-04-16T15:25:49.0875501+08:00</CreatedTime>
  </APISiteReport>
</ArrayOfAPISiteReport>