atproto blogging
at main 66 lines 1.7 kB view raw
1{ 2 "lexicon": 1, 3 "id": "tools.ozone.safelink.addRule", 4 "defs": { 5 "main": { 6 "type": "procedure", 7 "description": "Add a new URL safety rule", 8 "input": { 9 "encoding": "application/json", 10 "schema": { 11 "type": "object", 12 "required": [ 13 "url", 14 "pattern", 15 "action", 16 "reason" 17 ], 18 "properties": { 19 "action": { 20 "type": "ref", 21 "ref": "tools.ozone.safelink.defs#actionType" 22 }, 23 "comment": { 24 "type": "string", 25 "description": "Optional comment about the decision" 26 }, 27 "createdBy": { 28 "type": "string", 29 "description": "Author DID. Only respected when using admin auth", 30 "format": "did" 31 }, 32 "pattern": { 33 "type": "ref", 34 "ref": "tools.ozone.safelink.defs#patternType" 35 }, 36 "reason": { 37 "type": "ref", 38 "ref": "tools.ozone.safelink.defs#reasonType" 39 }, 40 "url": { 41 "type": "string", 42 "description": "The URL or domain to apply the rule to" 43 } 44 } 45 } 46 }, 47 "output": { 48 "encoding": "application/json", 49 "schema": { 50 "type": "ref", 51 "ref": "tools.ozone.safelink.defs#event" 52 } 53 }, 54 "errors": [ 55 { 56 "description": "The provided URL is invalid", 57 "name": "InvalidUrl" 58 }, 59 { 60 "description": "A rule for this URL/domain already exists", 61 "name": "RuleAlreadyExists" 62 } 63 ] 64 } 65 } 66}