{
  "openapi": "3.1.0",
  "info": {
    "title": "IOTA Hub Public API v1",
    "description": "Submit observations, manage drafts and download files with the IOTA Hub API.\n\nSend your API key in the `X-API-Key` header. Access depends on your account permissions and the permissions selected for the key. Use keys in scripts and server applications, not browser code.\n\nStart with the [HTTP API guide](/developers/api). Create and manage keys on the [API keys page](/developers/keys).",
    "contact": {
      "name": "IOTA Hub Support",
      "email": "admin@iota-hub.com"
    },
    "license": {
      "name": "MIT"
    },
    "version": "1.0.0"
  },
  "servers": [
    {
      "url": "https://api.iota-hub.com",
      "description": "API base URL for this deployment."
    }
  ],
  "tags": [
    {
      "name": "Public API v1",
      "description": "Submit observations and retrieve events, observations and files through `/public/v1`. Send an API key in the `X-API-Key` header. Access is limited by your account permissions and the key scopes: `read` for reads and `observations:write` for writes. Use the API from scripts or servers; browser requests are not supported. To submit, create a draft, upload each file, finalize, wait for checks and submit. Within v1, existing response fields remain compatible and new fields may be added. API errors include `code`, `message`, `hint` and `details`. Use `code` in error-handling logic. Rate-limit responses include `Retry-After`."
    },
    {
      "name": "Key exchange (applications)",
      "description": "For an application that already holds a user's OccultWatcher (OWC) API key, such as Tangra: obtain a Hub API key for that user without the user creating one at /developers/keys. A script that uses its own key does not need these calls. They take no `X-API-Key`: the exchange and the sign-in start take the user's OWC key in the `OW-ApiKey` header and a body `{\"client\": \"<id>\"}` naming the application (an id the Hub knows, today only `tangra`; without it the call is for `tangra`, and an unknown id is `422 unknown_client`), and collect takes the sign-in's `collect_code` in its body. The issued key is limited to observer actions, has the scopes `observations:write` and `read`, and expires after 90 days; each exchange replaces the key the previous one issued to the same `client`. The exchange and the sign-in start share a limit of 20 calls per hour per IP address. Branch on the error `code`: `404 no_matching_account` means no Hub account was matched, so start the browser sign-in."
    }
  ],
  "security": [
    {
      "ApiKeyAuth": []
    }
  ],
  "paths": {
    "/public/v1/observations/drafts": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Create a draft and get upload URLs",
        "description": "Create a draft and get an upload URL and form fields for each file. Upload each file directly to S3, then call `finalize`.\n\nThe Hub reads the observer, asteroid, star, time and result from the report spreadsheet or Tangra JSON report. These fields cannot be set in this request.\n\nThe optional `aperture_record` file can be a PyMovie `.pymovie` or Tangra `.lc` file, up to 500 MB.\n\nFor extra files such as plots or notes, use `slot: \"attachment\"` for each file. An observation can have up to 25 attachments, each up to 50 MB. Executables and scripts are not allowed. Save each returned `attachment_id` for finalization or removal.",
        "operationId": "public_create_draft",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours.",
              "title": "Idempotency-Key"
            },
            "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicDraftCreateRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Draft created; `uploads` holds one target per file",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicDraftCreated"
                },
                "example": {
                  "observation": {
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "submission_status": "draft",
                    "status": "draft",
                    "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 0,
                    "created_at": "2026-03-15T08:02:00Z",
                    "updated_at": "2026-03-15T08:02:01Z",
                    "version": 2,
                    "created_via": "api",
                    "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                    "metadata": {
                      "confirm_unnumbered_asteroid_id": false,
                      "bypass_required_files": false
                    },
                    "files": {},
                    "readiness": {
                      "state": "in_progress",
                      "missing_required": [
                        "result_type",
                        "asteroid_id",
                        "asteroid_name",
                        "star",
                        "observed_at_utc",
                        "report"
                      ],
                      "open_findings": 0,
                      "dismissed_findings": 0,
                      "checks_current": false,
                      "event_files_blocked": false
                    },
                    "next_actions": [
                      "upload:report"
                    ]
                  },
                  "uploads": [
                    {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "upload_url": "https://prod-iota-hub-storage.s3.amazonaws.com/",
                      "fields": {
                        "key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/report_upload_1773562200.418265_4f1a9c2e.xlsx",
                        "policy": "eyJleHBpcmF0aW9uIjoi...",
                        "x-amz-signature": "1a2b3c..."
                      },
                      "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/report_upload_1773562200.418265_4f1a9c2e.xlsx"
                    }
                  ]
                }
              }
            }
          },
          "409": {
            "description": "`draft_limit_reached` — too many open drafts",
            "content": {
              "application/json": {
                "example": {
                  "code": "draft_limit_reached",
                  "message": "You already have 100 open drafts (the limit is 100). Submit or delete some before creating another.",
                  "hint": "You have too many open drafts. Submit or delete some before creating another.",
                  "details": {
                    "open_drafts": 100,
                    "limit": 100
                  }
                }
              }
            }
          },
          "422": {
            "description": "`file_too_large` (`details.slot`), `validation_error` (unknown slot, duplicate slot, bad extension, blocked attachment type, too many attachments)",
            "content": {
              "application/json": {
                "example": {
                  "code": "file_too_large",
                  "message": "report.xlsx is 31457280 bytes; the report slot accepts at most 15728640",
                  "hint": "The declared file is over the slot's size limit; see 'details.max_size_bytes'.",
                  "details": {
                    "slot": "report",
                    "size": 31457280,
                    "max_size_bytes": 15728640
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/finalize": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Finish uploads and start checks",
        "description": "Finish the uploads, read the report and start observer checks. The Hub first verifies that every file listed when creating the draft has been uploaded. Request `GET /public/v1/observations/{id}` to check progress.\n\nIf a file is missing, the API returns `409 upload_missing` with its file type in `details.slot`. Upload the missing file and retry. Files already uploaded are retained.",
        "operationId": "public_finalize_draft",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours.",
              "title": "Idempotency-Key"
            },
            "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours."
          }
        ],
        "responses": {
          "200": {
            "description": "Uploads committed; `checks.run_id` names the run",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "draft",
                  "status": "draft",
                  "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:11:00Z",
                  "version": 6,
                  "created_via": "api",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "readiness": {
                    "state": "checking",
                    "missing_required": [],
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "checks_current": false,
                    "event_files_blocked": false,
                    "latest_run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70"
                  },
                  "checks": {
                    "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                    "status": "running",
                    "checks_current": false,
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "findings": [],
                    "skipped": []
                  },
                  "next_actions": [
                    "poll"
                  ],
                  "report_parse": {
                    "status": "parsed"
                  },
                  "owc": {}
                }
              }
            }
          },
          "404": {
            "description": "`not_found` — no such draft, or not yours",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Draft not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`upload_missing` — a declared file never arrived",
            "content": {
              "application/json": {
                "example": {
                  "code": "upload_missing",
                  "message": "No file was uploaded for the lightcurve slot. POST the presigned target from the create response, then finalize again.",
                  "hint": "A file declared at create was never uploaded. POST its presigned target (see 'details.slot'), then call finalize again.",
                  "details": {
                    "slot": "lightcurve",
                    "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/lightcurve_upload_1773562214.902113_b83e07d5.csv"
                  }
                }
              }
            }
          },
          "422": {
            "description": "`validation_error` — a `.pymovie` aperture record without PyMovie's signature (`details.code` `INVALID_MAGIC_BYTES`); nothing is committed",
            "content": {
              "application/json": {
                "example": {
                  "code": "validation_error",
                  "message": "The .pymovie file is not a PyMovie aperture record: it does not start with the PYMOVIE file signature.",
                  "hint": "A body field or query parameter is invalid. For a schema error, 'details.errors' lists each problem: 'loc' names the field and 'msg' says what is wrong. Otherwise 'message' says what is wrong.",
                  "details": {
                    "slot": "aperture_record",
                    "filename": "lightcurve.pymovie",
                    "code": "INVALID_MAGIC_BYTES"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/files/{slot}/upload/init": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Get a file upload URL",
        "description": "Get an upload URL and form fields for a replacement file. Upload the file, then call the corresponding `upload/finalize` endpoint.\n\nOwners can replace files on drafts and submitted observations. Once the event enters review, owner uploads are rejected with `409 already_processed`.",
        "operationId": "public_init_file_upload",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slot"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicInitUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload target for this slot",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicUploadTarget"
                },
                "example": {
                  "slot": "report",
                  "filename": "report.xlsx",
                  "upload_url": "https://prod-iota-hub-storage.s3.amazonaws.com/",
                  "fields": {
                    "key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/report_upload_1773562200.418265_4f1a9c2e.xlsx",
                    "policy": "eyJleHBpcmF0aW9uIjoi...",
                    "x-amz-signature": "1a2b3c..."
                  },
                  "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/report_upload_1773562200.418265_4f1a9c2e.xlsx"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`already_processed` — the event is in review or later",
            "content": {
              "application/json": {
                "example": {
                  "code": "already_processed",
                  "message": "Cannot edit observation attached to event in IN_REVIEW status.",
                  "hint": "This observation's event is in review or later, so the observer can no longer change its files. Contact a coordinator if a correction is needed.",
                  "details": {
                    "status": "locked",
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 1
                  }
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/files/{slot}/upload/finalize": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Save an uploaded file",
        "description": "Save an uploaded file to the observation. On a draft, replacing the report updates the observation details read from it. The response's `report_parse` field indicates whether the report was read successfully.\n\nWhen an owner replaces a submitted file, the API sets `amended_at`, increments `amendment_count` and changes the status to `amended`. A replacement report must identify the same asteroid, star, UTC date, result and station. Otherwise, the API returns `422 identity_changed`, lists the differences in `details.changed` and leaves the observation unchanged.\n\nOnce the event enters review, owner uploads are rejected with `409 already_processed`.",
        "operationId": "public_finalize_file_upload",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slot"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours.",
              "title": "Idempotency-Key"
            },
            "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicFinalizeUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "File committed; the updated observation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "examples": {
                  "draft": {
                    "value": {
                      "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "submission_status": "draft",
                      "status": "draft",
                      "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "amendment_count": 0,
                      "created_at": "2026-03-15T08:02:00Z",
                      "updated_at": "2026-03-15T08:11:00Z",
                      "version": 6,
                      "created_via": "api",
                      "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                      "metadata": {
                        "observer_name": "A. Observer",
                        "observer_email": "observer@example.org",
                        "asteroid_id": "1036",
                        "asteroid_name": "Ganymed",
                        "star_catalog": "GAIA",
                        "star_id": "1234567890123456789",
                        "observed_at_utc": "2026-03-14T04:12:07Z",
                        "result_type": "POS",
                        "confirm_unnumbered_asteroid_id": false,
                        "bypass_required_files": false
                      },
                      "report_details": {
                        "started_observing": "04:10:00",
                        "d_uncorrected": "04:12:07.245000",
                        "r_uncorrected": "04:12:09.805000",
                        "d_err_68": 0.024,
                        "d_err_95": 0.06,
                        "d_err_9973": 0.159,
                        "r_err_68": 0.024,
                        "r_err_95": 0.06,
                        "r_err_9973": 0.159,
                        "stopped_observing": "04:15:00",
                        "aperture": "8 in",
                        "f_ratio": "10",
                        "telescope_type": "SCT including Cass and Mak",
                        "timing_source": "GPS - time inserted",
                        "timing_method": "Video with frame analysis",
                        "timing_device": "IOTA-VTI",
                        "ote_used": "PYOTE",
                        "detector_model": "Watec 910HX",
                        "video_format": "NTSC/EIA",
                        "integration": "2x",
                        "clouds": "Clear",
                        "stability": "Steady"
                      },
                      "report_site": {
                        "observing_location": "Near Tucson, AZ",
                        "latitude": "32 13 18.1 N",
                        "longitude": "110 56 41.2 W",
                        "elevation": "780 m",
                        "datum": "WGS84"
                      },
                      "files": {
                        "report": {
                          "slot": "report",
                          "filename": "report.xlsx",
                          "size_bytes": 51234,
                          "uploaded_at": "2026-03-15T08:10:00Z"
                        }
                      },
                      "readiness": {
                        "state": "checking",
                        "missing_required": [],
                        "open_findings": 0,
                        "dismissed_findings": 0,
                        "checks_current": false,
                        "event_files_blocked": false,
                        "latest_run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70"
                      },
                      "checks": {
                        "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                        "status": "running",
                        "checks_current": false,
                        "open_findings": 0,
                        "dismissed_findings": 0,
                        "findings": [],
                        "skipped": []
                      },
                      "next_actions": [
                        "poll"
                      ],
                      "report_parse": {
                        "status": "parsed"
                      },
                      "owc": {}
                    }
                  },
                  "amended": {
                    "value": {
                      "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "submission_status": "submitted",
                      "status": "amended",
                      "web_url": "https://iota-hub.com/observations/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "submitted_at": "2026-03-15T08:30:00Z",
                      "amended_at": "2026-03-16T09:00:00Z",
                      "amendment_count": 1,
                      "created_at": "2026-03-15T08:02:00Z",
                      "updated_at": "2026-03-16T09:00:00Z",
                      "version": 9,
                      "created_via": "api",
                      "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                      "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                      "metadata": {
                        "observer_name": "A. Observer",
                        "observer_email": "observer@example.org",
                        "asteroid_id": "1036",
                        "asteroid_name": "Ganymed",
                        "star_catalog": "GAIA",
                        "star_id": "1234567890123456789",
                        "observed_at_utc": "2026-03-14T04:12:07Z",
                        "result_type": "POS",
                        "confirm_unnumbered_asteroid_id": false,
                        "bypass_required_files": false
                      },
                      "report_details": {
                        "started_observing": "04:10:00",
                        "d_uncorrected": "04:12:07.245000",
                        "r_uncorrected": "04:12:09.805000",
                        "d_err_68": 0.024,
                        "d_err_95": 0.06,
                        "d_err_9973": 0.159,
                        "r_err_68": 0.024,
                        "r_err_95": 0.06,
                        "r_err_9973": 0.159,
                        "stopped_observing": "04:15:00",
                        "aperture": "8 in",
                        "f_ratio": "10",
                        "telescope_type": "SCT including Cass and Mak",
                        "timing_source": "GPS - time inserted",
                        "timing_method": "Video with frame analysis",
                        "timing_device": "IOTA-VTI",
                        "ote_used": "PYOTE",
                        "detector_model": "Watec 910HX",
                        "video_format": "NTSC/EIA",
                        "integration": "2x",
                        "clouds": "Clear",
                        "stability": "Steady"
                      },
                      "report_site": {
                        "observing_location": "Near Tucson, AZ",
                        "latitude": "32 13 18.1 N",
                        "longitude": "110 56 41.2 W",
                        "elevation": "780 m",
                        "datum": "WGS84"
                      },
                      "files": {
                        "report": {
                          "slot": "report",
                          "filename": "report.xlsx",
                          "size_bytes": 51234,
                          "uploaded_at": "2026-03-15T08:10:00Z"
                        }
                      },
                      "next_actions": [],
                      "owc": {}
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`already_processed` — the event is in review or later",
            "content": {
              "application/json": {
                "example": {
                  "code": "already_processed",
                  "message": "Cannot edit observation attached to event in IN_REVIEW status.",
                  "hint": "This observation's event is in review or later, so the observer can no longer change its files. Contact a coordinator if a correction is needed.",
                  "details": {
                    "status": "locked",
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 1
                  }
                }
              }
            }
          },
          "422": {
            "description": "`identity_changed` (amend) or `validation_error` (including a `.pymovie` aperture record without PyMovie's signature, `details.code` `INVALID_MAGIC_BYTES`)",
            "content": {
              "application/json": {
                "example": {
                  "code": "identity_changed",
                  "message": "The replacement report describes a different observation: star_id changed.",
                  "hint": "The replacement report describes a different observation (see 'details.changed'). Fix the report so it describes this observation; a different observation is a new submission.",
                  "details": {
                    "status": "submitted",
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 0,
                    "changed": [
                      {
                        "field": "star_id",
                        "stored": "1234567890123456789",
                        "parsed": "1234567890123456780"
                      }
                    ]
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/files/{slot}": {
      "delete": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Remove one file",
        "description": "Remove a file from the observation. Removing a draft's report also clears the details read from that report. Required information must be supplied again before submission.\n\nOwners cannot remove files from submitted observations (`403 forbidden`).",
        "operationId": "public_delete_file",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "slot",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Slot"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Slot cleared; the updated observation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "draft",
                  "status": "draft",
                  "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:02:01Z",
                  "version": 2,
                  "created_via": "api",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "files": {},
                  "readiness": {
                    "state": "in_progress",
                    "missing_required": [
                      "result_type",
                      "asteroid_id",
                      "asteroid_name",
                      "star",
                      "observed_at_utc",
                      "report"
                    ],
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "checks_current": false,
                    "event_files_blocked": false
                  },
                  "next_actions": [
                    "upload:report"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/attachments/upload/init": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Get an attachment upload URL",
        "description": "Get an upload URL and form fields for an attachment. Save the returned `attachment_id` for finalization or removal.\n\nAn observation can have up to 25 attachments, each up to 50 MB; an attachment this upload replaces (same filename) does not count. Exceeding the count returns `422 validation_error` with `details.max_allowed`. Executables and scripts return `422 validation_error` with `details.blocked_extension`. S3 enforces the upload size limit.",
        "operationId": "public_init_attachment_upload",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicInitUploadRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Upload target for the new attachment",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicUploadTarget"
                },
                "example": {
                  "slot": "attachment",
                  "filename": "pyote_plot.png",
                  "upload_url": "https://prod-iota-hub-storage.s3.amazonaws.com/",
                  "fields": {
                    "key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/attachment_3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90_1773563400.517902.png",
                    "policy": "eyJleHBpcmF0aW9uIjoi...",
                    "x-amz-signature": "1a2b3c..."
                  },
                  "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/attachment_3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90_1773563400.517902.png",
                  "attachment_id": "3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90"
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/attachments/upload/finalize": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Save an uploaded attachment",
        "description": "Save an uploaded attachment to the observation. The Hub records its actual uploaded size. A filename exactly matching an existing attachment (case-sensitive) replaces it, unless the owner is uploading over a reviewer's or coordinator's file, which is kept and the upload added. Attachments are not used by observer checks, so adding one does not require new checks.",
        "operationId": "public_finalize_attachment_upload",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours.",
              "title": "Idempotency-Key"
            },
            "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours."
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicFinalizeAttachmentRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Attachment committed; the updated observation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "draft",
                  "status": "draft",
                  "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:11:00Z",
                  "version": 6,
                  "created_via": "api",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "readiness": {
                    "state": "checking",
                    "missing_required": [],
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "checks_current": false,
                    "event_files_blocked": false,
                    "latest_run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70"
                  },
                  "checks": {
                    "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                    "status": "running",
                    "checks_current": false,
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "findings": [],
                    "skipped": []
                  },
                  "next_actions": [
                    "poll"
                  ],
                  "report_parse": {
                    "status": "parsed"
                  },
                  "owc": {},
                  "attachments": [
                    {
                      "attachment_id": "3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90",
                      "slot": "attachment",
                      "filename": "pyote_plot.png",
                      "size_bytes": 90211,
                      "uploaded_at": "2026-03-15T08:12:00Z"
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/attachments/{attachment_id}": {
      "delete": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Remove one attachment",
        "description": "Remove an attachment by its `attachment_id`. This can also cancel an attachment listed when creating the draft but not yet finalized. Draft finalization will no longer require that attachment.",
        "operationId": "public_delete_attachment",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "attachment_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Attachment Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Attachment removed; the updated observation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "draft",
                  "status": "draft",
                  "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:11:00Z",
                  "version": 6,
                  "created_via": "api",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "readiness": {
                    "state": "checking",
                    "missing_required": [],
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "checks_current": false,
                    "event_files_blocked": false,
                    "latest_run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70"
                  },
                  "checks": {
                    "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                    "status": "running",
                    "checks_current": false,
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "findings": [],
                    "skipped": []
                  },
                  "next_actions": [
                    "poll"
                  ],
                  "report_parse": {
                    "status": "parsed"
                  },
                  "owc": {}
                }
              }
            }
          },
          "404": {
            "description": "`not_found` — no such observation or attachment",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Attachment not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/validation/runs": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Run the observer checks",
        "description": "Start observer checks on a draft. The response returns immediately with `status: running`. Request `GET /public/v1/observations/{id}` to check progress and read findings.\n\nEach API key can start up to 100 runs per hour. A `429` response includes the retry delay in `Retry-After`.",
        "operationId": "public_run_checks",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "responses": {
          "202": {
            "description": "Run enqueued",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChecks"
                },
                "example": {
                  "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                  "status": "running",
                  "checks_current": false,
                  "open_findings": 0,
                  "dismissed_findings": 0,
                  "findings": [],
                  "skipped": []
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Draft not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`check_run_in_progress` — a run is already under way",
            "content": {
              "application/json": {
                "example": {
                  "code": "check_run_in_progress",
                  "message": "A validation run is already in progress for this observation",
                  "hint": "A check run is already under way for this draft; poll GET /public/v1/observations/{id} instead of starting another."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited` — too many runs for this key; `Retry-After` carries the wait in seconds",
            "content": {
              "application/json": {
                "example": {
                  "code": "rate_limited",
                  "message": "Rate limit exceeded for check_run. Try again in 1800 seconds.",
                  "hint": "Wait for the number of seconds in the Retry-After header, then retry."
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/validation/findings/{fingerprint}/dismiss": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Dismiss a finding",
        "description": "Dismiss a finding with a written explanation. It will no longer prevent submission. The explanation and the use of an API key are recorded for the reviewer.\n\nA finding about a missing required item cannot be dismissed (`422 not_dismissable`). Supply the item instead.",
        "operationId": "public_dismiss_finding",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "fingerprint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Fingerprint"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDismissRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Dismissed; the run with the dismissal recorded",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChecks"
                },
                "example": {
                  "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                  "status": "complete",
                  "checks_current": true,
                  "open_findings": 0,
                  "dismissed_findings": 1,
                  "findings": [
                    {
                      "check_number": 12,
                      "code": "observation_predicted_time",
                      "name": "Near predicted time",
                      "severity": "warning",
                      "message": "Mid-event 04:12:07.40 · OWC at your station 04:11:31.25 · 36 s apart.",
                      "how_to_fix": "The mid-event time is far from the predicted time. Check the recording's time source and the event you are reporting; if the timing is correct, dismiss with a note.",
                      "doc_url": "https://iota-hub.com/developers/checks#check-12",
                      "fingerprint": "9c1e4b7a02d35f68",
                      "evidence": [
                        {
                          "source": "report:3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                          "field": "predicted_time",
                          "expected": "04:11:31.25",
                          "actual": "04:12:07.40",
                          "expected_label": "Predicted",
                          "actual_label": "Mid-event",
                          "mismatch": true,
                          "file_ref": "report:3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17"
                        }
                      ],
                      "dismissal": {
                        "dismissed_by": "A. Observer",
                        "dismissed_at": "2026-03-15T08:20:00Z",
                        "note": "GPS-timed recording; the OWC orbit is out of date for this asteroid.",
                        "via": "api"
                      }
                    }
                  ],
                  "skipped": [
                    {
                      "check_number": 12,
                      "code": "observation_predicted_time",
                      "name": "Near predicted time",
                      "status": "skipped",
                      "reason": "No OWC match: 2 candidates — pick one."
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "`not_found` — no such draft or finding",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Finding not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "`not_dismissable`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_dismissable",
                  "message": "Required-item findings cannot be dismissed; supply the missing item instead.",
                  "hint": "This finding reports a missing required item — supply the item instead of dismissing it."
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Undo a dismissal",
        "description": "Undo a dismissal. The finding must then be fixed or dismissed before submission.",
        "operationId": "public_undo_dismissal",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "fingerprint",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Fingerprint"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Dismissal removed; the finding is open again",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicChecks"
                },
                "example": {
                  "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                  "status": "complete",
                  "checks_current": true,
                  "open_findings": 1,
                  "dismissed_findings": 0,
                  "findings": [
                    {
                      "check_number": 12,
                      "code": "observation_predicted_time",
                      "name": "Near predicted time",
                      "severity": "warning",
                      "message": "Mid-event 04:12:07.40 · OWC at your station 04:11:31.25 · 36 s apart.",
                      "how_to_fix": "The mid-event time is far from the predicted time. Check the recording's time source and the event you are reporting; if the timing is correct, dismiss with a note.",
                      "doc_url": "https://iota-hub.com/developers/checks#check-12",
                      "fingerprint": "9c1e4b7a02d35f68",
                      "evidence": [
                        {
                          "source": "report:3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                          "field": "predicted_time",
                          "expected": "04:11:31.25",
                          "actual": "04:12:07.40",
                          "expected_label": "Predicted",
                          "actual_label": "Mid-event",
                          "mismatch": true,
                          "file_ref": "report:3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17"
                        }
                      ]
                    }
                  ],
                  "skipped": [
                    {
                      "check_number": 12,
                      "code": "observation_predicted_time",
                      "name": "Near predicted time",
                      "status": "skipped",
                      "reason": "No OWC match: 2 candidates — pick one."
                    }
                  ]
                }
              }
            }
          },
          "404": {
            "description": "`not_found` — no such draft or dismissal",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Dismissal not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}": {
      "patch": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Update draft details",
        "description": "Update a draft's OWC link, asteroid confirmation, comments or required-file exemption. Fields omitted from the request stay unchanged. Changes start a new check run. Include the latest `version`; an outdated version returns `409 stale_version`.\n\nThe Hub tries to match an Occult Watcher Cloud (OWC) event after reading the report; a Tangra JSON report's `optionalData.prediction.owcEventId` is used as the link instead (`owc.choice` `report`), checked against OWC and dropped for the Hub's own match if OWC has no such event or it disagrees with the report. Every upload of a report that names an event sets it again, replacing a choice made here. Read `owc.resolution` for the result. To select an event yourself, set `owc_link_choice`:\n\n- `picked`: set `owc_event` to an ID from `owc.resolution.candidates`.\n- `pasted`: set `owc_event` to an OWC ID or URL. The Hub verifies it against OWC and the report.\n- `proceed_unlinked`: continue without an OWC link.\n\nReport fields cannot be edited here (`422 report_derived_fields`, with `details.fields`). OWC errors include `422 owc_not_a_candidate`, `422 owc_link_unparseable`, `422 owc_link_not_found`, `422 owc_link_mismatch` (with `details.violations`) and `503 owc_unavailable`.",
        "operationId": "public_update_draft",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicDraftUpdateRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Updated draft",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "draft",
                  "status": "draft",
                  "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:11:00Z",
                  "version": 7,
                  "created_via": "api",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "readiness": {
                    "state": "checking",
                    "missing_required": [],
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "checks_current": false,
                    "event_files_blocked": false,
                    "latest_run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70"
                  },
                  "checks": {
                    "run_id": "5c9d2e7a-1b84-4f06-8a3c-e2f19b6d4a70",
                    "status": "running",
                    "checks_current": false,
                    "open_findings": 0,
                    "dismissed_findings": 0,
                    "findings": [],
                    "skipped": []
                  },
                  "next_actions": [
                    "poll"
                  ],
                  "report_parse": {
                    "status": "parsed"
                  },
                  "owc": {
                    "choice": "picked",
                    "owc_event_id": "1917-2448-97311-649282-U033649",
                    "owc_event_url": "https://cloud.occultwatcher.net/event/1917-2448-97311-649282-U033649",
                    "resolution": {
                      "status": "ambiguous",
                      "reason": "2 OWC events match this asteroid and date.",
                      "candidates": [
                        {
                          "owc_event_id": "1917-2448-97311-649282-U033649",
                          "owc_event_url": "https://cloud.occultwatcher.net/event/1917-2448-97311-649282-U033649",
                          "asteroid": "(2448) Sholokhov",
                          "star": "UCAC4 544-028351",
                          "star_mag": 12.41,
                          "closest_approach_utc": "2026-Mar-15, 04:59:12",
                          "mag_drop": 3.2
                        },
                        {
                          "owc_event_id": "1917-2448-97311-649282-U033650",
                          "owc_event_url": "https://cloud.occultwatcher.net/event/1917-2448-97311-649282-U033650",
                          "asteroid": "(2448) Sholokhov",
                          "star": "TYC 1234-00567-1",
                          "star_mag": 12.39,
                          "closest_approach_utc": "2026-Mar-15, 04:59:12",
                          "mag_drop": 3.2
                        }
                      ],
                      "mismatches": [],
                      "resolved_at": "2026-03-15T08:10:04Z"
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Draft not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`stale_version`",
            "content": {
              "application/json": {
                "example": {
                  "code": "stale_version",
                  "message": "Draft was modified elsewhere. Refresh and try again.",
                  "hint": "The observation changed since you read it. Re-read it and retry with the new 'version'.",
                  "details": {
                    "expected_version": 6,
                    "current_version": 7
                  }
                }
              }
            }
          },
          "422": {
            "description": "`report_derived_fields`, `owc_not_a_candidate`, `owc_link_unparseable`, `owc_link_not_found`, `owc_link_mismatch` or `validation_error`",
            "content": {
              "application/json": {
                "example": {
                  "code": "report_derived_fields",
                  "message": "These fields come from the uploaded report and cannot be set directly: asteroid_id.",
                  "hint": "These fields come from the report spreadsheet. Upload a corrected report instead — finalizing the report slot rewrites them.",
                  "details": {
                    "fields": [
                      "asteroid_id"
                    ]
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          },
          "503": {
            "description": "`owc_unavailable` — OWC could not validate a pasted link",
            "content": {
              "application/json": {
                "example": {
                  "code": "owc_unavailable",
                  "message": "OWC could not be reached to validate the link.",
                  "hint": "Occult Watcher Cloud could not be reached. Retry after the number of seconds in the Retry-After header; for an OWC link you may instead proceed without one."
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "delete": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Delete a draft",
        "description": "Delete an unsubmitted draft and its files. Submitted observations cannot be deleted through this API (`409 already_submitted`). Contact a coordinator if one needs to be removed.\n\nAnother user's submitted observation returns `403 forbidden`; another user's draft returns `404 not_found`.",
        "operationId": "public_delete_draft",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "responses": {
          "204": {
            "description": "Draft deleted (no body)"
          },
          "403": {
            "description": "`forbidden` — another user's submitted observation",
            "content": {
              "application/json": {
                "example": {
                  "code": "forbidden",
                  "message": "This observation belongs to another user.",
                  "hint": "Your account cannot perform this action. An API key has the privileges you have in the web app; a key issued by the OWC key exchange is limited to observer actions."
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Observation not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`already_submitted` — submitted observations stay",
            "content": {
              "application/json": {
                "example": {
                  "code": "already_submitted",
                  "message": "This observation has been submitted; the public API does not delete submitted observations.",
                  "hint": "This observation is already submitted. Submit answers 200 with its current state; a submitted observation cannot be deleted through the API.",
                  "details": {
                    "status": "submitted",
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 0
                  }
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      },
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Get one observation",
        "description": "Get an observation or draft. Only the owner can read a draft; other callers receive `404`.\n\nFor drafts, `readiness` describes what is needed for submission, `checks` contains the latest check results (or null if checks have never run), and `next_actions` lists the next steps.",
        "operationId": "public_get_observation",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "submitted",
                  "status": "amended",
                  "web_url": "https://iota-hub.com/observations/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submitted_at": "2026-03-15T08:30:00Z",
                  "amended_at": "2026-03-15T09:05:00Z",
                  "amendment_count": 1,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T09:05:00Z",
                  "version": 3,
                  "created_via": "api",
                  "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "station": "2",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "20260314_1036_Ganymed_POS-2.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "attachments": [],
                  "next_actions": []
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/submit": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Submit a draft",
        "description": "Submit a draft and attach it to a matching or newly created event. Optionally send `version` to ensure the draft has not changed since you read it. An outdated version returns `409 stale_version`; omitting it submits the current version.\n\nIf the observation is already submitted, the request returns `200` with its current state. If another submit of the draft is under way, such as the automatic submit requested with `auto_submit_when_clean`, the request waits up to about 20 seconds for it and returns `200` with the submitted observation. If that submit is still running, the response is `409 submit_in_progress`, which is not a failure by itself: read the observation, and if it is a draft again with `submit` in `next_actions`, call submit again.\n\nSubmission can fail with `422 missing_required`, `409 open_findings`, `409 checks_stale`, `409 stale_version`, `409 event_files_conflict` or `422 owc_link_mismatch`. The response's `details` identify missing items, open findings or OWC differences where applicable. Errors caused by the observation's state include `status`, `observation_id` and `amendment_count` in `details`.\n\nAn unresolved OWC link does not prevent submission. Check 12 is skipped when no link is available.\n\nAnother user's submitted observation returns `403 forbidden`; another user's draft returns `404 not_found`.",
        "operationId": "public_submit_draft",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours.",
              "title": "Idempotency-Key"
            },
            "description": "Client-generated key making this call safe to retry. A replay returns the first call's response and does no second write. Keys expire after 24 hours."
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicSubmitRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Submitted (or already submitted: its current state)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservation"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submission_status": "submitted",
                  "status": "submitted",
                  "web_url": "https://iota-hub.com/observations/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "submitted_at": "2026-03-15T08:30:00Z",
                  "amendment_count": 0,
                  "created_at": "2026-03-15T08:02:00Z",
                  "updated_at": "2026-03-15T08:30:00Z",
                  "version": 8,
                  "created_via": "api",
                  "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                  "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                  "metadata": {
                    "observer_name": "A. Observer",
                    "observer_email": "observer@example.org",
                    "asteroid_id": "1036",
                    "asteroid_name": "Ganymed",
                    "star_catalog": "GAIA",
                    "star_id": "1234567890123456789",
                    "observed_at_utc": "2026-03-14T04:12:07Z",
                    "result_type": "POS",
                    "confirm_unnumbered_asteroid_id": false,
                    "bypass_required_files": false
                  },
                  "report_details": {
                    "started_observing": "04:10:00",
                    "d_uncorrected": "04:12:07.245000",
                    "r_uncorrected": "04:12:09.805000",
                    "d_err_68": 0.024,
                    "d_err_95": 0.06,
                    "d_err_9973": 0.159,
                    "r_err_68": 0.024,
                    "r_err_95": 0.06,
                    "r_err_9973": 0.159,
                    "stopped_observing": "04:15:00",
                    "aperture": "8 in",
                    "f_ratio": "10",
                    "telescope_type": "SCT including Cass and Mak",
                    "timing_source": "GPS - time inserted",
                    "timing_method": "Video with frame analysis",
                    "timing_device": "IOTA-VTI",
                    "ote_used": "PYOTE",
                    "detector_model": "Watec 910HX",
                    "video_format": "NTSC/EIA",
                    "integration": "2x",
                    "clouds": "Clear",
                    "stability": "Steady"
                  },
                  "report_site": {
                    "observing_location": "Near Tucson, AZ",
                    "latitude": "32 13 18.1 N",
                    "longitude": "110 56 41.2 W",
                    "elevation": "780 m",
                    "datum": "WGS84"
                  },
                  "files": {
                    "report": {
                      "slot": "report",
                      "filename": "report.xlsx",
                      "size_bytes": 51234,
                      "uploaded_at": "2026-03-15T08:10:00Z"
                    }
                  },
                  "next_actions": [],
                  "owc": {}
                }
              }
            }
          },
          "403": {
            "description": "`forbidden` — another user's submitted observation",
            "content": {
              "application/json": {
                "example": {
                  "code": "forbidden",
                  "message": "This observation belongs to another user.",
                  "hint": "Your account cannot perform this action. An API key has the privileges you have in the web app; a key issued by the OWC key exchange is limited to observer actions."
                }
              }
            }
          },
          "404": {
            "description": "`not_found`",
            "content": {
              "application/json": {
                "example": {
                  "code": "not_found",
                  "message": "Draft not found",
                  "hint": "Check the id, and that the resource is visible to your account."
                }
              }
            }
          },
          "409": {
            "description": "`open_findings`, `checks_stale`, `stale_version`, `event_files_conflict` or `submit_in_progress`",
            "content": {
              "application/json": {
                "example": {
                  "code": "open_findings",
                  "message": "Draft has findings that are neither fixed nor dismissed",
                  "hint": "Fix the listed findings by replacing the offending file, or dismiss each one with a note, then submit again.",
                  "details": {
                    "status": "draft",
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "amendment_count": 0,
                    "open_findings": 1
                  }
                }
              }
            }
          },
          "422": {
            "description": "`missing_required`",
            "content": {
              "application/json": {
                "example": {
                  "code": "missing_required",
                  "message": "Draft is missing required items",
                  "hint": "Supply every item listed in 'details.missing_required', then submit again.",
                  "details": {
                    "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "missing_required": [
                      "lightcurve",
                      "log"
                    ]
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/events": {
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "List events",
        "description": "List events, newest first by default. Use the query parameters to filter results. Pass `next_cursor` as the next request's `cursor` parameter to retrieve another page. A null cursor means there are no more pages.\n\nBefore an event is `COMPLETE`, `files` is null unless your account has `event.files.view_pre_complete` permission.",
        "operationId": "public_list_events",
        "parameters": [
          {
            "name": "status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Workflow status; comma-separate for OR, e.g. 'REVIEWED,COMPLETE'.",
              "examples": [
                "COMPLETE"
              ],
              "title": "Status"
            },
            "description": "Workflow status; comma-separate for OR, e.g. 'REVIEWED,COMPLETE'."
          },
          {
            "name": "asteroid_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asteroid designation (exact or partial match)",
              "title": "Asteroid Id"
            },
            "description": "Asteroid designation (exact or partial match)"
          },
          {
            "name": "asteroid_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asteroid name (exact or partial match)",
              "title": "Asteroid Name"
            },
            "description": "Asteroid name (exact or partial match)"
          },
          {
            "name": "star_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Star identifier (exact or partial match)",
              "title": "Star Id"
            },
            "description": "Star identifier (exact or partial match)"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only events with date_window_utc at or after this ISO 8601 datetime or date. No offset means UTC; a date means the start of that UTC day.",
              "title": "Date From"
            },
            "description": "Only events with date_window_utc at or after this ISO 8601 datetime or date. No offset means UTC; a date means the start of that UTC day."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only events with date_window_utc at or before this ISO 8601 datetime or date. No offset means UTC; a date includes all of that UTC day.",
              "title": "Date To"
            },
            "description": "Only events with date_window_utc at or before this ISO 8601 datetime or date. No offset means UTC; a date includes all of that UTC day."
          },
          {
            "name": "observer_names",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeat to select several; an event matching ANY of the names is returned.",
              "title": "Observer Names"
            },
            "description": "Repeat to select several; an event matching ANY of the names is returned."
          },
          {
            "name": "waiting_for",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "enum": [
                    "files",
                    "observations"
                  ],
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Restrict to WAITING_FOR_OBSERVATIONS events still waiting on a specific input: 'files' (coordinator files) or 'observations' (observer data). Implies status=WAITING_FOR_OBSERVATIONS.",
              "title": "Waiting For"
            },
            "description": "Restrict to WAITING_FOR_OBSERVATIONS events still waiting on a specific input: 'files' (coordinator files) or 'observations' (observer data). Implies status=WAITING_FOR_OBSERVATIONS."
          },
          {
            "name": "assigned_reviewer_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeat to select several; an event whose reviewer list contains ANY of the ids is returned. Pass __UNASSIGNED__ for events with no assigned reviewer.",
              "title": "Assigned Reviewer Id"
            },
            "description": "Repeat to select several; an event whose reviewer list contains ANY of the ids is returned. Pass __UNASSIGNED__ for events with no assigned reviewer."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(date_window_utc|created_at)$",
              "description": "'date_window_utc' (default) or 'created_at'",
              "default": "date_window_utc",
              "title": "Sort By"
            },
            "description": "'date_window_utc' (default) or 'created_at'"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "'asc' or 'desc'",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "'asc' or 'desc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size, 1-100",
              "default": 25,
              "title": "Limit"
            },
            "description": "Page size, 1-100"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the last page",
              "title": "Cursor"
            },
            "description": "`next_cursor` from the last page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventList"
                },
                "example": {
                  "items": [
                    {
                      "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                      "status": "COMPLETE",
                      "asteroid_id": "1036",
                      "asteroid_name": "Ganymed",
                      "star_catalog": "GAIA",
                      "star_id": "1234567890123456789",
                      "date_window_utc": "2026-03-14T04:12:00Z",
                      "observation_ids": [
                        "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                        "e09c4d7b-5a13-4f82-9c6e-2b8d1f7a3e54"
                      ],
                      "observer_names": [
                        "A. Observer",
                        "B. Observer"
                      ],
                      "assigned_reviewer_ids": [
                        "d2f63b19-7e04-4a8c-b5d1-6c9e0f3a7b82"
                      ],
                      "created_at": "2026-03-01T09:00:00Z",
                      "updated_at": "2026-03-20T17:45:00Z",
                      "files": {
                        "occelmnt": {
                          "slot": "occelmnt",
                          "filename": "1036_ganymed.occelmnt",
                          "size_bytes": 4096,
                          "uploaded_at": "2026-03-02T11:00:00Z"
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/events/{event_id}": {
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Get one event",
        "description": "Get an event. File information follows your account permissions. Use `GET /public/v1/events/{event_id}/files` for download links.",
        "operationId": "public_get_event",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEvent"
                },
                "example": {
                  "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                  "status": "COMPLETE",
                  "asteroid_id": "1036",
                  "asteroid_name": "Ganymed",
                  "star_catalog": "GAIA",
                  "star_id": "1234567890123456789",
                  "date_window_utc": "2026-03-14T04:12:00Z",
                  "observation_ids": [
                    "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                    "e09c4d7b-5a13-4f82-9c6e-2b8d1f7a3e54"
                  ],
                  "observer_names": [
                    "A. Observer",
                    "B. Observer"
                  ],
                  "assigned_reviewer_ids": [
                    "d2f63b19-7e04-4a8c-b5d1-6c9e0f3a7b82"
                  ],
                  "created_at": "2026-03-01T09:00:00Z",
                  "updated_at": "2026-03-20T17:45:00Z",
                  "files": {
                    "occelmnt": {
                      "slot": "occelmnt",
                      "filename": "1036_ganymed.occelmnt",
                      "size_bytes": 4096,
                      "uploaded_at": "2026-03-02T11:00:00Z"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/events/{event_id}/files": {
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Download links for an event's files",
        "description": "Get temporary download links for event files. Multiple files can share the `damit` or `ground_track` slot. Attachments use `slot: \"attachment\"` and require `observation.view_pii` permission.\n\nBefore the event is `COMPLETE`, this endpoint returns an empty list unless your account has `event.files.view_pre_complete` permission.",
        "operationId": "public_list_event_files",
        "parameters": [
          {
            "name": "event_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Event Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicEventFileList"
                },
                "example": {
                  "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                  "files": [
                    {
                      "slot": "occelmnt",
                      "filename": "1036_ganymed.occelmnt",
                      "size_bytes": 4096,
                      "url": "https://s3.amazonaws.com/...&X-Amz-Signature=...",
                      "expires_in": 900
                    }
                  ],
                  "expires_in": 900
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations": {
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "List observations",
        "description": "List submitted observations, newest first by default. Use the query parameters to filter results. Pass `next_cursor` as the next request's `cursor` parameter to retrieve another page.\n\nUse `submission_status=draft` to list your own drafts. Other users' drafts are not included. Observer email addresses are returned for your own observations, or when your account has permission to view them.",
        "operationId": "public_list_observations",
        "parameters": [
          {
            "name": "observer_names",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeat to select several; an observation matching ANY of the names is returned.",
              "title": "Observer Names"
            },
            "description": "Repeat to select several; an observation matching ANY of the names is returned."
          },
          {
            "name": "event_status_group",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(in_review|complete)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "'in_review': unattached, or attached to an event that is not COMPLETE/LONE_NEGATIVE/INSUFFICIENT_EVIDENCE. 'complete': attached to a COMPLETE event.",
              "title": "Event Status Group"
            },
            "description": "'in_review': unattached, or attached to an event that is not COMPLETE/LONE_NEGATIVE/INSUFFICIENT_EVIDENCE. 'complete': attached to a COMPLETE event."
          },
          {
            "name": "submission_status",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string",
                  "pattern": "^(draft|submitted)$"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Omitted or 'submitted' lists submitted observations. 'draft' lists only your own drafts, each with `readiness`.",
              "title": "Submission Status"
            },
            "description": "Omitted or 'submitted' lists submitted observations. 'draft' lists only your own drafts, each with `readiness`."
          },
          {
            "name": "asteroid_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asteroid designation",
              "title": "Asteroid Id"
            },
            "description": "Asteroid designation"
          },
          {
            "name": "asteroid_name",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Asteroid name",
              "title": "Asteroid Name"
            },
            "description": "Asteroid name"
          },
          {
            "name": "star_id",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Star identifier (partial match)",
              "title": "Star Id"
            },
            "description": "Star identifier (partial match)"
          },
          {
            "name": "result_type",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "array",
                  "items": {
                    "enum": [
                      "POS",
                      "NEG",
                      "UNSURE"
                    ],
                    "type": "string"
                  }
                },
                {
                  "type": "null"
                }
              ],
              "description": "Repeat to select several: POS, NEG, UNSURE",
              "title": "Result Type"
            },
            "description": "Repeat to select several: POS, NEG, UNSURE"
          },
          {
            "name": "ungrouped_only",
            "in": "query",
            "required": false,
            "schema": {
              "type": "boolean",
              "description": "Only observations not attached to any event",
              "default": false,
              "title": "Ungrouped Only"
            },
            "description": "Only observations not attached to any event"
          },
          {
            "name": "date_from",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only observations observed at or after this ISO 8601 datetime or date (filters observed_at_utc, not the submission time). No offset means UTC; a date means the start of that UTC day.",
              "title": "Date From"
            },
            "description": "Only observations observed at or after this ISO 8601 datetime or date (filters observed_at_utc, not the submission time). No offset means UTC; a date means the start of that UTC day."
          },
          {
            "name": "date_to",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "Only observations observed at or before this ISO 8601 datetime or date. No offset means UTC; a date includes all of that UTC day.",
              "title": "Date To"
            },
            "description": "Only observations observed at or before this ISO 8601 datetime or date. No offset means UTC; a date includes all of that UTC day."
          },
          {
            "name": "sort_by",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^observed_at$",
              "description": "Only 'observed_at'",
              "default": "observed_at",
              "title": "Sort By"
            },
            "description": "Only 'observed_at'"
          },
          {
            "name": "sort_order",
            "in": "query",
            "required": false,
            "schema": {
              "type": "string",
              "pattern": "^(asc|desc)$",
              "description": "'asc' or 'desc'",
              "default": "desc",
              "title": "Sort Order"
            },
            "description": "'asc' or 'desc'"
          },
          {
            "name": "limit",
            "in": "query",
            "required": false,
            "schema": {
              "type": "integer",
              "maximum": 100,
              "minimum": 1,
              "description": "Page size, 1-100",
              "default": 25,
              "title": "Limit"
            },
            "description": "Page size, 1-100"
          },
          {
            "name": "cursor",
            "in": "query",
            "required": false,
            "schema": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "null"
                }
              ],
              "description": "`next_cursor` from the last page",
              "title": "Cursor"
            },
            "description": "`next_cursor` from the last page"
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicObservationList"
                },
                "example": {
                  "items": [
                    {
                      "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "submission_status": "submitted",
                      "status": "amended",
                      "web_url": "https://iota-hub.com/observations/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                      "submitted_at": "2026-03-15T08:30:00Z",
                      "amended_at": "2026-03-15T09:05:00Z",
                      "amendment_count": 1,
                      "created_at": "2026-03-15T08:02:00Z",
                      "updated_at": "2026-03-15T09:05:00Z",
                      "version": 3,
                      "created_via": "api",
                      "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                      "observer_user_id": "a4c81e2f-9b37-4d60-8e15-c3f7b2a09d48",
                      "metadata": {
                        "observer_name": "A. Observer",
                        "observer_email": "observer@example.org",
                        "asteroid_id": "1036",
                        "asteroid_name": "Ganymed",
                        "star_catalog": "GAIA",
                        "star_id": "1234567890123456789",
                        "observed_at_utc": "2026-03-14T04:12:07Z",
                        "result_type": "POS",
                        "station": "2",
                        "confirm_unnumbered_asteroid_id": false,
                        "bypass_required_files": false
                      },
                      "report_details": {
                        "started_observing": "04:10:00",
                        "d_uncorrected": "04:12:07.245000",
                        "r_uncorrected": "04:12:09.805000",
                        "d_err_68": 0.024,
                        "d_err_95": 0.06,
                        "d_err_9973": 0.159,
                        "r_err_68": 0.024,
                        "r_err_95": 0.06,
                        "r_err_9973": 0.159,
                        "stopped_observing": "04:15:00",
                        "aperture": "8 in",
                        "f_ratio": "10",
                        "telescope_type": "SCT including Cass and Mak",
                        "timing_source": "GPS - time inserted",
                        "timing_method": "Video with frame analysis",
                        "timing_device": "IOTA-VTI",
                        "ote_used": "PYOTE",
                        "detector_model": "Watec 910HX",
                        "video_format": "NTSC/EIA",
                        "integration": "2x",
                        "clouds": "Clear",
                        "stability": "Steady"
                      },
                      "report_site": {
                        "observing_location": "Near Tucson, AZ",
                        "latitude": "32 13 18.1 N",
                        "longitude": "110 56 41.2 W",
                        "elevation": "780 m",
                        "datum": "WGS84"
                      },
                      "files": {
                        "report": {
                          "slot": "report",
                          "filename": "20260314_1036_Ganymed_POS-2.xlsx",
                          "size_bytes": 51234,
                          "uploaded_at": "2026-03-15T08:10:00Z"
                        }
                      },
                      "attachments": [],
                      "next_actions": []
                    }
                  ]
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/check": {
      "post": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Check whether an observation already exists",
        "description": "Check whether you already have a draft or submission for the specified asteroid, star, UTC date and station. Use this before repeating a submission.\n\nThe `found` field indicates the result:\n\n- `observation`: a matching observation belongs to you. The `observation` field contains its ID, status, amendment count and web URL. If several match, the most recent is returned. The `event` field contains its attached event, if any.\n- `event`: you have no matching observation, but an event matches the asteroid, star and date. The `event` field contains its ID and status.\n- `none`: neither was found.\n\nOther users' observations are not returned. Text matching ignores case and repeated whitespace. `asteroid_id` and `star_catalog` are compared only when supplied. Event lookup requires `asteroid_id`. Station is always compared; omitted, null and empty-string station values are equivalent.",
        "operationId": "public_check_observation",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCheckRequest"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicCheckResponse"
                },
                "examples": {
                  "observation": {
                    "summary": "You already have this observation",
                    "value": {
                      "found": "observation",
                      "observation": {
                        "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                        "status": "draft",
                        "amendment_count": 0,
                        "web_url": "https://iota-hub.com/new-observation?draft=3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17"
                      }
                    }
                  },
                  "event": {
                    "summary": "No observation of yours, but the event exists",
                    "value": {
                      "found": "event",
                      "event": {
                        "event_id": "b71e9a04-2c58-4d3f-9e61-0a8f47c2d9b5",
                        "status": "WAITING_FOR_OBSERVATIONS"
                      }
                    }
                  },
                  "none": {
                    "summary": "Nothing yet",
                    "value": {
                      "found": "none"
                    }
                  }
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/observations/{observation_id}/files": {
      "get": {
        "tags": [
          "Public API v1"
        ],
        "summary": "Download links for an observation's files",
        "description": "Get temporary download links for observation files, attachments and an export ZIP if available. Attachments use `slot: \"attachment\"`.\n\nYou can download your own observation files. Downloading another observer's files requires `observation.view_pii` permission; without it, the API returns `403`.",
        "operationId": "public_list_observation_files",
        "parameters": [
          {
            "name": "observation_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "title": "Observation Id"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Successful Response",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicFileList"
                },
                "example": {
                  "observation_id": "3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17",
                  "files": [
                    {
                      "slot": "report",
                      "filename": "20260314_1036_Ganymed_POS-2.xlsx",
                      "size_bytes": 51234,
                      "url": "https://s3.amazonaws.com/...&X-Amz-Signature=...",
                      "expires_in": 900
                    }
                  ],
                  "expires_in": 900
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          }
        },
        "security": [
          {
            "ApiKeyAuth": []
          }
        ]
      }
    },
    "/public/v1/key-exchange": {
      "post": {
        "tags": [
          "Key exchange (applications)"
        ],
        "summary": "Exchange an OccultWatcher key for a Hub key",
        "description": "Send the user's OccultWatcher API key in the `OW-ApiKey` header and the body `{\"client\": \"<id>\"}` naming the application (no Hub key). Without a body, or without `client`, the call is for `tangra`; an id the Hub does not know is `422 unknown_client`. The Hub asks OccultWatcher who the key belongs to and looks for that user's Hub account, first by an earlier link, then by email address (ignoring the case of ASCII letters; an address with other characters never matches).\n\nOn a match it returns a new Hub API key. The key replaces any key an earlier exchange issued to the same account for the same `client`, expires after 90 days, has the scopes `observations:write` and `read`, and is limited to observer actions. Store it and send it in `X-API-Key`; exchange again when a call answers `401 expired_api_key` or `401 unknown_api_key`.\n\n`404 no_matching_account` means no account could be matched: start a sign-in. `403 account_not_active` means the account exists but cannot be used yet. Never repeat the exchange after `401 invalid_owc_key`; `503 owc_unavailable` may be retried after `Retry-After` seconds. Limited to 20 calls per hour per IP address.",
        "operationId": "public_key_exchange",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicKeyExchangeRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A new Hub key (shown only in this response)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicKeyExchangeResult"
                }
              }
            }
          },
          "401": {
            "description": "`missing_owc_key` or `invalid_owc_key`",
            "content": {
              "application/json": {
                "example": {
                  "code": "invalid_owc_key",
                  "message": "OccultWatcher did not accept this API key",
                  "hint": "OccultWatcher did not accept this key. Ask the user to check their OccultWatcher API key; do not repeat the exchange with the same key."
                }
              }
            }
          },
          "403": {
            "description": "`account_not_active`",
            "content": {
              "application/json": {
                "example": {
                  "code": "account_not_active",
                  "message": "The Hub account is not active",
                  "hint": "The Hub account is not active ('details.account_status' says why). Show this to the user; a sign-in will not help until a coordinator activates the account or the email address is verified.",
                  "details": {
                    "account_status": "pending"
                  }
                }
              }
            }
          },
          "404": {
            "description": "`no_matching_account` — start a sign-in",
            "content": {
              "application/json": {
                "example": {
                  "code": "no_matching_account",
                  "message": "No Hub account matches this OccultWatcher account",
                  "hint": "No Hub account could be matched to this OccultWatcher account. Start a sign-in (POST /public/v1/key-exchange/sign-in) so the user can connect their Hub account in the browser."
                }
              }
            }
          },
          "422": {
            "description": "`unknown_client`, or `validation_error` for a malformed body",
            "content": {
              "application/json": {
                "example": {
                  "code": "unknown_client",
                  "message": "The Hub does not know this client application",
                  "hint": "The 'client' in the body is not an application the Hub knows. Send the id the Hub gave your application (lower case, e.g. 'tangra'), or no body."
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`",
            "content": {
              "application/json": {
                "example": {
                  "code": "rate_limited",
                  "message": "Rate limit exceeded for key_exchange operations. Please try again later.",
                  "hint": "Wait for the number of seconds in the Retry-After header, then retry."
                }
              }
            }
          },
          "503": {
            "description": "`owc_unavailable`, with `Retry-After`",
            "content": {
              "application/json": {
                "example": {
                  "code": "owc_unavailable",
                  "message": "OccultWatcher could not be reached to identify the key",
                  "hint": "Occult Watcher Cloud could not be reached. Retry after the number of seconds in the Retry-After header; for an OWC link you may instead proceed without one."
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "OW-ApiKey",
            "in": "header",
            "required": true,
            "description": "The user's OccultWatcher API key",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/v1/key-exchange/sign-in": {
      "post": {
        "tags": [
          "Key exchange (applications)"
        ],
        "summary": "Start a browser sign-in",
        "description": "Send the user's OccultWatcher API key in the `OW-ApiKey` header and the body `{\"client\": \"<id>\"}` naming the application, as on the exchange (no body means `tangra`; an unknown id is `422 unknown_client`). The approval page names that application. Use it after `404 no_matching_account`, or to connect a different Hub account. Open `verification_url` in the user's browser: they sign in to the Hub and approve. Then call collect with `collect_code` every `interval` seconds until it answers `200`; collect issues the key for the `client` named here.\n\nThe sign-in expires after `expires_in` seconds (15 minutes). Keep `collect_code` out of URLs and logs. Approval links the OccultWatcher account to the Hub account, replacing any other OccultWatcher account linked to it, so later exchanges succeed without a browser. The link is shared by every application using that OccultWatcher account: revoking any key an exchange issued, on the Hub's API keys page, removes the link and every exchanged key. Limited to 20 calls per hour per IP address, shared with the exchange.",
        "operationId": "public_key_exchange_sign_in_start",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "anyOf": [
                  {
                    "$ref": "#/components/schemas/PublicKeyExchangeRequest"
                  },
                  {
                    "type": "null"
                  }
                ],
                "title": "Body"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "Sign-in started",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicSignInStarted"
                }
              }
            }
          },
          "401": {
            "description": "`missing_owc_key` or `invalid_owc_key`",
            "content": {
              "application/json": {
                "example": {
                  "code": "invalid_owc_key",
                  "message": "OccultWatcher did not accept this API key",
                  "hint": "OccultWatcher did not accept this key. Ask the user to check their OccultWatcher API key; do not repeat the exchange with the same key."
                }
              }
            }
          },
          "422": {
            "description": "`unknown_client`, or `validation_error` for a malformed body",
            "content": {
              "application/json": {
                "example": {
                  "code": "unknown_client",
                  "message": "The Hub does not know this client application",
                  "hint": "The 'client' in the body is not an application the Hub knows. Send the id the Hub gave your application (lower case, e.g. 'tangra'), or no body."
                },
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`",
            "content": {
              "application/json": {
                "example": {
                  "code": "rate_limited",
                  "message": "Rate limit exceeded for key_exchange operations. Please try again later.",
                  "hint": "Wait for the number of seconds in the Retry-After header, then retry."
                }
              }
            }
          },
          "503": {
            "description": "`owc_unavailable`, with `Retry-After`",
            "content": {
              "application/json": {
                "example": {
                  "code": "owc_unavailable",
                  "message": "OccultWatcher could not be reached to identify the key",
                  "hint": "Occult Watcher Cloud could not be reached. Retry after the number of seconds in the Retry-After header; for an OWC link you may instead proceed without one."
                }
              }
            }
          }
        },
        "security": [],
        "parameters": [
          {
            "name": "OW-ApiKey",
            "in": "header",
            "required": true,
            "description": "The user's OccultWatcher API key",
            "schema": {
              "type": "string"
            }
          }
        ]
      }
    },
    "/public/v1/key-exchange/sign-in/{request_id}/collect": {
      "post": {
        "tags": [
          "Key exchange (applications)"
        ],
        "summary": "Collect the Hub key after sign-in",
        "description": "Send the `collect_code` from the sign-in start; no Hub key and no OccultWatcher key. Answers `409 sign_in_pending` until the user approves, then `200` with a Hub key, exactly once. `410 sign_in_expired` means the sign-in expired, was already collected, or the code is wrong: start a new sign-in. `403 account_not_active` means the approving account can no longer be used.",
        "operationId": "public_key_exchange_sign_in_collect",
        "parameters": [
          {
            "name": "request_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64,
              "title": "Request Id"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PublicCollectRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "A new Hub key (shown only in this response)",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicKeyExchangeResult"
                }
              }
            }
          },
          "403": {
            "description": "`account_not_active`",
            "content": {
              "application/json": {
                "example": {
                  "code": "account_not_active",
                  "message": "The Hub account is not active",
                  "hint": "The Hub account is not active ('details.account_status' says why). Show this to the user; a sign-in will not help until a coordinator activates the account or the email address is verified.",
                  "details": {
                    "account_status": "disabled"
                  }
                }
              }
            }
          },
          "409": {
            "description": "`sign_in_pending` — wait `interval` seconds and retry",
            "content": {
              "application/json": {
                "example": {
                  "code": "sign_in_pending",
                  "message": "The sign-in has not been approved yet",
                  "hint": "The user has not approved the sign-in yet. Wait 'interval' seconds and call collect again."
                }
              }
            }
          },
          "410": {
            "description": "`sign_in_expired` — start a new sign-in",
            "content": {
              "application/json": {
                "example": {
                  "code": "sign_in_expired",
                  "message": "This sign-in is no longer valid",
                  "hint": "This sign-in is no longer valid: it expired, was already collected, or the collect code is wrong. Start a new sign-in."
                }
              }
            }
          },
          "422": {
            "description": "Problem details with a stable `code`",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PublicError"
                }
              }
            }
          },
          "429": {
            "description": "`rate_limited`, with `Retry-After`",
            "content": {
              "application/json": {
                "example": {
                  "code": "rate_limited",
                  "message": "Too many authentication failures. Please try again later.",
                  "hint": "Wait for the number of seconds in the Retry-After header, then retry."
                }
              }
            }
          }
        },
        "security": []
      }
    }
  },
  "components": {
    "schemas": {
      "PublicAttachment": {
        "properties": {
          "attachment_id": {
            "type": "string",
            "title": "Attachment Id",
            "description": "Id to remove this attachment by"
          },
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "Always 'attachment'",
            "default": "attachment"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Original filename as uploaded"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes",
            "description": "Size of the file in bytes"
          },
          "uploaded_at": {
            "type": "string",
            "title": "Uploaded At",
            "description": "ISO 8601 upload timestamp"
          }
        },
        "type": "object",
        "required": [
          "attachment_id",
          "filename",
          "size_bytes",
          "uploaded_at"
        ],
        "title": "PublicAttachment",
        "description": "An additional file on an observation. Use `attachment_id` to remove it."
      },
      "PublicCheckEvent": {
        "properties": {
          "event_id": {
            "type": "string",
            "title": "Event Id"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Event workflow status, e.g. 'WAITING_FOR_OBSERVATIONS'"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "status"
        ],
        "title": "PublicCheckEvent",
        "description": "A matching event for the asteroid, star and date."
      },
      "PublicCheckObservation": {
        "properties": {
          "observation_id": {
            "type": "string",
            "title": "Observation Id"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "amended",
              "locked"
            ],
            "title": "Status",
            "description": "'draft', 'submitted', 'amended' (a file replaced after submit) or 'locked' (its event is in review or later)"
          },
          "amendment_count": {
            "type": "integer",
            "title": "Amendment Count",
            "description": "How many times files were replaced after submit"
          },
          "web_url": {
            "type": "string",
            "title": "Web Url",
            "description": "The observation (or draft editor) in the web app"
          }
        },
        "type": "object",
        "required": [
          "observation_id",
          "status",
          "amendment_count",
          "web_url"
        ],
        "title": "PublicCheckObservation",
        "description": "Your matching draft or submitted observation."
      },
      "PublicCheckRequest": {
        "properties": {
          "asteroid_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asteroid Id",
            "description": "Asteroid number. Without it only your own observations are searched: events are looked up by asteroid number."
          },
          "asteroid_name": {
            "type": "string",
            "minLength": 1,
            "title": "Asteroid Name",
            "description": "Asteroid name"
          },
          "star_catalog": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Star Catalog",
            "description": "Star catalog, e.g. 'TYC', 'UCAC4', 'GAIA'"
          },
          "star_id": {
            "type": "string",
            "minLength": 1,
            "title": "Star Id",
            "description": "Star identifier"
          },
          "observed_date": {
            "type": "string",
            "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
            "title": "Observed Date",
            "description": "UTC date of the observation, YYYY-MM-DD"
          },
          "station": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station",
            "description": "Station number for a multi-station observer ('2' for '…_POS-2.xlsx'); omit for a single station"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "asteroid_name",
          "star_id",
          "observed_date"
        ],
        "title": "PublicCheckRequest",
        "description": "Observation details to match against existing records. Text matching ignores case\nand repeated whitespace. `asteroid_id` and `star_catalog` are compared only when\nsupplied. Station is always compared; omitted, null and empty-string values are\nequivalent.",
        "examples": [
          {
            "asteroid_id": "1036",
            "asteroid_name": "Ganymed",
            "observed_date": "2026-03-14",
            "star_catalog": "GAIA",
            "star_id": "1234567890123456789"
          }
        ]
      },
      "PublicCheckResponse": {
        "properties": {
          "found": {
            "type": "string",
            "enum": [
              "observation",
              "event",
              "none"
            ],
            "title": "Found"
          },
          "observation": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicCheckObservation"
              },
              {
                "type": "null"
              }
            ]
          },
          "event": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicCheckEvent"
              },
              {
                "type": "null"
              }
            ]
          }
        },
        "type": "object",
        "required": [
          "found"
        ],
        "title": "PublicCheckResponse",
        "description": "The lookup result. `found` is `observation` when a matching draft or submission\nbelongs to you (the most recent if several match). Its attached event is\nincluded if available. Otherwise, `found` is `event` when a matching event\nexists, or `none` when neither was found. Other users' observations are not\nreturned."
      },
      "PublicChecks": {
        "properties": {
          "run_id": {
            "type": "string",
            "title": "Run Id",
            "description": "Id of the run these findings came from"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'pending', 'running', 'complete' or 'error'"
          },
          "checks_current": {
            "type": "boolean",
            "title": "Checks Current",
            "description": "False when the draft changed after this run started",
            "default": false
          },
          "open_findings": {
            "type": "integer",
            "title": "Open Findings",
            "description": "Findings not dismissed",
            "default": 0
          },
          "dismissed_findings": {
            "type": "integer",
            "title": "Dismissed Findings",
            "description": "Findings dismissed",
            "default": 0
          },
          "findings": {
            "items": {
              "$ref": "#/components/schemas/PublicFinding"
            },
            "type": "array",
            "title": "Findings",
            "description": "Every finding across every check in the run, in check order"
          },
          "skipped": {
            "items": {
              "$ref": "#/components/schemas/PublicSkippedCheck"
            },
            "type": "array",
            "title": "Skipped",
            "description": "Checks that could not run, with their reasons. These do not prevent submission, even when the draft is ready."
          }
        },
        "type": "object",
        "required": [
          "run_id",
          "status"
        ],
        "title": "PublicChecks",
        "description": "The latest observer check run and its findings."
      },
      "PublicCollectRequest": {
        "properties": {
          "collect_code": {
            "type": "string",
            "maxLength": 256,
            "minLength": 1,
            "title": "Collect Code",
            "description": "The `collect_code` from the sign-in start response"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "collect_code"
        ],
        "title": "PublicCollectRequest",
        "description": "Body of the collect call."
      },
      "PublicDeclaredFile": {
        "properties": {
          "slot": {
            "type": "string",
            "enum": [
              "report",
              "lightcurve",
              "log",
              "vizier",
              "aperture_record",
              "attachment"
            ],
            "title": "Slot",
            "description": "Which slot this file fills. `attachment` may repeat; each of the five fixed slots at most once (`aperture_record` is optional: a PyMovie `.pymovie` or Tangra `.lc`)."
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "description": "Filename, with extension (at most 255 characters)"
          },
          "size": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Size",
            "description": "Exact size in bytes"
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sha256",
            "description": "Optional base64-encoded SHA-256 checksum of the file. When supplied, the upload form includes `x-amz-checksum-sha256` and S3 checks that the uploaded file matches. Without it, S3 does not verify a checksum."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "slot",
          "filename",
          "size"
        ],
        "title": "PublicDeclaredFile",
        "description": "A file to upload when creating a draft."
      },
      "PublicDismissRequest": {
        "properties": {
          "note": {
            "type": "string",
            "maxLength": 2000,
            "minLength": 3,
            "title": "Note",
            "description": "Why this finding is not a real problem (3 to 2000 characters)"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "note"
        ],
        "title": "PublicDismissRequest",
        "description": "Body of ``POST …/validation/findings/{fingerprint}/dismiss``.",
        "examples": [
          {
            "note": "GPS-timed recording; the OWC orbit is out of date for this asteroid."
          }
        ]
      },
      "PublicDismissal": {
        "properties": {
          "dismissed_by": {
            "type": "string",
            "title": "Dismissed By",
            "description": "Name of the person who dismissed the finding"
          },
          "dismissed_at": {
            "type": "string",
            "title": "Dismissed At",
            "description": "ISO 8601 timestamp of the dismissal"
          },
          "note": {
            "type": "string",
            "title": "Note",
            "description": "Explanation for dismissing the finding"
          },
          "via": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Via",
            "description": "Channel the dismissal was made through"
          }
        },
        "type": "object",
        "required": [
          "dismissed_by",
          "dismissed_at",
          "note"
        ],
        "title": "PublicDismissal",
        "description": "A finding dismissal and its explanation. `via` identifies whether it was made\nthrough the web app or API, or is null for older records."
      },
      "PublicDraftCreateRequest": {
        "properties": {
          "files": {
            "items": {
              "$ref": "#/components/schemas/PublicDeclaredFile"
            },
            "type": "array",
            "title": "Files",
            "description": "Files to be uploaded for this draft"
          },
          "auto_submit_when_clean": {
            "type": "boolean",
            "title": "Auto Submit When Clean",
            "description": "Submit automatically when checks finish and the draft is ready. Findings are not dismissed automatically.",
            "default": false
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PublicDraftCreateRequest",
        "description": "Files and settings for a new draft. Observation details are read from the uploaded\nreport. Supplying those details here returns `422 report_derived_fields`.",
        "examples": [
          {
            "auto_submit_when_clean": false,
            "files": [
              {
                "filename": "report.xlsx",
                "size": 51234,
                "slot": "report"
              },
              {
                "filename": "lightcurve.csv",
                "size": 2483920,
                "slot": "lightcurve"
              },
              {
                "filename": "pyote.log",
                "size": 18422,
                "slot": "log"
              },
              {
                "filename": "lightcurve.pymovie",
                "size": 187654321,
                "slot": "aperture_record"
              },
              {
                "filename": "pyote_plot.png",
                "size": 90211,
                "slot": "attachment"
              }
            ]
          }
        ]
      },
      "PublicDraftCreated": {
        "properties": {
          "observation": {
            "$ref": "#/components/schemas/PublicObservation",
            "description": "The newly created draft"
          },
          "uploads": {
            "items": {
              "$ref": "#/components/schemas/PublicUploadTarget"
            },
            "type": "array",
            "title": "Uploads",
            "description": "One upload URL and set of form fields per file"
          }
        },
        "type": "object",
        "required": [
          "observation"
        ],
        "title": "PublicDraftCreated",
        "description": "The newly created draft and upload instructions for its files."
      },
      "PublicDraftUpdateRequest": {
        "properties": {
          "version": {
            "type": "integer",
            "title": "Version",
            "description": "The version you last read. Returns 409 stale_version if the draft has changed since then."
          },
          "owc_link_choice": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "picked",
                  "pasted",
                  "proceed_unlinked"
                ]
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Link Choice",
            "description": "'picked' — link one of `owc.resolution.candidates` (give its id in `owc_event`); 'pasted' — link any OWC event by id or URL (validated against OWC and against the report); 'proceed_unlinked' — submit without an OWC link."
          },
          "owc_event": {
            "anyOf": [
              {
                "type": "string",
                "minLength": 1
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Event",
            "description": "OWC event id or URL; required with 'picked' and 'pasted'"
          },
          "confirm_unnumbered_asteroid_id": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Confirm Unnumbered Asteroid Id",
            "description": "Confirm that a non-numeric asteroid id is deliberate"
          },
          "comments": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 4000
              },
              {
                "type": "null"
              }
            ],
            "title": "Comments",
            "description": "Free-text notes for the reviewer (at most 4000 characters)"
          },
          "bypass_required_files": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Bypass Required Files",
            "description": "Allow a POS/UNSURE observation processed with other software to be submitted without the light curve and log."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "version"
        ],
        "title": "PublicDraftUpdateRequest",
        "description": "Changes to a draft: OWC link, asteroid confirmation, comments or required-file\nexemption. Omitted fields stay unchanged. To change details read from the\nreport, upload a corrected report. Supplying report fields here returns `422\nreport_derived_fields`.",
        "examples": [
          {
            "owc_event": "1917-2448-97311-649282-U033649",
            "owc_link_choice": "picked",
            "version": 7
          },
          {
            "confirm_unnumbered_asteroid_id": true,
            "version": 8
          }
        ]
      },
      "PublicError": {
        "properties": {
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Error identifier to use in error-handling logic"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "Human-readable explanation"
          },
          "hint": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Hint",
            "description": "Suggested action to resolve the error, when available"
          },
          "details": {
            "anyOf": [
              {
                "additionalProperties": true,
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Details",
            "description": "Structured context for the code, e.g. {\"missing_required\": [\"lightcurve\"]}"
          }
        },
        "type": "object",
        "required": [
          "code",
          "message"
        ],
        "title": "PublicError",
        "description": "An API error. Use `code` in error-handling logic; message wording can change."
      },
      "PublicEvent": {
        "properties": {
          "event_id": {
            "type": "string",
            "title": "Event Id",
            "description": "Event id"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "Workflow status, e.g. 'IN_REVIEW'"
          },
          "asteroid_id": {
            "type": "string",
            "title": "Asteroid Id",
            "description": "Asteroid designation"
          },
          "asteroid_name": {
            "type": "string",
            "title": "Asteroid Name",
            "description": "Asteroid name"
          },
          "star_catalog": {
            "type": "string",
            "title": "Star Catalog",
            "description": "Star catalog, e.g. 'GAIA'"
          },
          "star_id": {
            "type": "string",
            "title": "Star Id",
            "description": "Star identifier within the catalog"
          },
          "date_window_utc": {
            "type": "string",
            "title": "Date Window Utc",
            "description": "UTC date window of the event"
          },
          "observation_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Observation Ids",
            "description": "Observations attached to this event"
          },
          "observer_names": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Observer Names",
            "description": "Observer names across the attached observations, as the UI shows them"
          },
          "assigned_reviewer_ids": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Assigned Reviewer Ids",
            "description": "User ids of the assigned reviewers"
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "ISO 8601 creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At",
            "description": "ISO 8601 last-modified timestamp"
          },
          "public_notes": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Public Notes",
            "description": "Public-facing notes shown on the results page"
          },
          "files": {
            "anyOf": [
              {
                "additionalProperties": {
                  "anyOf": [
                    {
                      "$ref": "#/components/schemas/PublicFileVersion"
                    },
                    {
                      "type": "null"
                    }
                  ]
                },
                "type": "object"
              },
              {
                "type": "null"
              }
            ],
            "title": "Files",
            "description": "Current event files, grouped by file type. Null when file information is unavailable or your account cannot view it."
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "status",
          "asteroid_id",
          "asteroid_name",
          "star_catalog",
          "star_id",
          "date_window_utc",
          "created_at",
          "updated_at"
        ],
        "title": "PublicEvent",
        "description": "An event as the public API returns it."
      },
      "PublicEventFileLink": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "File type, such as occelmnt or attachment"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Original filename"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes",
            "description": "Size in bytes"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Temporary download URL; use without an API key"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until the URL expires"
          }
        },
        "type": "object",
        "required": [
          "slot",
          "filename",
          "size_bytes",
          "url",
          "expires_in"
        ],
        "title": "PublicEventFileLink",
        "description": "A temporary download link for an event file. Multiple files can share the `damit` or\n`ground_track` slot."
      },
      "PublicEventFileList": {
        "properties": {
          "event_id": {
            "type": "string",
            "title": "Event Id",
            "description": "Event the files belong to"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/PublicEventFileLink"
            },
            "type": "array",
            "title": "Files"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until the URLs expire"
          }
        },
        "type": "object",
        "required": [
          "event_id",
          "expires_in"
        ],
        "title": "PublicEventFileList",
        "description": "``GET /public/v1/events/{id}/files``."
      },
      "PublicEventList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PublicEvent"
            },
            "type": "array",
            "title": "Items"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as the cursor query parameter to get the next page. Null on the last page."
          }
        },
        "type": "object",
        "title": "PublicEventList",
        "description": "One page of events."
      },
      "PublicEvidence": {
        "properties": {
          "source": {
            "type": "string",
            "title": "Source",
            "description": "Where the value was read from"
          },
          "field": {
            "type": "string",
            "title": "Field",
            "description": "Which field was compared"
          },
          "expected": {
            "type": "string",
            "title": "Expected",
            "description": "Expected value ('' when not a comparison)"
          },
          "actual": {
            "type": "string",
            "title": "Actual",
            "description": "Value actually found"
          },
          "expected_label": {
            "type": "string",
            "title": "Expected Label",
            "description": "Column label for 'expected'",
            "default": "Expected"
          },
          "actual_label": {
            "type": "string",
            "title": "Actual Label",
            "description": "Column label for 'actual'",
            "default": "Actual"
          },
          "mismatch": {
            "type": "boolean",
            "title": "Mismatch",
            "description": "False when this row reports a value rather than a disagreement",
            "default": true
          },
          "file_ref": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File Ref",
            "description": "Identifier of the file the value came from"
          }
        },
        "type": "object",
        "required": [
          "source",
          "field",
          "expected",
          "actual"
        ],
        "title": "PublicEvidence",
        "description": "Values used to explain a finding. Use `expected_label` and `actual_label` as column\nheadings. A false `mismatch` means the row provides information rather than\nreporting a problem."
      },
      "PublicFileLink": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "File type, such as lightcurve or attachment"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Original filename"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes",
            "description": "Size in bytes"
          },
          "url": {
            "type": "string",
            "title": "Url",
            "description": "Temporary download URL; use without an API key"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until the URL expires"
          },
          "attachment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachment Id",
            "description": "The attachment's id; null for the fixed slots"
          }
        },
        "type": "object",
        "required": [
          "slot",
          "filename",
          "size_bytes",
          "url",
          "expires_in"
        ],
        "title": "PublicFileLink",
        "description": "A time-limited download link for one observation file."
      },
      "PublicFileList": {
        "properties": {
          "observation_id": {
            "type": "string",
            "title": "Observation Id",
            "description": "Observation the files belong to"
          },
          "files": {
            "items": {
              "$ref": "#/components/schemas/PublicFileLink"
            },
            "type": "array",
            "title": "Files"
          },
          "zip_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Zip Url",
            "description": "Temporary download URL for all files as a ZIP archive, when available"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until the URLs expire"
          }
        },
        "type": "object",
        "required": [
          "observation_id",
          "expires_in"
        ],
        "title": "PublicFileList",
        "description": "``GET /public/v1/observations/{id}/files``."
      },
      "PublicFileVersion": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "File type, such as report or lightcurve"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Original filename as uploaded"
          },
          "size_bytes": {
            "type": "integer",
            "title": "Size Bytes",
            "description": "Size of the file in bytes"
          },
          "uploaded_at": {
            "type": "string",
            "title": "Uploaded At",
            "description": "ISO 8601 upload timestamp"
          },
          "content_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Content Type",
            "description": "Declared content type, when known"
          }
        },
        "type": "object",
        "required": [
          "slot",
          "filename",
          "size_bytes",
          "uploaded_at"
        ],
        "title": "PublicFileVersion",
        "description": "Information about a currently uploaded file. Request the corresponding `/files`\nendpoint for its download link."
      },
      "PublicFinalizeAttachmentRequest": {
        "properties": {
          "file_key": {
            "type": "string",
            "title": "File Key",
            "description": "The `file_key` the init call returned"
          },
          "attachment_id": {
            "type": "string",
            "pattern": "^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$",
            "title": "Attachment Id",
            "description": "The `attachment_id` the init call returned"
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "description": "Filename, with extension"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "file_key",
          "attachment_id",
          "filename"
        ],
        "title": "PublicFinalizeAttachmentRequest",
        "description": "Body of ``POST …/attachments/upload/finalize``.",
        "examples": [
          {
            "attachment_id": "3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90",
            "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/attachment_3f1c2b9e-8d4a-4c1e-9f7a-2b6d5e8c1a90_1773563400.517902.png",
            "filename": "pyote_plot.png"
          }
        ]
      },
      "PublicFinalizeUploadRequest": {
        "properties": {
          "file_key": {
            "type": "string",
            "title": "File Key",
            "description": "The `file_key` the init call returned"
          },
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "description": "Filename, with extension"
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "file_key",
          "filename"
        ],
        "title": "PublicFinalizeUploadRequest",
        "description": "Body of ``POST …/files/{slot}/upload/finalize``.",
        "examples": [
          {
            "file_key": "staging/3f2b8c1e-6d4a-4f9b-a7e2-91c0d5b84e17/lightcurve_upload_1773562214.902113_b83e07d5.csv",
            "filename": "lightcurve.csv"
          }
        ]
      },
      "PublicFinding": {
        "properties": {
          "check_number": {
            "type": "integer",
            "title": "Check Number",
            "description": "Observer catalog number of the check that produced this finding; 0 for a check the current catalog no longer knows."
          },
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Check identifier. Use this in your code, not the check name."
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Check name"
          },
          "severity": {
            "type": "string",
            "title": "Severity",
            "description": "'warning' or 'fail'"
          },
          "message": {
            "type": "string",
            "title": "Message",
            "description": "What the check found"
          },
          "how_to_fix": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "How To Fix",
            "description": "Static remediation text for this check"
          },
          "doc_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doc Url",
            "description": "Public documentation anchor for this check"
          },
          "fingerprint": {
            "type": "string",
            "title": "Fingerprint",
            "description": "Stable identifier of this finding across runs; the id used to dismiss it."
          },
          "evidence": {
            "items": {
              "$ref": "#/components/schemas/PublicEvidence"
            },
            "type": "array",
            "title": "Evidence",
            "description": "Rows backing the finding"
          },
          "dismissal": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicDismissal"
              },
              {
                "type": "null"
              }
            ],
            "description": "Set when the finding has been dismissed"
          }
        },
        "type": "object",
        "required": [
          "check_number",
          "code",
          "name",
          "severity",
          "message",
          "fingerprint"
        ],
        "title": "PublicFinding",
        "description": "A problem reported by an observer check."
      },
      "PublicInitUploadRequest": {
        "properties": {
          "filename": {
            "type": "string",
            "maxLength": 255,
            "minLength": 1,
            "title": "Filename",
            "description": "Filename, with extension"
          },
          "sha256": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Sha256",
            "description": "Optional base64-encoded SHA-256 checksum of the file. When supplied, the upload form includes `x-amz-checksum-sha256` and S3 checks that the uploaded file matches. Without it, S3 does not verify a checksum."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "required": [
          "filename"
        ],
        "title": "PublicInitUploadRequest",
        "description": "Body of ``POST …/files/{slot}/upload/init``.",
        "examples": [
          {
            "filename": "lightcurve.csv"
          }
        ]
      },
      "PublicKeyExchangeAccount": {
        "properties": {
          "email": {
            "type": "string",
            "title": "Email",
            "description": "The Hub account's email address"
          },
          "display_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Display Name",
            "description": "The Hub account's display name, when set"
          }
        },
        "type": "object",
        "required": [
          "email"
        ],
        "title": "PublicKeyExchangeAccount",
        "description": "The Hub account an exchanged key belongs to."
      },
      "PublicKeyExchangeRequest": {
        "properties": {
          "client": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Client",
            "description": "The application making the call, as an id the Hub knows (today only `tangra`), matched exactly. Defaults to `tangra`.",
            "examples": [
              "tangra"
            ]
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PublicKeyExchangeRequest",
        "description": "Optional body of the exchange and of the sign-in start.\n\nName the application making the call. Without a body, or without\n`client`, the call is for `tangra`. An id the Hub does not know is\n`422 unknown_client`."
      },
      "PublicKeyExchangeResult": {
        "properties": {
          "api_key": {
            "type": "string",
            "title": "Api Key",
            "description": "Send this in the `X-API-Key` header on every other call"
          },
          "key_id": {
            "type": "string",
            "title": "Key Id",
            "description": "The key's id, shown on /developers/keys"
          },
          "expires_at": {
            "type": "string",
            "title": "Expires At",
            "description": "ISO 8601 UTC expiry"
          },
          "scopes": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Scopes",
            "description": "Always `observations:write` and `read`"
          },
          "account": {
            "$ref": "#/components/schemas/PublicKeyExchangeAccount"
          },
          "client": {
            "type": "string",
            "title": "Client",
            "description": "The application the key was issued to (e.g. `tangra`)"
          }
        },
        "type": "object",
        "required": [
          "api_key",
          "key_id",
          "expires_at",
          "scopes",
          "account",
          "client"
        ],
        "title": "PublicKeyExchangeResult",
        "description": "A Hub API key issued for an OccultWatcher identity.\n\nThe key is shown only in this response. It replaces any key issued to the\nsame Hub account for the same application by an earlier exchange, expires\nafter 90 days, and is limited to observer actions."
      },
      "PublicOWC": {
        "properties": {
          "choice": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Choice",
            "description": "'matched' (the server's auto-match, or a confirmed match), 'picked' (a candidate chosen), 'pasted' (a link supplied), 'report' (the OWC event the Tangra JSON report named — see `resolution.report_check`), 'proceed_unlinked' (deliberately no link), or null (unresolved)."
          },
          "owc_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Event Id",
            "description": "The linked OWC event, when there is one"
          },
          "owc_event_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Event Url",
            "description": "The linked event on Occult Watcher Cloud"
          },
          "resolution": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicOWCResolution"
              },
              {
                "type": "null"
              }
            ],
            "description": "Drafts only: the server's auto-match outcome. Null until the first check run after the report is finalized has resolved it."
          }
        },
        "type": "object",
        "title": "PublicOWC",
        "description": "The observation's link to an Occult Watcher Cloud event."
      },
      "PublicOWCCandidate": {
        "properties": {
          "owc_event_id": {
            "type": "string",
            "title": "Owc Event Id",
            "description": "OWC event id"
          },
          "owc_event_url": {
            "type": "string",
            "title": "Owc Event Url",
            "description": "The event on Occult Watcher Cloud"
          },
          "asteroid": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asteroid",
            "description": "OWC's asteroid label"
          },
          "star": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Star",
            "description": "OWC's star designation"
          },
          "star_mag": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Star Mag",
            "description": "Star magnitude"
          },
          "closest_approach_utc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Closest Approach Utc",
            "description": "Closest approach, as OWC formats it"
          },
          "mag_drop": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Mag Drop",
            "description": "Magnitude drop"
          }
        },
        "type": "object",
        "required": [
          "owc_event_id",
          "owc_event_url"
        ],
        "title": "PublicOWCCandidate",
        "description": "A possible Occult Watcher Cloud event for this observation."
      },
      "PublicOWCMismatch": {
        "properties": {
          "field": {
            "type": "string",
            "title": "Field",
            "description": "'asteroid_name', 'star' or 'date'"
          },
          "report_value": {
            "type": "string",
            "title": "Report Value",
            "description": "What the report says"
          },
          "owc_value": {
            "type": "string",
            "title": "Owc Value",
            "description": "What OWC says"
          }
        },
        "type": "object",
        "required": [
          "field",
          "report_value",
          "owc_value"
        ],
        "title": "PublicOWCMismatch",
        "description": "A difference between the report and an Occult Watcher Cloud event."
      },
      "PublicOWCResolution": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'matched' (selected automatically), 'not_found', 'ambiguous' (see candidates), 'mismatch' (one event found, but it disagrees with the report — see mismatches), 'error' (OWC unreachable; the next check run retries) or 'skipped' (not a numbered asteroid)."
          },
          "reason": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reason",
            "description": "Explanation"
          },
          "owc_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Event Id",
            "description": "The event the matcher chose ('matched' or 'mismatch')"
          },
          "candidates": {
            "items": {
              "$ref": "#/components/schemas/PublicOWCCandidate"
            },
            "type": "array",
            "title": "Candidates",
            "description": "The OWC events considered"
          },
          "mismatches": {
            "items": {
              "$ref": "#/components/schemas/PublicOWCMismatch"
            },
            "type": "array",
            "title": "Mismatches",
            "description": "Set when status is 'mismatch'"
          },
          "resolved_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Resolved At",
            "description": "ISO 8601 timestamp"
          },
          "report_owc_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Owc Event Id",
            "description": "The OWC event the Tangra JSON report named (`report_details.prediction.owc_event_id`), when this resolution checked it. Null otherwise."
          },
          "report_check": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Report Check",
            "description": "What OWC said about `report_owc_event_id`: 'verified' (it is the link), 'not_found' or 'mismatch' (dropped: OWC has no such event, or it is for another asteroid or star; the rest of this resolution is the Hub's own match), or 'unverified' (OWC could not be reached; it is the link, and the next check run tries again). Null when the report named no event."
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PublicOWCResolution",
        "description": "The result of matching the report to an Occult Watcher Cloud event."
      },
      "PublicObservation": {
        "properties": {
          "observation_id": {
            "type": "string",
            "title": "Observation Id",
            "description": "Observation id"
          },
          "submission_status": {
            "type": "string",
            "title": "Submission Status",
            "description": "'draft' or 'submitted'"
          },
          "status": {
            "type": "string",
            "enum": [
              "draft",
              "submitted",
              "amended",
              "locked"
            ],
            "title": "Status",
            "description": "'draft': not submitted. 'submitted': submitted without later owner file changes. 'amended': the owner changed a submitted file. 'locked': the event is in review or later, so only authorized reviewers or coordinators can change its files.",
            "default": "draft"
          },
          "web_url": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Web Url",
            "description": "This observation in the web app: the draft editor for a draft, the observation page otherwise."
          },
          "submitted_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Submitted At",
            "description": "ISO 8601 submit timestamp; null for drafts, imported observations and observations from before draft submission"
          },
          "amended_at": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Amended At",
            "description": "ISO 8601 time of the owner's latest file change after submit; null if never amended"
          },
          "amendment_count": {
            "type": "integer",
            "title": "Amendment Count",
            "description": "Owner file changes since submit. Reviewer and coordinator corrections do not count.",
            "default": 0
          },
          "created_at": {
            "type": "string",
            "title": "Created At",
            "description": "ISO 8601 creation timestamp"
          },
          "updated_at": {
            "type": "string",
            "title": "Updated At",
            "description": "ISO 8601 last-modified timestamp"
          },
          "version": {
            "type": "integer",
            "title": "Version",
            "description": "Current version. Include it when updating or submitting to detect changes made since you read the observation."
          },
          "created_via": {
            "type": "string",
            "title": "Created Via",
            "description": "Channel that created it: 'web' or 'api'",
            "default": "web"
          },
          "event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event Id",
            "description": "Event this observation is attached to, if any"
          },
          "observer_user_id": {
            "type": "string",
            "title": "Observer User Id",
            "description": "Owner of the observation"
          },
          "metadata": {
            "$ref": "#/components/schemas/PublicObservationMetadata",
            "description": "Identity and result fields"
          },
          "report_details": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportDetails"
              },
              {
                "type": "null"
              }
            ],
            "description": "What the current report records about equipment, conditions and D/R timing, as the observer entered it. Null when there is no readable report."
          },
          "report_site": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportSite"
              },
              {
                "type": "null"
              }
            ],
            "description": "The observing site the current report records. Personal data: returned only to the observation's owner and to accounts that may view observer contact details; null otherwise, and when the report records none."
          },
          "files": {
            "additionalProperties": {
              "anyOf": [
                {
                  "$ref": "#/components/schemas/PublicFileVersion"
                },
                {
                  "type": "null"
                }
              ]
            },
            "type": "object",
            "title": "Files",
            "description": "Current file per slot (report, lightcurve, log, vizier); null for an empty slot or a file your account cannot view. The optional aperture_record slot is listed only when it holds a file."
          },
          "attachments": {
            "items": {
              "$ref": "#/components/schemas/PublicAttachment"
            },
            "type": "array",
            "title": "Attachments",
            "description": "Additional files, in upload order. Empty if no attachments exist or your account cannot view the files."
          },
          "readiness": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReadiness"
              },
              {
                "type": "null"
              }
            ],
            "description": "What is needed for submission; null for submitted observations"
          },
          "checks": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicChecks"
              },
              {
                "type": "null"
              }
            ],
            "description": "Latest observer-check run, when one was loaded; null for submitted observations"
          },
          "next_actions": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Next Actions",
            "description": "Actions needed to finish the draft"
          },
          "owc": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicOWC"
              },
              {
                "type": "null"
              }
            ],
            "description": "The Occult Watcher Cloud link and, for drafts, the automatic match result. A missing link does not prevent submission, but check 12 is skipped."
          },
          "report_parse": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportParse"
              },
              {
                "type": "null"
              }
            ],
            "description": "Result of reading the report, included in responses that finalize a report upload."
          }
        },
        "type": "object",
        "required": [
          "observation_id",
          "submission_status",
          "created_at",
          "updated_at",
          "version",
          "observer_user_id",
          "metadata"
        ],
        "title": "PublicObservation",
        "description": "An observation or draft, including its status, files and latest check results. For a\ndraft, `next_actions` lists the steps needed for submission."
      },
      "PublicObservationList": {
        "properties": {
          "items": {
            "items": {
              "$ref": "#/components/schemas/PublicObservation"
            },
            "type": "array",
            "title": "Items"
          },
          "next_cursor": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Next Cursor",
            "description": "Pass as the cursor query parameter to get the next page. Null on the last page."
          }
        },
        "type": "object",
        "title": "PublicObservationList",
        "description": "One page of observations."
      },
      "PublicObservationMetadata": {
        "properties": {
          "observer_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observer Name",
            "description": "Read from the report"
          },
          "observer_email": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observer Email",
            "description": "Read from the report"
          },
          "asteroid_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asteroid Id",
            "description": "Read from the report"
          },
          "asteroid_name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Asteroid Name",
            "description": "Read from the report"
          },
          "star_catalog": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Star Catalog",
            "description": "Read from the report"
          },
          "star_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Star Id",
            "description": "Read from the report"
          },
          "observed_at_utc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observed At Utc",
            "description": "Read from the report"
          },
          "result_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Result Type",
            "description": "Report-derived: 'POS', 'NEG' or 'UNSURE'"
          },
          "station": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station",
            "description": "Report-derived: the station, for an observer who ran several — a Tangra JSON report's submission station, or the '-N' suffix of an NA report filename ('..._POS-2.xlsx'). Null otherwise."
          },
          "comments": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comments",
            "description": "Free-text notes from the observer"
          },
          "confirm_unnumbered_asteroid_id": {
            "type": "boolean",
            "title": "Confirm Unnumbered Asteroid Id",
            "description": "The observer confirmed that the asteroid identifier is intentional",
            "default": false
          },
          "bypass_required_files": {
            "type": "boolean",
            "title": "Bypass Required Files",
            "description": "The observer uses other processing software and has chosen to submit a POS/UNSURE observation without the light curve and log.",
            "default": false
          }
        },
        "type": "object",
        "title": "PublicObservationMetadata",
        "description": "Observation details read from the report, plus comments and submission settings. To\ncorrect details from the report, upload a corrected report."
      },
      "PublicReadiness": {
        "properties": {
          "state": {
            "type": "string",
            "title": "State",
            "description": "'in_progress' (required items missing or event files blocking), 'checking' (checks absent, running or stale), 'needs_attention' (open findings), or 'ready'."
          },
          "missing_required": {
            "items": {
              "type": "string"
            },
            "type": "array",
            "title": "Missing Required",
            "description": "Stable keys still absent: report, lightcurve, log, result_type, asteroid_id, asteroid_id_confirmation, asteroid_name, star, observed_at_utc, observer_name, observer_email."
          },
          "open_findings": {
            "type": "integer",
            "title": "Open Findings",
            "description": "Non-dismissed findings on the latest run",
            "default": 0
          },
          "dismissed_findings": {
            "type": "integer",
            "title": "Dismissed Findings",
            "description": "Dismissed findings on the latest run",
            "default": 0
          },
          "checks_current": {
            "type": "boolean",
            "title": "Checks Current",
            "description": "True when the latest complete run describes the draft as it stands",
            "default": false
          },
          "event_files_blocked": {
            "type": "boolean",
            "title": "Event Files Blocked",
            "description": "Uploaded event files conflict with files already on the event",
            "default": false
          },
          "latest_run_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latest Run Id",
            "description": "Id of the latest observer check run, if any"
          },
          "submit_in_progress": {
            "type": "boolean",
            "title": "Submit In Progress",
            "description": "A submit of this draft is under way, for example the automatic submit requested with auto_submit_when_clean. Poll this observation and follow next_actions: if the submit fails the draft stays a draft and next_actions offers 'submit' again.",
            "default": false
          }
        },
        "type": "object",
        "required": [
          "state"
        ],
        "title": "PublicReadiness",
        "description": "What a draft needs before it can be submitted."
      },
      "PublicReportDetails": {
        "properties": {
          "started_observing": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Started Observing",
            "description": "Started Observing time; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "d_uncorrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Uncorrected",
            "description": "Disappearance time as the observer entered it; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'. Null for a Tangra JSON report, whose times are already corrected"
          },
          "d_corrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Corrected",
            "description": "Disappearance time after the form's camera-delay correction; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'. Null when the form had no correction for the camera"
          },
          "r_corrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Corrected",
            "description": "Reappearance time after camera-delay correction; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "r_uncorrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Uncorrected",
            "description": "Reappearance time as the observer entered it; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "d_err_68": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Err 68",
            "description": "Disappearance error bar at 68.3 %, seconds"
          },
          "d_err_95": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Err 95",
            "description": "Disappearance error bar at 95 %, seconds"
          },
          "d_err_9973": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Err 9973",
            "description": "Disappearance error bar at 99.73 %, seconds"
          },
          "r_err_68": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Err 68",
            "description": "Reappearance error bar at 68.3 %, seconds"
          },
          "r_err_95": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Err 95",
            "description": "Reappearance error bar at 95 %, seconds"
          },
          "r_err_9973": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Err 9973",
            "description": "Reappearance error bar at 99.73 %, seconds"
          },
          "d_err": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Err",
            "description": "Tangra JSON reports only: the single disappearance error (±), seconds, a 1-sigma (68 % confidence) half-width"
          },
          "r_err": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Err",
            "description": "Tangra JSON reports only: the single reappearance error (±), seconds, a 1-sigma (68 % confidence) half-width"
          },
          "stopped_observing": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stopped Observing",
            "description": "Stopped Observing time; ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "aperture": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Aperture",
            "description": "Telescope aperture with its unit, e.g. '8 in'"
          },
          "f_ratio": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "F Ratio",
            "description": "Telescope f/ratio"
          },
          "telescope_type": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Telescope Type",
            "description": "Telescope type"
          },
          "timing_source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Source",
            "description": "Time source"
          },
          "timing_method": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Method",
            "description": "Timing method"
          },
          "timing_device": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timing Device",
            "description": "Timing device"
          },
          "ote_used": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ote Used",
            "description": "Occultation timing extractor (analysis program)"
          },
          "detector_model": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Detector Model",
            "description": "Camera model/type"
          },
          "video_format": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Video Format",
            "description": "Video format"
          },
          "integration": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Integration",
            "description": "Exposure/integration"
          },
          "clouds": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Clouds",
            "description": "Clouds / transparency"
          },
          "stability": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Stability",
            "description": "Image stability"
          },
          "archive_comment": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Archive Comment",
            "description": "Tangra JSON reports only: the observation comment the report carries for the archive (reportData.comments), as plain text with its line breaks (LF). Not the observation's own comments, which are the reviewer note"
          },
          "acknowledged_messages": {
            "anyOf": [
              {
                "items": {
                  "type": "string"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acknowledged Messages",
            "description": "Tangra JSON reports only: the warnings the observer confirmed in Tangra before submitting (optionalData.analysis.acknowledgedMessages), verbatim as plain text"
          },
          "events": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PublicReportEvent"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Events",
            "description": "Tangra JSON reports only: every event of the report (reportData.events), in report order, the first included. Several for a double star or an asteroid's satellite. Null for a spreadsheet, a miss, or a report stored before events were read"
          },
          "observers_more_than_listed": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observers More Than Listed",
            "description": "Tangra JSON reports only: reportData.observers.moreThanListed (more observers than the names listed, 'et al.')"
          },
          "camera_model_for_delays": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Camera Model For Delays",
            "description": "Tangra JSON reports only: the camera model whose instrumental delays were used (optionalData.equipment.cameraModelForDelays)"
          },
          "timing_detail": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportTimingDetail"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra JSON reports only: delays and time-base values"
          },
          "light_curve": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportLightCurve"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra JSON reports only: the light curve sent"
          },
          "recording": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportRecording"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra JSON reports only: the recording's span"
          },
          "prediction": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportPrediction"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra JSON reports only: where the event was identified from"
          },
          "submission": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportSubmission"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra JSON reports only: the region and station number"
          },
          "double_stars": {
            "anyOf": [
              {
                "items": {
                  "$ref": "#/components/schemas/PublicReportDoubleStar"
                },
                "type": "array"
              },
              {
                "type": "null"
              }
            ],
            "title": "Double Stars",
            "description": "Tangra JSON reports only: Tangra's double-star analysis (optionalData.analysis.doubleStars), one entry per pair of events"
          }
        },
        "type": "object",
        "title": "PublicReportDetails",
        "description": "The report's equipment, conditions and timing (not PII)."
      },
      "PublicReportDoubleStar": {
        "properties": {
          "event_a": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event A",
            "description": "Star A's event: a 1-based index into reportData.events"
          },
          "event_b": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Event B",
            "description": "Star B's event: a 1-based index into reportData.events"
          },
          "arrangement": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Arrangement",
            "description": "Order of the D and R steps, as written ('ABAB')"
          },
          "light_a": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Light A",
            "description": "Star A's share of the combined light (0-1)"
          },
          "light_b": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Light B",
            "description": "Star B's share of the combined light (0-1)"
          },
          "delta_magnitude": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delta Magnitude",
            "description": "Magnitude difference B - A"
          },
          "light_b_at_d": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Light B At D",
            "description": "Star B's share measured at D (0-1)"
          },
          "light_b_at_r": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Light B At R",
            "description": "Star B's share measured at R (0-1)"
          },
          "drop_a": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Drop A",
            "description": "Star A's drop (0-1)"
          },
          "drop_b": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Drop B",
            "description": "Star B's drop (0-1)"
          },
          "measured_drop": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Measured Drop",
            "description": "Measured total drop (0-1)"
          },
          "predicted_drop": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Predicted Drop",
            "description": "Predicted total drop (0-1)"
          },
          "ordering_ambiguous": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Ordering Ambiguous",
            "description": "Which star is A and which is B is ambiguous"
          },
          "found_by": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Found By",
            "description": "What found the double star, as written"
          },
          "edges": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Edges",
            "description": "Edge model, as written"
          },
          "star_b": {
            "anyOf": [
              {
                "$ref": "#/components/schemas/PublicReportStarB"
              },
              {
                "type": "null"
              }
            ],
            "description": "Tangra's test of star B"
          }
        },
        "type": "object",
        "title": "PublicReportDoubleStar",
        "description": "One entry of a Tangra JSON report's ``optionalData.analysis.doubleStars``:\nthe two events of a double star and how the light splits between them."
      },
      "PublicReportEvent": {
        "properties": {
          "d_corrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Corrected",
            "description": "Disappearance time (already corrected by Tangra); ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "r_corrected": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Corrected",
            "description": "Reappearance time (already corrected by Tangra); ISO 8601 time of day (UTC), e.g. '04:12:07.245000'"
          },
          "d_err": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Err",
            "description": "The disappearance error (±, 1-sigma), seconds"
          },
          "r_err": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Err",
            "description": "The reappearance error (±, 1-sigma), seconds"
          },
          "snr": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Snr",
            "description": "Signal-to-noise ratio"
          },
          "second_star": {
            "type": "boolean",
            "title": "Second Star",
            "description": "The event is of the second star of a double star",
            "default": false
          }
        },
        "type": "object",
        "title": "PublicReportEvent",
        "description": "One event (a disappearance/reappearance pair) of a Tangra JSON report.\n\nA double star or an asteroid's satellite gives one report several events;\nthe first is also the report's top-level ``d_corrected`` / ``r_corrected``\n/ ``d_err`` / ``r_err``."
      },
      "PublicReportLightCurve": {
        "properties": {
          "file": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "File",
            "description": "The light curve's file name"
          },
          "points": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Points",
            "description": "Data points in it"
          },
          "frames_from": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frames From",
            "description": "First frame it was cut to; null when it is the whole curve"
          },
          "frames_to": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Frames To",
            "description": "Last frame it was cut to; null when it is the whole curve"
          },
          "comparison_stars": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Comparison Stars",
            "description": "Comparison stars measured"
          }
        },
        "type": "object",
        "title": "PublicReportLightCurve",
        "description": "A Tangra JSON report's ``optionalData.lightCurve``: the light curve\nfile sent with the report."
      },
      "PublicReportParse": {
        "properties": {
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'parsed' or 'failed'"
          },
          "code": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Code",
            "description": "Stable outcome identifier: 'partial' with status 'parsed'; 'unreadable', 'version_not_detected', 'unsupported_version' or 'no_metadata' with status 'failed'."
          },
          "message": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Message",
            "description": "Explanation for the observer"
          }
        },
        "type": "object",
        "required": [
          "status"
        ],
        "title": "PublicReportParse",
        "description": "Whether the Hub read the uploaded report successfully."
      },
      "PublicReportPrediction": {
        "properties": {
          "source": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Source",
            "description": "Where the event came from, as Tangra writes it: OccultWatcherCloudMyEvents, OccultWatcherCloudSearch, OccultLocal, Pasted"
          },
          "owc_event_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Owc Event Id",
            "description": "The OccultWatcher Cloud event id the report names, as written. It becomes the observation's OWC link on each upload of the report, kept when OWC confirms it and dropped (the Hub's own match runs instead) when OWC has no such event or it is for another asteroid or star; owc.resolution.report_check says which"
          }
        },
        "type": "object",
        "title": "PublicReportPrediction",
        "description": "A Tangra JSON report's ``optionalData.prediction``: where the event\nwas identified from."
      },
      "PublicReportRecording": {
        "properties": {
          "start_utc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Start Utc",
            "description": "Recording start, ISO 8601 UTC ('...Z')"
          },
          "end_utc": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "End Utc",
            "description": "Recording end, ISO 8601 UTC ('...Z')"
          }
        },
        "type": "object",
        "title": "PublicReportRecording",
        "description": "A Tangra JSON report's ``optionalData.recording``: when the recording\nthe light curve came from starts and ends."
      },
      "PublicReportSite": {
        "properties": {
          "observing_location": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Observing Location",
            "description": "The observing location's name"
          },
          "latitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Latitude",
            "description": "Latitude as entered, with its hemisphere, e.g. '32 13 18.1 N' (a Tangra JSON report gives signed decimal degrees)"
          },
          "longitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Longitude",
            "description": "Longitude as entered, with its hemisphere, e.g. '110 56 41.2 W' (a Tangra JSON report gives signed decimal degrees)"
          },
          "elevation": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Elevation",
            "description": "Elevation with its unit, e.g. '780 m'"
          },
          "datum": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Datum",
            "description": "Geodetic datum, e.g. 'WGS84'"
          },
          "station_latitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station Latitude",
            "description": "Tangra JSON reports only: the station's latitude as announced in OccultWatcher Cloud, signed decimal degrees"
          },
          "station_longitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station Longitude",
            "description": "Tangra JSON reports only: the station's longitude as announced in OccultWatcher Cloud, signed decimal degrees"
          },
          "station_altitude": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station Altitude",
            "description": "Tangra JSON reports only: the station's altitude as announced in OccultWatcher Cloud, with its unit, e.g. '780 m'"
          }
        },
        "type": "object",
        "title": "PublicReportSite",
        "description": "Where the observer stood, as the report records it (PII).\n\nVisible only to the observation's owner and to ``observation.view_pii``\nholders; ``null`` for everyone else."
      },
      "PublicReportStarB": {
        "properties": {
          "p_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "P Value",
            "description": "The test's p-value"
          },
          "p_value_is_bound": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "P Value Is Bound",
            "description": "The p-value is an upper bound"
          },
          "trials": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Trials",
            "description": "Trials run"
          },
          "verdict": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Verdict",
            "description": "Tangra's verdict, as written (e.g. 'Probable')"
          },
          "slow_edge_fits_as_well": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Slow Edge Fits As Well",
            "description": "A slow (diffraction) edge fits as well"
          },
          "step_elsewhere": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Step Elsewhere",
            "description": "A similar step was found elsewhere"
          },
          "d_spread_points": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Spread Points",
            "description": "Spread of the D step, data points"
          },
          "r_spread_points": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Spread Points",
            "description": "Spread of the R step, data points"
          },
          "d_elsewhere": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "D Elsewhere",
            "description": "Similar D steps found elsewhere"
          },
          "r_elsewhere": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "R Elsewhere",
            "description": "Similar R steps found elsewhere"
          },
          "doubtful": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Doubtful",
            "description": "Tangra flags it doubtful"
          },
          "full_disappearance_p_value": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Full Disappearance P Value",
            "description": "p-value of a full disappearance"
          },
          "lifted_by_full_disappearance": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Lifted By Full Disappearance",
            "description": "The verdict was lifted by a full disappearance"
          }
        },
        "type": "object",
        "title": "PublicReportStarB",
        "description": "Tangra's test of whether the second star of a double star is real."
      },
      "PublicReportSubmission": {
        "properties": {
          "region": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Region",
            "description": "The region reported to, as Tangra writes it: Australasia, Europe, NorthAmerica, Other"
          },
          "station_number": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Station Number",
            "description": "The station's number on the OccultWatcher Cloud event (1-based)"
          }
        },
        "type": "object",
        "title": "PublicReportSubmission",
        "description": "A Tangra JSON report's ``optionalData.submission`` region and station\nnumber (the announced station position is in the PII ``report_site``)."
      },
      "PublicReportTimingDetail": {
        "properties": {
          "instrumental_delays": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Instrumental Delays",
            "description": "How the camera's instrumental delays were dealt with, as Tangra writes it: AppliedByTangra, AppliedToLightCurve, AcquisitionDelayApplied, NotRequired, NotApplied (more may follow)"
          },
          "embedded_timestamps": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Embedded Timestamps",
            "description": "The frames carry timestamps of their own (not OCR'd)"
          },
          "reliable_time_base": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reliable Time Base",
            "description": "The recording's time base is reliable"
          },
          "fitted_in_time": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Fitted In Time",
            "description": "The fit was done in time rather than in frames"
          },
          "windows_clock_timestamps": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Windows Clock Timestamps",
            "description": "The timestamps come from the Windows clock"
          },
          "acquisition_delay_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Acquisition Delay Ms",
            "description": "Acquisition delay, milliseconds"
          },
          "reference_time_to_utc_offset_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Reference Time To Utc Offset Ms",
            "description": "Reference time to UTC offset, milliseconds"
          },
          "delays_entered_at_report": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Delays Entered At Report",
            "description": "The delays were entered when reporting"
          },
          "timestamp_jitter_3sigma_ms": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp Jitter 3Sigma Ms",
            "description": "Timestamp jitter (3 sigma), milliseconds"
          },
          "timestamp_jitter_frames": {
            "anyOf": [
              {
                "type": "number"
              },
              {
                "type": "null"
              }
            ],
            "title": "Timestamp Jitter Frames",
            "description": "Timestamp jitter, frames"
          }
        },
        "type": "object",
        "title": "PublicReportTimingDetail",
        "description": "A Tangra JSON report's ``optionalData.timing`` beyond the video values:\nhow the camera's delays were handled and how good the time base is."
      },
      "PublicSignInStarted": {
        "properties": {
          "request_id": {
            "type": "string",
            "title": "Request Id",
            "description": "Identifies the sign-in"
          },
          "collect_code": {
            "type": "string",
            "title": "Collect Code",
            "description": "Secret for the collect call. Keep it out of URLs and logs; the browser page never sees it."
          },
          "verification_url": {
            "type": "string",
            "title": "Verification Url",
            "description": "Hub page where the user signs in and approves"
          },
          "expires_at": {
            "type": "string",
            "title": "Expires At",
            "description": "ISO 8601 UTC; void after this"
          },
          "expires_in": {
            "type": "integer",
            "title": "Expires In",
            "description": "Seconds until `expires_at`"
          },
          "interval": {
            "type": "integer",
            "title": "Interval",
            "description": "Seconds to wait between collect calls"
          },
          "client": {
            "type": "string",
            "title": "Client",
            "description": "The application the sign-in is for (e.g. `tangra`); the approval page names it"
          }
        },
        "type": "object",
        "required": [
          "request_id",
          "collect_code",
          "verification_url",
          "expires_at",
          "expires_in",
          "interval",
          "client"
        ],
        "title": "PublicSignInStarted",
        "description": "A browser sign-in, started because no Hub account matched automatically.\n\nOpen `verification_url` in the user's browser, then poll\n`POST /public/v1/key-exchange/sign-in/{request_id}/collect` with\n`collect_code` every `interval` seconds until it answers `200`."
      },
      "PublicSkippedCheck": {
        "properties": {
          "check_number": {
            "type": "integer",
            "title": "Check Number",
            "description": "Observer catalog number of the check; 0 for a check the current catalog no longer knows."
          },
          "code": {
            "type": "string",
            "title": "Code",
            "description": "Stable check identifier (the check_id)"
          },
          "name": {
            "type": "string",
            "title": "Name",
            "description": "Check name"
          },
          "status": {
            "type": "string",
            "title": "Status",
            "description": "'skipped' when required information was unavailable, or 'error' when the check failed to run."
          },
          "reason": {
            "type": "string",
            "title": "Reason",
            "description": "Why the check did not run"
          }
        },
        "type": "object",
        "required": [
          "check_number",
          "code",
          "name",
          "status",
          "reason"
        ],
        "title": "PublicSkippedCheck",
        "description": "A check that could not run, with the reason. Skipped checks do not prevent\nsubmission."
      },
      "PublicSubmitRequest": {
        "properties": {
          "version": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Version",
            "description": "The version you last read. Returns 409 stale_version if it has changed. Omit to submit the current version."
          }
        },
        "additionalProperties": false,
        "type": "object",
        "title": "PublicSubmitRequest",
        "description": "Body of ``POST /public/v1/observations/{id}/submit`` (the body is optional).",
        "examples": [
          {
            "version": 7
          },
          {}
        ]
      },
      "PublicUploadTarget": {
        "properties": {
          "slot": {
            "type": "string",
            "title": "Slot",
            "description": "File type this upload is for"
          },
          "filename": {
            "type": "string",
            "title": "Filename",
            "description": "Filename the target was issued for"
          },
          "upload_url": {
            "type": "string",
            "title": "Upload Url",
            "description": "S3 URL to POST the file to"
          },
          "fields": {
            "additionalProperties": {
              "type": "string"
            },
            "type": "object",
            "title": "Fields",
            "description": "Form fields that must accompany the file"
          },
          "file_key": {
            "type": "string",
            "title": "File Key",
            "description": "Upload identifier; pass it unchanged when finalizing"
          },
          "attachment_id": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Attachment Id",
            "description": "For an `attachment` target, the id the attachment will carry (pass it to the attachment finalize); null for the fixed slots."
          }
        },
        "type": "object",
        "required": [
          "slot",
          "filename",
          "upload_url",
          "file_key"
        ],
        "title": "PublicUploadTarget",
        "description": "An upload URL and form fields for one file. Send all returned fields in a multipart\nPOST, with the file as the last part."
      }
    },
    "securitySchemes": {
      "ApiKeyAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-API-Key",
        "description": "Create a key at /developers/keys. The full key is shown only once. Format: `iotahub_<key_id>_<secret>`. Choose its permissions when creating it: `read` for reading data and `observations:write` for creating or changing observations."
      }
    }
  }
}
