Creates a web application targeting rule for the specified zone.
Reference
POST https://YOUR-NETWORK-DOMAIN/rest-api/zone/{zoneId}/targeting/is-web-app/create.do
Creates a web application targeting rule for the specified zone. Requires UPDATE permission on the zone and MANAGE_SUPPLY_PRE_TARGETING user permission.
Path Params
zoneIdintegerrequired
Unique numeric ID of the zone
200
Form Params
rulestringrequired
Targeting rule type — INCLUDE for whitelist or EXCLUDE for blacklist
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("POST"), "https://YOUR-NETWORK-DOMAIN/rest-api/zone/200/targeting/is-web-app/create.do");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
request.Content = new FormUrlEncodedContent(new Dictionary<string, string> { ["rule"] = "INCLUDE" });
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());