{
  "openapi": "3.1.0",
  "info": {
    "title": "Escape Meridian public reading API",
    "version": "1.0.0",
    "description": "Free retained reading records. No arbitrary URL fetches. Preserve attribution, date precision, limitations, revision history and withdrawn status.",
    "contact": {
      "name": "James Nichols",
      "url": "https://escapemeridian.com/corrections/",
      "email": "james@jamesdnichols.com"
    }
  },
  "servers": [
    {
      "url": "https://escapemeridian.com"
    }
  ],
  "security": [],
  "paths": {
    "/stream.json": {
      "get": {
        "operationId": "readPublicStream",
        "summary": "Current readings plus the dated editorial seed collection on the first page",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Opaque nextCursor returned by the preceding page.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Normalized reading records, canonical links, readerContext and nextCursor.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/readings/{id}.json": {
      "get": {
        "operationId": "readPublicReading",
        "summary": "One canonical reading with source, context, limitations, revisions, audits and withdrawn status",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[a-z0-9-]{1,120}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attributed reading and history.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown reading."
          }
        }
      }
    },
    "/api/pipeline/stream": {
      "get": {
        "operationId": "listLiveRecords",
        "summary": "Published live records only; excludes the seed collection",
        "parameters": [
          {
            "name": "before",
            "in": "query",
            "required": false,
            "description": "Opaque nextCursor returned by the preceding page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 50,
              "default": 20
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Live publication items, readerContext by ID and nextCursor.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/api/pipeline/stream/{id}": {
      "get": {
        "operationId": "readLiveRecord",
        "summary": "Live record, full revisions and audit findings",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^[0-9a-f]{64}$"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Entry, readerContext, revisions, audits and withdrawn status.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "404": {
            "description": "Unknown live record."
          }
        }
      }
    },
    "/api/entities": {
      "get": {
        "operationId": "listEntityContext",
        "summary": "Public people, organizations and subject reference catalog",
        "responses": {
          "200": {
            "description": "Editorial context catalog.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  }
}
