{
  "$type": "com.atproto.lexicon.schema",
  "defs": {
    "main": {
      "description": "Get moderation history for the caller's account and records. Omits reports, notes, tags, and who acted. Works for former members. Requires service auth.",
      "errors": [
        {
          "name": "GroupNotFound"
        },
        {
          "description": "The subject isn't the caller's account or record.",
          "name": "InvalidSubject"
        },
        {
          "name": "InvalidCursor"
        }
      ],
      "output": {
        "encoding": "application/json",
        "schema": {
          "properties": {
            "cursor": {
              "type": "string"
            },
            "events": {
              "items": {
                "ref": "org.atgrp.mod.defs#eventView",
                "type": "ref"
              },
              "type": "array"
            }
          },
          "required": [
            "events"
          ],
          "type": "object"
        }
      },
      "parameters": {
        "properties": {
          "cursor": {
            "type": "string"
          },
          "group": {
            "format": "did",
            "type": "string"
          },
          "limit": {
            "default": 50,
            "maximum": 100,
            "minimum": 1,
            "type": "integer"
          },
          "sort": {
            "default": "newest",
            "knownValues": [
              "newest",
              "oldest"
            ],
            "type": "string"
          },
          "subject": {
            "description": "The caller's DID or one of their record URIs. Omit for all.",
            "format": "uri",
            "type": "string"
          }
        },
        "required": [
          "group"
        ],
        "type": "params"
      },
      "type": "query"
    }
  },
  "id": "org.atgrp.mod.querySelfHistory",
  "lexicon": 1
}
