{ "swagger": "2.0", "info": { "description": "mgt API swagger document.", "title": "mgt API", "contact": {}, "version": "2.0" }, "basePath": "/api", "paths": { "/ManagerInfo": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get blocking message", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetManagerInfoRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "update blocking message", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutManagerInfoReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/alarm": { "get": { "produces": [ "application/json" ], "tags": [ "alarm" ], "summary": "get alarm config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Alarm" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "alarm" ], "summary": "update alarm config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/alarm.PutAlarmConfigRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/alarm.AlarmConfigResponse" } } } ] } } } } }, "/alarm/test": { "post": { "produces": [ "application/json" ], "tags": [ "alarm" ], "summary": "test alarm config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/api/commercial/dashboard/token": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "commercial" ], "summary": "获取Dashboard Token", "parameters": [ { "description": "expired_at", "name": "expired_at", "in": "body", "required": true, "schema": { "$ref": "#/definitions/commercial.DashboardTokenReq" } } ], "responses": { "200": { "description": "token", "schema": { "type": "string" } } } } }, "/business/account": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get login security config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AccountConfig" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "set login security config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.AccountConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/anti_tamper/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "get anti tamper detail", "parameters": [ { "type": "integer", "description": "anti_tamper id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.AntiTamperDetailRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "update anti tamper", "parameters": [ { "type": "integer", "description": "anti_tamper id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "delete anti tamper", "parameters": [ { "type": "integer", "description": "anti_tamper id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/anti_tamper/{id}/page": { "get": { "tags": [ "anti_tamper" ], "summary": "get anti tamper page", "parameters": [ { "type": "integer", "description": "anti_tamper id", "name": "id", "in": "path", "required": true }, { "maximum": 2, "minimum": 1, "type": "integer", "name": "content", "in": "query", "required": true } ], "responses": {} } }, "/business/audit_log": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get audit logs", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/audit_log.ListAuditLogRes" } } } ] } } } } }, "/business/frontend_style": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get frontend style", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/business.GetFrontendStyleRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "set frontend style", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/business.PutFrontendStyleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/report": { "get": { "produces": [ "application/json" ], "tags": [ "report" ], "summary": "list report", "parameters": [ { "type": "string", "name": "name", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/report.ListRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "report" ], "summary": "create report", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/report.CreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/report/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "report" ], "summary": "get report detail", "parameters": [ { "type": "integer", "description": "report id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/report.GetRes" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "report" ], "summary": "delete report", "parameters": [ { "type": "integer", "description": "report id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/site/{site_id}/anti_tamper": { "get": { "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "list site anti tamper", "parameters": [ { "type": "integer", "description": "site_id", "name": "site_id", "in": "path", "required": true }, { "type": "boolean", "name": "changed", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.AntiTamperListRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "refresh anti tamper", "parameters": [ { "type": "integer", "description": "site_id", "name": "site_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "anti_tamper" ], "summary": "create anti tamper", "parameters": [ { "type": "integer", "description": "site_id", "name": "site_id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.AntiTamperCreateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/site/{site_id}/anti_tamper/resource/{resource_id}": { "get": { "tags": [ "anti_tamper" ], "summary": "get anti tamper resource", "parameters": [ { "type": "integer", "description": "site id", "name": "site_id", "in": "path", "required": true }, { "type": "integer", "description": "resource id", "name": "resource_id", "in": "path", "required": true } ], "responses": {} } }, "/business/system/login_method": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "set login method config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.LoginMethod" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/business/users/{id}/unlock": { "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "unlock user", "parameters": [ { "type": "integer", "description": "user id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/commercial/block_page": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get block pages", "parameters": [ { "type": "string", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetSpecialPageRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "update block pages", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutSpecialPageRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/commercial/block_page_list": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "list block pages", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.ListSpecialPageItem" } } } } ] } } } } }, "/commercial/portal/style": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "update portal style", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PortalStyle" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/commercial/record/export": { "get": { "produces": [ "application/octet-stream" ], "tags": [ "attacks" ], "summary": "export attack logs", "parameters": [ { "type": "string", "name": "action", "in": "query" }, { "type": "string", "name": "attack_type", "in": "query" }, { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "event_id", "in": "query" }, { "type": "string", "name": "host", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "type": "string", "name": "ja4_fingerprint", "in": "query" }, { "type": "string", "name": "port", "in": "query" }, { "type": "integer", "name": "start", "in": "query" }, { "type": "string", "name": "type", "in": "query" }, { "type": "string", "name": "url", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/commercial/site/group/switch": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "web service group setting switch", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.GroupSwitchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/commercial/syslog": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get syslog config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ReceiverConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update syslog config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ReceiverConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/commercial/syslog/test": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "syslog test", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.ReceiverConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/mcp": { "get": { "description": "Get MCP server address", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "MCP" ], "summary": "Get MCP server address", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/mcp.GetMcpResponse" } } } ] } } } }, "post": { "description": "Set MCP server address", "produces": [ "application/json" ], "tags": [ "MCP" ], "summary": "Set MCP server address", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/mcp.SetMcpRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/mcp.GetMcpResponse" } } } ] } } } } }, "/open/Commercial/downgrade": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get downgrade status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetDowngradeVersionRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "downgrade", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/acl/relieve": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "ratelimit unblock", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/acl.ACLRelieveRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth/csrf": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "get csrf token", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth.GetCsrfTokenRes" } } } ] } } } } }, "/open/auth/login": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "username password login", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth.LoginReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth.LoginRes" } } } ] } } } } }, "/open/auth/logout": { "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "logout", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth/tfa": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "tfa login", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth.TfaReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth.TfaRes" } } } ] } } } } }, "/open/auth/token": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get API token", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update API token", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "delete API token", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/source": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "list auth source", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.ListGroupRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "create auth source", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.CreateSourceReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/auth_defense/source/password": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "get password auth config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PasswordConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update password auth config", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PasswordConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/source/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "list auth source", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AuthDefenseSource" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update auth source", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.UpdateSourceReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update auth source", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/source/{id}/user": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "list auth source user", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "uname", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.ListSourceUserRes" } } } ] } } } } }, "/open/auth_defense/source/{id}/user/{user_id}": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update auth source user", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "source user id", "name": "user_id", "in": "path", "required": true }, { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.PutSourceUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update auth source user", "parameters": [ { "type": "integer", "description": "source id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "source user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/user": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "list auth defense user", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "username", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.ListUserRes" } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "create auth defense user", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.CreateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "batch delete auth defense user", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.BatchDeleteUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/user/merge": { "post": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "merge auth defense user to master", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.MergeUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.MergeUserRes" } } } ] } } } } }, "/open/auth_defense/user/review": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "list auth defense user review", "parameters": [ { "type": "boolean", "name": "only_review", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.ListUserReviewRes" } } } ] } } } } }, "/open/auth_defense/user/review/{review_id}": { "put": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "review auth defense user", "parameters": [ { "type": "integer", "description": "review id", "name": "review_id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.UserReviewReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/user/{user_id}": { "get": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "get auth defense user", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.GetUserRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "update auth defense user", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.UpdateUserReq" } }, { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "delete auth defense user", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/user/{user_id}/reset_totp": { "put": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "reset auth defense user totp", "parameters": [ { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/auth_defense/user/{user_id}/unbind": { "put": { "produces": [ "application/json" ], "tags": [ "auth" ], "summary": "unbind auth defense user", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/auth_defense.UnbindUserReq" } }, { "type": "integer", "description": "user id", "name": "user_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/cert": { "get": { "produces": [ "application/json" ], "tags": [ "ssl_cert" ], "summary": "list cert", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetCertListRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "ssl_cert" ], "summary": "upsert cert", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cert.CertDetail" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/cert/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "ssl_cert" ], "summary": "get cert detail", "parameters": [ { "type": "integer", "description": "cert id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/cert.CertDetail" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "ssl_cert" ], "summary": "delete cert", "parameters": [ { "type": "integer", "description": "cert id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/challenge/config": { "get": { "description": "Get Challenge Config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Challenge" ], "summary": "Get Challenge Config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/challenge.ChallengeConfig" } } } ] } } } }, "post": { "description": "Set Challenge Config", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Challenge" ], "summary": "Set Challenge Config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/challenge.ChallengeConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/challenge.ChallengeConfig" } } } ] } } } } }, "/open/cloud/policies": { "get": { "produces": [ "application/json" ], "tags": [ "cloud" ], "summary": "get cloud policies", "parameters": [ { "type": "string", "description": "name", "name": "name", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/cloud.GetCloudPoliciesItem" } } } } ] } } } } }, "/open/cloud/policies/subscribe": { "post": { "produces": [ "application/json" ], "tags": [ "cloud" ], "summary": "subscribe cloud policy", "parameters": [ { "description": "id", "name": "id", "in": "body", "required": true, "schema": { "$ref": "#/definitions/cloud.SubCloudPolicyReq" } } ], "responses": { "200": { "description": "OK" } } } }, "/open/detector": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get detector performance", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetDetectorRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update detector performance", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostDetectorReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/events": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get attack events", "parameters": [ { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "host", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "port", "in": "query" }, { "type": "integer", "name": "start", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.EventListRes" } } } ] } } } } }, "/open/events/rule": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get black or white rule attack events", "parameters": [ { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "host", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "port", "in": "query" }, { "type": "integer", "name": "start", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.EventListRes" } } } ] } } } } }, "/open/global/log_clean": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get clear data interval", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.LogMaxDayConfig" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update clear data interval", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.LogMaxDayConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/global/mode": { "get": { "description": "Get global semantics", "produces": [ "application/json" ], "tags": [ "Skynet" ], "summary": "Get global semantics", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/skynet.GetGlobalSemanticsRes" } } } ] } } } }, "put": { "description": "Update global semantics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Skynet" ], "summary": "Update global semantics", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/skynet.SemanticsConfigParams" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/global/proxy": { "get": { "produces": [ "application/json" ], "tags": [ "global_settings" ], "summary": "get global settings", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ProxyConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "global_settings" ], "summary": "set global settings", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/proxy.Config" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ProxyConfig" } } } ] } } } } }, "/open/intelligence": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get malicious ip sharing plan", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Intelligence" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "update malicious ip sharing plan", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutThreatInfoRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/intelligence/ip_lib": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "通用配置" ], "summary": "update malicious ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutThreatLibRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/ipgroup": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "list ip group", "parameters": [ { "type": "integer", "name": "top", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetIPGroupRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "update ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ipg.IPGroupVO" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "create ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ipg.IPGroupVO" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "delete ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.DeleteIPGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/ipgroup/append": { "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "add ip to ip group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PostAppendIPGroupRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/ipgroup/crawler": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get search engine spider group id", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "update search engine spider", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/ipgroup/detail": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get ip group detail", "parameters": [ { "type": "integer", "name": "id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetIPGroupDetailRes" } } } ] } } } } }, "/open/ipgroup/link": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get ip by link", "parameters": [ { "type": "string", "name": "href", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetIPGroupByLinkRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "create ip group by link", "parameters": [ { "type": "string", "name": "comment", "in": "query" }, { "type": "string", "name": "url", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/ja4": { "get": { "description": "Get JA4 Fingerprint", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "JA4" ], "summary": "Get JA4 Fingerprint", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/ja4.GetJa4Response" } } } ] } } } }, "put": { "description": "Set JA4 Library", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "JA4" ], "summary": "Set JA4 Library", "parameters": [ { "description": "request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/ja4.SetJa4Request" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "object" } } } ] } } } } }, "/open/policy": { "get": { "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "list customized rule", "parameters": [ { "maximum": 3, "minimum": -1, "type": "integer", "name": "action", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/policy.ListPolicyRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "update customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PutPolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "create customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PostPolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "delete customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.DeletePolicyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/policy/detail": { "get": { "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "get customized rule detail", "parameters": [ { "type": "integer", "name": "id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/policy.GetPolicyRes" } } } ] } } } } }, "/open/policy/switch": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "customized_rules" ], "summary": "enable/disable customized rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/policy.PutPolicySwitchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/portal": { "get": { "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "get portal config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/portal.GetRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "update portal config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.PortalConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/portal/proxy_config": { "get": { "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "get portal proxy config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ProxyConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "update portal proxy config", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/portal.PutProxyConfigReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/portal/style": { "get": { "produces": [ "application/json" ], "tags": [ "portal" ], "summary": "get portal style", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.PortalStyle" } } } ] } } } } }, "/open/record/:id": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get attack log detail", "parameters": [ { "type": "string", "description": "log id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.DetectLog" } } } ] } } } } }, "/open/record/rule/:id": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get black or white rule attack log detail", "parameters": [ { "type": "string", "description": "log id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.RuleDetectLog" } } } ] } } } } }, "/open/records": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get attack logs", "parameters": [ { "type": "string", "name": "action", "in": "query" }, { "type": "string", "name": "attack_type", "in": "query" }, { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "event_id", "in": "query" }, { "type": "string", "name": "host", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "type": "string", "name": "ja4_fingerprint", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "port", "in": "query" }, { "type": "integer", "name": "start", "in": "query" }, { "type": "string", "name": "url", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.GetDetectLogListRes" } } } ] } } } } }, "/open/records/acl": { "get": { "produces": [ "application/json" ], "tags": [ "ratelimit", "logs" ], "summary": "get ratelimit log", "parameters": [ { "type": "integer", "name": "page", "in": "query" }, { "type": "integer", "name": "page_size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/acl.GetACLLogsRes" } } } ] } } } } }, "/open/records/auth_defense": { "get": { "produces": [ "application/json" ], "tags": [ "auth", "logs" ], "summary": "get auth logs", "parameters": [ { "type": "string", "name": "ip", "in": "query" }, { "type": "integer", "name": "page", "in": "query" }, { "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "site", "in": "query" }, { "type": "integer", "name": "started_at_begin", "in": "query" }, { "type": "integer", "name": "started_at_end", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.GetAuthDefenseLogsRes" } } } ] } } } } }, "/open/records/challenge": { "get": { "produces": [ "application/json" ], "tags": [ "anti-bot" ], "summary": "list anti-bot log", "parameters": [ { "type": "string", "name": "ip", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "site", "in": "query" }, { "type": "integer", "name": "started_at_begin", "in": "query" }, { "type": "integer", "name": "started_at_end", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetChallengeLogsRes" } } } ] } } } } }, "/open/records/rule": { "get": { "produces": [ "application/json" ], "tags": [ "attacks" ], "summary": "get black or white rule attack logs", "parameters": [ { "type": "string", "name": "action", "in": "query" }, { "type": "string", "name": "attack_type", "in": "query" }, { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "event_id", "in": "query" }, { "type": "string", "name": "host", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "type": "string", "name": "ja4_fingerprint", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "port", "in": "query" }, { "type": "integer", "name": "start", "in": "query" }, { "type": "string", "name": "url", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/record.GetRuleDetectLogListRes" } } } ] } } } } }, "/open/records/waiting": { "get": { "produces": [ "application/json" ], "tags": [ "WaitingRoom" ], "summary": "Get waiting room logs", "parameters": [ { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "site", "in": "query" }, { "type": "integer", "name": "started_at_begin", "in": "query" }, { "type": "integer", "name": "started_at_end", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.WaitingRoomLogs" } } } ] } } } } }, "/open/safepoint/consult": { "post": { "produces": [ "application/json" ], "tags": [ "safepoint" ], "summary": "consult safepoint", "parameters": [ { "description": "consult request", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/safepoint.PostConsultReq" } } ], "responses": { "200": { "description": "OK" } } } }, "/open/security_posture/realtime": { "get": { "description": "Get Security Posture Realtime", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "SecurityPosture" ], "summary": "Get Security Posture Realtime", "parameters": [ { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "top", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/securityposture.RealtimeResponse" } } } ] } } } } }, "/open/security_posture/site": { "post": { "description": "Set Site Security Posture", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "SecurityPosture" ], "summary": "Set Site Security Posture", "parameters": [ { "description": "body params", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/securityposture.SetSiteSecurityPostureBody" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "object" } } } ] } } } } }, "/open/security_posture/statistics": { "get": { "description": "Get Security Posture Statistics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "SecurityPosture" ], "summary": "Get Security Posture Statistics", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/securityposture.StatisticsResponse" } } } ] } } } } }, "/open/security_posture/trends": { "get": { "description": "Get Security Posture Trends", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "SecurityPosture" ], "summary": "Get Security Posture Trends", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "top", "in": "query" }, { "enum": [ "attack", "black_white", "acl", "challenge", "waiting", "auth", "attack_type", "black_white_rule", "attack_host", "attack_page" ], "type": "string", "x-enum-varnames": [ "TrendsQueryTypeAttack", "TrendsQueryTypeBlackWhite", "TrendsQueryTypeACL", "TrendsQueryTypeChallenge", "TrendsQueryTypeWaiting", "TrendsQueryTypeAuth", "TrendsQueryTypeAttackType", "TrendsQueryTypeBlackWhiteRule", "TrendsQueryTypeAttackHost", "TrendsQueryTypeAttackPage" ], "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/securityposture.TrendsResponse" } } } ] } } } } }, "/open/share_behaviour": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get share user behaviour for waf", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "set share user behaviour info for waf", "parameters": [ { "description": "request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SetShareBehaviourRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/share_fingerprint": { "get": { "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "get share browser fingerprint info at block page or not", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "settings" ], "summary": "set share browser fingerprint info at block page or not", "parameters": [ { "description": "request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.SetShareFingerprintRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "list web service", "parameters": [ { "type": "integer", "name": "group_id", "in": "query" }, { "type": "string", "name": "site", "in": "query" }, { "type": "boolean", "name": "sp_enabled", "in": "query" }, { "type": "boolean", "name": "stat_enabled", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.GetWebsiteRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.WebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "create web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.WebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "delete web service", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.DeleteWebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/:id/waiting": { "get": { "produces": [ "application/json" ], "tags": [ "WaitingRoom" ], "summary": "Get website waiting room rule", "parameters": [ { "type": "integer", "description": "website id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.WaitingRoom" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "WaitingRoom" ], "summary": "Set website waiting room rule", "parameters": [ { "type": "integer", "description": "website id", "name": "id", "in": "path", "required": true }, { "description": "request body", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.SetWebsiteWaitingRoomReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.WaitingRoom" } } } ] } } } } }, "/open/site/challenge": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service anti-bot", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.PubWebsiteChallengeReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/defense": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service auth", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.PutWebsiteDefenseReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/group": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "list web service group", "parameters": [ { "type": "string", "name": "site", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.ListGroupRes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "create web service group", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.CreateGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/site/group/switch": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service group setting switch", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } } } }, "/open/site/group/{id}": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service group info", "parameters": [ { "type": "integer", "description": "group id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.UpdateGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "delete web service group", "parameters": [ { "type": "integer", "description": "group id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/group/{id}/sort": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "sort web service group", "parameters": [ { "type": "integer", "description": "group id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.SortGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/healthcheck": { "post": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service healthcheck", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.PostWebsiteHealthcheckReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "object", "additionalProperties": { "type": "string" } } } } ] } } } } }, "/open/site/mode": { "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service run mode", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.PutWebsiteModeRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service detail", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.GetWebsiteDetailRes" } } } ] } } } } }, "/open/site/{id}/acl": { "get": { "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "get web service ratelimit config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/acl.ACLConfig" } } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "set web service ratelimit config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/acl.SetSiteACLRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "object" } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "add web service ratelimit config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/acl.ACLConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/site/{id}/acl/{rule_id}": { "put": { "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "update web service ratelimit config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "rule id", "name": "rule_id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/acl.ACLConfig" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "ratelimit" ], "summary": "delete web service ratelimit config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "rule id", "name": "rule_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/site/{id}/basic_info": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service basic info", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.PutWebsiteBasicInfoReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/chaos": { "get": { "produces": [ "application/json" ], "tags": [ "dynamic" ], "summary": "get site dynamic", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.Chaos" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "dynamic" ], "summary": "create site dynamic", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.WebsiteChaosReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/excludes": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service routing collection config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SiteExcludes" } } } ] } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service routing collection config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/resource.UpdateExcludesReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/forwarding_rules": { "get": { "produces": [ "application/json" ], "tags": [ "forwarding_rules" ], "summary": "list forwarding rules for a site", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.ForwardingRule" } } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "forwarding_rules" ], "summary": "create a forwarding rule for a site", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/forwarding_rule.CreateRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/site/{id}/forwarding_rules/{rule_id}": { "put": { "produces": [ "application/json" ], "tags": [ "forwarding_rules" ], "summary": "edit a forwarding rule", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "rule id", "name": "rule_id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/forwarding_rule.EditRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "forwarding_rules" ], "summary": "delete a forwarding rule", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "rule id", "name": "rule_id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/site/{id}/forwarding_rules/{rule_id}/switch": { "put": { "produces": [ "application/json" ], "tags": [ "forwarding_rules" ], "summary": "enable/disable a forwarding rule", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "description": "rule id", "name": "rule_id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/forwarding_rule.SwitchRequest" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/group": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service group", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.UpdateSiteGroupReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/log": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "list web service access/error log", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "string", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.ListLogItem" } } } } ] } } } } }, "/open/site/{id}/log/detail": { "get": { "tags": [ "web_services" ], "summary": "get web service access/error log detail", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "string", "name": "type", "in": "query" } ], "responses": {} } }, "/open/site/{id}/log/download": { "get": { "tags": [ "web_services" ], "summary": "download web service access/error log", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "string", "name": "filename", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "type": "file" } } } } }, "/open/site/{id}/log/limit": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service access/error log limit", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "string", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "set web service access/error log limit", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "integer", "name": "limit", "in": "query" }, { "type": "string", "name": "type", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/nginx_config": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service tengine config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/site.NginxConfigGetRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "update web service tengine config", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.NginxConfigUpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/proxy": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service security", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ProxyConfig" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "set web service security", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/proxy.Config" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ProxyConfig" } } } ] } } } } }, "/open/site/{id}/resources": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "list web service routing", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.WebsiteResource" } } } ] } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "delete web service routing", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/resource.RemoveReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/semantics": { "get": { "description": "Get site semantics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Skynet" ], "summary": "Get site semantics", "parameters": [ { "type": "integer", "description": "Site ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.SkynetMoudle" } } } ] } } } }, "put": { "description": "Set site semantics", "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "Skynet" ], "summary": "Set site semantics", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/skynet.SemanticsConfigParams" } }, { "type": "integer", "description": "Site ID", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/sort": { "put": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "sort web service", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.SortWebsiteReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/site/{id}/static": { "get": { "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "get web service static file", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "type": "string", "name": "path", "in": "query", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/tcd.FileInfo" } } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "rename web service static file", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.RenameStaticReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "create web service static file", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.AddStaticReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "web_services" ], "summary": "delete web service static file", "parameters": [ { "type": "integer", "description": "site id", "name": "id", "in": "path", "required": true }, { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/site.DeleteStaticReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/skynet/rule": { "get": { "produces": [ "application/json" ], "tags": [ "enhance_rule" ], "summary": "get enhance rule", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.GetSkynetRuleRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "enhance_rule" ], "summary": "update enhance rule", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutSkynetRuleReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/skynet/rule/switch": { "get": { "produces": [ "application/json" ], "tags": [ "enhance_rule" ], "summary": "get enhance rule global status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "enhance_rule" ], "summary": "update enhance rule global status", "parameters": [ { "description": "request params", "name": "request", "in": "body", "required": true, "schema": { "$ref": "#/definitions/api.PutSkynetRuleSwitchReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/system": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system info", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/system.AboutRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update management cert", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/system.UpdateReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/system/arch": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system arch", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/open/system/authorize": { "get": { "produces": [ "application/json" ], "tags": [ "license" ], "summary": "get license", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/system.CodeApplyInfoRes" } } } ] } } } }, "put": { "produces": [ "application/json" ], "tags": [ "license" ], "summary": "reapply license", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "license" ], "summary": "apply license", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/system.CodeApplyReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "delete": { "produces": [ "application/json" ], "tags": [ "license" ], "summary": "delete license", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/system/customer_service": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get customer service config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.CustomerService" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "set customer service config", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.CustomerService" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/system/edition": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system edition", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/system.EditionRes" } } } ] } } } } }, "/open/system/key": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system key", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "string" } } } ] } } } } }, "/open/system/login_method": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get login method config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.LoginMethod" } } } ] } } } } }, "/open/system/login_type": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get login method config", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "integer" } } } ] } } } } }, "/open/system/network_proxy": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get system network proxy", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.NetworkProxy" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "system" ], "summary": "set system network proxy", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/model.NetworkProxy" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/system/protocol": { "get": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "get protocol status", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "boolean" } } } ] } } } }, "post": { "produces": [ "application/json" ], "tags": [ "system" ], "summary": "update protocol status", "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/users": { "get": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "list user", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/user.GetUserListRes" } } } ] } } } }, "put": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "update user", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.UpdateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } }, "post": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "create user", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.CreateUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/user.CreateUserResp" } } } ] } } } }, "delete": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "user" ], "summary": "delete user", "parameters": [ { "description": "request params", "name": "requests", "in": "body", "required": true, "schema": { "$ref": "#/definitions/user.DeleteUserReq" } } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/users/{id}/totp": { "post": { "produces": [ "application/json" ], "tags": [ "user" ], "summary": "reset user totp", "parameters": [ { "type": "integer", "description": "user id", "name": "id", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "$ref": "#/definitions/response.JSONBody" } } } } }, "/open/v2/records/auth_defense": { "get": { "produces": [ "application/json" ], "tags": [ "auth", "logs" ], "summary": "get auth logs v2", "parameters": [ { "type": "integer", "name": "begin", "in": "query" }, { "type": "integer", "name": "end", "in": "query" }, { "type": "string", "name": "ip", "in": "query" }, { "minimum": 1, "type": "integer", "name": "page", "in": "query" }, { "maximum": 100, "minimum": 1, "type": "integer", "name": "page_size", "in": "query" }, { "type": "string", "name": "site", "in": "query" }, { "type": "integer", "name": "status", "in": "query" }, { "type": "string", "name": "username", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/auth_defense.GetAuthDefenseLogsV2Res" } } } ] } } } } }, "/stat/advance/access": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced access", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceAccessRes" } } } ] } } } } }, "/stat/advance/attack": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced intercept", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceAttackRes" } } } ] } } } } }, "/stat/advance/client": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced client", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceClientRes" } } } ] } } } } }, "/stat/advance/domain": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced domain", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "boolean", "name": "refer", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "domain": { "type": "string" } } } } } } ] } } } } }, "/stat/advance/error_status_code": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced error status code", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "boolean", "name": "upstream", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/stat.AdvanceErrorStatusCodeRes" } } } ] } } } } }, "/stat/advance/location": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced geolocation", "parameters": [ { "type": "integer", "name": "action", "in": "query" }, { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "boolean", "name": "global", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "country": { "type": "string" }, "province": { "type": "string" } } } } } } ] } } } } }, "/stat/advance/page": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced page", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "boolean", "name": "refer", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "size", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "page": { "type": "string" } } } } } } ] } } } } }, "/stat/advance/status_code": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced status code", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" }, { "type": "integer", "name": "size", "in": "query" }, { "type": "boolean", "name": "upstream", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "status_code": { "type": "string" } } } } } } ] } } } } }, "/stat/advance/trend/access": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced access trend", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "time": { "type": "integer" } } } } } } ] } } } } }, "/stat/advance/trend/intercept": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get advanced intercept trend", "parameters": [ { "type": "integer", "name": "begin_time", "in": "query" }, { "type": "integer", "name": "end_time", "in": "query" }, { "type": "integer", "name": "site_id", "in": "query" } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "time": { "type": "integer" } } } } } } ] } } } } }, "/stat/qps": { "get": { "produces": [ "application/json" ], "tags": [ "statistics" ], "summary": "get qps", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/response.JSONBody" }, { "type": "object", "properties": { "data": { "$ref": "#/definitions/api.QpsRes" } } } ] } } } } } }, "definitions": { "acl.ACLConfig": { "type": "object", "properties": { "action": { "type": "string" }, "block_min": { "type": "integer" }, "built_in": { "type": "boolean" }, "conditions": { "type": "array", "items": { "$ref": "#/definitions/model.RuleCondition" } }, "count": { "type": "integer" }, "created_at": { "type": "integer" }, "enabled": { "type": "boolean" }, "id": { "type": "integer" }, "name": { "type": "string" }, "period": { "type": "integer" }, "priority": { "type": "integer" }, "site_id": { "type": "integer" }, "type": { "type": "string" }, "updated_at": { "type": "integer" }, "use_global": { "type": "boolean" } } }, "acl.ACLRelieveRequest": { "type": "object", "properties": { "id": { "type": "array", "items": { "type": "integer" } }, "search": { "$ref": "#/definitions/acl.SearchReq" } } }, "acl.GetACLLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/acl.Log" } }, "total": { "type": "integer" } } }, "acl.Log": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.ACLConfigAction" }, "block_min": { "type": "integer" }, "city": { "description": "obsolete", "type": "string" }, "count": { "type": "integer" }, "country": { "description": "obsolete", "type": "string" }, "created_at": { "type": "string" }, "denied_count": { "type": "integer" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "period": { "type": "integer" }, "province": { "description": "obsolete", "type": "string" }, "query_key": { "type": "string" }, "reason": { "$ref": "#/definitions/model.ACLConfigType" }, "result": { "type": "string" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "status": { "type": "integer" }, "updated_at": { "type": "string" }, "valid_before": { "type": "string" } } }, "acl.SearchReq": { "type": "object", "properties": { "begin": { "type": "integer" }, "end": { "type": "integer" }, "ip": { "type": "string" }, "site": { "type": "string" } } }, "acl.SetSiteACLRequest": { "type": "object", "properties": { "rules": { "type": "array", "items": { "$ref": "#/definitions/acl.ACLConfig" } }, "use_global": { "type": "boolean" } } }, "alarm.AlarmConfigResponse": { "type": "object", "properties": { "id": { "type": "integer" } } }, "alarm.PutAlarmConfigRequest": { "type": "object", "properties": { "cur_platform": { "type": "string" }, "event": { "$ref": "#/definitions/model.JsonObject-model_AlarmEvent" }, "network_proxy": { "type": "boolean" }, "platform": { "$ref": "#/definitions/model.JsonObject-model_AlarmPlatform" }, "site_ids": { "type": "array", "items": { "type": "integer" } } } }, "api.ChallengeLog": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "event_id": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "province": { "type": "string" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "trigger_count": { "type": "integer" }, "updated_at": { "type": "string" } } }, "api.DeleteIPGroupReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "api.GetCertListRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/api.ListCertItem" } }, "total": { "type": "integer" } } }, "api.GetChallengeLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/api.ChallengeLog" } }, "total": { "type": "integer" } } }, "api.GetDetectorRes": { "type": "object", "properties": { "mode": { "type": "integer" } } }, "api.GetDowngradeVersionRes": { "type": "object", "properties": { "status": { "type": "boolean" } } }, "api.GetIPGroupByLinkRes": { "type": "object", "properties": { "ips": { "type": "array", "items": { "type": "string" } } } }, "api.GetIPGroupDetailRes": { "type": "object", "properties": { "data": { "$ref": "#/definitions/ipg.IPGroupVO" } } }, "api.GetIPGroupRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/ipg.IPGroupVO" } }, "total": { "type": "integer" } } }, "api.GetManagerInfoRes": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.ManagerInfo" } } }, "api.GetSkynetRuleRes": { "type": "object", "properties": { "rules": { "type": "object", "additionalProperties": { "$ref": "#/definitions/detect.SkynetInfo" } } } }, "api.GetSpecialPageRes": { "type": "object", "properties": { "content": { "type": "string" } } }, "api.ListCertItem": { "type": "object", "properties": { "acme_message": { "type": "string" }, "domains": { "type": "array", "items": { "type": "string" } }, "expired": { "type": "boolean" }, "id": { "type": "integer" }, "issuer": { "type": "string" }, "related_sites": { "type": "array", "items": { "type": "string" } }, "revoked": { "type": "boolean" }, "self_signature": { "type": "boolean" }, "trusted": { "type": "boolean" }, "type": { "type": "integer" }, "valid_before": { "type": "string" } } }, "api.ListSpecialPageItem": { "type": "object", "properties": { "custom": { "type": "boolean" }, "type": { "type": "string" } } }, "api.LogMaxDayConfig": { "type": "object", "properties": { "max_day": { "type": "integer" }, "max_report_day": { "type": "integer" }, "max_stat_day": { "type": "integer" } } }, "api.PostAppendIPGroupRequest": { "type": "object", "properties": { "ip_group_ids": { "type": "array", "items": { "type": "integer" } }, "ips": { "type": "array", "items": { "type": "string" } } } }, "api.PostDetectorReq": { "type": "object", "properties": { "mode": { "type": "integer" }, "ts": { "type": "integer" } } }, "api.PutManagerInfoReq": { "type": "object", "properties": { "common_color": { "$ref": "#/definitions/model.CommonColor" }, "error_color": { "$ref": "#/definitions/model.ErrorColor" }, "manager_info": { "type": "string" }, "page_manager_info": { "type": "object", "additionalProperties": { "type": "string" } } } }, "api.PutSkynetRuleReq": { "type": "object", "properties": { "global": { "type": "boolean" }, "id": { "type": "array", "items": { "type": "string" } }, "mode": { "$ref": "#/definitions/detect.Mode" } } }, "api.PutSkynetRuleSwitchReq": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "api.PutSpecialPageRequest": { "type": "object", "properties": { "recover": { "type": "boolean" }, "response_html": { "type": "string" }, "type": { "type": "string" } } }, "api.PutThreatInfoRequest": { "type": "object", "properties": { "share_enabled": { "type": "boolean" } } }, "api.PutThreatLibRequest": { "type": "object", "properties": { "use_commercial_lib": { "description": "是否使用商业 IP 库", "type": "boolean" } } }, "api.QpsRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "type": "object", "additionalProperties": {} } } } }, "api.SetShareBehaviourRequest": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "api.SetShareFingerprintRequest": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "audit_log.ListAuditLogItem": { "type": "object", "properties": { "content": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "username": { "type": "string" } } }, "audit_log.ListAuditLogRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/audit_log.ListAuditLogItem" } }, "total": { "type": "integer" } } }, "auth.GetCsrfTokenRes": { "type": "object", "properties": { "csrf_token": { "type": "string" } } }, "auth.LoginReq": { "type": "object", "properties": { "callback_address": { "type": "string" }, "csrf_token": { "type": "string" }, "password": { "type": "string" }, "test": { "type": "boolean" }, "username": { "type": "string" } } }, "auth.LoginRes": { "type": "object", "properties": { "id": { "type": "integer" }, "jwt": { "type": "string" }, "redirect": { "type": "string" }, "tfa_bind_url": { "type": "string" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" } } }, "auth.TfaReq": { "type": "object", "properties": { "code": { "type": "string" }, "csrf_token": { "type": "string" }, "timestamp": { "type": "integer" } } }, "auth.TfaRes": { "type": "object", "properties": { "jwt": { "type": "string" } } }, "auth_defense.BatchDeleteUserReq": { "type": "object", "required": [ "ids" ], "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "auth_defense.CreateSourceReq": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.CreateUserReq": { "type": "object", "required": [ "password", "username" ], "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "auth_defense.GetAuthDefenseLogsRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.Log" } }, "total": { "type": "integer" } } }, "auth_defense.GetAuthDefenseLogsV2Item": { "type": "object", "properties": { "auth_source_id": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "policy_id": { "type": "integer" }, "province": { "type": "string" }, "result": { "type": "boolean" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "source_type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "status": { "$ref": "#/definitions/model.AuthDefenseVerifyStatus" }, "third_id": { "type": "string" }, "updated_at": { "type": "string" }, "user_id": { "type": "integer" }, "username": { "type": "string" }, "uuid": { "type": "string" } } }, "auth_defense.GetAuthDefenseLogsV2Res": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetAuthDefenseLogsV2Item" } }, "total": { "type": "integer" } } }, "auth_defense.GetUserRes": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "email": { "type": "string" }, "last_login": { "type": "integer" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetUserSite" } } } }, "auth_defense.GetUserSite": { "type": "object", "properties": { "site_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserSiteStatus" } } }, "auth_defense.ListGroupItem": { "type": "object", "properties": { "id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.ListGroupRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListGroupItem" } } } }, "auth_defense.ListSourceUserItem": { "type": "object", "properties": { "id": { "type": "integer" }, "last_login": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseSourceUserStatus" }, "uname": { "type": "string" } } }, "auth_defense.ListSourceUserRes": { "type": "object", "properties": { "approved_total": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListSourceUserItem" } }, "total": { "type": "integer" }, "user_total": { "type": "integer" } } }, "auth_defense.ListUserItem": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "id": { "type": "integer" }, "last_login": { "type": "integer" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "integer" } } }, "auth_defense.ListUserRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListUserItem" } }, "limit": { "type": "integer" }, "total": { "type": "integer" } } }, "auth_defense.ListUserReviewItem": { "type": "object", "properties": { "auth_user_id": { "type": "integer" }, "id": { "type": "integer" }, "request_time": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserReviewStatus" }, "username": { "type": "string" } } }, "auth_defense.ListUserReviewRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.ListUserReviewItem" } }, "total": { "type": "integer" } } }, "auth_defense.Log": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "deny_count": { "type": "integer" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "event_id": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "province": { "type": "string" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "trigger_count": { "type": "integer" }, "updated_at": { "type": "string" }, "username": { "type": "string" } } }, "auth_defense.MergeUserReq": { "type": "object", "required": [ "main" ], "properties": { "dry_run": { "type": "boolean" }, "main": { "type": "integer" }, "merges": { "type": "array", "items": { "type": "integer" } } } }, "auth_defense.MergeUserRes": { "type": "object", "properties": { "binds": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UserBind" } }, "email": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.GetUserSite" } } } }, "auth_defense.PutSourceUserReq": { "type": "object", "required": [ "status" ], "properties": { "status": { "enum": [ 1, 2 ], "allOf": [ { "$ref": "#/definitions/model.AuthDefenseSourceUserStatus" } ] } } }, "auth_defense.UnbindUserReq": { "type": "object", "required": [ "type" ], "properties": { "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "auth_defense.UpdateSourceReq": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" } } }, "auth_defense.UpdateUserReq": { "type": "object", "properties": { "email": { "type": "string" }, "password": { "type": "string" }, "phone": { "type": "string" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" }, "websites": { "type": "array", "items": { "$ref": "#/definitions/auth_defense.UpdateUserSite" } } } }, "auth_defense.UpdateUserSite": { "type": "object", "properties": { "site_id": { "type": "integer" }, "status": { "$ref": "#/definitions/model.AuthDefenseUserSiteStatus" } } }, "auth_defense.UserBind": { "type": "object", "properties": { "source_type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "third_id": { "type": "string" } } }, "auth_defense.UserReviewReq": { "type": "object", "required": [ "status" ], "properties": { "status": { "maximum": 2, "minimum": 1, "allOf": [ { "$ref": "#/definitions/model.AuthDefenseUserReviewStatus" } ] } } }, "business.GetFrontendStyleRes": { "type": "object", "properties": { "icon": { "type": "string" }, "title": { "type": "string" } } }, "business.PutFrontendStyleReq": { "type": "object", "properties": { "icon": { "type": "string" }, "title": { "type": "string" } } }, "cert.CertDetail": { "type": "object", "properties": { "acme": { "$ref": "#/definitions/cert.acmeVO" }, "id": { "type": "integer" }, "manual": { "$ref": "#/definitions/cert.manual" }, "type": { "type": "integer" } } }, "cert.acmeVO": { "type": "object", "properties": { "domains": { "type": "array", "items": { "type": "string" } }, "email": { "type": "string" } } }, "cert.manual": { "type": "object", "properties": { "crt": { "type": "string" }, "key": { "type": "string" } } }, "challenge.ChallengeConfig": { "type": "object", "properties": { "server": { "$ref": "#/definitions/constants.ChallengeServer" } } }, "cloud.GetCloudPoliciesItem": { "type": "object", "properties": { "added": { "type": "boolean" }, "auth_rule": { "type": "integer" }, "black_rule": { "type": "integer" }, "captcha_rule": { "type": "integer" }, "compatible": { "type": "integer" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "org_name": { "type": "string" }, "policy_name": { "type": "string" }, "tags": { "type": "array", "items": { "type": "string" } }, "updated_at": { "type": "string" }, "white_rule": { "type": "integer" } } }, "cloud.SubCloudPolicyReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "commercial.DashboardTokenReq": { "type": "object", "properties": { "expired_at": { "type": "integer" } } }, "constants.ChallengeServer": { "type": "string", "enum": [ "cloud", "local" ], "x-enum-varnames": [ "ChallengeServerCloud", "ChallengeServerLocal" ] }, "consts.UserRole": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5 ], "x-enum-varnames": [ "UserRoleUnknown", "UserRoleAdmin", "UserRoleManager", "UserRoleConfig", "UserRoleAudit", "UserRoleMax" ] }, "detect.Mode": { "type": "string", "enum": [ "strict", "default", "dry_run", "disable", "deny" ], "x-enum-varnames": [ "StrictMode", "DefaultMode", "DryRunMode", "DisableMode", "DenyMode" ] }, "detect.SkynetInfo": { "type": "object", "properties": { "attack_type": { "type": "integer" }, "attack_type_name": { "type": "string" }, "id": { "type": "string" }, "mode": { "$ref": "#/definitions/detect.Mode" }, "name": { "type": "string" }, "risk_level": { "type": "integer" } } }, "forwarding_rule.CreateRequest": { "type": "object", "required": [ "path_prefix", "upstreams" ], "properties": { "comment": { "type": "string" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "forwarding_rule.EditRequest": { "type": "object", "required": [ "path_prefix", "upstreams" ], "properties": { "comment": { "type": "string" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "minItems": 1, "items": { "type": "string" } } } }, "forwarding_rule.SwitchRequest": { "type": "object", "properties": { "is_enabled": { "type": "boolean" } } }, "ipg.IPGroupVO": { "type": "object", "properties": { "builtin": { "type": "boolean" }, "comment": { "type": "string" }, "id": { "type": "integer" }, "ips": { "type": "array", "items": { "type": "string" } }, "reference": { "type": "string" }, "total": { "type": "integer" }, "updated_at": { "type": "string" } } }, "ja4.GetJa4Response": { "type": "object", "properties": { "count": { "type": "integer" }, "id": { "type": "integer" }, "name": { "type": "string" }, "pro": { "type": "boolean" }, "updated_at": { "type": "integer" } } }, "ja4.SetJa4Request": { "type": "object", "properties": { "pro": { "type": "boolean" } } }, "license.State": { "type": "string", "enum": [ "unknown", "none", "applying", "rejected", "approved", "revoked", "revoking", "expired", "verify_failed", "downgrade", "arch_mismatch" ], "x-enum-comments": { "StateApplying": "应用中", "StateApproved": "有效", "StateDowngrade": "license 降级", "StateExpired": "过期", "StateNone": "没有license", "StateRejected": "无效", "StateRevoked": "回收", "StateRevoking": "回收中,由于还未被回收,认为 license 状态有效", "StateVerifyFailed": "请求百川报错" }, "x-enum-descriptions": [ "", "没有license", "应用中", "无效", "有效", "回收", "回收中,由于还未被回收,认为 license 状态有效", "过期", "请求百川报错", "license 降级", "" ], "x-enum-varnames": [ "StateUnknown", "StateNone", "StateApplying", "StateRejected", "StateApproved", "StateRevoked", "StateRevoking", "StateExpired", "StateVerifyFailed", "StateDowngrade", "StateArchMismatch" ] }, "mcp.GetMcpResponse": { "type": "object", "properties": { "secret": { "description": "mcp secret", "type": "string" }, "server": { "description": "mcp server address", "type": "string" } } }, "mcp.SetMcpRequest": { "type": "object", "properties": { "secret": { "description": "mcp secret", "type": "string" }, "server": { "description": "mcp server address", "type": "string" } } }, "model.ACLConfigAction": { "type": "string", "enum": [ "ban", "challenge" ], "x-enum-varnames": [ "ACLConfigActionBan", "ACLConfigActionChallenge" ] }, "model.ACLConfigType": { "type": "string", "enum": [ "req", "attack", "error" ], "x-enum-comments": { "ACLConfigTypeAttack": "高频攻击", "ACLConfigTypeError": "高频错误", "ACLConfigTypeReq": "高频请求" }, "x-enum-descriptions": [ "高频请求", "高频攻击", "高频错误" ], "x-enum-varnames": [ "ACLConfigTypeReq", "ACLConfigTypeAttack", "ACLConfigTypeError" ] }, "model.AccountConfig": { "type": "object", "required": [ "access_whitelist" ], "properties": { "access_whitelist": { "description": "ip 或 cidr", "type": "array", "items": { "type": "string" } }, "expired_unit": { "description": "过期时间单位, day, hour, minute", "allOf": [ { "$ref": "#/definitions/model.TimeUnit" } ] }, "lock_config": { "description": "账号锁定配置", "allOf": [ { "$ref": "#/definitions/model.AccountConfigLock" } ] }, "login_expire": { "description": "过期秒数", "type": "integer" }, "password_complex": { "type": "array", "items": { "$ref": "#/definitions/model.PasswordChar" } }, "password_expire_day": { "description": "过期天数", "type": "integer" }, "password_length": { "type": "integer" } } }, "model.AccountConfigLock": { "type": "object", "properties": { "lock_interval": { "description": "锁定时间", "type": "integer" }, "lock_interval_unit": { "description": "锁定时间单位", "allOf": [ { "$ref": "#/definitions/model.TimeUnit" } ] }, "login_failed": { "description": "登录失败次数", "type": "integer" } } }, "model.Alarm": { "type": "object", "properties": { "created_at": { "type": "string" }, "cur_platform": { "description": "当前告警平台", "type": "string" }, "event": { "$ref": "#/definitions/model.JsonObject-model_AlarmEvent" }, "id": { "type": "integer" }, "network_proxy": { "description": "是否使用网络代理进行告警转发", "type": "boolean" }, "platform": { "$ref": "#/definitions/model.JsonObject-model_AlarmPlatform" }, "site_ids": { "description": "告警的站点ID,如果为空,则告警所有站点", "type": "array", "items": { "type": "integer" } }, "updated_at": { "type": "string" } } }, "model.AlarmConfig": { "type": "object", "properties": { "alarm_period": { "type": "integer" }, "enabled": { "type": "boolean" } } }, "model.AlarmEvent": { "type": "object", "properties": { "acl": { "$ref": "#/definitions/model.AlarmConfig" }, "attack": { "$ref": "#/definitions/model.AlarmConfig" }, "auth_defense": { "$ref": "#/definitions/model.AlarmConfig" }, "black_white": { "$ref": "#/definitions/model.AlarmConfig" }, "challenge": { "$ref": "#/definitions/model.AlarmConfig" }, "system": { "$ref": "#/definitions/model.AlarmConfig" }, "tamper": { "$ref": "#/definitions/model.AlarmConfig" }, "waiting_room": { "$ref": "#/definitions/model.AlarmConfig" } } }, "model.AlarmPlatform": { "type": "object", "properties": { "ding_talk": { "$ref": "#/definitions/model.DingTalkConfig" }, "discord": { "$ref": "#/definitions/model.DiscordConfig" }, "feishu": { "$ref": "#/definitions/model.FeishuConfig" }, "qiye_weixin": { "$ref": "#/definitions/model.QiyeWeixinConfig" }, "telegram": { "$ref": "#/definitions/model.TelegramConfig" } } }, "model.AuthDefenseSource": { "type": "object", "properties": { "association": { "$ref": "#/definitions/model.AuthDefenseSourceAssociation" }, "auth": { "$ref": "#/definitions/model.PolicyAuth" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "network_proxy": { "type": "boolean" }, "title": { "type": "string" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" }, "updated_at": { "type": "string" }, "user": { "type": "array", "items": { "$ref": "#/definitions/model.PolicyUser" } } } }, "model.AuthDefenseSourceAssociation": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseSourceAssociationNone", "AuthDefenseSourceAssociationEmail", "AuthDefenseSourceAssociationPhone" ] }, "model.AuthDefenseSourceType": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 6, 7, 8 ], "x-enum-varnames": [ "AuthDefenseSourceTypePass", "AuthDefenseSourceTypeWechatAccountsPlatform", "AuthDefenseSourceTypeGithub", "AuthDefenseSourceTypeCAS", "AuthDefenseSourceTypeOIDC", "AuthDefenseSourceTypeDingtalk", "AuthDefenseSourceTypeQYWeixin", "AuthDefenseSourceTypeLDAP", "AuthDefenseSourceTypeMax" ] }, "model.AuthDefenseSourceUserStatus": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseSourceUserStatusReview", "AuthDefenseSourceUserStatusApproved", "AuthDefenseSourceUserStatusDenied" ] }, "model.AuthDefenseUserReviewStatus": { "type": "integer", "enum": [ 0, 1, 2 ], "x-enum-varnames": [ "AuthDefenseUserReviewStatusReview", "AuthDefenseUserReviewStatusAllow", "AuthDefenseUserReviewStatusDeny" ] }, "model.AuthDefenseUserSiteStatus": { "type": "integer", "enum": [ 0, 1, 2, 3 ], "x-enum-varnames": [ "AuthDefenseUserSiteStatusUnknown", "AuthDefenseUserSiteStatusAllow", "AuthDefenseUserSiteStatusDeny", "AuthDefenseUserSiteStatusMax" ] }, "model.AuthDefenseVerifyStatus": { "type": "integer", "format": "int64", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "AuthDefenseVerifyFail", "AuthDefenseVerifyStatusSuccess", "AuthDefenseVerifyStatusReject", "AuthDefenseVerifyStatusPending", "AuthDefenseVerifyStatusReview" ] }, "model.CASConfig": { "type": "object", "properties": { "mapping": { "description": "角色和 cas 服务关系映射", "type": "object", "additionalProperties": { "$ref": "#/definitions/consts.UserRole" } }, "role_key": { "description": "获取 角色 的 key", "type": "string" }, "url": { "description": "cas 服务地址", "type": "string" }, "version": { "description": "cas 版本", "type": "integer" } } }, "model.Chaos": { "type": "object", "properties": { "created_at": { "type": "string" }, "html_encryption": { "type": "boolean" }, "html_fast_decryption": { "type": "boolean" }, "id": { "type": "integer" }, "img_encryption": { "type": "boolean" }, "img_text": { "type": "string" }, "img_watermark": { "type": "string" }, "is_enabled": { "type": "boolean" }, "js_encryption": { "type": "boolean" }, "js_path": { "type": "array", "items": { "type": "string" } }, "name": { "type": "string" }, "updated_at": { "type": "string" }, "website_id": { "type": "integer" } } }, "model.CommonColor": { "type": "object", "properties": { "font_color": { "type": "string" }, "light_font_color": { "type": "string" }, "light_primary_color": { "type": "string" }, "primary_color": { "type": "string" }, "success_color": { "type": "string" } } }, "model.CustomerService": { "type": "object", "properties": { "pages": { "type": "array", "items": { "type": "string" } }, "type": { "description": "1 全局显示 2 全局隐藏 3 部分隐藏", "type": "integer" } } }, "model.DetectLog": { "type": "object", "properties": { "action": { "description": "0: 放行, 1: 阻断", "type": "integer" }, "attack_type": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "decode_path": { "type": "string" }, "dst_ip": { "type": "string" }, "dst_port": { "type": "integer" }, "eventId": { "type": "string" }, "event_id": { "description": "to eliminate ambiguous", "type": "string" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ja4_fingerprint": { "type": "string" }, "lat": { "type": "string" }, "lng": { "type": "string" }, "location": { "type": "string" }, "method": { "type": "string" }, "module": { "type": "string" }, "payload": { "type": "string" }, "policy_name": { "type": "string" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "query_string": { "type": "string" }, "reason": { "type": "string" }, "req_body": { "type": "string" }, "req_header": { "type": "string" }, "risk_level": { "type": "integer" }, "rsp_body": { "type": "string" }, "rsp_header": { "type": "string" }, "rule_id": { "type": "string" }, "rule_id_list": { "type": "array", "items": { "type": "string" } }, "short_rule_id": { "type": "string" }, "site_uuid": { "type": "string" }, "socket_ip": { "type": "string" }, "src_ip": { "type": "string" }, "src_port": { "type": "integer" }, "status_code": { "type": "integer" }, "timestamp": { "type": "integer" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "website": { "type": "string" } } }, "model.DingTalkConfig": { "type": "object", "properties": { "sign": { "type": "string" }, "url": { "type": "string" } } }, "model.DiscordConfig": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.ErrorColor": { "type": "object", "properties": { "warning_color": { "type": "string" }, "warning_font_color": { "type": "string" }, "warning_light_font_color": { "type": "string" } } }, "model.FeishuConfig": { "type": "object", "properties": { "sign": { "type": "string" }, "url": { "type": "string" } } }, "model.ForwardingRule": { "type": "object", "properties": { "comment": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "path_prefix": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "model.ForwardingRuleConfig": { "type": "object", "properties": { "id": { "type": "integer" }, "path_prefix": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "model.GlobalProxyConfig": { "type": "object", "properties": { "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "model.HttpHeader": { "type": "object", "properties": { "key": { "type": "string" }, "op": { "type": "string" }, "target": { "type": "string" }, "val": { "type": "string" } } }, "model.Intelligence": { "type": "object", "properties": { "ip_group_id": { "type": "integer" }, "policy_rule_id": { "type": "integer" }, "share_enabled": { "type": "boolean" }, "updated_at": { "type": "string" }, "use_commercial_lib": { "type": "boolean" } } }, "model.JsonObject-model_AlarmEvent": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AlarmEvent" } } }, "model.JsonObject-model_AlarmPlatform": { "type": "object", "properties": { "data": { "$ref": "#/definitions/model.AlarmPlatform" } } }, "model.LoadBalanceConfig": { "type": "object", "properties": { "balance_type": { "type": "integer" } } }, "model.LoginMethod": { "type": "object", "required": [ "type" ], "properties": { "cas": { "$ref": "#/definitions/model.CASConfig" }, "oauth": { "$ref": "#/definitions/model.OauthConfig" }, "type": { "type": "integer", "maximum": 3 } } }, "model.ManagerInfo": { "type": "object", "properties": { "common_color": { "$ref": "#/definitions/model.CommonColor" }, "error_color": { "$ref": "#/definitions/model.ErrorColor" }, "manager_info": { "type": "string" }, "page_manager_info": { "type": "object", "additionalProperties": { "type": "string" } } } }, "model.MatchCondition": { "type": "object", "properties": { "field": { "description": "匹配字段", "type": "string" }, "operator": { "description": "操作符", "allOf": [ { "$ref": "#/definitions/model.MatchOperator" } ] }, "value": { "description": "匹配值数组,数组中的值为或关系", "type": "array", "items": { "type": "string" } } } }, "model.MatchOperator": { "type": "string", "enum": [ "eq", "not_eq", "has", "not_has", "prefix", "re" ], "x-enum-comments": { "OperatorContains": "包含", "OperatorEqual": "等于", "OperatorNotContains": "不包含", "OperatorNotEqual": "不等于", "OperatorRegex": "正则匹配", "OperatorStartsWith": "前缀匹配" }, "x-enum-descriptions": [ "等于", "不等于", "包含", "不包含", "前缀匹配", "正则匹配" ], "x-enum-varnames": [ "OperatorEqual", "OperatorNotEqual", "OperatorContains", "OperatorNotContains", "OperatorStartsWith", "OperatorRegex" ] }, "model.NetworkProxy": { "type": "object", "properties": { "password": { "type": "string" }, "url": { "type": "string" }, "username": { "type": "string" } } }, "model.OauthConfig": { "type": "object", "properties": { "client_id": { "description": "客户端 ID", "type": "string" }, "client_secret": { "description": "客户端密钥", "type": "string" }, "mapping": { "description": "角色和 cas 服务关系映射", "type": "object", "additionalProperties": { "$ref": "#/definitions/consts.UserRole" } }, "role_key": { "description": "获取 角色 的 key", "type": "string" }, "scope": { "description": "作用域", "type": "string" }, "url": { "description": "oauth 服务地址", "type": "string" } } }, "model.PasswordChar": { "type": "integer", "enum": [ 0, 1, 2, 3, 4 ], "x-enum-varnames": [ "PasswordCharDigit", "PasswordCharSymbol", "PasswordCharUpper", "PasswordCharLower", "PasswordCharMax" ] }, "model.PasswordConfig": { "type": "object", "properties": { "title": { "type": "string" } } }, "model.PolicyAction": { "type": "integer", "enum": [ 0, 1, 2, 3, 4, 5, 999, 999 ], "x-enum-varnames": [ "PolicyActionAllow", "PolicyActionDeny", "PolicyActionChallenge", "PolicyActionAuthDefense", "PolicyActionChaos", "PolicyActionWaitingRoom", "PolicyActionMix", "PolicyActionMax" ] }, "model.PolicyAuth": { "type": "object", "properties": { "cas": { "$ref": "#/definitions/model.PolicyAuthCAS" }, "ldap": { "$ref": "#/definitions/model.PolicyAuthLDAP" }, "oauth2": { "$ref": "#/definitions/model.PolicyAuthOauth2" } } }, "model.PolicyAuthCAS": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.PolicyAuthLDAP": { "type": "object", "properties": { "base_dn": { "type": "string" }, "bind_dn": { "type": "string" }, "bind_pass": { "type": "string" }, "filter": { "type": "string" }, "url": { "type": "string" } } }, "model.PolicyAuthOauth2": { "type": "object", "properties": { "app_id": { "type": "string" }, "app_secret": { "type": "string" }, "extra": { "type": "object", "additionalProperties": { "type": "string" } }, "provider": { "type": "string" } } }, "model.PolicyReview": { "type": "integer", "enum": [ 0, 1 ], "x-enum-varnames": [ "PolicyReviewRequired", "PolicyReviewNone" ] }, "model.PolicyUser": { "type": "object", "properties": { "password": { "type": "string" }, "username": { "type": "string" } } }, "model.PortalConfig": { "type": "object", "properties": { "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "cert_id": { "type": "integer" }, "domain": { "type": "string" }, "enable": { "type": "boolean" }, "port": { "description": "Deprecated", "type": "integer" }, "ports": { "type": "array", "items": { "type": "string" } }, "tfa_enabled": { "type": "boolean" } } }, "model.PortalStyle": { "type": "object", "properties": { "app_arrange": { "type": "string" }, "icon": { "type": "string" }, "theme": { "type": "string" }, "title": { "type": "string" } } }, "model.ProxyConfig": { "type": "object", "properties": { "br": { "$ref": "#/definitions/model.ProxyItem-bool" }, "created_at": { "type": "string" }, "default_server": { "$ref": "#/definitions/model.ProxyItem-bool" }, "force_https": { "$ref": "#/definitions/model.ProxyItem-bool" }, "global": { "$ref": "#/definitions/model.GlobalProxyConfig" }, "gzip": { "$ref": "#/definitions/model.ProxyItem-bool" }, "host": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_max_age": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts_preload": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_sub": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http2": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http3": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_1.0": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_headers": { "$ref": "#/definitions/model.ProxyItem-model_HttpHeaders" }, "id": { "type": "integer" }, "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ip_value": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ntlm": { "$ref": "#/definitions/model.ProxyItem-bool" }, "reset_xff": { "$ref": "#/definitions/model.ProxyItem-bool" }, "site_id": { "type": "integer" }, "sse": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "description": "SSLMode ProxyItem[string] `gorm:\"column:ssl_mode;type:jsonb;\" json:\"ssl_mode\"`", "allOf": [ { "$ref": "#/definitions/model.ProxyItem-string" } ] }, "updated_at": { "type": "string" }, "xfh": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfp": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "model.ProxyItem-bool": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "boolean" } } }, "model.ProxyItem-model_HttpHeaders": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "array", "items": { "$ref": "#/definitions/model.HttpHeader" } } } }, "model.ProxyItem-string": { "type": "object", "properties": { "global": { "type": "boolean" }, "value": { "type": "string" } } }, "model.QiyeWeixinConfig": { "type": "object", "properties": { "url": { "type": "string" } } }, "model.ReceiverConfig": { "type": "object", "properties": { "host": { "type": "string" }, "label": { "type": "string" }, "log_types": { "type": "array", "items": { "type": "string" } }, "port": { "type": "integer" }, "protocol": { "type": "string" }, "rfc": { "type": "string" }, "type": { "type": "string" } } }, "model.ReportData": { "type": "object", "properties": { "access": { "$ref": "#/definitions/model.ReportDataAccess" }, "attack": { "$ref": "#/definitions/model.ReportDataAttack" }, "count": { "$ref": "#/definitions/model.ReportDataCount" }, "geo": { "$ref": "#/definitions/model.ReportDataGeo" }, "trend": { "$ref": "#/definitions/model.ReportDataTrend" } } }, "model.ReportDataAccess": { "type": "object", "properties": { "domain": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "page": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } } } }, "model.ReportDataAttack": { "type": "object", "properties": { "domain": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "page": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "src_ip": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataAttackGeoItem" } }, "type": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } }, "website": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataCountItem" } } } }, "model.ReportDataAttackGeoItem": { "type": "object", "properties": { "city": { "type": "string" }, "count": { "type": "integer" }, "country": { "type": "string" }, "key": { "type": "string" }, "province": { "type": "string" } } }, "model.ReportDataCount": { "type": "object", "properties": { "intercept": { "type": "integer" }, "ip": { "type": "integer" }, "request": { "type": "integer" }, "uv": { "type": "integer" }, "website": { "type": "integer" } } }, "model.ReportDataCountItem": { "type": "object", "properties": { "count": { "type": "integer" }, "key": { "type": "string" } } }, "model.ReportDataGeo": { "type": "object", "properties": { "intercept_country": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "intercept_province": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "request_country": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } }, "request_province": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataGeoItem" } } } }, "model.ReportDataGeoItem": { "type": "object", "properties": { "count": { "type": "integer" }, "location": { "type": "string" } } }, "model.ReportDataTrend": { "type": "object", "properties": { "acl": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "attack": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "auth_defense": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "black_white": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "challenge": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "intercept": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "request": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } }, "waiting_room": { "type": "array", "items": { "$ref": "#/definitions/model.ReportDataTrendItem" } } } }, "model.ReportDataTrendItem": { "type": "object", "properties": { "count": { "type": "integer" }, "trend_time": { "type": "integer" } } }, "model.Resource": { "type": "object", "properties": { "content_length": { "type": "integer" }, "content_type": { "type": "string" }, "created_at": { "type": "string" }, "id": { "type": "integer" }, "method": { "type": "string" }, "path": { "description": "resource content", "type": "string" }, "req_header": { "type": "string" }, "req_today": { "type": "integer" }, "response_time": { "type": "integer" }, "site_id": { "type": "integer" }, "status_code": { "type": "integer" }, "updated_at": { "type": "string" } } }, "model.RuleCondition": { "type": "object", "properties": { "condition": { "description": "匹配条件", "allOf": [ { "$ref": "#/definitions/model.MatchCondition" } ] }, "strategy": { "description": "策略名称", "type": "string" } } }, "model.RuleDetectLog": { "type": "object", "properties": { "action": { "description": "0: 放行, 1: 阻断", "type": "integer" }, "attack_type": { "type": "integer" }, "city": { "type": "string" }, "country": { "type": "string" }, "created_at": { "type": "string" }, "decode_path": { "type": "string" }, "dst_ip": { "type": "string" }, "dst_port": { "type": "integer" }, "eventId": { "type": "string" }, "event_id": { "description": "to eliminate ambiguous", "type": "string" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ja4_fingerprint": { "type": "string" }, "lat": { "type": "string" }, "lng": { "type": "string" }, "location": { "type": "string" }, "method": { "type": "string" }, "module": { "type": "string" }, "payload": { "type": "string" }, "policy_name": { "type": "string" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "query_string": { "type": "string" }, "reason": { "type": "string" }, "req_body": { "type": "string" }, "req_header": { "type": "string" }, "risk_level": { "type": "integer" }, "rsp_body": { "type": "string" }, "rsp_header": { "type": "string" }, "rule_id": { "type": "string" }, "rule_id_list": { "type": "array", "items": { "type": "string" } }, "short_rule_id": { "type": "string" }, "site_uuid": { "type": "string" }, "socket_ip": { "type": "string" }, "src_ip": { "type": "string" }, "src_port": { "type": "integer" }, "status_code": { "type": "integer" }, "timestamp": { "type": "integer" }, "updated_at": { "type": "string" }, "url_path": { "type": "string" }, "website": { "type": "string" } } }, "model.RulePattern": { "type": "object", "properties": { "k": { "type": "string" }, "op": { "type": "string" }, "sub_k": { "type": "string" }, "v": { "type": "array", "items": { "type": "string" } } } }, "model.SemanticConfig": { "type": "object", "additionalProperties": { "type": "string" } }, "model.SiteExcludes": { "type": "object", "properties": { "content_types": { "type": "array", "items": { "type": "string" } }, "prefixes": { "type": "array", "items": { "type": "string" } } } }, "model.SkynetMoudle": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "semantics": { "$ref": "#/definitions/model.SemanticConfig" }, "site_id": { "type": "integer" }, "updated_at": { "type": "string" } } }, "model.TelegramConfig": { "type": "object", "properties": { "chat_id": { "type": "integer" }, "token": { "type": "string" } } }, "model.TimeUnit": { "type": "string", "enum": [ "day", "hour", "minute" ], "x-enum-varnames": [ "TimeUnitDay", "TimeUnitHour", "TimeUnitMinute" ] }, "model.WaitingRoom": { "type": "object", "properties": { "created_at": { "type": "string" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "max_concurrent": { "description": "当前允许最大同时在线的人数", "type": "integer" }, "max_waiting": { "description": "当前允许最大同时排队的人数", "type": "integer" }, "name": { "type": "string" }, "session_timeout": { "description": "服务队列中 session 的存活周期", "type": "integer" }, "updated_at": { "type": "string" }, "website_id": { "type": "integer" } } }, "model.WebsiteResource": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/model.Resource" } }, "total": { "type": "integer" } } }, "policy.DeletePolicyReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "policy.GetPolicyRes": { "type": "object", "properties": { "action": { "description": "0 -\u003e allow, 1 -\u003e deny", "allOf": [ { "$ref": "#/definitions/model.PolicyAction" } ] }, "auth_callback": { "type": "string" }, "auth_rule": { "type": "integer" }, "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "black_rule": { "type": "integer" }, "builtin": { "type": "boolean" }, "captcha_rule": { "type": "integer" }, "cloud_id": { "type": "integer" }, "cloud_total": { "type": "integer" }, "compatible": { "type": "integer" }, "created_at": { "type": "string" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "negate": { "type": "boolean" }, "pass_count": { "type": "integer" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "replay": { "type": "boolean" }, "req_count": { "type": "integer" }, "review": { "$ref": "#/definitions/model.PolicyReview" }, "tfa_enabled": { "type": "boolean" }, "updated_at": { "type": "string" }, "white_rule": { "type": "integer" } } }, "policy.ListPolicyRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/policy.GetPolicyRes" } }, "total": { "type": "integer" } } }, "policy.PostPolicyReq": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.PolicyAction" }, "expire": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } } } }, "policy.PutPolicyReq": { "type": "object", "properties": { "action": { "$ref": "#/definitions/model.PolicyAction" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "is_enabled": { "type": "boolean" }, "level": { "type": "integer" }, "log": { "type": "boolean" }, "name": { "type": "string" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } } } }, "policy.PutPolicySwitchReq": { "type": "object", "properties": { "id": { "type": "integer" }, "is_enabled": { "type": "boolean" } } }, "portal.GetAuthSourceItem": { "type": "object", "properties": { "id": { "type": "integer" }, "type": { "$ref": "#/definitions/model.AuthDefenseSourceType" } } }, "portal.GetRes": { "type": "object", "properties": { "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "auth_sources": { "type": "array", "items": { "$ref": "#/definitions/portal.GetAuthSourceItem" } }, "cert_id": { "type": "integer" }, "domain": { "type": "string" }, "enable": { "type": "boolean" }, "ports": { "type": "array", "items": { "type": "string" } }, "tfa_enabled": { "type": "boolean" } } }, "portal.PutProxyConfigReq": { "type": "object", "properties": { "force_https": { "type": "boolean" } } }, "proxy.Config": { "type": "object", "properties": { "br": { "$ref": "#/definitions/model.ProxyItem-bool" }, "default_server": { "$ref": "#/definitions/model.ProxyItem-bool" }, "force_https": { "$ref": "#/definitions/model.ProxyItem-bool" }, "gzip": { "$ref": "#/definitions/model.ProxyItem-bool" }, "host": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_max_age": { "$ref": "#/definitions/model.ProxyItem-string" }, "hsts_preload": { "$ref": "#/definitions/model.ProxyItem-bool" }, "hsts_sub": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http2": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http3": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_1.0": { "$ref": "#/definitions/model.ProxyItem-bool" }, "http_headers": { "$ref": "#/definitions/model.ProxyItem-model_HttpHeaders" }, "ip_source": { "$ref": "#/definitions/model.ProxyItem-string" }, "ip_value": { "$ref": "#/definitions/model.ProxyItem-string" }, "ipv6": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ntlm": { "$ref": "#/definitions/model.ProxyItem-bool" }, "reset_xff": { "$ref": "#/definitions/model.ProxyItem-bool" }, "sse": { "$ref": "#/definitions/model.ProxyItem-bool" }, "ssl_ciphers": { "$ref": "#/definitions/model.ProxyItem-string" }, "ssl_protocols": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfh": { "$ref": "#/definitions/model.ProxyItem-string" }, "xfp": { "$ref": "#/definitions/model.ProxyItem-string" } } }, "record.Event": { "type": "object", "properties": { "city": { "type": "string" }, "country": { "type": "string" }, "deny_count": { "type": "integer" }, "dst_port": { "type": "integer" }, "end_at": { "type": "integer" }, "finished": { "type": "boolean" }, "host": { "type": "string" }, "id": { "type": "integer" }, "ip": { "type": "string" }, "pass_count": { "type": "integer" }, "protocol": { "type": "integer" }, "province": { "type": "string" }, "start_at": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "record.EventListRes": { "type": "object", "properties": { "nodes": { "type": "array", "items": { "$ref": "#/definitions/record.Event" } }, "total": { "type": "integer" } } }, "record.GetDetectLogListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.DetectLog" } }, "total": { "type": "integer" } } }, "record.GetRuleDetectLogListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/model.RuleDetectLog" } }, "total": { "type": "integer" } } }, "report.CreateReq": { "type": "object", "required": [ "name" ], "properties": { "begin_time": { "type": "integer" }, "end_time": { "type": "integer" }, "name": { "type": "string" } } }, "report.GetRes": { "type": "object", "properties": { "begin_time": { "type": "integer" }, "created_at": { "type": "integer" }, "data": { "$ref": "#/definitions/model.ReportData" }, "end_time": { "type": "integer" }, "error": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "state": { "type": "string" } } }, "report.ListItem": { "type": "object", "properties": { "created_at": { "type": "integer" }, "error": { "type": "string" }, "id": { "type": "integer" }, "name": { "type": "string" }, "state": { "type": "string" } } }, "report.ListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/report.ListItem" } }, "total": { "type": "integer" } } }, "resource.RemoveReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "resource.UpdateExcludesReq": { "type": "object", "properties": { "content_types": { "type": "array", "items": { "type": "string" } }, "prefixes": { "type": "array", "items": { "type": "string" } } } }, "response.JSONBody": { "type": "object", "properties": { "data": {}, "err": { "type": "string" }, "msg": { "type": "string" } } }, "river.Edition": { "type": "integer", "format": "int32", "enum": [ 0, 1, 2, 3 ], "x-enum-comments": { "Edition_EDITION_ENTERPRISE": "企业版", "Edition_EDITION_LITE": "Lite 版", "Edition_EDITION_PROFESSIONAL": "专业版", "Edition_EDITION_UNKOWN": "未知" }, "x-enum-descriptions": [ "未知", "专业版", "企业版", "Lite 版" ], "x-enum-varnames": [ "Edition_EDITION_UNKOWN", "Edition_EDITION_PROFESSIONAL", "Edition_EDITION_ENTERPRISE", "Edition_EDITION_LITE" ] }, "safepoint.PostConsultReq": { "type": "object", "properties": { "apps": { "type": "array", "items": { "type": "string" } }, "company": { "type": "string" }, "email": { "type": "string" }, "location": { "type": "string" }, "message": { "type": "string" }, "name": { "type": "string" }, "phone": { "type": "string" }, "purpose": { "type": "string" } } }, "securityposture.Event": { "type": "object", "properties": { "end": { "type": "integer" }, "host": { "type": "string" }, "ip": { "type": "string" }, "port": { "type": "string" }, "start": { "type": "integer" } } }, "securityposture.RealtimeEvent": { "type": "object", "properties": { "attack_type": { "type": "string" }, "event": { "$ref": "#/definitions/securityposture.Event" }, "event_type": { "type": "integer" }, "site_id": { "type": "integer" }, "site_name": { "type": "string" }, "time_stamp": { "type": "integer" } } }, "securityposture.RealtimeResponse": { "type": "object", "properties": { "event": { "type": "array", "items": { "$ref": "#/definitions/securityposture.RealtimeEvent" } } } }, "securityposture.SetSiteSecurityPostureBody": { "type": "object", "properties": { "enabled": { "type": "boolean" }, "site_id": { "type": "integer" } } }, "securityposture.StatisticsResponse": { "type": "object", "properties": { "acl_hit": { "type": "integer" }, "anti_tamper": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "attack_allow": { "type": "integer" }, "attack_deny": { "type": "integer" }, "auth_allow": { "type": "integer" }, "auth_deny": { "type": "integer" }, "black_allow": { "type": "integer" }, "black_deny": { "type": "integer" }, "black_hit": { "type": "integer" }, "challenge_allow": { "type": "integer" }, "challenge_deny": { "type": "integer" }, "waiting_hit": { "type": "integer" }, "white_hit": { "type": "integer" } } }, "securityposture.TrendsQueryType": { "type": "string", "enum": [ "attack", "black_white", "acl", "challenge", "waiting", "auth", "attack_type", "black_white_rule", "attack_host", "attack_page" ], "x-enum-varnames": [ "TrendsQueryTypeAttack", "TrendsQueryTypeBlackWhite", "TrendsQueryTypeACL", "TrendsQueryTypeChallenge", "TrendsQueryTypeWaiting", "TrendsQueryTypeAuth", "TrendsQueryTypeAttackType", "TrendsQueryTypeBlackWhiteRule", "TrendsQueryTypeAttackHost", "TrendsQueryTypeAttackPage" ] }, "securityposture.TrendsResponse": { "type": "object", "properties": { "item": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "pass": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } }, "top": { "type": "array", "items": { "type": "object", "additionalProperties": { "type": "string" } } } } }, "site.AddStaticReq": { "type": "object", "required": [ "path" ], "properties": { "dir": { "type": "boolean" }, "page": { "type": "string" }, "path": { "type": "string" }, "zip": { "type": "boolean" } } }, "site.AntiTamperCreateReq": { "type": "object", "properties": { "resource_ids": { "type": "array", "items": { "type": "integer" } } } }, "site.AntiTamperDetailRes": { "type": "object", "properties": { "cache_sha256": { "type": "string" }, "cache_size": { "type": "integer" }, "cache_time": { "type": "integer" }, "change_sha256": { "type": "string" }, "change_size": { "type": "integer" }, "change_time": { "type": "integer" }, "changed": { "type": "boolean" }, "content_type": { "type": "string" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "path": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "site.AntiTamperListData": { "type": "object", "properties": { "cache_time": { "type": "integer" }, "changed": { "type": "boolean" }, "created_at": { "type": "integer" }, "id": { "type": "integer" }, "path": { "type": "string" }, "site_id": { "type": "integer" }, "updated_at": { "type": "integer" } } }, "site.AntiTamperListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.AntiTamperListData" } }, "refresh_state": { "type": "string" }, "refresh_time": { "type": "integer" } } }, "site.CreateGroupReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "site.DeleteStaticReq": { "type": "object", "required": [ "path" ], "properties": { "path": { "type": "string" } } }, "site.DeleteWebsiteReq": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } } } }, "site.GetWebsiteDetailRes": { "type": "object", "properties": { "access_log_limit": { "type": "integer" }, "acl_enabled": { "type": "boolean" }, "acl_response_html_path": { "type": "string" }, "acl_response_status_code": { "type": "integer" }, "auth_defense_id": { "type": "integer" }, "bad_gateway_html_path": { "type": "string" }, "bad_gateway_status_code": { "type": "integer" }, "cc_bot": { "type": "boolean" }, "cert_filename": { "description": "3.5.0 存储时废弃,tcd通信时仍使用", "type": "string" }, "cert_id": { "type": "integer" }, "cert_type": { "description": "0 -\u003e no cert, 1 -\u003e upload, 2 -\u003e self-signed, 3 -\u003e choose mgt cert\nCertType 3.5.0 存储时废弃", "type": "integer" }, "challenge_id": { "type": "integer" }, "chaos_id": { "type": "integer" }, "chaos_is_enabled": { "type": "boolean" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } }, "denied_value": { "type": "integer" }, "email": { "type": "string" }, "error_log_limit": { "type": "integer" }, "exclude_content_type": { "type": "array", "items": { "type": "string" } }, "exclude_paths": { "type": "array", "items": { "type": "string" } }, "forbidden_html_path": { "type": "string" }, "forbidden_status_code": { "type": "integer" }, "forwarding_rules": { "description": "ForwardingRules 转发规则配置(非数据库字段,用于传输到 tcd)", "type": "array", "items": { "$ref": "#/definitions/model.ForwardingRuleConfig" } }, "gateway_timeout_html_path": { "type": "string" }, "gateway_timeout_status_code": { "type": "integer" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "health_state": { "type": "object", "additionalProperties": { "$ref": "#/definitions/site.HealthState" } }, "icon": { "type": "string" }, "id": { "type": "integer" }, "index": { "type": "string" }, "init": { "type": "boolean" }, "is_enabled": { "type": "boolean" }, "key_filename": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "mode": { "description": "0 -\u003e defense, 1-\u003e offline, 2 -\u003e dry run", "type": "integer" }, "not_found_html_path": { "type": "string" }, "not_found_status_code": { "type": "integer" }, "offline_html_path": { "type": "string" }, "offline_status_code": { "type": "integer" }, "portal": { "type": "boolean" }, "portal_redirect": { "type": "string" }, "ports": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer" }, "redirect_status_code": { "type": "integer" }, "req_value": { "type": "integer" }, "semantics": { "type": "boolean" }, "server_names": { "type": "array", "items": { "type": "string" } }, "sp_enabled": { "description": "是否开启安全态势", "type": "boolean" }, "stat_enabled": { "description": "是否开启统计", "type": "boolean" }, "static": { "type": "boolean" }, "static_default": { "type": "integer" }, "tamper_refresh": { "description": "防篡改刷新时间(毫秒)", "type": "integer" }, "tamper_refresh_state": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } }, "wr_id": { "type": "integer" } } }, "site.GetWebsiteItem": { "type": "object", "properties": { "access_log_limit": { "type": "integer" }, "acl_enabled": { "type": "boolean" }, "acl_response_html_path": { "type": "string" }, "acl_response_status_code": { "type": "integer" }, "auth_defense_id": { "type": "integer" }, "bad_gateway_html_path": { "type": "string" }, "bad_gateway_status_code": { "type": "integer" }, "cc_bot": { "type": "boolean" }, "cert_filename": { "description": "3.5.0 存储时废弃,tcd通信时仍使用", "type": "string" }, "cert_id": { "type": "integer" }, "cert_type": { "description": "0 -\u003e no cert, 1 -\u003e upload, 2 -\u003e self-signed, 3 -\u003e choose mgt cert\nCertType 3.5.0 存储时废弃", "type": "integer" }, "challenge_id": { "type": "integer" }, "chaos_id": { "type": "integer" }, "chaos_is_enabled": { "type": "boolean" }, "comment": { "type": "string" }, "created_at": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } }, "denied_value": { "type": "integer" }, "email": { "type": "string" }, "error_log_limit": { "type": "integer" }, "exclude_content_type": { "type": "array", "items": { "type": "string" } }, "exclude_paths": { "type": "array", "items": { "type": "string" } }, "forbidden_html_path": { "type": "string" }, "forbidden_status_code": { "type": "integer" }, "forwarding_rules": { "description": "ForwardingRules 转发规则配置(非数据库字段,用于传输到 tcd)", "type": "array", "items": { "$ref": "#/definitions/model.ForwardingRuleConfig" } }, "gateway_timeout_html_path": { "type": "string" }, "gateway_timeout_status_code": { "type": "integer" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "health_state": { "type": "object", "additionalProperties": { "$ref": "#/definitions/site.HealthState" } }, "icon": { "type": "string" }, "id": { "type": "integer" }, "index": { "type": "string" }, "init": { "type": "boolean" }, "is_enabled": { "type": "boolean" }, "key_filename": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "mode": { "description": "0 -\u003e defense, 1-\u003e offline, 2 -\u003e dry run", "type": "integer" }, "not_found_html_path": { "type": "string" }, "not_found_status_code": { "type": "integer" }, "offline_html_path": { "type": "string" }, "offline_status_code": { "type": "integer" }, "portal": { "type": "boolean" }, "portal_redirect": { "type": "string" }, "ports": { "type": "array", "items": { "type": "string" } }, "position": { "type": "integer" }, "redirect_status_code": { "type": "integer" }, "req_value": { "type": "integer" }, "semantics": { "type": "boolean" }, "server_names": { "type": "array", "items": { "type": "string" } }, "sp_enabled": { "description": "是否开启安全态势", "type": "boolean" }, "stat_enabled": { "description": "是否开启统计", "type": "boolean" }, "static": { "type": "boolean" }, "static_default": { "type": "integer" }, "tamper_refresh": { "description": "防篡改刷新时间(毫秒)", "type": "integer" }, "tamper_refresh_state": { "type": "string" }, "title": { "type": "string" }, "type": { "type": "integer" }, "updated_at": { "type": "string" }, "upstreams": { "type": "array", "items": { "type": "string" } }, "wr_id": { "type": "integer" } } }, "site.GetWebsiteRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.GetWebsiteItem" } }, "total": { "type": "integer" } } }, "site.GroupSwitchReq": { "type": "object", "properties": { "enable": { "type": "boolean" } } }, "site.HealthState": { "type": "object", "properties": { "error": { "type": "string" }, "state": { "type": "integer" } } }, "site.ListGroupItem": { "type": "object", "properties": { "id": { "type": "integer" }, "name": { "type": "string" }, "position": { "type": "integer" }, "site_count": { "type": "integer" } } }, "site.ListGroupRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.ListGroupItem" } } } }, "site.ListLogItem": { "type": "object", "properties": { "filename": { "type": "string" }, "size": { "type": "integer" } } }, "site.NginxConfigGetRes": { "type": "object", "properties": { "config": { "type": "string" }, "custom_location": { "type": "array", "items": { "type": "string" } } } }, "site.NginxConfigUpdateReq": { "type": "object", "properties": { "custom_location": { "type": "array", "items": { "type": "string" } } } }, "site.PostWebsiteHealthcheckReq": { "type": "object", "properties": { "hosts": { "type": "array", "items": { "type": "string" } }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "site.PubWebsiteChallengeReq": { "type": "object", "properties": { "enable": { "type": "boolean" }, "expire": { "type": "integer" }, "id": { "type": "integer" }, "level": { "type": "integer" }, "negate": { "type": "boolean" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "replay": { "type": "boolean" } } }, "site.PutWebsiteBasicInfoReq": { "type": "object", "properties": { "comment": { "type": "string" }, "group_id": { "type": "integer" }, "icon": { "type": "string" } } }, "site.PutWebsiteDefenseReq": { "type": "object", "properties": { "auth_callback": { "type": "string" }, "auth_source_ids": { "type": "array", "items": { "type": "integer" } }, "enable": { "type": "boolean" }, "id": { "type": "integer" }, "negate": { "type": "boolean" }, "pattern": { "type": "array", "items": { "type": "array", "items": { "$ref": "#/definitions/model.RulePattern" } } }, "portal_redirect": { "type": "string" }, "review": { "maximum": 1, "minimum": 0, "allOf": [ { "$ref": "#/definitions/model.PolicyReview" } ] }, "tfa_enabled": { "type": "boolean" } } }, "site.PutWebsiteModeRequest": { "type": "object", "properties": { "ids": { "type": "array", "items": { "type": "integer" } }, "mode": { "type": "integer" } } }, "site.RenameStaticReq": { "type": "object", "required": [ "new_path", "old_path" ], "properties": { "copy": { "type": "boolean" }, "new_path": { "type": "string" }, "old_path": { "type": "string" } } }, "site.SetWebsiteWaitingRoomReq": { "type": "object", "properties": { "is_enabled": { "type": "boolean" }, "max_concurrent": { "description": "当前允许最大同时在线的人数", "type": "integer" }, "session_timeout": { "description": "服务队列中 session 的存活周期", "type": "integer" } } }, "site.SortGroupReq": { "type": "object", "required": [ "position" ], "properties": { "position": { "type": "integer", "minimum": 1 } } }, "site.SortWebsiteReq": { "type": "object", "required": [ "position" ], "properties": { "position": { "type": "integer", "minimum": 1 } } }, "site.UpdateGroupReq": { "type": "object", "required": [ "name" ], "properties": { "name": { "type": "string" } } }, "site.UpdateSiteGroupReq": { "type": "object", "required": [ "group_id" ], "properties": { "group_id": { "type": "integer" } } }, "site.WaitingRoomLog": { "type": "object", "properties": { "avg_wait_sec": { "type": "integer" }, "bounce_rate": { "type": "number" }, "cur_waiting": { "type": "integer" }, "dur_sec": { "type": "integer" }, "ended_at": { "type": "integer" }, "max_concurrent": { "type": "integer" }, "rule_id": { "type": "integer" }, "site_comment": { "type": "string" }, "site_icon": { "type": "string" }, "site_id": { "type": "integer" }, "site_server_names": { "type": "array", "items": { "type": "string" } }, "site_title": { "type": "string" }, "started_at": { "type": "integer" }, "top_waiting": { "type": "integer" }, "total_waiting": { "type": "integer" } } }, "site.WaitingRoomLogs": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/site.WaitingRoomLog" } }, "total": { "type": "integer" } } }, "site.WebsiteChaosReq": { "type": "object", "properties": { "html_encryption": { "type": "boolean" }, "html_fast_decryption": { "type": "boolean" }, "img_encryption": { "type": "boolean" }, "img_text": { "type": "string" }, "img_watermark": { "type": "string" }, "is_enabled": { "type": "boolean" }, "js_encryption": { "type": "boolean" }, "js_path": { "type": "array", "items": { "type": "string" } } } }, "site.WebsiteReq": { "type": "object", "properties": { "cert_id": { "type": "integer" }, "comment": { "type": "string" }, "email": { "type": "string" }, "group_id": { "type": "integer" }, "health_check": { "type": "boolean" }, "id": { "type": "integer" }, "index": { "type": "string" }, "load_balance": { "$ref": "#/definitions/model.LoadBalanceConfig" }, "ports": { "type": "array", "items": { "type": "string" } }, "redirect_status_code": { "type": "integer" }, "server_names": { "type": "array", "items": { "type": "string" } }, "stat_enabled": { "type": "boolean" }, "static_default": { "type": "integer" }, "type": { "type": "integer" }, "upstreams": { "type": "array", "items": { "type": "string" } } } }, "skynet.GetGlobalSemanticsRes": { "type": "object", "properties": { "semantics": { "$ref": "#/definitions/model.SemanticConfig" } } }, "skynet.SemanticsConfigParams": { "type": "object", "required": [ "semantics" ], "properties": { "semantics": { "$ref": "#/definitions/model.SemanticConfig" }, "use_global": { "type": "boolean" } } }, "stat.AdvanceAccessRes": { "type": "object", "properties": { "access": { "type": "integer" }, "ip": { "type": "integer" }, "pv": { "type": "integer" }, "session": { "type": "integer" } } }, "stat.AdvanceAttackRes": { "type": "object", "properties": { "attack_ip": { "type": "integer" }, "intercept": { "type": "object", "properties": { "auth_defense": { "type": "integer" }, "blacklist": { "type": "integer" }, "block": { "type": "integer" }, "challenge": { "type": "integer" }, "offline": { "type": "integer" }, "rate_limit": { "type": "integer" } } } } }, "stat.AdvanceClientRes": { "type": "object", "properties": { "browser": { "type": "array", "items": { "type": "object", "properties": { "browser": { "type": "string" }, "count": { "type": "integer" } } } }, "os": { "type": "array", "items": { "type": "object", "properties": { "count": { "type": "integer" }, "os": { "type": "string" } } } } } }, "stat.AdvanceErrorStatusCodeRes": { "type": "object", "properties": { "error_4xx": { "type": "integer" }, "error_5xx": { "type": "integer" } } }, "system.AboutLicense": { "type": "object", "properties": { "valid": { "type": "boolean" } } }, "system.AboutRes": { "type": "object", "properties": { "cert_id": { "type": "integer" }, "created_at": { "type": "integer" }, "deprecated": { "type": "boolean" }, "license": { "$ref": "#/definitions/system.AboutLicense" }, "machine_id": { "type": "string" }, "outdated": { "type": "boolean" }, "oversea": { "type": "boolean" }, "password_expire_day": { "type": "integer" }, "slave": { "type": "boolean" }, "staging": { "type": "boolean" }, "time": { "type": "string" }, "version": { "type": "string" } } }, "system.CodeApplyInfoRes": { "type": "object", "properties": { "expired_at": { "type": "integer" }, "org_id": { "type": "string" }, "org_name": { "type": "string" }, "pwd_updated_at": { "type": "integer" }, "river_url": { "type": "string" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "state": { "type": "string" }, "timeout": { "type": "boolean" }, "user_id": { "type": "integer" }, "version": { "$ref": "#/definitions/river.Edition" } } }, "system.CodeApplyReq": { "type": "object", "properties": { "code": { "type": "string" } } }, "system.EditionRes": { "type": "object", "properties": { "state": { "$ref": "#/definitions/license.State" }, "version": { "$ref": "#/definitions/river.Edition" } } }, "system.UpdateReq": { "type": "object", "properties": { "cert_id": { "type": "integer" } } }, "tcd.FileInfo": { "type": "object", "properties": { "content": { "type": "string" }, "content_type": { "type": "string" }, "dir": { "type": "boolean" }, "modify_time": { "type": "integer" }, "name": { "type": "string" }, "size": { "type": "integer" } } }, "user.CreateUserReq": { "type": "object", "required": [ "password", "role", "username" ], "properties": { "password": { "type": "string" }, "role": { "maximum": 4, "minimum": 1, "allOf": [ { "$ref": "#/definitions/consts.UserRole" } ] }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "user.CreateUserResp": { "type": "object", "properties": { "id": { "type": "integer" } } }, "user.DeleteUserReq": { "type": "object", "properties": { "id": { "type": "integer" } } }, "user.GetUserListRes": { "type": "object", "properties": { "data": { "type": "array", "items": { "$ref": "#/definitions/user.User" } } } }, "user.UpdateUserReq": { "type": "object", "properties": { "id": { "type": "integer" }, "password": { "type": "string" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } }, "user.User": { "type": "object", "properties": { "id": { "type": "integer" }, "last_login": { "type": "integer" }, "lock_until": { "type": "integer" }, "password_enabled": { "type": "boolean" }, "pwd_updated_at": { "type": "integer" }, "role": { "$ref": "#/definitions/consts.UserRole" }, "tfa_binded": { "type": "boolean" }, "tfa_enabled": { "type": "boolean" }, "username": { "type": "string" } } } } }