Export (0) Print
Expand All
Expand Minimize

IWebmasterApi.GetSiteRoles

Namespace: Microsoft.Bing.Webmaster.Api

IWebmasterApi.GetSiteRoles Method

Get user site roles

Syntax

List<SiteRoles> GetSiteRoles(
string siteUrl,
bool includeAllSubdomains
)

Parameters

siteUrl
Type: System.String
Site url

includeAllSubdomains
Type: System.BooleanS
Url for which information will be returned.

Return Value

List of site roles

XML request sample

GET /webmaster/api.svc/pox/GetSiteRoles?siteUrl=http://example.com&includeAllSubdomains=false&apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com

XML response sample

HTTP/1.1 200 OK
Content-Length: 598
Content-Type: application/xml; charset=utf-8

<ArrayOfSiteRoles xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<SiteRoles>
<Date>2011-09-21T16:02:02.2509881-07:00</Date>
<DelegatedCode>258CAD36B9EEE22F1CFDEB4C239D26BB</DelegatedCode>
<DelegatedCodeOwnerEmail>webmaster@example.com</DelegatedCodeOwnerEmail>
<DelegatorEmail>webmaster@example.com</DelegatorEmail>
<Email>webmaster@example.com</Email>
<Expired>false</Expired>
<Role>ReadWrite</Role>
<Site>http://host1.example.com</Site>
<VerificationSite>http://example.com</VerificationSite>
</SiteRoles>
</ArrayOfSiteRoles>

JSON request sample

GET /webmaster/api.svc/json/GetSiteRoles?siteUrl=http://example.com&includeAllSubdomains=false&apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com

JSON response sample

HTTP/1.1 200 OK
Content-Length: 375
Content-Type: application/json; charset=utf-8


{
"d":[
{
"__type":"SiteRoles:#Microsoft.Bing.Webmaster.Api",
"Date":"\/Date(1316645995221-0700)\/",
"DelegatedCode":"258CAD36B9EEE22F1CFDEB4C239D26BB",
"DelegatedCodeOwnerEmail":"webmaster@example.com",
"DelegatorEmail":"webmaster@example.com",
"Email":"webmaster@example.com",
"Expired":false,
"Role":2,
"Site":"http:\/\/host1.example.com",
"VerificationSite":"http:\/\/example.com"
}]
}

See Also

Show:
© 2014 Microsoft