IWebmasterApi.GetSiteRoles(String, Boolean) Method

Definition

Get user site roles

public:
 System::Collections::Generic::List<Microsoft::Bing::Webmaster::Api::Interfaces::SiteRoles ^> ^ GetSiteRoles(System::String ^ siteUrl, bool includeAllSubdomains);
[System.ServiceModel.FaultContract(typeof(Microsoft.Bing.Webmaster.Api.Interfaces.ApiFault))]
[System.ServiceModel.OperationContract]
[System.ServiceModel.Web.WebGet(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest)]
public System.Collections.Generic.List<Microsoft.Bing.Webmaster.Api.Interfaces.SiteRoles> GetSiteRoles (string siteUrl, bool includeAllSubdomains);
abstract member GetSiteRoles : string * bool -> System.Collections.Generic.List<Microsoft.Bing.Webmaster.Api.Interfaces.SiteRoles>
Public Function GetSiteRoles (siteUrl As String, includeAllSubdomains As Boolean) As List(Of SiteRoles)

Parameters

siteUrl
String
includeAllSubdomains
Boolean

Returns

List<SiteRoles>
Attributes

Examples

XML request sample

GET /webmaster/api.svc/pox/GetSiteRoles?siteUrl=http://example.com&includeAllSubdomains=false&apikey=sampleapikeyedecc1ea4ae341cc8b6 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=sampleapikeyedecc1ea4ae341cc8b6 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"
}]
}

Remarks

Applies to