Export (0) Print
Expand All
Expand Minimize

IWebmasterApi.RemoveSiteRole

Namespace: Microsoft.Bing.Webmaster.Api

IWebmasterApi.RemoveSiteRole Method

Remove user site access

Syntax

void RemoveSiteRole(
string siteUrl,
SiteRoles siteRole
)

Parameters

siteUrl
Type: System.String
Site url

siteRole
Type: Microsoft.Bing.Webmaster.Api.SiteRoles
Site role

Examples

XML request sample

POST /webmaster/api.svc/pox/RemoveSiteRole?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/xml; charset=utf-8
Host: ssl.bing.com
Content-Length: 695

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

XML response sample

HTTP/1.1 200 OK
Content-Length: 0

JSON request sample

POST /webmaster/api.svc/json/RemoveSiteRole?apikey=EEDECC1EA4AE341CC57365E075EBC8B6 HTTP/1.1
Content-Type: application/json; charset=utf-8
Host: ssl.bing.com
Content-Length: 413


{
"siteUrl":"http:\/\/example.com",
"siteRole":
{
"__type":"SiteRoles:#Microsoft.Bing.Webmaster.Api",
"Date":"\/Date(1316645995237-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"
}
}

JSON response sample

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


{
"d":null
}

See Also

Show:
© 2014 Microsoft