Загрузка данных


{"openapi":"3.1.0","info":{"title":"Aegis [mdms-auth]","description":"Бэкенд сервиса авторизации и генерации токена для использования в системе MDMS","contact":{"name":"Описание API (wiki)","url":"https://conf.gs-labs.tv/"},"version":"0.1.3"},"servers":[{"url":"http://10.128.68.28:5010","description":"Generated server url"}],"tags":[{"name":"AuthController","description":"Операции авторизации и регистрации"},{"name":"MaintenanceController","description":"Операции обслуживания устройств и данных по ним"}],"paths":{"/maintenance/props":{"post":{"tags":["MaintenanceController"],"summary":"Обновление данных Device Properties при необходимости (для зарегистрированных устройств)","description":"**Требуется действительный токен.** Разрешенные роли: \n- `DEVICE`","operationId":"updateProps","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryTVRequest"}}},"required":true},"responses":{"400":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"403":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"422":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"412":{"description":"Element Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"409":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"200":{"description":"OK","content":{}}},"security":[{"Auth-V":[]}]}},"/auth/register/tv":{"post":{"tags":["AuthController"],"summary":"Проверка статуса авторизации и регистрация нового рекламного телевещателя при необходимости","description":"**Требуется действительный токен.** Разрешенные роли: \n- `NOT_AUTH_DEVICE`","operationId":"registerTV","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryTVRequest"}}},"required":true},"responses":{"400":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"403":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"422":{"description":"Device registration failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"412":{"description":"Element Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"409":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RegistryTVResponse"}}}}},"security":[{"Auth-V":[]}]}},"/auth/login":{"post":{"tags":["AuthController"],"summary":"Авторизация пользователя (в админке ЛК)","operationId":"loginUser","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"401":{"description":"User authenticate failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"412":{"description":"Element Not Found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"409":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BaseErrorResponse"}}}},"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginResponse"}}}}}}}},"components":{"schemas":{"BaseErrorResponse":{"type":"object","description":"Base error response","properties":{"type":{"type":"string","description":"Type of error (wiki link)","example":"https://conf.gs-labs.tv/display/TPD/"},"title":{"type":"string","description":"Error title","example":"Internal Server Error"},"status":{"type":"integer","format":"int32","description":"HTTP status code","example":409},"detail":{"type":"string","description":"Error details","example":"Сломалось что-то(("},"instance":{"type":"string","description":"Instance","example":"/auth/login"},"errorCode":{"type":"string","description":"Error code","example":"BACK_01"}},"required":["detail","errorCode","instance","status","title","type"],"title":"Обертка, чтобы не выводить все поля класса ErrorResponse в Swagger целиком"},"DeviceProps":{"type":"object","description":"Данные для идентификации устройства","properties":{"uuid":{"type":["string","null"],"format":"uuid","description":"UUID","example":"0d26fb23-56ce-4660-85f2-c73a4c085e28"},"hwid":{"type":["string","null"],"description":"HWID","example":"c73a4c085e28"},"hardware":{"type":["string","null"],"description":"Hardware number","example":"56ce4660"},"serial":{"type":["string","null"],"description":"Серийный номер","example":"sd351531asdasd"},"firmwareVersion":{"type":["string","null"],"description":"Версия прошивки","example":"sd351531asdasd"},"firmwareBuildTime":{"type":["string","null"],"format":"date-time","description":"Дата сборки прошивки","example":"2022-04-30T10:00:00.000Z"},"androidVersion":{"type":["string","null"],"description":"Версия Android устройства","example":"sd351531asdasd"},"locale":{"type":["string","null"],"description":"Язык и регион устройства","example":"ru-Ru"},"vendor":{"type":["string","null"],"description":"Вендор","example":"MTKDEVICE"},"product":{"type":["string","null"],"description":"Продукт устройства","example":"MTK8845_PA796_MTK8845_ST3262A4_5"},"brand":{"type":["string","null"],"description":"Бренд устройства","example":"MediaTek"},"model":{"type":["string","null"],"description":"Модель устройства","example":"MTK24TS02K"},"device":{"type":["string","null"],"description":"Девайс устройства","example":"m7332"},"name":{"type":["string","null"],"description":"Имя устройства","example":"Tricolor_Ltd"},"manufacturer":{"type":["string","null"],"description":"Сборщик устройства","example":"Tricolor_Ltd"},"macEth":{"type":["string","null"],"description":"MAC-адрес Ethernet","example":"00:AB:CD:EF:11:22"},"macWifi":{"type":["string","null"],"description":"MAC-адрес Wi-Fi","example":"00:AB:CD:EF:11:22"},"ip":{"type":["string","null"],"description":"IP-адрес","example":"65.24.0.10"},"imei":{"type":["string","null"],"description":"IMEI","example":"35-209900-176148-1"},"fingerprint":{"type":["string","null"],"description":"Снимок прошивки (fingerprint)","example":"MediaTek/m7332_eu/m7332:11/UNKNOWN/761:userdebug/test-keys"},"widevineSecLevel":{"oneOf":[{"$ref":"#/components/schemas/WidevineSecLevel"},{"type":"null"}]}}},"RegistryTVRequest":{"type":"object","description":"Запрос на регистрацию нового устройства (ТВ)","properties":{"token":{"type":["string","null"],"description":"Токен доступа","example":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYyMjUwNj"},"systemLauncher":{"type":["string","null"],"description":"Текущий лаунчер на устройстве","example":"TOS_Launch"},"timezone":{"type":["integer","null"],"format":"int32","description":"Часовой пояс","example":-2},"geoIp":{"type":["string","null"],"description":"Местонахождение устройства","example":"Саратов"},"deviceOrientation":{"type":["integer","null"],"format":"int32","description":"Ориентация экрана","example":90},"allMemory":{"type":["integer","null"],"format":"int32","description":"Общая память","example":2048},"freeMemory":{"type":["integer","null"],"format":"int32","description":"Свободная память","example":1024},"networkSpec":{"type":["string","null"],"description":"Параметры сети","example":"IP/MAC/MASK"},"properties":{"oneOf":[{"$ref":"#/components/schemas/DeviceProps"},{"type":"null"}]},"sysInfo":{"type":["object","null"],"additionalProperties":{"type":"string"},"description":"Системная информация об устройстве (full raw properties)"}}},"WidevineSecLevel":{"type":"string","description":"Уровень Widevine DRM, поддерживаемый устройством","enum":["L1","L2","L3"]},"Defaults":{"type":"object","description":"Значения по-умолчанию, присваиваемые устройствам, привязанным к данному Entity","properties":{"heartbeat":{"type":["string","null"],"description":"Период обновления рекламной кампании для всех ТВ по-умолчанию (сек)","example":"3600"},"statType":{"oneOf":[{"$ref":"#/components/schemas/DeviceStatType"},{"type":"null"}]},"logType":{"oneOf":[{"$ref":"#/components/schemas/DeviceLogType"},{"type":"null"}]},"statInterval":{"type":["string","null"],"description":"Период отправки статистики с устройства на сервер для всех ТВ по-умолчанию (сек)","example":"3600"},"logInterval":{"type":["string","null"],"description":"Период отправки лога с устройства на сервер для всех ТВ по-умолчанию (сек)","example":"3600"},"updateInterval":{"type":["string","null"],"description":"Период проверки наличия обновлений клиента для всех ТВ по-умолчанию (сек)","example":"3600"}}},"DeviceLogType":{"type":"string","description":"Тип собираемых логов с устройства","enum":["DEBUG","INFO","WARN","ERROR","FATAL"]},"DeviceStatType":{"type":"string","description":"Тип получаемой статистики с устройства","enum":["ALL","ONLY_DEVICE","ONLY_AD"]},"RegistryTVResponse":{"type":"object","description":"Ответ регистрации c токеном доступа для устройства","properties":{"token":{"type":["string","null"],"description":"Токен доступа","example":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYyMjUwNj"},"defaults":{"oneOf":[{"$ref":"#/components/schemas/Defaults"},{"type":"null"}]},"deviceId":{"type":["integer","null"],"format":"int64","description":"Внутренний идентификатор устройства в БД (для логирования и отладки)","example":12},"message":{"type":["string","null"],"description":"Дополнительная информация","example":"Success"}}},"LoginRequest":{"type":"object","description":"Запрос на аутентификацию (авторизацию) пользователя в ЛК","properties":{"username":{"type":"string","description":"Логин пользователя","example":"Test123","maxLength":50,"minLength":1},"password":{"type":"string","description":"Пароль","example":"asfd65454SDSD","maxLength":255,"minLength":0}},"required":["password","username"]},"LoginResponse":{"type":"object","description":"Ответ авторизации c токеном доступа и данными пользователя в ЛК","properties":{"id":{"type":"integer","format":"int64","description":"Id пользователя","example":5},"username":{"type":"string","description":"Логин пользователя","example":"Test123"},"email":{"type":"string","description":"Адрес электронной почты","example":"tvpdd-test@gslabs.ru"},"roles":{"type":"array","description":"Список ролей пользователя","items":{"$ref":"#/components/schemas/UserRole"},"uniqueItems":true},"token":{"type":"string","description":"Токен доступа","example":"eyJhbGciOiJIUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTYyMjUwNj"}},"required":["email","id","roles","token","username"]},"UserRole":{"type":"string","description":"Роль пользователя","enum":["ROLE_SUPERADMIN","ROLE_SUPPORT_TEAM","ROLE_DEVICE","ROLE_NOT_AUTH_DEVICE","ROLE_USER","ROLE_MODERATOR","ROLE_ADMIN","ROLE_CUSTOMER_ADMIN","ROLE_CUSTOMER_SUPPORT","ROLE_CUSTOMER_DEVICE_MANAGER","ROLE_CUSTOMER_AD_MANAGER"]}},"securitySchemes":{"Auth-V":{"type":"apiKey","description":"Токен авторизации для запросов.","name":"Auth-V","in":"header"}}}}