{"openapi":"3.0.3","info":{"title":"bbstats.am public API","version":"1.0.0","description":"Unauthenticated HTTP APIs for the bbstats basketball-league platform: health, published news, changelog, and host identity. League admin and live scoring are on each tenant host and require a staff session."},"servers":[{"url":"https://bbstats.am","description":"This host"}],"paths":{"/api/health":{"get":{"operationId":"getHealth","summary":"Process health","tags":["Status"],"responses":{"200":{"description":"Mongo is connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"status":"ok"}}}},"503":{"description":"Mongo is not connected","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"},"example":{"status":"degraded"}}}}}}},"/api/platform-news":{"get":{"operationId":"listPlatformNews","summary":"Published platform blog posts","tags":["News"],"parameters":[{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","hy","ru"]}}],"responses":{"200":{"description":"Newest published posts first (body omitted)","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PlatformNewsListItem"}}}}}}}},"/api/platform-news/{slug}":{"get":{"operationId":"getPlatformNews","summary":"One published post, including HTML body","tags":["News"],"parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string"}},{"name":"lang","in":"query","schema":{"type":"string","enum":["en","hy","ru"]}}],"responses":{"200":{"description":"Published article","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlatformNewsArticle"}}}},"404":{"description":"Unknown or unpublished slug"}}}},"/api/changelog":{"get":{"operationId":"listChangelog","summary":"Published platform releases","tags":["Changelog"],"responses":{"200":{"description":"Releases grouped by version","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ChangelogRelease"}}}}}}}},"/api/public/tenant":{"get":{"operationId":"getPublicTenant","summary":"Host identity and branding","description":"On bbstats.am this is the platform-root marker. On a league host it is that championship’s public branding.","tags":["Tenant"],"responses":{"200":{"description":"Public tenant or platform-root payload","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicTenant"}}}},"410":{"description":"This league host is no longer available"}}}}},"components":{"schemas":{"Health":{"type":"object","required":["status"],"properties":{"status":{"type":"string","enum":["ok","degraded"]}}},"PlatformNewsListItem":{"type":"object","properties":{"_id":{"type":"string"},"title":{"type":"string"},"slug":{"type":"string"},"excerpt":{"type":"string"},"coverImage":{"type":"string"},"publishedAt":{"type":"string","format":"date-time"},"authorName":{"type":"string"}}},"PlatformNewsArticle":{"allOf":[{"$ref":"#/components/schemas/PlatformNewsListItem"},{"type":"object","properties":{"body":{"type":"string","description":"Sanitized HTML"}}}]},"ChangelogRelease":{"type":"object","properties":{"key":{"type":"string"},"version":{"type":"string"},"releaseDate":{"type":"string","format":"date-time"},"entries":{"type":"array","items":{"type":"object","properties":{"_id":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"body":{"type":"string"}}}}}},"PublicTenant":{"type":"object","properties":{"platformRoot":{"type":"boolean"},"name":{"type":"string"},"siteTitle":{"type":"string"},"subdomain":{"type":"string"}},"additionalProperties":true}}}}