Skip to content

Replace the domain category blocking configuration

Request

Replaces your organization's domain category blocking configuration with the configuration you send. Any rule you don't include is deleted.

A rule with an id updates the existing rule with that id. A rule without an id is created. Rules are evaluated in the order you send them, and the first rule that matches wins.

To change part of the configuration, retrieve it first, apply your changes, and send the complete configuration back.

Security
x-api-key
Bodyapplication/jsonrequired

The complete set of rules to save.

globalsobject(Domain Category Blocking Globals)required

Control-wide settings that apply across every rule.

rulesArray of objects(Domain Category Blocking Rule)required

Complete list of Domain Category Blocking rules.

curl -i -X PUT \
  https://eu1.api.pushsecurity.com/v1/controls/domainCategoryBlocking/configuration \
  -H 'Content-Type: application/json' \
  -H 'x-api-key: YOUR_API_KEY_HERE' \
  -d '{
    "globals": {},
    "rules": []
  }'

Responses

OK

Bodyapplication/json
globalsobject(Domain Category Blocking Globals)required

Control-wide settings that apply across every rule.

rulesArray of objects(Domain Category Blocking Rule)required

Complete list of Domain Category Blocking rules.

Response
{ "globals": { "ignoredDomains": [ "allowed-partner.example.com", "*.trusted.example.com" ] }, "rules": [ { "id": "c478966c-f927-411c-b919-179832d3d50c", "name": "Block gambling sites on company profiles", "enabled": true, "mode": "BLOCK", "title": "Access restricted", "subtext": "This site is blocked by your organization's browsing policy.", "buttonText": "Continue anyway", "ignoredDomains": [ "allowed-partner.example.com" ], "urlGranularity": "DOMAIN", "displayFrequency": "ONCE_PER_BROWSER", "createDetections": true, "severity": "MEDIUM", "criteria": { "domainCategories": { "matches": [ … ] }, "employeeIds": { "matches": [ … ] }, "employeeGroups": { "matches": [ … ] }, "profileScope": { "matches": [ … ] } } } ] }