{
  "lexicon": 1,
  "id": "com.atproto.sync.getRepoStatus",
  "defs": {
    "main": {
      "type": "query",
      "description": "Get the hosting status for a repository, on this server. Expected to be implemented by PDS and Relay.",
      "parameters": {
        "type": "params",
        "required": [
          "did"
        ],
        "properties": {
          "did": {
            "type": "string",
            "description": "The DID of the repo.",
            "format": "did"
          }
        }
      },
      "output": {
        "encoding": "application/json",
        "schema": {
          "type": "object",
          "required": [
            "did",
            "active"
          ],
          "properties": {
            "active": {
              "type": "boolean"
            },
            "did": {
              "type": "string",
              "format": "did"
            },
            "rev": {
              "type": "string",
              "description": "Optional field, the current rev of the repo, if active=true",
              "format": "tid"
            },
            "status": {
              "type": "string",
              "description": "If active=false, this optional field indicates a possible reason for why the account is not active. If active=false and no status is supplied, then the host makes no claim for why the repository is no longer being hosted.",
              "knownValues": [
                "takendown",
                "suspended",
                "deleted",
                "deactivated",
                "desynchronized",
                "throttled"
              ]
            }
          }
        }
      },
      "errors": [
        {
          "name": "RepoNotFound"
        }
      ]
    }
  }
}