mirror of
https://github.com/veops/oneterm.git
synced 2025-09-27 03:36:02 +08:00
6174 lines
212 KiB
Go
6174 lines
212 KiB
Go
// Package docs Code generated by swaggo/swag. DO NOT EDIT
|
|
package docs
|
|
|
|
import "github.com/swaggo/swag"
|
|
|
|
const docTemplate = `{
|
|
"schemes": {{ marshal .Schemes }},
|
|
"swagger": "2.0",
|
|
"info": {
|
|
"description": "{{escape .Description}}",
|
|
"title": "{{.Title}}",
|
|
"contact": {},
|
|
"version": "{{.Version}}"
|
|
},
|
|
"host": "{{.Host}}",
|
|
"basePath": "{{.BasePath}}",
|
|
"paths": {
|
|
"/account": {
|
|
"get": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or account",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account type",
|
|
"name": "type",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "account",
|
|
"name": "account",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/account/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "account",
|
|
"name": "account",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/account/{id}/credentials": {
|
|
"post": {
|
|
"tags": [
|
|
"account"
|
|
],
|
|
"summary": "Get account credentials with MFA verification",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Account ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "MFA verification token",
|
|
"name": "X-MFA-Token",
|
|
"in": "header",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or ip",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset's parent id",
|
|
"name": "parent_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset ip",
|
|
"name": "ip",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "asset",
|
|
"name": "asset",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "asset",
|
|
"name": "asset",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Asset"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/asset/:id/permissions": {
|
|
"get": {
|
|
"tags": [
|
|
"asset"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account ids (comma separated, e.g. 123,456,789)",
|
|
"name": "account_ids",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/controller.AssetPermissionMultiAccountResult"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization": {
|
|
"get": {
|
|
"tags": [
|
|
"authorization"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "node_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "asset_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "account_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Account"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"authorization"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "authorization",
|
|
"name": "authorization",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Authorization"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization/:id": {
|
|
"delete": {
|
|
"tags": [
|
|
"authorization"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "authorization id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization_v2": {
|
|
"get": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "filter by enabled status",
|
|
"name": "enabled",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search by name or description",
|
|
"name": "search",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.AuthorizationV2"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "authorization rule",
|
|
"name": "authorization",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.AuthorizationV2"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization_v2/:id": {
|
|
"get": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "authorization id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.AuthorizationV2"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "authorization id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "authorization rule",
|
|
"name": "authorization",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.AuthorizationV2"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "authorization id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization_v2/:id/clone": {
|
|
"post": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "source authorization id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "clone request",
|
|
"name": "body",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.AuthorizationV2"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/authorization_v2/check": {
|
|
"post": {
|
|
"tags": [
|
|
"authorization_v2"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "permission check request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.CheckPermissionRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.AuthResult"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command": {
|
|
"get": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or cmd",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command enable",
|
|
"name": "enable",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command category",
|
|
"name": "category",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command risk level",
|
|
"name": "risk_level",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or cmd",
|
|
"name": "search",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "command",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "command",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"command"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command_template": {
|
|
"get": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search by name or description",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "template category",
|
|
"name": "category",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "filter by builtin status",
|
|
"name": "builtin",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CommandTemplate"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "command template",
|
|
"name": "template",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CommandTemplate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command_template/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "template id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "command template",
|
|
"name": "template",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.CommandTemplate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "template id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command_template/:id/commands": {
|
|
"get": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "template id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Command"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/command_template/builtin": {
|
|
"get": {
|
|
"tags": [
|
|
"command_template"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.CommandTemplate"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/config": {
|
|
"get": {
|
|
"tags": [
|
|
"config"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"config"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "config",
|
|
"name": "command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Config"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/:asset_id/:account_id/:protocol": {
|
|
"get": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "width",
|
|
"name": "w",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "height",
|
|
"name": "h",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "dpi",
|
|
"name": "dpi",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "session_id",
|
|
"name": "session_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/close/:session_id": {
|
|
"post": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/connect/monitor/:session_id": {
|
|
"get": {
|
|
"tags": [
|
|
"connect"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/download/:asset_id/:account_id": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset_id",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account_id",
|
|
"name": "account_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "names (comma-separated for multiple files)",
|
|
"name": "names",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/history": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "saction",
|
|
"name": "action",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "uid",
|
|
"name": "uid",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "asset_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account id",
|
|
"name": "account_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "client_ip",
|
|
"name": "client_ip",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Session"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/ls/:asset_id/:account_id": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset_id",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account_id",
|
|
"name": "account_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "show hidden files (default: false)",
|
|
"name": "show_hidden",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/mkdir/:asset_id/:account_id": {
|
|
"post": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset_id",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account_id",
|
|
"name": "account_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir ",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/session/:session_id/download": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "names (comma-separated for multiple files)",
|
|
"name": "names",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/session/:session_id/ls": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "show hidden files (default: false)",
|
|
"name": "show_hidden",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/session/:session_id/mkdir": {
|
|
"post": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "dir",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/session/:session_id/upload": {
|
|
"post": {
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session_id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "target directory path (default: /tmp)",
|
|
"name": "dir",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Custom transfer ID for progress tracking (frontend generated)",
|
|
"name": "transfer_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "file to upload",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/file/transfer/progress/id/:transfer_id": {
|
|
"get": {
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"responses": {}
|
|
}
|
|
},
|
|
"/file/upload/:asset_id/:account_id": {
|
|
"post": {
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"file"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "asset_id",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account_id",
|
|
"name": "account_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "target directory path (default: /tmp)",
|
|
"name": "dir",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Custom transfer ID for progress tracking (frontend generated)",
|
|
"name": "transfer_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "file to upload",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gateway": {
|
|
"get": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or host or account or port",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "gateway ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "gateway name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "is info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "account type",
|
|
"name": "type",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "gateway",
|
|
"name": "gateway",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/gateway/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "gateway",
|
|
"name": "gateway",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Gateway"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"gateway"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "gateway id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/history": {
|
|
"get": {
|
|
"tags": [
|
|
"history"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"enum": [
|
|
"account",
|
|
"asset",
|
|
"command",
|
|
"gateway",
|
|
"node",
|
|
"public_key"
|
|
],
|
|
"type": "string",
|
|
"description": "type",
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "target_id",
|
|
"name": "target_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "uid",
|
|
"name": "uid",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "create=1 delete=2 update=3",
|
|
"name": "action_type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start time, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end time, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.History"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/history/type/mapping": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/node": {
|
|
"get": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "node ids",
|
|
"name": "ids",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "node's parent id",
|
|
"name": "parent_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "node name",
|
|
"name": "name",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "exclude itself and its child",
|
|
"name": "no_self_child",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "include itself and its parent",
|
|
"name": "self_parent",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "return tree structure with children",
|
|
"name": "recursive",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "node",
|
|
"name": "node",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/node/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "node",
|
|
"name": "node",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"node"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "node id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/preference": {
|
|
"get": {
|
|
"description": "Get terminal preferences for the current user",
|
|
"tags": [
|
|
"Preference"
|
|
],
|
|
"summary": "Get user preferences",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.UserPreference"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"description": "Update terminal preferences for the current user",
|
|
"tags": [
|
|
"Preference"
|
|
],
|
|
"summary": "Update user preferences",
|
|
"parameters": [
|
|
{
|
|
"description": "User preferences",
|
|
"name": "preference",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.UserPreference"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.UserPreference"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/proxy": {
|
|
"get": {
|
|
"description": "Handle web proxy requests for subdomain-based assets",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Proxy web requests",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Asset subdomain (asset-123.domain.com)",
|
|
"name": "Host",
|
|
"in": "header",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID (alternative to cookie)",
|
|
"name": "session_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Proxied content"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_key": {
|
|
"get": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or mac",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "publicKey name",
|
|
"name": "name",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "publicKey",
|
|
"name": "publicKey",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/public_key/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "publicKey",
|
|
"name": "publicKey",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.PublicKey"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"public_key"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "publicKey id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/quick_command": {
|
|
"get": {
|
|
"description": "Get all quick commands available to the user",
|
|
"tags": [
|
|
"QuickCommand"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or command",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "command id",
|
|
"name": "id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "command name",
|
|
"name": "name",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.QuickCommand"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"description": "Create a new quick command",
|
|
"tags": [
|
|
"QuickCommand"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "Quick command data",
|
|
"name": "quick_command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.QuickCommand"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/quick_command/{id}": {
|
|
"put": {
|
|
"description": "Update an existing quick command by ID",
|
|
"tags": [
|
|
"QuickCommand"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Quick command ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Updated quick command data",
|
|
"name": "quick_command",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.QuickCommand"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"description": "Delete a quick command by ID",
|
|
"tags": [
|
|
"QuickCommand"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Quick command ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rdp/sessions/{session_id}/files": {
|
|
"get": {
|
|
"description": "Get file list for RDP session drive",
|
|
"tags": [
|
|
"RDP File"
|
|
],
|
|
"summary": "List RDP session files",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Directory path",
|
|
"name": "path",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rdp/sessions/{session_id}/files/download": {
|
|
"get": {
|
|
"description": "Download files from RDP session drive (supports multiple files via names parameter)",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/octet-stream"
|
|
],
|
|
"tags": [
|
|
"RDP File"
|
|
],
|
|
"summary": "Download files from RDP session",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Directory path",
|
|
"name": "dir",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "File names (comma-separated for multiple files)",
|
|
"name": "names",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "file"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rdp/sessions/{session_id}/files/mkdir": {
|
|
"post": {
|
|
"description": "Create directory in RDP session drive",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"RDP File"
|
|
],
|
|
"summary": "Create directory in RDP session",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Directory path",
|
|
"name": "path",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rdp/sessions/{session_id}/files/prepare": {
|
|
"post": {
|
|
"description": "Create transfer record before RDP upload starts for progress tracking",
|
|
"consumes": [
|
|
"application/json"
|
|
],
|
|
"produces": [
|
|
"application/json"
|
|
],
|
|
"tags": [
|
|
"RDP File"
|
|
],
|
|
"summary": "Create transfer record for RDP upload",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Custom transfer ID",
|
|
"name": "transfer_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Filename",
|
|
"name": "filename",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/rdp/sessions/{session_id}/files/upload": {
|
|
"post": {
|
|
"description": "Upload file to RDP session drive",
|
|
"consumes": [
|
|
"multipart/form-data"
|
|
],
|
|
"tags": [
|
|
"RDP File"
|
|
],
|
|
"summary": "Upload file to RDP session",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Session ID",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Custom transfer ID for progress tracking (frontend generated)",
|
|
"name": "transfer_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "Target directory path",
|
|
"name": "path",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "file",
|
|
"description": "File to upload",
|
|
"name": "file",
|
|
"in": "formData",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "status, online=1, offline=2",
|
|
"name": "status",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "uid",
|
|
"name": "uid",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "asset id",
|
|
"name": "asset_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "client_ip",
|
|
"name": "client_ip",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Session"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/:session_id/cmd": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SessionCmd"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/cmd": {
|
|
"post": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "SessionCmd",
|
|
"name": "sessioncmd",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.SessionCmd"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/option/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.SessionOptionAsset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/option/clientip": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/session/replay/:session_id": {
|
|
"get": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"session"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "session id",
|
|
"name": "session_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share": {
|
|
"get": {
|
|
"tags": [
|
|
"share"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query",
|
|
"required": true
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "name or ip",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "start, RFC3339",
|
|
"name": "start",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "end, RFC3339",
|
|
"name": "end",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "asset id",
|
|
"name": "asset_id",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "account id",
|
|
"name": "account_id",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Share"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"share"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "share",
|
|
"name": "share",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Share"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/:id": {
|
|
"delete": {
|
|
"tags": [
|
|
"share"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "share id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/share/connect/:uuid": {
|
|
"get": {
|
|
"tags": [
|
|
"share"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "width",
|
|
"name": "w",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "height",
|
|
"name": "h",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "dpi",
|
|
"name": "dpi",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/account": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month"
|
|
],
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAccount"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/asset": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"enum": [
|
|
"day",
|
|
"week",
|
|
"month"
|
|
],
|
|
"type": "string",
|
|
"description": "account name",
|
|
"name": "type",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAsset"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/assettype": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatAssetType"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/count": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.StatCount"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/count/ofuser": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.StatCountOfUser"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/stat/rank/ofuser": {
|
|
"get": {
|
|
"tags": [
|
|
"stat"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StatRankOfUser"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/configs": {
|
|
"get": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "List all storage configurations",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page_index",
|
|
"name": "page_index",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page_size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "storage type filter",
|
|
"name": "type",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "enabled filter (true/false)",
|
|
"name": "enabled",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "primary filter (true/false)",
|
|
"name": "primary",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.ListData"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"list": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.StorageConfig"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Create a new storage configuration",
|
|
"parameters": [
|
|
{
|
|
"description": "Storage configuration",
|
|
"name": "config",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.StorageConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/configs/{id}": {
|
|
"get": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Get storage configuration by ID",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Storage ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/model.StorageConfig"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"put": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Update an existing storage configuration",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Storage ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "Storage configuration",
|
|
"name": "config",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.StorageConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Delete a storage configuration",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Storage ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/configs/{id}/set-primary": {
|
|
"put": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Set a storage provider as primary",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Storage ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/configs/{id}/toggle": {
|
|
"put": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Enable or disable a storage provider",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Storage ID",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/health": {
|
|
"get": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Get health status of all storage providers",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/metrics": {
|
|
"get": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Get storage usage metrics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/metrics/refresh": {
|
|
"post": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Refresh storage usage metrics",
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/storage/test-connection": {
|
|
"post": {
|
|
"tags": [
|
|
"storage"
|
|
],
|
|
"summary": "Test storage connection",
|
|
"parameters": [
|
|
{
|
|
"description": "Storage configuration to test",
|
|
"name": "config",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.StorageConfig"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/time_template": {
|
|
"get": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "page index",
|
|
"name": "page_index",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "integer",
|
|
"description": "page size",
|
|
"name": "page_size",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "search by name or description",
|
|
"name": "search",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "string",
|
|
"description": "template category",
|
|
"name": "category",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "filter by active status",
|
|
"name": "active",
|
|
"in": "query"
|
|
},
|
|
{
|
|
"type": "boolean",
|
|
"description": "info mode",
|
|
"name": "info",
|
|
"in": "query"
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeTemplate"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"post": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "time template",
|
|
"name": "template",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.TimeTemplate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/time_template/:id": {
|
|
"put": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "template id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
},
|
|
{
|
|
"description": "time template",
|
|
"name": "template",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/model.TimeTemplate"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"delete": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "template id",
|
|
"name": "id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/time_template/builtin": {
|
|
"get": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeTemplate"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/time_template/check": {
|
|
"post": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"parameters": [
|
|
{
|
|
"description": "time access check request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.CheckTimeAccessRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
},
|
|
{
|
|
"type": "object",
|
|
"properties": {
|
|
"data": {
|
|
"$ref": "#/definitions/controller.CheckTimeAccessResponse"
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/time_template/init": {
|
|
"post": {
|
|
"tags": [
|
|
"time_template"
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/controller.HttpResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/cleanup": {
|
|
"post": {
|
|
"description": "Clean up web session when browser tab is closed",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Cleanup web session",
|
|
"parameters": [
|
|
{
|
|
"description": "Cleanup request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Session cleaned up",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/close": {
|
|
"post": {
|
|
"description": "Close an active web session and clean up resources",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Close web session",
|
|
"parameters": [
|
|
{
|
|
"description": "Session close request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Session closed successfully",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/config/{asset_id}": {
|
|
"get": {
|
|
"description": "Get web asset configuration by asset ID",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Get web asset configuration",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Asset ID",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/model.WebConfig"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/external_redirect": {
|
|
"get": {
|
|
"description": "Show a page when an external redirect is blocked by the proxy",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Handle external redirect",
|
|
"parameters": [
|
|
{
|
|
"type": "string",
|
|
"description": "Target URL that was blocked",
|
|
"name": "url",
|
|
"in": "query",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "External redirect blocked page"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/heartbeat": {
|
|
"post": {
|
|
"description": "Update the last activity time for a web session (heartbeat)",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Update session heartbeat",
|
|
"parameters": [
|
|
{
|
|
"description": "Heartbeat request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "Heartbeat updated",
|
|
"schema": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/sessions/{asset_id}": {
|
|
"get": {
|
|
"description": "Get list of active web sessions for a specific asset",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Get active web sessions",
|
|
"parameters": [
|
|
{
|
|
"type": "integer",
|
|
"description": "Asset ID",
|
|
"name": "asset_id",
|
|
"in": "path",
|
|
"required": true
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "List of active sessions",
|
|
"schema": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"/web_proxy/start": {
|
|
"post": {
|
|
"description": "Start a new web session for the specified asset",
|
|
"tags": [
|
|
"WebProxy"
|
|
],
|
|
"summary": "Start web session",
|
|
"parameters": [
|
|
{
|
|
"description": "Start session request",
|
|
"name": "request",
|
|
"in": "body",
|
|
"required": true,
|
|
"schema": {
|
|
"$ref": "#/definitions/web_proxy.StartWebSessionRequest"
|
|
}
|
|
}
|
|
],
|
|
"responses": {
|
|
"200": {
|
|
"description": "OK",
|
|
"schema": {
|
|
"$ref": "#/definitions/web_proxy.StartWebSessionResponse"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"definitions": {
|
|
"controller.AssetPermissionBatchResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/controller.AssetPermissionResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"controller.AssetPermissionMultiAccountResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"results": {
|
|
"description": "accountId -\u003e batch results",
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/controller.AssetPermissionBatchResult"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"controller.AssetPermissionResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allowed": {
|
|
"type": "boolean"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"restrictions": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"rule_id": {
|
|
"type": "integer"
|
|
},
|
|
"rule_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.CheckPermissionRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"action"
|
|
],
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"action": {
|
|
"$ref": "#/definitions/model.AuthAction"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
},
|
|
"node_id": {
|
|
"type": "integer",
|
|
"minimum": 0
|
|
}
|
|
}
|
|
},
|
|
"controller.CheckTimeAccessRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"template_id"
|
|
],
|
|
"properties": {
|
|
"template_id": {
|
|
"type": "integer"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.CheckTimeAccessResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allowed": {
|
|
"type": "boolean"
|
|
},
|
|
"checked_at": {
|
|
"type": "string"
|
|
},
|
|
"template_id": {
|
|
"type": "integer"
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.HttpResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"code": {
|
|
"type": "integer"
|
|
},
|
|
"data": {},
|
|
"message": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"controller.ListData": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"list": {
|
|
"type": "array",
|
|
"items": {}
|
|
}
|
|
}
|
|
},
|
|
"model.AccessAuth": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allow": {
|
|
"type": "boolean"
|
|
},
|
|
"cmd_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"end": {
|
|
"type": "string"
|
|
},
|
|
"ranges": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Range"
|
|
}
|
|
},
|
|
"start": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.AccessControl": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd_ids": {
|
|
"description": "Command control",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"custom_time_ranges": {
|
|
"description": "Direct definition",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeRange"
|
|
}
|
|
},
|
|
"ip_whitelist": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"max_sessions": {
|
|
"type": "integer"
|
|
},
|
|
"session_timeout": {
|
|
"type": "integer"
|
|
},
|
|
"template_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"time_template": {
|
|
"description": "Time control options",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.TimeTemplateReference"
|
|
}
|
|
]
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.AccessTimeControl": {
|
|
"type": "object",
|
|
"properties": {
|
|
"comment": {
|
|
"description": "Description of the time restriction",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"time_ranges": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeRange"
|
|
}
|
|
},
|
|
"timezone": {
|
|
"description": "e.g., \"Asia/Shanghai\"",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Account": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"account_type": {
|
|
"type": "integer"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"phrase": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.AccountAuthorization": {
|
|
"type": "object",
|
|
"properties": {
|
|
"permissions": {
|
|
"description": "V2 permissions (connect, file_upload, etc.)",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.AuthPermissions"
|
|
}
|
|
]
|
|
},
|
|
"rids": {
|
|
"description": "Role IDs for ACL system",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"rule_id": {
|
|
"description": "V2 authorization rule ID for tracking",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Asset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_auth": {
|
|
"description": "Deprecated: Use V2 fields below",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.AccessAuth"
|
|
}
|
|
]
|
|
},
|
|
"access_time_control": {
|
|
"description": "V2 Access Control (replaces AccessAuth)",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.AccessTimeControl"
|
|
}
|
|
]
|
|
},
|
|
"asset_command_control": {
|
|
"$ref": "#/definitions/model.AssetCommandControl"
|
|
},
|
|
"authorization": {
|
|
"$ref": "#/definitions/model.AuthorizationMap"
|
|
},
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"connectable": {
|
|
"type": "boolean"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"ip": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_chain": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"web_config": {
|
|
"description": "Web-specific configuration (only valid when protocols contain http/https)",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.WebConfig"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"model.AssetCommandControl": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd_ids": {
|
|
"description": "Command IDs to control",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"comment": {
|
|
"description": "Description of the command restriction",
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"template_ids": {
|
|
"description": "Command template IDs",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model.AuthAction": {
|
|
"type": "string",
|
|
"enum": [
|
|
"connect",
|
|
"file_upload",
|
|
"file_download",
|
|
"copy",
|
|
"paste",
|
|
"share"
|
|
],
|
|
"x-enum-varnames": [
|
|
"ActionConnect",
|
|
"ActionFileUpload",
|
|
"ActionFileDownload",
|
|
"ActionCopy",
|
|
"ActionPaste",
|
|
"ActionShare"
|
|
]
|
|
},
|
|
"model.AuthPermissions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"connect": {
|
|
"type": "boolean"
|
|
},
|
|
"copy": {
|
|
"type": "boolean"
|
|
},
|
|
"file_download": {
|
|
"type": "boolean"
|
|
},
|
|
"file_upload": {
|
|
"type": "boolean"
|
|
},
|
|
"paste": {
|
|
"type": "boolean"
|
|
},
|
|
"share": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"model.AuthResult": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allowed": {
|
|
"type": "boolean"
|
|
},
|
|
"permissions": {
|
|
"$ref": "#/definitions/model.AuthPermissions"
|
|
},
|
|
"reason": {
|
|
"type": "string"
|
|
},
|
|
"restrictions": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"rule_id": {
|
|
"type": "integer"
|
|
},
|
|
"rule_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Authorization": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"node_id": {
|
|
"type": "integer"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"rids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.AuthorizationMap": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"$ref": "#/definitions/model.AccountAuthorization"
|
|
}
|
|
},
|
|
"model.AuthorizationV2": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_control": {
|
|
"description": "Access control with time template support",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.AccessControl"
|
|
}
|
|
]
|
|
},
|
|
"account_selector": {
|
|
"$ref": "#/definitions/model.TargetSelector"
|
|
},
|
|
"asset_selector": {
|
|
"$ref": "#/definitions/model.TargetSelector"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"node_selector": {
|
|
"description": "Target selectors",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.TargetSelector"
|
|
}
|
|
]
|
|
},
|
|
"permissions": {
|
|
"description": "Permissions configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.AuthPermissions"
|
|
}
|
|
]
|
|
},
|
|
"resource_id": {
|
|
"description": "Standard fields",
|
|
"type": "integer"
|
|
},
|
|
"rids": {
|
|
"description": "Role IDs for ACL integration",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"valid_from": {
|
|
"description": "Rule validity period",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.CustomTime"
|
|
}
|
|
]
|
|
},
|
|
"valid_to": {
|
|
"$ref": "#/definitions/model.CustomTime"
|
|
}
|
|
}
|
|
},
|
|
"model.Command": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"description": "Enhanced fields for better management",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.CommandCategory"
|
|
}
|
|
]
|
|
},
|
|
"cmd": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"enable": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_global": {
|
|
"description": "Global predefined command",
|
|
"type": "boolean"
|
|
},
|
|
"is_re": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"risk_level": {
|
|
"$ref": "#/definitions/model.CommandRiskLevel"
|
|
},
|
|
"tags": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.CommandCategory": {
|
|
"type": "string",
|
|
"enum": [
|
|
"security",
|
|
"system",
|
|
"database",
|
|
"network",
|
|
"file",
|
|
"developer",
|
|
"custom"
|
|
],
|
|
"x-enum-comments": {
|
|
"CategoryCustom": "Custom commands",
|
|
"CategoryDatabase": "Database operations",
|
|
"CategoryDeveloper": "Development related",
|
|
"CategoryFile": "File operations",
|
|
"CategoryNetwork": "Network operations",
|
|
"CategorySecurity": "Security related",
|
|
"CategorySystem": "System operations"
|
|
},
|
|
"x-enum-varnames": [
|
|
"CategorySecurity",
|
|
"CategorySystem",
|
|
"CategoryDatabase",
|
|
"CategoryNetwork",
|
|
"CategoryFile",
|
|
"CategoryDeveloper",
|
|
"CategoryCustom"
|
|
]
|
|
},
|
|
"model.CommandRiskLevel": {
|
|
"type": "integer",
|
|
"enum": [
|
|
0,
|
|
1,
|
|
2,
|
|
3
|
|
],
|
|
"x-enum-comments": {
|
|
"RiskLevelCritical": "Critical danger",
|
|
"RiskLevelDanger": "Dangerous commands",
|
|
"RiskLevelSafe": "Safe commands",
|
|
"RiskLevelWarning": "Warning level"
|
|
},
|
|
"x-enum-varnames": [
|
|
"RiskLevelSafe",
|
|
"RiskLevelWarning",
|
|
"RiskLevelDanger",
|
|
"RiskLevelCritical"
|
|
]
|
|
},
|
|
"model.CommandTemplate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"$ref": "#/definitions/model.CommandCategory"
|
|
},
|
|
"cmd_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_builtin": {
|
|
"description": "Built-in template",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.Config": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"default_permissions": {
|
|
"description": "Default permissions for authorization creation",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.DefaultPermissions"
|
|
}
|
|
]
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"timeout": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.CustomTime": {
|
|
"type": "object",
|
|
"properties": {
|
|
"time.Time": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.DefaultPermissions": {
|
|
"type": "object",
|
|
"properties": {
|
|
"connect": {
|
|
"type": "boolean"
|
|
},
|
|
"copy": {
|
|
"type": "boolean"
|
|
},
|
|
"file_download": {
|
|
"type": "boolean"
|
|
},
|
|
"file_upload": {
|
|
"type": "boolean"
|
|
},
|
|
"paste": {
|
|
"type": "boolean"
|
|
},
|
|
"share": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"model.Gateway": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account": {
|
|
"type": "string"
|
|
},
|
|
"account_type": {
|
|
"type": "integer"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"host": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"phrase": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"port": {
|
|
"type": "integer"
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.History": {
|
|
"type": "object",
|
|
"properties": {
|
|
"action_type": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"new": {
|
|
"$ref": "#/definitions/model.Map-string-any"
|
|
},
|
|
"old": {
|
|
"$ref": "#/definitions/model.Map-string-any"
|
|
},
|
|
"remote_ip": {
|
|
"type": "string"
|
|
},
|
|
"target_id": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.JSON": {
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"model.Map-string-any": {
|
|
"type": "object",
|
|
"additionalProperties": {}
|
|
},
|
|
"model.Node": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_auth": {
|
|
"$ref": "#/definitions/model.AccessAuth"
|
|
},
|
|
"asset_count": {
|
|
"type": "integer"
|
|
},
|
|
"authorization": {
|
|
"$ref": "#/definitions/model.AuthorizationMap"
|
|
},
|
|
"children": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.Node"
|
|
}
|
|
},
|
|
"comment": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"has_child": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"parent_id": {
|
|
"type": "integer"
|
|
},
|
|
"permissions": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"protocols": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"resource_id": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.PublicKey": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"description": "ResourceId int ` + "`" + `json:\"resource_id\"` + "`" + `",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"pk": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.QuickCommand": {
|
|
"type": "object",
|
|
"properties": {
|
|
"command": {
|
|
"description": "Actual command to execute",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"description": "Creator ID",
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"description": "Command description",
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_global": {
|
|
"description": "Whether it's a global command",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"description": "Command name",
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Range": {
|
|
"type": "object",
|
|
"properties": {
|
|
"times": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"week": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.SelectorType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"all",
|
|
"ids",
|
|
"regex",
|
|
"tags"
|
|
],
|
|
"x-enum-varnames": [
|
|
"SelectorTypeAll",
|
|
"SelectorTypeIds",
|
|
"SelectorTypeRegex",
|
|
"SelectorTypeTags"
|
|
]
|
|
},
|
|
"model.Session": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer"
|
|
},
|
|
"account_info": {
|
|
"type": "string"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_info": {
|
|
"type": "string"
|
|
},
|
|
"client_ip": {
|
|
"type": "string"
|
|
},
|
|
"closed_at": {
|
|
"type": "string"
|
|
},
|
|
"cmd_count": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"duration": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_id": {
|
|
"type": "integer"
|
|
},
|
|
"gateway_info": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"protocol": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
},
|
|
"session_type": {
|
|
"type": "integer"
|
|
},
|
|
"share_id": {
|
|
"type": "integer"
|
|
},
|
|
"status": {
|
|
"type": "integer"
|
|
},
|
|
"uid": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SessionCmd": {
|
|
"type": "object",
|
|
"properties": {
|
|
"cmd": {
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"level": {
|
|
"type": "integer"
|
|
},
|
|
"result": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.SessionOptionAsset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.Share": {
|
|
"type": "object",
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"end": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"no_limit": {
|
|
"type": "boolean"
|
|
},
|
|
"protocol": {
|
|
"type": "string"
|
|
},
|
|
"start": {
|
|
"type": "string"
|
|
},
|
|
"times": {
|
|
"type": "integer"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"uuid": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAsset": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"time": {
|
|
"type": "string"
|
|
},
|
|
"user": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StatAssetType": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.StatCount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"gateway": {
|
|
"description": "TotalUser int64 ` + "`" + `json:\"total_user\"` + "`" + `",
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"total_asset": {
|
|
"type": "integer"
|
|
},
|
|
"total_gateway": {
|
|
"type": "integer"
|
|
},
|
|
"user": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StatCountOfUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"asset": {
|
|
"type": "integer"
|
|
},
|
|
"connect": {
|
|
"type": "integer"
|
|
},
|
|
"session": {
|
|
"type": "integer"
|
|
},
|
|
"total_asset": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StatRankOfUser": {
|
|
"type": "object",
|
|
"properties": {
|
|
"count": {
|
|
"type": "integer"
|
|
},
|
|
"last_time": {
|
|
"type": "string"
|
|
},
|
|
"uid": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StorageConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"config": {
|
|
"$ref": "#/definitions/model.StorageConfigMap"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"description": "Standard fields",
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"enabled": {
|
|
"type": "boolean"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_primary": {
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"priority": {
|
|
"type": "integer"
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/model.StorageType"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.StorageConfigMap": {
|
|
"type": "object",
|
|
"additionalProperties": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"model.StorageType": {
|
|
"type": "string",
|
|
"enum": [
|
|
"local",
|
|
"s3",
|
|
"minio",
|
|
"oss",
|
|
"cos",
|
|
"azure",
|
|
"obs",
|
|
"oos"
|
|
],
|
|
"x-enum-varnames": [
|
|
"StorageTypeLocal",
|
|
"StorageTypeS3",
|
|
"StorageTypeMinio",
|
|
"StorageTypeOSS",
|
|
"StorageTypeCOS",
|
|
"StorageTypeAzure",
|
|
"StorageTypeOBS",
|
|
"StorageTypeOOS"
|
|
]
|
|
},
|
|
"model.TargetSelector": {
|
|
"type": "object",
|
|
"properties": {
|
|
"exclude_ids": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
},
|
|
"type": {
|
|
"$ref": "#/definitions/model.SelectorType"
|
|
},
|
|
"values": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model.TimeRange": {
|
|
"type": "object",
|
|
"properties": {
|
|
"end_time": {
|
|
"type": "string"
|
|
},
|
|
"start_time": {
|
|
"type": "string"
|
|
},
|
|
"weekdays": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "integer"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"model.TimeTemplate": {
|
|
"type": "object",
|
|
"properties": {
|
|
"category": {
|
|
"description": "work, maintenance, emergency, etc.",
|
|
"type": "string"
|
|
},
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"creator_id": {
|
|
"type": "integer"
|
|
},
|
|
"description": {
|
|
"type": "string"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"is_active": {
|
|
"type": "boolean"
|
|
},
|
|
"is_builtin": {
|
|
"description": "Status and metadata",
|
|
"type": "boolean"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"resource_id": {
|
|
"description": "Standard fields",
|
|
"type": "integer"
|
|
},
|
|
"time_ranges": {
|
|
"description": "Time configuration",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeRange"
|
|
}
|
|
},
|
|
"timezone": {
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"updater_id": {
|
|
"type": "integer"
|
|
},
|
|
"usage_count": {
|
|
"description": "Usage statistics",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.TimeTemplateReference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"custom_ranges": {
|
|
"description": "Additional custom time ranges",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.TimeRange"
|
|
}
|
|
},
|
|
"template_id": {
|
|
"type": "integer"
|
|
},
|
|
"template_name": {
|
|
"description": "For display",
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.UserPreference": {
|
|
"type": "object",
|
|
"properties": {
|
|
"created_at": {
|
|
"type": "string"
|
|
},
|
|
"cursor_style": {
|
|
"description": "Cursor style (block, bar, underline)",
|
|
"type": "string"
|
|
},
|
|
"font_family": {
|
|
"description": "Font family",
|
|
"type": "string"
|
|
},
|
|
"font_size": {
|
|
"description": "Font size",
|
|
"type": "integer"
|
|
},
|
|
"id": {
|
|
"type": "integer"
|
|
},
|
|
"letter_spacing": {
|
|
"description": "Letter spacing",
|
|
"type": "number"
|
|
},
|
|
"line_height": {
|
|
"description": "Line height",
|
|
"type": "number"
|
|
},
|
|
"settings": {
|
|
"description": "Additional settings in JSON format",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.JSON"
|
|
}
|
|
]
|
|
},
|
|
"theme": {
|
|
"description": "Theme name",
|
|
"type": "string"
|
|
},
|
|
"updated_at": {
|
|
"type": "string"
|
|
},
|
|
"user_id": {
|
|
"description": "User ID with unique index",
|
|
"type": "integer"
|
|
}
|
|
}
|
|
},
|
|
"model.WebConfig": {
|
|
"type": "object",
|
|
"properties": {
|
|
"access_policy": {
|
|
"description": "full_access, read_only",
|
|
"type": "string"
|
|
},
|
|
"auth_mode": {
|
|
"description": "none, smart, manual",
|
|
"type": "string"
|
|
},
|
|
"login_accounts": {
|
|
"description": "Web login credentials",
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/model.WebLoginAccount"
|
|
}
|
|
},
|
|
"proxy_settings": {
|
|
"description": "Proxy configuration",
|
|
"allOf": [
|
|
{
|
|
"$ref": "#/definitions/model.WebProxySettings"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"model.WebLoginAccount": {
|
|
"type": "object",
|
|
"properties": {
|
|
"is_default": {
|
|
"type": "boolean"
|
|
},
|
|
"password": {
|
|
"type": "string"
|
|
},
|
|
"status": {
|
|
"description": "active, inactive",
|
|
"type": "string"
|
|
},
|
|
"username": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"model.WebProxySettings": {
|
|
"type": "object",
|
|
"properties": {
|
|
"allowed_methods": {
|
|
"description": "Allowed HTTP methods",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"blocked_paths": {
|
|
"description": "Blocked URL paths",
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"max_concurrent": {
|
|
"description": "Max concurrent connections",
|
|
"type": "integer"
|
|
},
|
|
"recording_enabled": {
|
|
"description": "Enable session recording",
|
|
"type": "boolean"
|
|
},
|
|
"watermark_enabled": {
|
|
"description": "Enable watermark",
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"web_proxy.StartWebSessionRequest": {
|
|
"type": "object",
|
|
"required": [
|
|
"asset_id"
|
|
],
|
|
"properties": {
|
|
"account_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_id": {
|
|
"type": "integer"
|
|
},
|
|
"asset_name": {
|
|
"type": "string"
|
|
},
|
|
"auth_mode": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"web_proxy.StartWebSessionResponse": {
|
|
"type": "object",
|
|
"properties": {
|
|
"message": {
|
|
"type": "string"
|
|
},
|
|
"proxy_url": {
|
|
"type": "string"
|
|
},
|
|
"session_id": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}`
|
|
|
|
// SwaggerInfo holds exported Swagger Info so clients can modify it
|
|
var SwaggerInfo = &swag.Spec{
|
|
Version: "",
|
|
Host: "",
|
|
BasePath: "",
|
|
Schemes: []string{},
|
|
Title: "",
|
|
Description: "",
|
|
InfoInstanceName: "swagger",
|
|
SwaggerTemplate: docTemplate,
|
|
LeftDelim: "{{",
|
|
RightDelim: "}}",
|
|
}
|
|
|
|
func init() {
|
|
swag.Register(SwaggerInfo.InstanceName(), SwaggerInfo)
|
|
}
|