{"openapi":"3.1.0","info":{"title":"Public API Middleware","version":"0.6.6"},"paths":{"/api/v1/ror/search":{"post":{"tags":["ROR"],"summary":"Search","description":"Proxy search requests to the ROR upstream service.","operationId":"search_api_v1_ror_search_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"affiliations":{"items":{"type":"string"},"type":"array","description":"List of raw affiliation strings to search."},"include_deprecated_ror_ids":{"type":"boolean","description":"If true, include deprecated ror_ids."}},"type":"object","required":["affiliations"]},"example":{"affiliations":["Massachusetts Institute of Technology"],"include_deprecated_ror_ids":false}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RorSearchResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/ror/search_topk":{"post":{"tags":["ROR"],"summary":"Search Topk","description":"Proxy top-k search requests to the ROR upstream service.","operationId":"search_topk_api_v1_ror_search_topk_post","requestBody":{"content":{"application/json":{"schema":{"properties":{"affiliations":{"items":{"type":"string"},"type":"array","description":"List of raw affiliation strings to search."},"top_k":{"type":"integer","description":"Number of results to return."},"include_deprecated_ror_ids":{"type":"boolean","description":"If true, include deprecated ror_ids."}},"type":"object","required":["affiliations"]},"example":{"affiliations":["Massachusetts Institute of Technology","University of Cambridge"],"top_k":1,"include_deprecated_ror_ids":false}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RorSearchResponse"}}}}},"security":[{"APIKeyHeader":[]}]}},"/api/v1/_healthz":{"get":{"summary":"Health Check","description":"Check health status of the middleware service.","operationId":"health_check_api_v1__healthz_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}}}}}},"components":{"schemas":{"HealthResponse":{"properties":{"status":{"type":"string","title":"Health Status","description":"The health status of the service","example":"healthy"},"timestamp":{"type":"string","title":"Timestamp","description":"ISO 8601 timestamp of the health check","example":"2025-12-19T14:50:00Z"},"details":{"additionalProperties":true,"type":"object","title":"Details","description":"Additional health check details","example":{"api_connectivity":"ok"}}},"type":"object","required":["status","timestamp","details"],"title":"HealthResponse","description":"Response model for health check endpoint."},"RorAffiliationMatch":{"properties":{"identified_affiliation_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identified Affiliation Name"},"identified_organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identified Organization Name"},"identified_department_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Identified Department Name"},"institution_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institution Name"},"institution_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Institution Type"},"institution_urls":{"items":{"type":"string"},"type":"array","title":"Institution Urls","default":[]},"ror_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ror Id"},"grid_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Grid Id"},"score":{"anyOf":[{"type":"number"},{"type":"integer"}],"title":"Score"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City"},"click_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Click Url"},"feedback_thumbs_up_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Thumbs Up Url"},"feedback_thumbs_down_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Feedback Thumbs Down Url"}},"type":"object","required":["score"],"title":"RorAffiliationMatch","description":"Allowlisted fields for a single affiliation match."},"RorAffiliationResponse":{"properties":{"raw_affiliation":{"type":"string","title":"Raw Affiliation"},"affiliation_matches":{"anyOf":[{"items":{"$ref":"#/components/schemas/RorAffiliationMatch"},"type":"array"},{"type":"null"}],"title":"Affiliation Matches"},"user_input_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Input Url"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["raw_affiliation"],"title":"RorAffiliationResponse","description":"Allowlisted fields for a raw affiliation result."},"RorSearchResponse":{"properties":{"response":{"items":{"$ref":"#/components/schemas/RorAffiliationResponse"},"type":"array","title":"Response"}},"type":"object","required":["response"],"title":"RorSearchResponse","description":"Top-level allowlist for ROR search endpoints."}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","in":"header","name":"Authorization"}}}}