Skip to content

tools.ozone.safelink.addRule

Lexicon Version: 1

Type: procedure

Add a new URL safety rule

Parameters: (None defined)

Input:

  • Encoding: application/json
  • Schema:

Schema Type: object

NameTypeReq’dDescriptionConstraints
urlstringThe URL or domain to apply the rule to
patterntools.ozone.safelink.defs#patternType
actiontools.ozone.safelink.defs#actionType
reasontools.ozone.safelink.defs#reasonType
commentstringOptional comment about the decision
createdBystringAuthor DID. Only respected when using admin authFormat: did
Output:
  • Encoding: application/json
  • Schema:

Schema Type: tools.ozone.safelink.defs#event

Possible Errors:

  • InvalidUrl: The provided URL is invalid
  • RuleAlreadyExists: A rule for this URL/domain already exists

{
"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": {
"url": {
"type": "string",
"description": "The URL or domain to apply the rule to"
},
"pattern": {
"type": "ref",
"ref": "tools.ozone.safelink.defs#patternType"
},
"action": {
"type": "ref",
"ref": "tools.ozone.safelink.defs#actionType"
},
"reason": {
"type": "ref",
"ref": "tools.ozone.safelink.defs#reasonType"
},
"comment": {
"type": "string",
"description": "Optional comment about the decision"
},
"createdBy": {
"type": "string",
"format": "did",
"description": "Author DID. Only respected when using admin auth"
}
}
}
},
"output": {
"encoding": "application/json",
"schema": {
"type": "ref",
"ref": "tools.ozone.safelink.defs#event"
}
},
"errors": [
{
"name": "InvalidUrl",
"description": "The provided URL is invalid"
},
{
"name": "RuleAlreadyExists",
"description": "A rule for this URL/domain already exists"
}
]
}
}
}