{ "lexicon": 1, "id": "tools.ozone.safelink.addRule", "defs": { "main": { "type": "procedure", "description": "Add a new URL safety rule", "input": { "encoding": "application/json", "schema": { "type": "object", "required": [ "url", "pattern", "action", "reason" ], "properties": { "action": { "type": "ref", "ref": "tools.ozone.safelink.defs#actionType" }, "comment": { "type": "string", "description": "Optional comment about the decision" }, "createdBy": { "type": "string", "description": "Author DID. Only respected when using admin auth", "format": "did" }, "pattern": { "type": "ref", "ref": "tools.ozone.safelink.defs#patternType" }, "reason": { "type": "ref", "ref": "tools.ozone.safelink.defs#reasonType" }, "url": { "type": "string", "description": "The URL or domain to apply the rule to" } } } }, "output": { "encoding": "application/json", "schema": { "type": "ref", "ref": "tools.ozone.safelink.defs#event" } }, "errors": [ { "description": "The provided URL is invalid", "name": "InvalidUrl" }, { "description": "A rule for this URL/domain already exists", "name": "RuleAlreadyExists" } ] } } }