{"openapi":"3.1.0","info":{"title":"TRON AML API","description":"\nAML-проверка адресов TRON: трассировка потоков TRX и стейблкоинов, разметка контрагентов\nпо публичным источникам и собственным алгоритмам, оценка риска и PDF-отчёт на русском.\n\n**Как пользоваться**\n1. `POST /api/v1/aml-checks` с адресом → получаете `id` (или сразу результат при `wait=true`).\n2. `GET /api/v1/aml-checks/{id}` — статус и полный результат.\n3. `pdf_url` — публичная ссылка на PDF, `GET /api/v1/aml-checks/{id}/summary` — текстовая сводка.\n\n**Авторизация**: заголовок `X-API-Key: <ключ>` или `Authorization: Bearer <ключ>`.\n","version":"1.0.0"},"servers":[{"url":"https://api.amlcore.space","description":"Боевой"},{"url":"http://localhost:8000","description":"Локально"}],"paths":{"/api/v1/aml-checks":{"post":{"tags":["AML-проверки"],"summary":"Создать AML-проверку адреса","operationId":"create_check_api_v1_aml_checks_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmlCheckCreate"}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmlCheck"}}}},"200":{"description":"Проверка уже готова","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmlCheck"}}}},"422":{"description":"Некорректный адрес или параметры"}}},"get":{"tags":["AML-проверки"],"summary":"Список проверок","operationId":"list_checks_api_v1_aml_checks_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Фильтр по адресу","title":"Address"},"description":"Фильтр по адресу"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmlCheckList"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/aml-checks/{check_id}":{"get":{"tags":["AML-проверки"],"summary":"Получить проверку (статус и полный результат)","operationId":"get_check_api_v1_aml_checks__check_id__get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmlCheck"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/aml-checks/{check_id}/events":{"get":{"tags":["AML-проверки"],"summary":"Поток событий проверки (Server-Sent Events): статус и результат по готовности","description":"Реальное время без опроса: соединение держится до готовности проверки (или до 10 минут),\nсобытия `status` раз в несколько секунд и финальное `done`/`failed` с телом как у GET /aml-checks/{id}.","operationId":"check_events_api_v1_aml_checks__check_id__events_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/aml-checks/{check_id}/summary":{"get":{"tags":["AML-проверки"],"summary":"Краткая текстовая сводка (формат для Telegram)","operationId":"get_summary_api_v1_aml_checks__check_id__summary_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/aml-checks/{check_id}/report.pdf":{"get":{"tags":["AML-проверки"],"summary":"PDF-отчёт","operationId":"get_pdf_api_v1_aml_checks__check_id__report_pdf_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/aml-checks/{check_id}.pdf":{"get":{"tags":["Публичные"],"summary":"PDF-отчёт по публичной ссылке (без ключа, доступ по неугадываемому id)","operationId":"get_public_pdf_api_v1_public_aml_checks__check_id__pdf_get","parameters":[{"name":"check_id","in":"path","required":true,"schema":{"type":"string","title":"Check Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/pdf":{}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/addresses/{address}/labels":{"get":{"tags":["Разметка"],"summary":"Метки адреса из базы (без сетевых запросов)","operationId":"address_labels_api_v1_addresses__address__labels_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AddressLabels"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/addresses/{address}/transfers":{"get":{"tags":["Индекс переводов"],"summary":"Переводы USDT адреса из собственного индекса (BigQuery, 180 дней)","description":"История из индекса aml_index (usdt_out/usdt_in): входящие и исходящие переводы USDT, новые первыми.\nЭто те же данные, по которым трассировщик проходит промежуточные кошельки.","operationId":"address_transfers_api_v1_addresses__address__transfers_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/categories":{"get":{"tags":["Разметка"],"summary":"Категории связей и их веса","operationId":"list_categories_api_v1_categories_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/CategoryOut"},"type":"array","title":"Response List Categories Api V1 Categories Get"}}}}}}},"/api/v1/labels":{"post":{"tags":["Разметка (админ)"],"summary":"Добавить или обновить ручную метку","operationId":"put_label_api_v1_labels_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LabelOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/labels/{address}":{"delete":{"tags":["Разметка (админ)"],"summary":"Удалить метки адреса","operationId":"delete_label_api_v1_labels__address__delete","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Только из этого источника","title":"Source"},"description":"Только из этого источника"},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/labels/import":{"post":{"tags":["Разметка (админ)"],"summary":"Импорт меток из CSV (address,category,entity,confidence)","operationId":"import_labels_api_v1_labels_import_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_import_labels_api_v1_labels_import_post"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportResult"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/labels/sync":{"post":{"tags":["Разметка (админ)"],"summary":"Синхронизировать публичные источники (OFAC, Tether, OpenSanctions, seed)","operationId":"run_sync_api_v1_labels_sync_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/SyncResult"},"type":"array","title":"Response Run Sync Api V1 Labels Sync Post"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/labels/sources":{"get":{"tags":["Разметка"],"summary":"Статистика меток по источникам","operationId":"label_sources_api_v1_labels_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/benchmarks":{"get":{"tags":["Самообучение (админ)"],"summary":"Эталоны и сравнение с нашими результатами","operationId":"list_benchmarks_api_v1_admin_benchmarks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]},"post":{"tags":["Самообучение (админ)"],"summary":"Добавить эталонный отчёт (текст сводки или поля)","operationId":"add_benchmark_api_v1_admin_benchmarks_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/benchmarks/upload":{"post":{"tags":["Самообучение (админ)"],"summary":"Загрузить эталонный отчёт (PDF или .txt)","operationId":"upload_benchmark_api_v1_admin_benchmarks_upload_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"source","in":"query","required":false,"schema":{"type":"string","default":"bitok","title":"Source"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_benchmark_api_v1_admin_benchmarks_upload_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/label-candidates":{"get":{"tags":["Самообучение (админ)"],"summary":"Метки, выведенные из эталонных отчётов (кандидаты и применённые)","operationId":"label_candidates_api_v1_admin_label_candidates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/quality":{"get":{"tags":["Самообучение (админ)"],"summary":"Метрики качества сейчас и история снимков","operationId":"get_quality_api_v1_admin_quality_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"history","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":0,"default":30,"title":"History"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/quality/snapshot":{"post":{"tags":["Самообучение (админ)"],"summary":"Сохранить снимок метрик сейчас","operationId":"take_snapshot_api_v1_admin_quality_snapshot_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/calibrate":{"post":{"tags":["Самообучение (админ)"],"summary":"Запустить калибровку скоринга по эталонам","operationId":"calibrate_api_v1_admin_calibrate_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Применить даже при малом выигрыше/мало эталонов","default":false,"title":"Force"},"description":"Применить даже при малом выигрыше/мало эталонов"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/scoring-profiles":{"get":{"tags":["Самообучение (админ)"],"summary":"Версии профиля скоринга","operationId":"profiles_api_v1_admin_scoring_profiles_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/scoring-profiles/{profile_id}/activate":{"post":{"tags":["Самообучение (админ)"],"summary":"Активировать профиль (откат)","operationId":"activate_profile_api_v1_admin_scoring_profiles__profile_id__activate_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"profile_id","in":"path","required":true,"schema":{"type":"integer","title":"Profile Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/scoring-profiles/reset":{"post":{"tags":["Самообучение (админ)"],"summary":"Вернуть параметры скоринга по умолчанию","operationId":"reset_profile_api_v1_admin_scoring_profiles_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/learning":{"get":{"tags":["Самообучение (админ)"],"summary":"Состояние фонового самообучения","operationId":"learning_state_api_v1_admin_learning_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/learning/enqueue":{"post":{"tags":["Самообучение (админ)"],"summary":"Поставить адреса на доразметку или сбор депозитов","operationId":"enqueue_api_v1_admin_learning_enqueue_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnqueueIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/learning/boost":{"get":{"tags":["Самообучение (админ)"],"summary":"Ход разгона обучения","operationId":"boost_state_api_v1_admin_learning_boost_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]},"post":{"tags":["Самообучение (админ)"],"summary":"Разгон обучения: потратить N запросов к ноде на очереди доразметки прямо сейчас","operationId":"boost_start_api_v1_admin_learning_boost_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoostIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Самообучение (админ)"],"summary":"Остановить разгон обучения","operationId":"boost_stop_api_v1_admin_learning_boost_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/policy":{"get":{"tags":["Самообучение (админ)"],"summary":"Текущие правила и настройки оценки риска (только чтение)","operationId":"policy_state_api_v1_admin_policy_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Управление (админ)"],"summary":"Сохранить правила оценки новой версией профиля (и активировать)","operationId":"policy_put_api_v1_admin_policy_put","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/bq-guard/reset":{"post":{"tags":["Самообучение (админ)"],"summary":"Сбросить предохранитель BigQuery (например, после повышения квоты)","operationId":"bq_guard_reset_api_v1_admin_bq_guard_reset_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/bq-index":{"get":{"tags":["Самообучение (админ)"],"summary":"Индекс переводов USDT в BigQuery: размер, окно, расход запросов","operationId":"bq_index_state_api_v1_admin_bq_index_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/bq-index/sync":{"post":{"tags":["Самообучение (админ)"],"summary":"Дописать индекс; rebuild=true — перестроить на backfill_days дней","operationId":"bq_index_sync_api_v1_admin_bq_index_sync_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"backfill_days","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":365,"minimum":1},{"type":"null"}],"title":"Backfill Days"}},{"name":"rebuild","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Rebuild"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/bq-exposure/rebuild":{"post":{"tags":["Самообучение (админ)"],"summary":"Пересчитать сетевую экспозицию всех адресов (BigQuery, фоном)","operationId":"bq_exposure_rebuild_api_v1_admin_bq_exposure_rebuild_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"iterations","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"default":6,"title":"Iterations"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/huione/build":{"post":{"tags":["Самообучение (админ)"],"summary":"Сеть HuionePay и исторические доли (BigQuery ~0.9 ТБ, фоном)","operationId":"huione_build_api_v1_admin_huione_build_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"запустить даже сверх фонового бюджета","default":false,"title":"Force"},"description":"запустить даже сверх фонового бюджета"},{"name":"rebuild_network","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Rebuild Network"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/labels/contract-sweep":{"get":{"tags":["Самообучение (админ)"],"summary":"Ход проверки сервисов на контракт","operationId":"contract_sweep_state_api_v1_admin_labels_contract_sweep_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]},"post":{"tags":["Самообучение (админ)"],"summary":"Проверить «угаданные» сервисы на смарт-контракт (DEX, мосты) и переразметить","operationId":"contract_sweep_api_v1_admin_labels_contract_sweep_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/graph-ml/build":{"post":{"tags":["Самообучение (админ)"],"summary":"Модель графа: признаки, обучение, распространение долей (BigQuery, фоном)","operationId":"graph_ml_build_api_v1_admin_graph_ml_build_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"steps","in":"query","required":false,"schema":{"type":"string","default":"features,train,propagate","title":"Steps"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/entities/build":{"post":{"tags":["Самообучение (админ)"],"summary":"Граф сущностей: узлы, тип сервиса, кластеры «один владелец», импорт меток (BigQuery, фоном)","operationId":"entities_build_api_v1_admin_entities_build_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"steps","in":"query","required":false,"schema":{"type":"string","default":"nodes,train,clusters,import","title":"Steps"}},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Force"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/entities":{"get":{"tags":["Самообучение (админ)"],"summary":"Состояние графа сущностей и кандидаты модели на ручную проверку","operationId":"entities_state_api_v1_admin_entities_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/bitrace/sweep":{"post":{"tags":["Самообучение (админ)"],"summary":"BTrace: потратить до N отчётов (mode=unnamed — безымянные хабы, risky — красная зона и кандидаты модели); фоном, ход — в GET /bitrace","operationId":"bitrace_sweep_api_v1_admin_bitrace_sweep_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"credits","in":"query","required":false,"schema":{"type":"integer","maximum":900,"minimum":1,"default":10,"title":"Credits"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(unnamed|risky)$","default":"unnamed","title":"Mode"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/bitrace/check":{"post":{"tags":["Самообучение (админ)"],"summary":"BTrace: полный отчёт по одному адресу → метки адреса и контрагентов + эталон","operationId":"bitrace_check_api_v1_admin_bitrace_check_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"address","in":"query","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/bitrace":{"get":{"tags":["Самообучение (админ)"],"summary":"BTrace: расход бюджета и последние результаты","operationId":"bitrace_state_api_v1_admin_bitrace_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/graph-ml":{"get":{"tags":["Самообучение (админ)"],"summary":"Состояние модели графа","operationId":"graph_ml_state_api_v1_admin_graph_ml_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/bq-exposure":{"get":{"tags":["Самообучение (админ)"],"summary":"Состояние сетевой экспозиции","operationId":"bq_exposure_state_api_v1_admin_bq_exposure_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/bigquery/run":{"post":{"tags":["Самообучение (админ)"],"summary":"Запустить поиск депозитов бирж в BigQuery сейчас","operationId":"bigquery_run_api_v1_admin_bigquery_run_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":365,"minimum":1,"default":30,"title":"Days"}},{"name":"dry_run","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Dry Run"}},{"name":"job_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"продолжить чтение готового результата BigQuery","title":"Job Id"},"description":"продолжить чтение готового результата BigQuery"},{"name":"start_row","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Start Row"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/checks":{"get":{"tags":["Управление (админ)"],"summary":"Проверки всех клиентов: фильтры, пагинация, сводка за сутки","operationId":"admin_checks_api_v1_admin_checks_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(pending|running|done|failed)$"},{"type":"null"}],"title":"Status"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"}},{"name":"level","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Level"}},{"name":"address","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"подстрока адреса или id","title":"Q"},"description":"подстрока адреса или id"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"include_system","in":"query","required":false,"schema":{"type":"boolean","default":true,"title":"Include System"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":50,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/checks/batch":{"post":{"tags":["Управление (админ)"],"summary":"Пакетная проверка: до 5 000 адресов одним запросом, низкий приоритет","operationId":"admin_batch_api_v1_admin_checks_batch_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/checks/batch/{batch_id}":{"get":{"tags":["Управление (админ)"],"summary":"Ход пакетной проверки и итог CSV","operationId":"admin_batch_status_api_v1_admin_checks_batch__batch_id__get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"batch_id","in":"path","required":true,"schema":{"type":"string","title":"Batch Id"}},{"name":"format","in":"query","required":false,"schema":{"type":"string","pattern":"^(json|csv)$","default":"json","title":"Format"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/clients":{"get":{"tags":["Управление (админ)"],"summary":"Клиенты API со статистикой","operationId":"list_clients_api_v1_admin_clients_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"post":{"tags":["Управление (админ)"],"summary":"Создать клиента","operationId":"create_client_api_v1_admin_clients_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/clients/{client_id}":{"get":{"tags":["Управление (админ)"],"summary":"Карточка клиента: ключи и статистика","operationId":"get_client_api_v1_admin_clients__client_id__get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Управление (админ)"],"summary":"Изменить клиента: реквизиты, лимиты, статус","operationId":"patch_client_api_v1_admin_clients__client_id__patch","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ClientPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/clients/{client_id}/keys":{"post":{"tags":["Управление (админ)"],"summary":"Выпустить ключ (показывается один раз)","operationId":"issue_key_api_v1_admin_clients__client_id__keys_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/KeyIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/clients/{client_id}/keys/{key_id}":{"delete":{"tags":["Управление (админ)"],"summary":"Отозвать ключ","operationId":"revoke_key_api_v1_admin_clients__client_id__keys__key_id__delete","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string","title":"Client Id"}},{"name":"key_id","in":"path","required":true,"schema":{"type":"string","title":"Key Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/settings":{"get":{"tags":["Управление (админ)"],"summary":"Редактируемые параметры ядра: тип, диапазон, значение, источник","operationId":"get_settings_list_api_v1_admin_settings_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}},"put":{"tags":["Управление (админ)"],"summary":"Изменить параметры без редеплоя (переопределение поверх окружения)","operationId":"put_settings_api_v1_admin_settings_put","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingsIn"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/settings/{name}":{"delete":{"tags":["Управление (админ)"],"summary":"Снять переопределение — вернуться к значению окружения","operationId":"delete_setting_api_v1_admin_settings__name__delete","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/policy/preview":{"post":{"tags":["Управление (админ)"],"summary":"Предпросмотр правил: как изменится совпадение с эталонами","operationId":"policy_preview_api_v1_admin_policy_preview_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PolicyIn"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}]}},"/api/v1/admin/benchmarks/{bench_id}":{"delete":{"tags":["Управление (админ)"],"summary":"Удалить эталон","operationId":"delete_benchmark_api_v1_admin_benchmarks__bench_id__delete","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"bench_id","in":"path","required":true,"schema":{"type":"integer","title":"Bench Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/benchmarks/{bench_id}/recheck":{"post":{"tags":["Управление (админ)"],"summary":"Перепроверить адрес эталона сейчас","operationId":"recheck_benchmark_api_v1_admin_benchmarks__bench_id__recheck_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"bench_id","in":"path","required":true,"schema":{"type":"integer","title":"Bench Id"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","pattern":"^(fast|standard|deep)$","default":"standard","title":"Mode"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/benchmarks/{bench_id}/file":{"get":{"tags":["Управление (админ)"],"summary":"Исходный текст эталонного отчёта","operationId":"benchmark_file_api_v1_admin_benchmarks__bench_id__file_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"bench_id","in":"path","required":true,"schema":{"type":"integer","title":"Bench Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/label-candidates/pending":{"get":{"tags":["Управление (админ)"],"summary":"Кандидаты меток без решения","operationId":"candidates_pending_api_v1_admin_label_candidates_pending_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":200,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/label-candidates/{cand_id}/apply":{"post":{"tags":["Управление (админ)"],"summary":"Применить кандидата: ручная метка адреса","operationId":"candidate_apply_api_v1_admin_label_candidates__cand_id__apply_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"cand_id","in":"path","required":true,"schema":{"type":"integer","title":"Cand Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DecisionIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/label-candidates/{cand_id}/reject":{"post":{"tags":["Управление (админ)"],"summary":"Отклонить кандидата","operationId":"candidate_reject_api_v1_admin_label_candidates__cand_id__reject_post","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"cand_id","in":"path","required":true,"schema":{"type":"integer","title":"Cand Id"}},{"name":"X-Actor","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Кто выполняет действие (логин оператора)","title":"X-Actor"},"description":"Кто выполняет действие (логин оператора)"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/DecisionIn"},{"type":"null"}],"title":"Body"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/usage":{"get":{"tags":["Управление (админ)"],"summary":"Расходы по дням: проверки по клиентам и режимам, запросы провайдеров, ГБ BigQuery","operationId":"usage_api_v1_admin_usage_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"To"}},{"name":"client","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client"}},{"name":"resource","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"префикс ключа счётчика","title":"Resource"},"description":"префикс ключа счётчика"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/label-sync-runs":{"get":{"tags":["Управление (админ)"],"summary":"История синхронизаций источников меток","operationId":"label_sync_runs_api_v1_admin_label_sync_runs_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":1000,"minimum":1,"default":100,"title":"Limit"}},{"name":"source","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/admin/events":{"get":{"tags":["Управление (админ)"],"summary":"События планировщика и админские действия (хранятся 30 дней)","operationId":"get_events_api_v1_admin_events_get","security":[{"APIKeyHeader":[]},{"HTTPBearer":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601","title":"Since"},"description":"ISO 8601"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":2000,"minimum":1,"default":200,"title":"Limit"}},{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(scheduler|admin|sync)$"},{"type":"null"}],"title":"Kind"}},{"name":"before_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Before Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health":{"get":{"tags":["Служебные"],"summary":"Проверка работоспособности","operationId":"health_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}}}}},"/health/sources":{"get":{"tags":["Служебные"],"summary":"Состояние источников: BigQuery, очередь, фон","operationId":"health_sources_health_sources_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}},"/health/node":{"get":{"tags":["Служебные"],"summary":"Доступность ноды NowNodes","operationId":"health_node_health_node_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}}}}},"components":{"schemas":{"AccountInfo":{"properties":{"balance_trx":{"type":"number","title":"Balance Trx"},"balances":{"additionalProperties":{"type":"number"},"type":"object","title":"Balances"},"tx_count":{"type":"integer","title":"Tx Count"},"transfers_analyzed":{"type":"integer","title":"Transfers Analyzed"},"first_activity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"First Activity"},"last_activity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Last Activity"},"created_at":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Created At"},"is_contract":{"type":"boolean","title":"Is Contract"},"incoming_usd":{"type":"number","title":"Incoming Usd"},"outgoing_usd":{"type":"number","title":"Outgoing Usd"},"history_complete":{"type":"boolean","title":"History Complete"}},"additionalProperties":true,"type":"object","required":["balance_trx","balances","tx_count","transfers_analyzed","first_activity","last_activity","created_at","is_contract","incoming_usd","outgoing_usd","history_complete"],"title":"AccountInfo"},"AddressLabels":{"properties":{"address":{"type":"string","title":"Address"},"primary":{"anyOf":[{"$ref":"#/components/schemas/LabelOut"},{"type":"null"}]},"labels":{"items":{"$ref":"#/components/schemas/LabelOut"},"type":"array","title":"Labels"}},"type":"object","required":["address","primary","labels"],"title":"AddressLabels"},"AmlCheck":{"properties":{"id":{"type":"string","title":"Id"},"address":{"type":"string","title":"Address"},"network":{"type":"string","title":"Network"},"status":{"type":"string","enum":["pending","running","done","failed"],"title":"Status"},"mode":{"type":"string","title":"Mode"},"risk_score":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Risk Score"},"risk_level":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level"},"risk_level_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Risk Level Name"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"finished_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Finished At"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url","description":"Публичная ссылка на PDF-отчёт (по неугадываемому id)"},"summary_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary Url"},"reused_from":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reused From","description":"id проверки, результат которой выдан повторно (max_age_seconds)"},"result":{"anyOf":[{"$ref":"#/components/schemas/AmlResult"},{"type":"null"}]}},"type":"object","required":["id","address","network","status","mode","created_at"],"title":"AmlCheck"},"AmlCheckCreate":{"properties":{"address":{"type":"string","title":"Address","description":"Адрес TRON (base58, начинается с T)","examples":["TQzZkjeTEWL8jEakjZCRERYsxB3vT84UNC"]},"network":{"type":"string","const":"tron","title":"Network","description":"Блокчейн. Сейчас поддерживается только TRON.","default":"tron"},"mode":{"type":"string","enum":["instant","fast","standard","deep"],"title":"Mode","description":"instant — ответ за секунды (2–3 шага, без ожидания внешних тегов, для онлайн-решений), fast — до 3 шагов, standard — до 4, deep — до 6 шагов и больший бюджет раскрытия кошельков","default":"standard"},"wait":{"type":"boolean","title":"Wait","description":"Подождать результат в этом же запросе (до WAIT_MAX_SECONDS, по умолчанию 90 с). Не успела — вернётся 202, дальше опрашивайте по id.","default":false},"callback_url":{"anyOf":[{"type":"string","maxLength":500,"pattern":"^https?://"},{"type":"null"}],"title":"Callback Url","description":"Куда прислать результат по готовности (POST JSON с телом как у GET /aml-checks/{id}; при ошибке — до 3 повторов)."},"max_age_seconds":{"anyOf":[{"type":"integer","maximum":604800.0,"minimum":0.0},{"type":"null"}],"title":"Max Age Seconds","description":"Разрешить мгновенный ответ готовым результатом по этому адресу и режиму не старше N секунд (0 или пусто — считать заново). Повторный результат помечен полем reused_from."}},"type":"object","required":["address"],"title":"AmlCheckCreate"},"AmlCheckList":{"properties":{"items":{"items":{"$ref":"#/components/schemas/AmlCheck"},"type":"array","title":"Items"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["items","total","limit","offset"],"title":"AmlCheckList"},"AmlResult":{"properties":{"address":{"type":"string","title":"Address"},"network":{"type":"string","title":"Network"},"blockchain_name":{"type":"string","title":"Blockchain Name"},"checked_at":{"type":"string","format":"date-time","title":"Checked At"},"risk":{"$ref":"#/components/schemas/RiskInfo"},"own_attribution":{"$ref":"#/components/schemas/Attribution"},"own_labels":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Own Labels"},"categories":{"items":{"$ref":"#/components/schemas/CategoryShare"},"type":"array","title":"Categories","description":"Связи адреса с долей от 0.1%"},"categories_minor":{"items":{"$ref":"#/components/schemas/CategoryShare"},"type":"array","title":"Categories Minor","description":"Связи с долей менее 0.1%"},"directions":{"additionalProperties":{"$ref":"#/components/schemas/DirectionInfo"},"propertyNames":{"enum":["in","out"]},"type":"object","title":"Directions"},"risky_links":{"items":{"$ref":"#/components/schemas/Link"},"type":"array","title":"Risky Links"},"identified_links":{"items":{"$ref":"#/components/schemas/Link"},"type":"array","title":"Identified Links"},"account":{"$ref":"#/components/schemas/AccountInfo"},"indicators":{"items":{"$ref":"#/components/schemas/Indicator"},"type":"array","title":"Indicators"},"data_quality":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Data Quality","description":"Полнота данных: доля атрибутированного оборота (attributed), «Остатки» (remnants), level: high|medium|low"},"stats":{"additionalProperties":true,"type":"object","title":"Stats"},"methodology_version":{"type":"string","title":"Methodology Version"}},"additionalProperties":true,"type":"object","required":["address","network","blockchain_name","checked_at","risk","own_attribution","own_labels","categories","categories_minor","directions","risky_links","identified_links","account","indicators","stats","methodology_version"],"title":"AmlResult"},"Attribution":{"properties":{"address":{"type":"string","title":"Address"},"category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"},"category_name":{"type":"string","title":"Category Name"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"},"confidence":{"type":"number","title":"Confidence","default":0},"evidence":{"items":{"type":"string"},"type":"array","title":"Evidence","default":[]}},"additionalProperties":true,"type":"object","required":["address","category","category_name"],"title":"Attribution"},"BatchIn":{"properties":{"addresses":{"items":{"type":"string"},"type":"array","maxItems":5000,"minItems":1,"title":"Addresses"},"mode":{"type":"string","pattern":"^(instant|fast|standard|deep)$","title":"Mode","default":"instant"},"max_age_seconds":{"anyOf":[{"type":"integer","maximum":2592000.0,"minimum":0.0},{"type":"null"}],"title":"Max Age Seconds","description":"переиспользовать готовый результат не старше N секунд"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name","description":"название пакета (попадает в params.batch)"},"client":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Client","description":"id клиента, от имени которого ставятся проверки (пусто — системные проверки админки)"}},"type":"object","required":["addresses"],"title":"BatchIn"},"BenchmarkIn":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Text","description":"Текстовая сводка внешнего отчёта или его полный текст"},"address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address"},"score":{"anyOf":[{"type":"number","maximum":100.0,"minimum":0.0},{"type":"null"}],"title":"Score"},"level":{"anyOf":[{"type":"string","pattern":"^(low|medium|high|critical)$"},{"type":"null"}],"title":"Level","description":"low | medium | high | critical"},"categories":{"anyOf":[{"additionalProperties":{"type":"number"},"type":"object"},{"type":"null"}],"title":"Categories","description":"код категории → доля 0..1"},"source":{"type":"string","maxLength":32,"title":"Source","default":"bitok"}},"type":"object","title":"BenchmarkIn"},"Body_import_labels_api_v1_labels_import_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_import_labels_api_v1_labels_import_post"},"Body_upload_benchmark_api_v1_admin_benchmarks_upload_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"}},"type":"object","required":["file"],"title":"Body_upload_benchmark_api_v1_admin_benchmarks_upload_post"},"BoostIn":{"properties":{"budget":{"type":"integer","maximum":2000000.0,"minimum":100.0,"title":"Budget","description":"сколько запросов к ноде потратить","default":20000},"kinds":{"items":{"type":"string"},"type":"array","title":"Kinds"},"workers":{"type":"integer","maximum":16.0,"minimum":1.0,"title":"Workers","default":4}},"type":"object","title":"BoostIn"},"CategoryOut":{"properties":{"code":{"type":"string","title":"Code"},"name":{"type":"string","title":"Name"},"tier":{"type":"string","title":"Tier"},"weight":{"type":"number","title":"Weight"},"saturation":{"type":"number","title":"Saturation"},"description":{"type":"string","title":"Description"}},"type":"object","required":["code","name","tier","weight","saturation","description"],"title":"CategoryOut"},"CategoryShare":{"properties":{"category":{"type":"string","title":"Category","description":"Код категории","examples":["exchange"]},"name":{"type":"string","title":"Name","description":"Название на русском","examples":["Биржа"]},"share":{"type":"number","title":"Share","description":"Доля связей 0..1"},"percent":{"type":"number","title":"Percent","description":"Доля связей в процентах, округлено до 0.1"},"usd":{"type":"number","title":"Usd","description":"Объём в USD, приходящийся на категорию"},"tier":{"type":"string","enum":["low","medium","high","severe"],"title":"Tier"}},"type":"object","required":["category","name","share","percent","usd","tier"],"title":"CategoryShare"},"ClientIn":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"title":"Name"},"contact":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Contact"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"plan":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Plan"},"limits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Limits","description":"rps, daily, monthly, modes, concurrency, callback_domains"}},"type":"object","required":["name"],"title":"ClientIn"},"ClientPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Name"},"contact":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Contact"},"note":{"anyOf":[{"type":"string","maxLength":2000},{"type":"null"}],"title":"Note"},"plan":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Plan"},"status":{"anyOf":[{"type":"string","pattern":"^(active|suspended)$"},{"type":"null"}],"title":"Status"},"limits":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Limits"},"policy":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Policy","description":"профиль/пороги клиента (резерв второго этапа)"}},"type":"object","title":"ClientPatch"},"DecisionIn":{"properties":{"entity":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}],"title":"Entity","description":"имя сущности для метки (при применении)"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"}},"type":"object","title":"DecisionIn"},"DirectionInfo":{"properties":{"total_usd":{"type":"number","title":"Total Usd"},"categories":{"items":{"$ref":"#/components/schemas/CategoryShare"},"type":"array","title":"Categories"},"by_hop":{"additionalProperties":{"type":"number"},"type":"object","title":"By Hop"},"remnant_reasons":{"additionalProperties":{"type":"number"},"type":"object","title":"Remnant Reasons"},"expansions":{"type":"integer","title":"Expansions"},"top_counterparties":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Top Counterparties"},"counterparties_total":{"type":"integer","title":"Counterparties Total"}},"additionalProperties":true,"type":"object","required":["total_usd","categories","by_hop","remnant_reasons","expansions","top_counterparties","counterparties_total"],"title":"DirectionInfo"},"EnqueueIn":{"properties":{"addresses":{"items":{"type":"string"},"type":"array","title":"Addresses"},"kind":{"type":"string","pattern":"^(tag|investigate|harvest|exposure)$","title":"Kind","default":"investigate"},"priority":{"type":"number","title":"Priority","default":50.0}},"type":"object","required":["addresses"],"title":"EnqueueIn"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"Health":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"database":{"type":"string","title":"Database"},"labels":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Labels"},"queue_size":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Queue Size"}},"type":"object","required":["status","version","database"],"title":"Health"},"ImportResult":{"properties":{"imported":{"type":"integer","title":"Imported"},"errors":{"items":{"type":"string"},"type":"array","title":"Errors"}},"type":"object","required":["imported","errors"],"title":"ImportResult"},"Indicator":{"properties":{"code":{"type":"string","title":"Code"},"severity":{"type":"string","enum":["info","warning"],"title":"Severity"},"title":{"type":"string","title":"Title"},"text":{"type":"string","title":"Text"},"share":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Share","description":"Доля оборота 0..1, если индикатор измеряется долей"},"items":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Items","default":[]}},"type":"object","required":["code","severity","title","text"],"title":"Indicator"},"KeyIn":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}],"title":"Label"},"rotate_grace_hours":{"anyOf":[{"type":"number","maximum":720.0,"minimum":0.0},{"type":"null"}],"title":"Rotate Grace Hours","description":"перевыпуск: старые ключи живут ещё столько часов"}},"type":"object","title":"KeyIn"},"LabelIn":{"properties":{"address":{"type":"string","title":"Address","examples":["TXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"]},"category":{"type":"string","title":"Category","description":"Код категории из GET /api/v1/categories","examples":["exchange"]},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity","examples":["Binance"]},"confidence":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Confidence","default":1.0},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["address","category"],"title":"LabelIn"},"LabelOut":{"properties":{"address":{"type":"string","title":"Address"},"category":{"type":"string","title":"Category"},"category_name":{"type":"string","title":"Category Name"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"source":{"type":"string","title":"Source"},"confidence":{"type":"number","title":"Confidence"},"meta":{"additionalProperties":true,"type":"object","title":"Meta"}},"type":"object","required":["address","category","category_name","entity","source","confidence","meta"],"title":"LabelOut"},"Link":{"properties":{"address":{"type":"string","title":"Address"},"direction":{"type":"string","enum":["in","out"],"title":"Direction"},"category":{"type":"string","title":"Category"},"category_name":{"type":"string","title":"Category Name"},"tier":{"type":"string","title":"Tier"},"entity":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Entity"},"share":{"type":"number","title":"Share"},"hop":{"type":"integer","title":"Hop","description":"Шаг связи: 1 — прямой контрагент"},"via":{"items":{"type":"string"},"type":"array","title":"Via","description":"Промежуточные адреса цепочки","default":[]},"evidence":{"items":{"type":"string"},"type":"array","title":"Evidence","default":[]},"source":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source"}},"additionalProperties":true,"type":"object","required":["address","direction","category","category_name","tier","share","hop"],"title":"Link"},"PolicyIn":{"properties":{"levels":{"anyOf":[{"items":{"type":"number"},"type":"array"},{"type":"null"}],"title":"Levels","description":"границы уровней: средний, высокий, критический"},"categories":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Categories","description":"код → {weight, saturation}"},"policy":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Policy","description":"правила косвенной связи: код → {min_share, base, per_pct, anchor, cap, far_weight}"},"dominant":{"anyOf":[{"additionalProperties":{"additionalProperties":{"type":"number"},"type":"object"},"type":"object"},{"type":"null"}],"title":"Dominant","description":"преобладающая связь: код → {min_share, score}"},"share_basis":{"anyOf":[{"type":"string","pattern":"^(raw|weighted)$"},{"type":"null"}],"title":"Share Basis"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Note"},"activate":{"type":"boolean","title":"Activate","description":"сразу сделать активным (иначе сохранить как версию)","default":true},"base_on_active":{"type":"boolean","title":"Base On Active","description":"начать с активного профиля и наложить изменения (false — только переданные поля, остальное по умолчанию)","default":true},"include_all_sources":{"type":"boolean","title":"Include All Sources","description":"считать совпадение по всем эталонам, включая источники, исключённые из калибровки","default":false}},"type":"object","title":"PolicyIn"},"RiskDriver":{"properties":{"category":{"type":"string","title":"Category"},"category_name":{"type":"string","title":"Category Name"},"contribution":{"type":"number","title":"Contribution","description":"Вклад категории в оценку, п.п."}},"type":"object","required":["category","category_name","contribution"],"title":"RiskDriver"},"RiskInfo":{"properties":{"score":{"type":"number","title":"Score","description":"Итоговая оценка риска, %","examples":[50.9]},"exposure_score":{"type":"number","title":"Exposure Score","description":"Оценка только по связям, без прямых совпадений"},"level":{"type":"string","enum":["low","medium","high","critical"],"title":"Level"},"level_name":{"type":"string","title":"Level Name","examples":["Средний"]},"direct_hit_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Direct Hit Reason","description":"Причина, если адрес сам в санкционном/рискованном списке"},"policy_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Policy Reason","description":"Почему уровень поднят правилом политики (косвенная связь, заморозки Tether, сервисы без имени), если оценка выше оценки по связям"},"drivers":{"items":{"$ref":"#/components/schemas/RiskDriver"},"type":"array","title":"Drivers"},"colors":{"additionalProperties":{"type":"string"},"type":"object","title":"Colors"}},"type":"object","required":["score","exposure_score","level","level_name","drivers","colors"],"title":"RiskInfo"},"SettingsIn":{"properties":{"values":{"additionalProperties":true,"type":"object","title":"Values","description":"имя параметра → новое значение (только изменённые)"},"comment":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Comment"}},"type":"object","required":["values"],"title":"SettingsIn"},"SyncResult":{"properties":{"source":{"type":"string","title":"Source"},"status":{"type":"string","title":"Status"},"count":{"type":"integer","title":"Count"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["source","status","count"],"title":"SyncResult"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"APIKeyHeader":{"type":"apiKey","description":"Ключ клиента","in":"header","name":"X-API-Key"},"HTTPBearer":{"type":"http","description":"Тот же ключ как Bearer-токен","scheme":"bearer"}}},"tags":[{"name":"AML-проверки","description":"Создание проверок, результаты, отчёты"},{"name":"Публичные","description":"Доступ без ключа по ссылке"},{"name":"Разметка","description":"Метки адресов и категории"},{"name":"Разметка (админ)","description":"Управление базой меток (ADMIN_API_KEY)"},{"name":"Самообучение (админ)","description":"Фоновая доразметка, эталонные отчёты, калибровка скоринга, метрики качества"},{"name":"Служебные"}]}