{"openapi":"3.1.0","info":{"title":"RED BASTION DayZ — Public Read-only API","description":"Открытый API каталога серверов DayZ RED BASTION. Доступ без авторизации, только чтение: серверы, онлайн, погода, опубликованные истории, оценка активного времени и уникальные заходы. Сначала получите /api/v1/servers и используйте возвращённый slug. Проверяйте observed_at, fresh и status: устаревшее наблюдение не означает текущий онлайн, null означает отсутствие данных, а не ноль. Истории публикуются с задержкой 120 минут и не являются прямой трансляцией событий. Каталог игроков, административные операции и сырые логи в этот контракт не входят.\n\nPublic, unauthenticated GET API. Check source timestamps and freshness before reporting current status. Never convert null observations into zero players. Published narratives are delayed and privacy-filtered, not a live event stream.","version":"1.0.0"},"servers":[{"url":"https://dayz.redbastion.ru","description":"Public site origin"}],"paths":{"/api/v1/servers":{"get":{"tags":["Servers"],"summary":"Список опубликованных серверов DayZ","description":"Начальная точка: карты, режимы, адреса подключения и наблюдения. total_players учитывает только свежие доступные наблюдения; проверяйте known_servers и observed_at. Отсутствующие данные остаются null.","operationId":"listPublicServers","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicServerCatalog"}}}}}}},"/api/v1/activity-window":{"get":{"tags":["Community"],"summary":"Обычное активное время сообщества по Москве","description":"Оценка наиболее активного трёхчасового интервала за 14 завершённых московских дней. Требуется минимум 7 достаточно полных дней по всем опубликованным серверам. status=insufficient_data означает нехватку данных, no_peak — отсутствие выраженного пика. Это историческая оценка, не прогноз и не текущий онлайн; результат обновляется раз в московский день.","operationId":"getCommunityActivityWindow","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicActivityWindow"}}}}}}},"/api/v1/servers/{slug}":{"get":{"tags":["Servers"],"summary":"Публичная карточка сервера DayZ","description":"Используйте slug из списка серверов. Наблюдения и погода имеют отдельные observed_at/fresh; наблюдение свежо не более 180 секунд. Отсутствующая карточка и неопубликованный сервер возвращают 404.","operationId":"getPublicServer","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicServer"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNotFound"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicValidationError"}}},"description":"Unprocessable Entity"}}}},"/api/v1/servers/{slug}/online":{"get":{"tags":["Servers"],"summary":"История онлайна сервера за 24 часа, 7 или 30 дней","description":"Пятиминутные интервалы за 24h и часовые за 7d/30d. Пропуски представлены null, реальный нулевой онлайн — 0. Среднее учитывает только наблюдавшиеся минуты; coverage_percent показывает полноту наблюдений. Сначала получите slug из списка серверов.","operationId":"getPublicServerOnlineHistory","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d)$","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicOnlineHistory"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNotFound"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicValidationError"}}},"description":"Unprocessable Entity"}}}},"/api/v1/servers/{slug}/stories":{"get":{"tags":["Servers"],"summary":"Опубликованные истории сервера за текущий московский день","description":"До 20 историй, опубликованных в текущий московский день, после задержки 120 минут. Точные period_start и period_end относятся к исходному эпизоду. Текст учитывает актуальные настройки приватности участников. Пустой список не означает отсутствие игроков или событий. Сырые логи и координаты не возвращаются.","operationId":"getPublicServerStories","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicStories"}}}},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicNotFound"}}},"description":"Not Found"},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicValidationError"}}},"description":"Unprocessable Entity"}}}},"/api/v1/players/activity":{"get":{"tags":["Community"],"summary":"Уникальные заходы игроков за 24 часа, 7 или 30 дней","description":"Обезличенные подключения игроков с заданным ником на опубликованных серверах. Один игрок учитывается один раз за интервал и отдельно один раз за весь период. Период заканчивается в момент запроса, без задержки публикации; длительная сессия без нового входа не создаёт новые подключения. Неполные интервалы помечены partial, null — нет данных. Скрытие карточки не исключает игрока из агрегата. Идентификаторы и серверы не возвращаются.","operationId":"getCommunityPlayerActivity","parameters":[{"name":"range","in":"query","required":false,"schema":{"type":"string","pattern":"^(24h|7d|30d)$","default":"24h","title":"Range"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicPlayerActivity"}}}},"422":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicValidationError"}}},"description":"Unprocessable Entity"}}}}},"components":{"schemas":{"PublicActivityWindow":{"properties":{"status":{"type":"string","enum":["ready","insufficient_data","no_peak"],"title":"Status"},"start_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Start Hour","description":"Local starting hour, present only when status is ready."},"end_hour":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"End Hour","description":"Local ending hour, modulo 24; the interval may cross midnight."},"timezone":{"type":"string","const":"Europe/Moscow","title":"Timezone"},"window_hours":{"type":"integer","const":3,"title":"Window Hours"},"period_days":{"type":"integer","const":14,"title":"Period Days"},"sample_days":{"type":"integer","title":"Sample Days","description":"Complete, sufficiently covered days used in the estimate; at least 7 are required."},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End","description":"Start of the current Moscow day; the ongoing day is excluded."}},"additionalProperties":false,"type":"object","required":["status","start_hour","end_hour","timezone","window_hours","period_days","sample_days","period_start","period_end"],"title":"PublicActivityWindow"},"PublicAnalysis":{"properties":{"description":{"type":"string","title":"Description"},"summary":{"type":"string","title":"Summary"},"generated_at":{"type":"string","format":"date-time","title":"Generated At"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End","description":"End of the delayed source period. This is not a live event feed."}},"additionalProperties":false,"type":"object","required":["description","summary","generated_at","period_start","period_end"],"title":"PublicAnalysis"},"PublicNotFound":{"properties":{"detail":{"type":"string","title":"Detail"}},"additionalProperties":false,"type":"object","required":["detail"],"title":"PublicNotFound"},"PublicObservation":{"properties":{"observed_at":{"type":"string","format":"date-time","title":"Observed At","description":"Source observation time, including its UTC offset."},"players":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Players","description":"Observed players; null means unavailable, not zero."},"max_players":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Players"},"game_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Time"},"source":{"type":"string","title":"Source"},"status":{"type":"string","enum":["online","unavailable","stale"],"title":"Status"},"fresh":{"type":"boolean","title":"Fresh","description":"True only for an available observation no older than 180 seconds at response time."}},"additionalProperties":false,"type":"object","required":["observed_at","players","max_players","game_time","source","status","fresh"],"title":"PublicObservation"},"PublicOnlineHistory":{"properties":{"points":{"items":{"$ref":"#/components/schemas/PublicOnlinePoint"},"type":"array","title":"Points"},"average":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Average","description":"Mean across observed minutes only; unobserved minutes are excluded."},"peak":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Peak","description":"Maximum actual observed player count in the requested period."},"coverage_percent":{"type":"number","title":"Coverage Percent","description":"Percentage of minutes with observations; missing minutes are not zero players."}},"additionalProperties":false,"type":"object","required":["points","average","peak","coverage_percent"],"title":"PublicOnlineHistory"},"PublicOnlinePoint":{"properties":{"at":{"type":"string","format":"date-time","title":"At"},"players":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Players","description":"Mean observed player count in this bucket. Null represents missing observations."}},"additionalProperties":false,"type":"object","required":["at","players"],"title":"PublicOnlinePoint"},"PublicPlayerActivity":{"properties":{"range":{"type":"string","enum":["24h","7d","30d"],"title":"Range"},"timezone":{"type":"string","const":"Europe/Moscow","title":"Timezone"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End","description":"Request time; recorded connections are included without a publication delay. Not current online."},"capture_started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Capture Started At","description":"History collection launch time; earlier data is never reconstructed from profiles."},"delay_minutes":{"type":"integer","const":0,"title":"Delay Minutes"},"total_unique_players":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Total Unique Players","description":"Distinct players across the entire period and all published servers, not the sum of points."},"status":{"type":"string","enum":["complete","partial","no_data"],"title":"Status"},"points":{"items":{"$ref":"#/components/schemas/PublicPlayerActivityPoint"},"type":"array","title":"Points"}},"additionalProperties":false,"type":"object","required":["range","timezone","period_start","period_end","capture_started_at","delay_minutes","total_unique_players","status","points"],"title":"PublicPlayerActivity"},"PublicPlayerActivityPoint":{"properties":{"at":{"type":"string","format":"date-time","title":"At","description":"Beginning of this hour or Moscow-day bucket, clipped to the requested period."},"until":{"type":"string","format":"date-time","title":"Until","description":"Exclusive end of this bucket, clipped to the requested period."},"unique_players":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Unique Players","description":"Distinct recorded entries. Partial positive counts are lower bounds; unknown empty buckets stay null."},"status":{"type":"string","enum":["complete","partial","no_data"],"title":"Status"}},"additionalProperties":false,"type":"object","required":["at","until","unique_players","status"],"title":"PublicPlayerActivityPoint"},"PublicServer":{"properties":{"id":{"type":"string","title":"Id"},"slug":{"type":"string","title":"Slug","description":"Public server slug to pass to the server detail, online and stories endpoints."},"name":{"type":"string","title":"Name"},"description":{"type":"string","title":"Description"},"map":{"type":"string","title":"Map"},"mode":{"type":"string","title":"Mode"},"game_address":{"type":"string","title":"Game Address","description":"Public game connection address."},"game_port":{"type":"integer","title":"Game Port"},"published":{"type":"boolean","const":true,"title":"Published"},"observation":{"anyOf":[{"$ref":"#/components/schemas/PublicObservation"},{"type":"null"}]},"weather":{"anyOf":[{"$ref":"#/components/schemas/PublicWeather"},{"type":"null"}]},"analysis":{"anyOf":[{"$ref":"#/components/schemas/PublicAnalysis"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["id","slug","name","description","map","mode","game_address","game_port","published","observation","weather","analysis"],"title":"PublicServer"},"PublicServerCatalog":{"properties":{"servers":{"items":{"$ref":"#/components/schemas/PublicServer"},"type":"array","title":"Servers"},"total_players":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Players","description":"Sum across fresh, available observations only; null if none are known."},"known_servers":{"type":"integer","title":"Known Servers","description":"Number of servers with a fresh, available observation."},"observed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Observed At","description":"Newest source time among fresh observations; null if none are known."}},"additionalProperties":false,"type":"object","required":["servers","total_players","known_servers","observed_at"],"title":"PublicServerCatalog"},"PublicStories":{"properties":{"stories":{"items":{"$ref":"#/components/schemas/PublicStory"},"type":"array","title":"Stories","description":"Up to 20 stories released during this Moscow day, newest first. Empty means no published stories for this day."},"day":{"type":"string","format":"date","title":"Day"},"timezone":{"type":"string","const":"Europe/Moscow","title":"Timezone"},"delay_minutes":{"type":"integer","const":60,"title":"Delay Minutes"}},"additionalProperties":false,"type":"object","required":["stories","day","timezone","delay_minutes"],"title":"PublicStories"},"PublicStory":{"properties":{"id":{"type":"string","title":"Id"},"period_start":{"type":"string","format":"date-time","title":"Period Start"},"period_end":{"type":"string","format":"date-time","title":"Period End"},"text":{"type":"string","title":"Text","description":"Published narrative rendered with current participant privacy settings; not raw log evidence."}},"additionalProperties":false,"type":"object","required":["id","period_start","period_end","text"],"title":"PublicStory"},"PublicValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/PublicValidationIssue"},"type":"array","title":"Detail"}},"additionalProperties":false,"type":"object","required":["detail"],"title":"PublicValidationError"},"PublicValidationIssue":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Loc"},"msg":{"type":"string","title":"Msg"},"type":{"type":"string","title":"Type"}},"additionalProperties":false,"type":"object","required":["loc","msg","type"],"title":"PublicValidationIssue"},"PublicWeather":{"properties":{"game_time":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Game Time"},"is_night":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Night"},"overcast":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Overcast"},"rain":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rain"},"snow":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Snow"},"fog":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Fog"},"wind_speed":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Wind Speed"},"observed_at":{"type":"string","format":"date-time","title":"Observed At"},"fresh":{"type":"boolean","title":"Fresh","description":"Whether source telemetry is no older than 180 seconds at response time."},"source":{"type":"string","const":"telemetry","title":"Source"}},"additionalProperties":false,"type":"object","required":["game_time","is_night","overcast","rain","snow","fog","wind_speed","observed_at","fresh","source"],"title":"PublicWeather"}}},"tags":[{"name":"Servers","description":"Published DayZ servers and their existing public observations."},{"name":"Community","description":"Aggregate community activity, without player profiles."}]}