{ "swagger": "2.0", "info": { "description": "Сервис управления реестром внешних приложений и токенами аутентификации", "title": "isp-system-service", "contact": {}, "license": { "name": "GNU GPL v3.0" }, "version": "1.0.0" }, "host": "localhost:9000", "basePath": "/api/system", "paths": { "/access_list/delete_list": { "post": { "description": "Удаляет заданный список методов для приложения", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "accessList" ], "summary": "Удалить список доступных методов для приложения", "parameters": [ { "description": "тело запроса", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/domain.AccessListDeleteListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/access_list/delete_list_with_methods": { "post": { "description": "Удаляет заданный список методов для приложения", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "accessList" ], "summary": "Удалить список доступных методов для приложения", "parameters": [ { "description": "тело запроса", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/domain.AccessListDeleteV2ListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "object" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/access_list/get_by_id": { "post": { "description": "Возвращает список методов для приложения, для которых заданы настройки доступа", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "accessList" ], "summary": "Получить список доступности методов для приложения", "parameters": [ { "description": "идентификатор приложения", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "список доступности методов", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.MethodInfo" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/access_list/set_list": { "post": { "description": "Возвращает список методов для приложения, для которых заданы настройки доступа", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "accessList" ], "summary": "Настроить доступность списка методов для приложения", "parameters": [ { "description": "объект настройки доступа", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/domain.AccessListSetListRequest" } } ], "responses": { "200": { "description": "список доступности методов", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.MethodInfo" } } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/access_list/set_one": { "post": { "description": "Возвращает количество измененных строк", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "accessList" ], "summary": "Настроить доступность метода для приложения", "parameters": [ { "description": "объект для настройки доступа", "name": "body", "in": "body", "schema": { "$ref": "#/definitions/domain.AccessListSetOneRequest" } } ], "responses": { "200": { "description": "количество измененных строк", "schema": { "$ref": "#/definitions/domain.AccessListSetOneResponse" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/create_application": { "post": { "description": "Если приложение с такими идентификатором или связкой `applicationGroupId`-`name` существует, то возвращает ошибку", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Создать приложение", "parameters": [ { "description": "Объект приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CreateApplicationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/create_update_application": { "post": { "description": "Если приложение с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Создать/обновить приложение", "parameters": [ { "description": "Объект приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.ApplicationCreateUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/delete_applications": { "post": { "description": "Удаляет приложения по списку их идентификаторов, возвращает количество удаленных приложений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Удалить приложения", "parameters": [ { "description": "Массив идентификаторов приложений", "name": "body", "in": "body", "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_all": { "post": { "description": "Возвращает список приложений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить список приложений", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Application" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_application_by_id": { "post": { "description": "Возвращает описание приложения по его идентификатору", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить приложение по идентификатору", "parameters": [ { "description": "Идентификатор приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_application_by_token": { "post": { "description": "Возвращает идентификатор приложения и группы по токену", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить идентификатор приложения и группы по токену", "parameters": [ { "description": "Тело запроса", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.GetApplicationByTokenRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.GetApplicationByTokenResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_applications": { "post": { "description": "Возвращает массив приложений с токенами по их идентификаторам", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить список приложений", "parameters": [ { "description": "Массив идентификаторов приложений", "name": "body", "in": "body", "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.ApplicationWithTokens" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_applications_by_service_id": { "post": { "description": "Возвращает список приложений по запрошенному идентификатору сервиса", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить список приложений по идентификатору сервиса", "parameters": [ { "description": "Идентификатор сервиса", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.ApplicationWithTokens" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/get_system_tree": { "post": { "description": "Возвращает описание взаимосвязей сервисов и приложений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Метод получения системного дерева", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.DomainWithService" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/next_id": { "post": { "description": "Возвращает следующий идентификатор приложения", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Получить следующий идентификатор приложения", "responses": { "200": { "description": "OK", "schema": { "type": "integer" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application/update_application": { "post": { "description": "Если приложение с связкой `applicationGroupId`-`name` существует или приложение не найдено, то возвращает ошибку", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application" ], "summary": "Обновить приложение", "parameters": [ { "description": "Объект приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UpdateApplicationRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application_group/create": { "post": { "description": "Если группа приложений таким именем существует, возвращает ошибку", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application_group" ], "summary": "Создать группу приложений", "parameters": [ { "description": "Объект группы приложений", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.CreateAppGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.AppGroup" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application_group/delete_list": { "post": { "description": "Удаляет группы приложений по списку их идентификаторов, возвращает количество удаленных групп приложений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application_group" ], "summary": "Удалить группы приложений", "parameters": [ { "description": "список идентификаторов групп приложений", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.IdListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application_group/get_all": { "post": { "description": "Возвращает все группы приложений", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application_group" ], "summary": "Получить группы приложений", "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.AppGroup" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application_group/get_by_id_list": { "post": { "description": "Возвращает группы приложений с указанными идентификаторами", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application_group" ], "summary": "Получить группы приложений по списку идентификаторов", "parameters": [ { "description": "список идентификаторов групп приложений", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.IdListRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.AppGroup" } } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/application_group/update": { "post": { "description": "Если группа приложений таким именем существует или группы приложений с указанным id не существует, возвращает ошибку", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "application_group" ], "summary": "Обновить группу приложений", "parameters": [ { "description": "Объект группы приложений", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.UpdateAppGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.AppGroup" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/domain/create_update_domain": { "post": { "description": "Если домен с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Создать/обновить домен", "parameters": [ { "description": "Объект домена", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.DomainCreateUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Domain" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/domain/delete_domains": { "post": { "description": "Удаляет домены по списку их идентификаторов, возвращает количество удаленных доменов", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Удаление доменов", "parameters": [ { "description": "Массив идентификаторов доменов", "name": "body", "in": "body", "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/domain/get_domain_by_id": { "post": { "description": "Возвращает описание домена по его идентификатору", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Получить домен по идентификатору", "parameters": [ { "description": "Идентификатор домена", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Domain" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/domain/get_domains_by_system_id": { "post": { "description": "Возвращает список доменов по системному идентификатору", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "domain" ], "summary": "Получить домены по идентификатору системы", "parameters": [ { "description": "Идентификатор системы", "name": "body", "in": "body", "schema": { "type": "integer" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Domain" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/secure/authenticate": { "post": { "description": "Проверяет наличие токена в системе,", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "secure" ], "summary": "Метод аутентификации токена", "parameters": [ { "description": "Тело запроса", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.AuthenticateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.AuthenticateResponse" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/secure/authorize": { "post": { "description": "Проверяет доступ приложения к запрашиваемому ендпоинту", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "secure" ], "summary": "Метод авторизации приложения", "parameters": [ { "description": "Тело запрос", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.AuthorizeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.AuthorizeResponse" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/service/create_update_service": { "post": { "description": "Если сервис с такими идентификатором существует, то обновляет данные, если нет, то добавляет данные в базу", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "service" ], "summary": "Создать/обновить сервис", "parameters": [ { "description": "Объект сервиса", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.ServiceCreateUpdateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Service" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "409": { "description": "Conflict", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/service/delete_service": { "post": { "description": "Удаляет сервисов по списку их идентификаторов, возвращает количество удаленных сервисов", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "service" ], "summary": "Удалить сервисы", "parameters": [ { "description": "Массив идентификаторов сервисов", "name": "body", "in": "body", "required": true, "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.DeleteResponse" } }, "400": { "description": "Bad Request", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/service/get_service": { "post": { "description": "Возвращает список сервисов по их идентификаторам", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "service" ], "summary": "Получить список сервисов", "parameters": [ { "description": "Массив идентификаторов сервисов", "name": "body", "in": "body", "schema": { "type": "array", "items": { "type": "integer" } } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Service" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/service/get_service_by_id": { "post": { "description": "Возвращает описание сервиса по его идентификатору", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "service" ], "summary": "Получить сервис по идентификатору", "parameters": [ { "description": "Идентификатор сервиса", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.Service" } }, "404": { "description": "Not Found", "schema": { "$ref": "#/definitions/apierrors.Error" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/service/get_services_by_domain_id": { "post": { "description": "Возвращает список сервисов по идентификатору домена", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "service" ], "summary": "Получить список сервисов по идентификатору домена", "parameters": [ { "description": "Идентификатор домена", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/domain.Service" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/token/create_token": { "post": { "description": "Создает токен и привязывает его к приложению", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Создать токен", "parameters": [ { "description": "Объект создания токена", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.TokenCreateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/token/get_tokens_by_app_id": { "post": { "description": "Возвращает список токенов, привязанных к приложению", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Получить токены по идентификатору приложения", "parameters": [ { "description": "Идентификатор приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "type": "array", "items": { "$ref": "#/definitions/entity.Token" } } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/token/revoke_tokens": { "post": { "description": "Отвязывает токены от приложений и удаляет их", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Отозвать токены", "parameters": [ { "description": "Объект отзыва токенов", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.TokenRevokeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.ApplicationWithTokens" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } }, "/token/revoke_tokens_for_app": { "post": { "description": "Отвязывает токены от приложений и удаляет их по идентификатору приложения", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "token" ], "summary": "Отозвать токены для приложения", "parameters": [ { "description": "Идентификатор приложения", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/domain.Identity" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/domain.DeleteResponse" } }, "500": { "description": "Internal Server Error", "schema": { "$ref": "#/definitions/apierrors.Error" } } } } } }, "definitions": { "apierrors.Error": { "type": "object", "properties": { "details": { "type": "object", "additionalProperties": {} }, "errorCode": { "type": "integer" }, "errorMessage": { "type": "string" } } }, "domain.AccessListDeleteListRequest": { "type": "object", "required": [ "appId", "methods" ], "properties": { "appId": { "type": "integer" }, "methods": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "domain.AccessListDeleteV2ListRequest": { "type": "object", "required": [ "appId", "methods" ], "properties": { "appId": { "type": "integer" }, "methods": { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/domain.Method" } } } }, "domain.AccessListSetListRequest": { "type": "object", "required": [ "appId" ], "properties": { "appId": { "type": "integer" }, "methods": { "type": "array", "items": { "$ref": "#/definitions/domain.MethodInfo" } }, "removeOld": { "type": "boolean" } } }, "domain.AccessListSetOneRequest": { "type": "object", "required": [ "appId", "method" ], "properties": { "appId": { "type": "integer" }, "httpMethod": { "type": "string" }, "method": { "type": "string" }, "value": { "type": "boolean" } } }, "domain.AccessListSetOneResponse": { "type": "object", "properties": { "count": { "type": "integer" } } }, "domain.AppGroup": { "type": "object", "properties": { "createdAt": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "domain.Application": { "type": "object", "properties": { "createdAt": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "serviceId": { "type": "integer" }, "type": { "type": "string" }, "updatedAt": { "type": "string" } } }, "domain.ApplicationCreateUpdateRequest": { "type": "object", "required": [ "name", "serviceId", "type" ], "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "serviceId": { "type": "integer" }, "type": { "type": "string", "enum": [ "SYSTEM", "MOBILE" ] } } }, "domain.ApplicationSimple": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "tokens": { "type": "array", "items": { "$ref": "#/definitions/domain.Token" } }, "type": { "type": "string" } } }, "domain.ApplicationWithTokens": { "type": "object", "properties": { "app": { "$ref": "#/definitions/domain.Application" }, "tokens": { "type": "array", "items": { "$ref": "#/definitions/domain.Token" } } } }, "domain.AuthData": { "type": "object", "properties": { "appName": { "type": "string" }, "applicationId": { "type": "integer" }, "domainId": { "type": "integer" }, "serviceId": { "type": "integer" }, "systemId": { "type": "integer" } } }, "domain.AuthenticateRequest": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } }, "domain.AuthenticateResponse": { "type": "object", "properties": { "authData": { "$ref": "#/definitions/domain.AuthData" }, "authenticated": { "type": "boolean" }, "errorReason": { "type": "string" } } }, "domain.AuthorizeRequest": { "type": "object", "required": [ "applicationId", "endpoint" ], "properties": { "applicationId": { "type": "integer" }, "endpoint": { "type": "string" }, "httpMethod": { "type": "string" } } }, "domain.AuthorizeResponse": { "type": "object", "properties": { "authorized": { "type": "boolean" } } }, "domain.CreateAppGroupRequest": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" } } }, "domain.CreateApplicationRequest": { "type": "object", "required": [ "applicationGroupId", "id", "name", "type" ], "properties": { "applicationGroupId": { "type": "integer" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "type": { "type": "string", "enum": [ "SYSTEM", "MOBILE" ] } } }, "domain.DeleteResponse": { "type": "object", "properties": { "deleted": { "type": "integer" } } }, "domain.Domain": { "type": "object", "properties": { "createdAt": { "type": "string" }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "systemId": { "type": "integer" }, "updatedAt": { "type": "string" } } }, "domain.DomainCreateUpdateRequest": { "type": "object", "required": [ "name" ], "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "domain.DomainWithService": { "type": "object", "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "services": { "type": "array", "items": { "$ref": "#/definitions/domain.ServiceWithApps" } } } }, "domain.GetApplicationByTokenRequest": { "type": "object", "required": [ "token" ], "properties": { "token": { "type": "string" } } }, "domain.GetApplicationByTokenResponse": { "type": "object", "properties": { "applicationGroupId": { "type": "integer" }, "applicationId": { "type": "integer" } } }, "domain.IdListRequest": { "type": "object", "required": [ "idList" ], "properties": { "idList": { "type": "array", "minItems": 1, "items": { "type": "integer" } } } }, "domain.Identity": { "type": "object", "required": [ "id" ], "properties": { "id": { "type": "integer" } } }, "domain.Method": { "type": "object", "required": [ "method" ], "properties": { "httpMethod": { "type": "string" }, "method": { "type": "string" } } }, "domain.MethodInfo": { "type": "object", "properties": { "httpMethod": { "type": "string" }, "method": { "type": "string" }, "value": { "type": "boolean" } } }, "domain.Service": { "type": "object", "properties": { "createdAt": { "type": "string" }, "description": { "type": "string" }, "domainId": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "updatedAt": { "type": "string" } } }, "domain.ServiceCreateUpdateRequest": { "type": "object", "required": [ "domainId", "name" ], "properties": { "description": { "type": "string" }, "domainId": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "domain.ServiceWithApps": { "type": "object", "properties": { "apps": { "type": "array", "items": { "$ref": "#/definitions/domain.ApplicationSimple" } }, "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "domain.Token": { "type": "object", "properties": { "appId": { "type": "integer" }, "createdAt": { "type": "string" }, "expireTime": { "type": "integer" }, "token": { "type": "string" } } }, "domain.TokenCreateRequest": { "type": "object", "required": [ "appId", "expireTimeMs" ], "properties": { "appId": { "type": "integer" }, "expireTimeMs": { "type": "integer" } } }, "domain.TokenRevokeRequest": { "type": "object", "required": [ "appId" ], "properties": { "appId": { "type": "integer" }, "tokens": { "type": "array", "items": { "type": "string" } } } }, "domain.UpdateAppGroupRequest": { "type": "object", "required": [ "id", "name" ], "properties": { "description": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" } } }, "domain.UpdateApplicationRequest": { "type": "object", "required": [ "name", "newId", "oldId" ], "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "newId": { "type": "integer" }, "oldId": { "type": "integer" } } }, "entity.Token": { "type": "object", "properties": { "appId": { "type": "integer" }, "createdAt": { "type": "string" }, "expireTime": { "type": "integer" }, "token": { "type": "string" } } } } }