IWebmasterApi.EnableDisableQueryParameter

Namespace: Microsoft.Bing.Webmaster.Api

IWebmasterApi.EnableDisableQueryParameter Method

Update URL normalization parameter

Syntax

void EnableDisableQueryParameter(
string siteUrl,
string queryParameter,
bool isEnabled
)

Parameters

siteUrl
Type: System.String
Site url

queryParameter
Type: Microsoft.Bing.Webmaster.Api.BlockedUrl
Query parameter

isEnabled
Type: System.Boolean
If isEnabled is True then it will enable the query params

Remarks

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

Examples

XML request sample

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

<EnableDisableQueryParameter xmlns="http://schemas.datacontract.org/2004/07/Microsoft.Bing.Webmaster.Api">
  <siteUrl>http://example.com/</siteUrl>
  <queryParameter>hello</queryParameter>
  <isEnabled>true</isEnabled>
</EnableDisableQueryParameter>

XML response sample

HTTP/1.1 200 OK
Content-Length: 0

JSON request sample

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

{"siteUrl":"http:\/\/example.com\/","queryParameter":"hello","isEnabled":false}

JSON response sample

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


{
"d":null
}

Exceptions

Exception Condition

Microsoft.Bing.Webmaster.Api

Thrown with error code InvalidParameter if queryParameter has invalid characters or if site has already reached limit of url normalization parameters

See Also

Concepts

Getting Started with Webmaster API
IWebmasterApi Members