IWebmasterApi.AddSiteRoles(String, String, String, String, Boolean, Boolean) Method

Definition

Delegate site access to user

public:
 void AddSiteRoles(System::String ^ siteUrl, System::String ^ delegatedUrl, System::String ^ userEmail, System::String ^ authenticationCode, bool isAdministrator, bool isReadOnly);
[System.ServiceModel.FaultContract(typeof(Microsoft.Bing.Webmaster.Api.Interfaces.ApiFault))]
[System.ServiceModel.OperationContract]
[System.ServiceModel.Web.WebInvoke(BodyStyle=System.ServiceModel.Web.WebMessageBodyStyle.WrappedRequest, Method="POST")]
public void AddSiteRoles (string siteUrl, string delegatedUrl, string userEmail, string authenticationCode, bool isAdministrator, bool isReadOnly);
abstract member AddSiteRoles : string * string * string * string * bool * bool -> unit
Public Sub AddSiteRoles (siteUrl As String, delegatedUrl As String, userEmail As String, authenticationCode As String, isAdministrator As Boolean, isReadOnly As Boolean)

Parameters

siteUrl
String
delegatedUrl
String
userEmail
String
authenticationCode
String
isAdministrator
Boolean
isReadOnly
Boolean
Attributes

Examples

XML request sample

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

<AddSiteRoles xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api">
<siteUrl>http://example.com</siteUrl>
<delegatedUrl>http://host1.example.com</delegatedUrl>
<userEmail>webmaster@example.com</userEmail>
<authenticationCode>258CAD36B9EEE22F1CFDEB4C239D26BB</authenticationCode>
<isAdministrator>false</isAdministrator>
<isReadOnly>true</isReadOnly>
</AddSiteRoles>

XML response sample

HTTP/1.1 200 OK
Content-Length: 0

JSON request sample

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


{
"siteUrl":"http://example.com",
"delegatedUrl":"http://host1.example.com",
"userEmail":"webmaster@example.com",
"authenticationCode":"258CAD36B9EEE22F1CFDEB4C239D26BB",
"isAdministrator":false,
"isReadOnly":true
}

JSON response sample

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


{
"d":null
}

Remarks

queryParameter may contain only unreserved letters and colon symbol (:).
The site can has only limited number of url normalization marameters.

Applies to