tools.ozone.safelink.addRule

Add a new URL safety rule

Details · procedure
Kindprocedure
Authoritysafelink.ozone.tools
Commit rev3n2oxkzxdox2r
Indexed

Showing version bafyreihnl3w5wicdpg3andxxg67hvd5k56fazaie4lkogrql6ri4tcqmfq. Show the latest

cid bafyreihnl3w5wicdpg3andxxg67hvd5k56fazaie4lkogrql6ri4tcqmfq

Checks

Valid
  • unlimited-string defs.main.input.schema.properties.commentNo maxLength, maxGraphemes or format limits this string.
  • unlimited-string defs.main.input.schema.properties.urlNo maxLength, maxGraphemes or format limits this string.
JSONDownload
{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Add a new URL safety rule",
      "errors": [
        {
          "description": "The provided URL is invalid",
          "name": "InvalidUrl"
        },
        {
          "description": "A rule for this URL/domain already exists",
          "name": "RuleAlreadyExists"
        },
        {
          "description": "A rule for this URL/domain is owned by another source",
          "name": "RuleSourceConflict"
        }
      ],
      "input": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "action": {
              "ref": "tools.ozone.safelink.defs#actionType",
              "type": "ref"
            },
            "comment": {
              "description": "Optional comment about the decision",
              "type": "string"
            },
            "createdBy": {
              "description": "Author DID. Only respected when using admin auth",
              "format": "did",
              "type": "string"
            },
            "pattern": {
              "ref": "tools.ozone.safelink.defs#patternType",
              "type": "ref"
            },
            "reason": {
              "ref": "tools.ozone.safelink.defs#reasonType",
              "type": "ref"
            },
            "source": {
              "default": "ozone/default",
              "description": "Source of the rule",
              "maxLength": 128,
              "type": "string"
            },
            "url": {
              "description": "The URL or domain to apply the rule to",
              "type": "string"
            }
          },
          "required": [
            "url",
            "pattern",
            "action",
            "reason"
          ],
          "type": "object"
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "ref": "tools.ozone.safelink.defs#event",
          "type": "ref"
        }
      },
      "type": "procedure"
    }
  },
  "id": "tools.ozone.safelink.addRule",
  "lexicon": 1
}