Returns all active targeting rules that belong to the specified rule type.
Reference
GET https://YOUR-NETWORK-DOMAIN/rest-api/rules/zone/available-rules.do
Returns all active targeting rules that belong to the specified rule type. The 'type' query parameter selects the rule category (e.g. CAMPAIGN or INVENTORY). The response JSON contains a 'rules' array with the matching active rule objects including their names and IDs.
Query Params
typestringrequired
The targeting rule type to filter by (e.g. CAMPAIGN or INVENTORY)
using var client = new HttpClient();
var request = new HttpRequestMessage(new HttpMethod("GET"), "https://YOUR-NETWORK-DOMAIN/rest-api/rules/zone/available-rules.do?type=CAMPAIGN");
request.Headers.Add("X-Api-Key", "YOUR_API_KEY");
var response = await client.SendAsync(request);
Console.WriteLine(await response.Content.ReadAsStringAsync());