mirror of
				https://github.com/veops/oneterm.git
				synced 2025-11-01 03:12:39 +08:00 
			
		
		
		
	
		
			
				
	
	
		
			3907 lines
		
	
	
		
			91 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			3907 lines
		
	
	
		
			91 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| definitions:
 | |
|   controller.AssetPermissionBatchResult:
 | |
|     properties:
 | |
|       results:
 | |
|         additionalProperties:
 | |
|           $ref: '#/definitions/controller.AssetPermissionResult'
 | |
|         type: object
 | |
|     type: object
 | |
|   controller.AssetPermissionMultiAccountResult:
 | |
|     properties:
 | |
|       results:
 | |
|         additionalProperties:
 | |
|           $ref: '#/definitions/controller.AssetPermissionBatchResult'
 | |
|         description: accountId -> batch results
 | |
|         type: object
 | |
|     type: object
 | |
|   controller.AssetPermissionResult:
 | |
|     properties:
 | |
|       allowed:
 | |
|         type: boolean
 | |
|       reason:
 | |
|         type: string
 | |
|       restrictions:
 | |
|         additionalProperties: true
 | |
|         type: object
 | |
|       rule_id:
 | |
|         type: integer
 | |
|       rule_name:
 | |
|         type: string
 | |
|     type: object
 | |
|   controller.CheckPermissionRequest:
 | |
|     properties:
 | |
|       account_id:
 | |
|         minimum: 0
 | |
|         type: integer
 | |
|       action:
 | |
|         $ref: '#/definitions/model.AuthAction'
 | |
|       asset_id:
 | |
|         minimum: 0
 | |
|         type: integer
 | |
|       node_id:
 | |
|         minimum: 0
 | |
|         type: integer
 | |
|     required:
 | |
|     - action
 | |
|     type: object
 | |
|   controller.CheckTimeAccessRequest:
 | |
|     properties:
 | |
|       template_id:
 | |
|         type: integer
 | |
|       timezone:
 | |
|         type: string
 | |
|     required:
 | |
|     - template_id
 | |
|     type: object
 | |
|   controller.CheckTimeAccessResponse:
 | |
|     properties:
 | |
|       allowed:
 | |
|         type: boolean
 | |
|       checked_at:
 | |
|         type: string
 | |
|       template_id:
 | |
|         type: integer
 | |
|       timezone:
 | |
|         type: string
 | |
|     type: object
 | |
|   controller.HttpResponse:
 | |
|     properties:
 | |
|       code:
 | |
|         type: integer
 | |
|       data: {}
 | |
|       message:
 | |
|         type: string
 | |
|     type: object
 | |
|   controller.ListData:
 | |
|     properties:
 | |
|       count:
 | |
|         type: integer
 | |
|       list:
 | |
|         items: {}
 | |
|         type: array
 | |
|     type: object
 | |
|   model.AccessAuth:
 | |
|     properties:
 | |
|       allow:
 | |
|         type: boolean
 | |
|       cmd_ids:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       end:
 | |
|         type: string
 | |
|       ranges:
 | |
|         items:
 | |
|           $ref: '#/definitions/model.Range'
 | |
|         type: array
 | |
|       start:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.AccessControl:
 | |
|     properties:
 | |
|       cmd_ids:
 | |
|         description: Command control
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       custom_time_ranges:
 | |
|         description: Direct definition
 | |
|         items:
 | |
|           $ref: '#/definitions/model.TimeRange'
 | |
|         type: array
 | |
|       ip_whitelist:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       max_sessions:
 | |
|         type: integer
 | |
|       session_timeout:
 | |
|         type: integer
 | |
|       template_ids:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       time_template:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.TimeTemplateReference'
 | |
|         description: Time control options
 | |
|       timezone:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.AccessTimeControl:
 | |
|     properties:
 | |
|       comment:
 | |
|         description: Description of the time restriction
 | |
|         type: string
 | |
|       enabled:
 | |
|         type: boolean
 | |
|       time_ranges:
 | |
|         items:
 | |
|           $ref: '#/definitions/model.TimeRange'
 | |
|         type: array
 | |
|       timezone:
 | |
|         description: e.g., "Asia/Shanghai"
 | |
|         type: string
 | |
|     type: object
 | |
|   model.Account:
 | |
|     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:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       phrase:
 | |
|         type: string
 | |
|       pk:
 | |
|         type: string
 | |
|       resource_id:
 | |
|         type: integer
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.AccountAuthorization:
 | |
|     properties:
 | |
|       permissions:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.AuthPermissions'
 | |
|         description: V2 permissions (connect, file_upload, etc.)
 | |
|       rids:
 | |
|         description: Role IDs for ACL system
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       rule_id:
 | |
|         description: V2 authorization rule ID for tracking
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.Asset:
 | |
|     properties:
 | |
|       access_auth:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.AccessAuth'
 | |
|         description: 'Deprecated: Use V2 fields below'
 | |
|       access_time_control:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.AccessTimeControl'
 | |
|         description: V2 Access Control (replaces AccessAuth)
 | |
|       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:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       protocols:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       resource_id:
 | |
|         type: integer
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|       web_config:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.WebConfig'
 | |
|         description: Web-specific configuration (only valid when protocols contain
 | |
|           http/https)
 | |
|     type: object
 | |
|   model.AssetCommandControl:
 | |
|     properties:
 | |
|       cmd_ids:
 | |
|         description: Command IDs to control
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       comment:
 | |
|         description: Description of the command restriction
 | |
|         type: string
 | |
|       enabled:
 | |
|         type: boolean
 | |
|       template_ids:
 | |
|         description: Command template IDs
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|     type: object
 | |
|   model.AuthAction:
 | |
|     enum:
 | |
|     - connect
 | |
|     - file_upload
 | |
|     - file_download
 | |
|     - copy
 | |
|     - paste
 | |
|     - share
 | |
|     type: string
 | |
|     x-enum-varnames:
 | |
|     - ActionConnect
 | |
|     - ActionFileUpload
 | |
|     - ActionFileDownload
 | |
|     - ActionCopy
 | |
|     - ActionPaste
 | |
|     - ActionShare
 | |
|   model.AuthPermissions:
 | |
|     properties:
 | |
|       connect:
 | |
|         type: boolean
 | |
|       copy:
 | |
|         type: boolean
 | |
|       file_download:
 | |
|         type: boolean
 | |
|       file_upload:
 | |
|         type: boolean
 | |
|       paste:
 | |
|         type: boolean
 | |
|       share:
 | |
|         type: boolean
 | |
|     type: object
 | |
|   model.AuthResult:
 | |
|     properties:
 | |
|       allowed:
 | |
|         type: boolean
 | |
|       permissions:
 | |
|         $ref: '#/definitions/model.AuthPermissions'
 | |
|       reason:
 | |
|         type: string
 | |
|       restrictions:
 | |
|         additionalProperties: true
 | |
|         type: object
 | |
|       rule_id:
 | |
|         type: integer
 | |
|       rule_name:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.Authorization:
 | |
|     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:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.AuthorizationMap:
 | |
|     additionalProperties:
 | |
|       $ref: '#/definitions/model.AccountAuthorization'
 | |
|     type: object
 | |
|   model.AuthorizationV2:
 | |
|     properties:
 | |
|       access_control:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.AccessControl'
 | |
|         description: Access control with time template support
 | |
|       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:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.TargetSelector'
 | |
|         description: Target selectors
 | |
|       permissions:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.AuthPermissions'
 | |
|         description: Permissions configuration
 | |
|       resource_id:
 | |
|         description: Standard fields
 | |
|         type: integer
 | |
|       rids:
 | |
|         description: Role IDs for ACL integration
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|       valid_from:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.CustomTime'
 | |
|         description: Rule validity period
 | |
|       valid_to:
 | |
|         $ref: '#/definitions/model.CustomTime'
 | |
|     type: object
 | |
|   model.Command:
 | |
|     properties:
 | |
|       category:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.CommandCategory'
 | |
|         description: Enhanced fields for better management
 | |
|       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:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       resource_id:
 | |
|         type: integer
 | |
|       risk_level:
 | |
|         $ref: '#/definitions/model.CommandRiskLevel'
 | |
|       tags:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.CommandCategory:
 | |
|     enum:
 | |
|     - security
 | |
|     - system
 | |
|     - database
 | |
|     - network
 | |
|     - file
 | |
|     - developer
 | |
|     - custom
 | |
|     type: string
 | |
|     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:
 | |
|     enum:
 | |
|     - 0
 | |
|     - 1
 | |
|     - 2
 | |
|     - 3
 | |
|     type: integer
 | |
|     x-enum-comments:
 | |
|       RiskLevelCritical: Critical danger
 | |
|       RiskLevelDanger: Dangerous commands
 | |
|       RiskLevelSafe: Safe commands
 | |
|       RiskLevelWarning: Warning level
 | |
|     x-enum-varnames:
 | |
|     - RiskLevelSafe
 | |
|     - RiskLevelWarning
 | |
|     - RiskLevelDanger
 | |
|     - RiskLevelCritical
 | |
|   model.CommandTemplate:
 | |
|     properties:
 | |
|       category:
 | |
|         $ref: '#/definitions/model.CommandCategory'
 | |
|       cmd_ids:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       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
 | |
|     type: object
 | |
|   model.Config:
 | |
|     properties:
 | |
|       created_at:
 | |
|         type: string
 | |
|       creator_id:
 | |
|         type: integer
 | |
|       default_permissions:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.DefaultPermissions'
 | |
|         description: Default permissions for authorization creation
 | |
|       id:
 | |
|         type: integer
 | |
|       timeout:
 | |
|         type: integer
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.CustomTime:
 | |
|     properties:
 | |
|       time.Time:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.DefaultPermissions:
 | |
|     properties:
 | |
|       connect:
 | |
|         type: boolean
 | |
|       copy:
 | |
|         type: boolean
 | |
|       file_download:
 | |
|         type: boolean
 | |
|       file_upload:
 | |
|         type: boolean
 | |
|       paste:
 | |
|         type: boolean
 | |
|       share:
 | |
|         type: boolean
 | |
|     type: object
 | |
|   model.Gateway:
 | |
|     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:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       phrase:
 | |
|         type: string
 | |
|       pk:
 | |
|         type: string
 | |
|       port:
 | |
|         type: integer
 | |
|       resource_id:
 | |
|         type: integer
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.History:
 | |
|     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
 | |
|     type: object
 | |
|   model.JSON:
 | |
|     additionalProperties: true
 | |
|     type: object
 | |
|   model.Map-string-any:
 | |
|     additionalProperties: {}
 | |
|     type: object
 | |
|   model.Node:
 | |
|     properties:
 | |
|       access_auth:
 | |
|         $ref: '#/definitions/model.AccessAuth'
 | |
|       asset_count:
 | |
|         type: integer
 | |
|       authorization:
 | |
|         $ref: '#/definitions/model.AuthorizationMap'
 | |
|       children:
 | |
|         items:
 | |
|           $ref: '#/definitions/model.Node'
 | |
|         type: array
 | |
|       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:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       protocols:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       resource_id:
 | |
|         type: integer
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.PublicKey:
 | |
|     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
 | |
|     type: object
 | |
|   model.QuickCommand:
 | |
|     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
 | |
|     type: object
 | |
|   model.Range:
 | |
|     properties:
 | |
|       times:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       week:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.SelectorType:
 | |
|     enum:
 | |
|     - all
 | |
|     - ids
 | |
|     - regex
 | |
|     - tags
 | |
|     type: string
 | |
|     x-enum-varnames:
 | |
|     - SelectorTypeAll
 | |
|     - SelectorTypeIds
 | |
|     - SelectorTypeRegex
 | |
|     - SelectorTypeTags
 | |
|   model.Session:
 | |
|     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
 | |
|     type: object
 | |
|   model.SessionCmd:
 | |
|     properties:
 | |
|       cmd:
 | |
|         type: string
 | |
|       created_at:
 | |
|         type: string
 | |
|       id:
 | |
|         type: integer
 | |
|       level:
 | |
|         type: integer
 | |
|       result:
 | |
|         type: string
 | |
|       session_id:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.SessionOptionAsset:
 | |
|     properties:
 | |
|       id:
 | |
|         type: integer
 | |
|       name:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.Share:
 | |
|     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
 | |
|     type: object
 | |
|   model.StatAccount:
 | |
|     properties:
 | |
|       count:
 | |
|         type: integer
 | |
|       name:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.StatAsset:
 | |
|     properties:
 | |
|       asset:
 | |
|         type: integer
 | |
|       connect:
 | |
|         type: integer
 | |
|       session:
 | |
|         type: integer
 | |
|       time:
 | |
|         type: string
 | |
|       user:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.StatAssetType:
 | |
|     properties:
 | |
|       count:
 | |
|         type: integer
 | |
|       id:
 | |
|         type: integer
 | |
|       name:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.StatCount:
 | |
|     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
 | |
|     type: object
 | |
|   model.StatCountOfUser:
 | |
|     properties:
 | |
|       asset:
 | |
|         type: integer
 | |
|       connect:
 | |
|         type: integer
 | |
|       session:
 | |
|         type: integer
 | |
|       total_asset:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.StatRankOfUser:
 | |
|     properties:
 | |
|       count:
 | |
|         type: integer
 | |
|       last_time:
 | |
|         type: string
 | |
|       uid:
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.StorageConfig:
 | |
|     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
 | |
|     type: object
 | |
|   model.StorageConfigMap:
 | |
|     additionalProperties:
 | |
|       type: string
 | |
|     type: object
 | |
|   model.StorageType:
 | |
|     enum:
 | |
|     - local
 | |
|     - s3
 | |
|     - minio
 | |
|     - oss
 | |
|     - cos
 | |
|     - azure
 | |
|     - obs
 | |
|     - oos
 | |
|     type: string
 | |
|     x-enum-varnames:
 | |
|     - StorageTypeLocal
 | |
|     - StorageTypeS3
 | |
|     - StorageTypeMinio
 | |
|     - StorageTypeOSS
 | |
|     - StorageTypeCOS
 | |
|     - StorageTypeAzure
 | |
|     - StorageTypeOBS
 | |
|     - StorageTypeOOS
 | |
|   model.TargetSelector:
 | |
|     properties:
 | |
|       exclude_ids:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|       type:
 | |
|         $ref: '#/definitions/model.SelectorType'
 | |
|       values:
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|     type: object
 | |
|   model.TimeRange:
 | |
|     properties:
 | |
|       end_time:
 | |
|         type: string
 | |
|       start_time:
 | |
|         type: string
 | |
|       weekdays:
 | |
|         items:
 | |
|           type: integer
 | |
|         type: array
 | |
|     type: object
 | |
|   model.TimeTemplate:
 | |
|     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
 | |
|         items:
 | |
|           $ref: '#/definitions/model.TimeRange'
 | |
|         type: array
 | |
|       timezone:
 | |
|         type: string
 | |
|       updated_at:
 | |
|         type: string
 | |
|       updater_id:
 | |
|         type: integer
 | |
|       usage_count:
 | |
|         description: Usage statistics
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.TimeTemplateReference:
 | |
|     properties:
 | |
|       custom_ranges:
 | |
|         description: Additional custom time ranges
 | |
|         items:
 | |
|           $ref: '#/definitions/model.TimeRange'
 | |
|         type: array
 | |
|       template_id:
 | |
|         type: integer
 | |
|       template_name:
 | |
|         description: For display
 | |
|         type: string
 | |
|     type: object
 | |
|   model.UserPreference:
 | |
|     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:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.JSON'
 | |
|         description: Additional settings in JSON format
 | |
|       theme:
 | |
|         description: Theme name
 | |
|         type: string
 | |
|       updated_at:
 | |
|         type: string
 | |
|       user_id:
 | |
|         description: User ID with unique index
 | |
|         type: integer
 | |
|     type: object
 | |
|   model.WebConfig:
 | |
|     properties:
 | |
|       access_policy:
 | |
|         description: full_access, read_only
 | |
|         type: string
 | |
|       auth_mode:
 | |
|         description: none, smart, manual
 | |
|         type: string
 | |
|       login_accounts:
 | |
|         description: Web login credentials
 | |
|         items:
 | |
|           $ref: '#/definitions/model.WebLoginAccount'
 | |
|         type: array
 | |
|       proxy_settings:
 | |
|         allOf:
 | |
|         - $ref: '#/definitions/model.WebProxySettings'
 | |
|         description: Proxy configuration
 | |
|     type: object
 | |
|   model.WebLoginAccount:
 | |
|     properties:
 | |
|       is_default:
 | |
|         type: boolean
 | |
|       password:
 | |
|         type: string
 | |
|       status:
 | |
|         description: active, inactive
 | |
|         type: string
 | |
|       username:
 | |
|         type: string
 | |
|     type: object
 | |
|   model.WebProxySettings:
 | |
|     properties:
 | |
|       allowed_methods:
 | |
|         description: Allowed HTTP methods
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       blocked_paths:
 | |
|         description: Blocked URL paths
 | |
|         items:
 | |
|           type: string
 | |
|         type: array
 | |
|       max_concurrent:
 | |
|         description: Max concurrent connections
 | |
|         type: integer
 | |
|       recording_enabled:
 | |
|         description: Enable session recording
 | |
|         type: boolean
 | |
|       watermark_enabled:
 | |
|         description: Enable watermark
 | |
|         type: boolean
 | |
|     type: object
 | |
|   web_proxy.StartWebSessionRequest:
 | |
|     properties:
 | |
|       account_id:
 | |
|         type: integer
 | |
|       asset_id:
 | |
|         type: integer
 | |
|       asset_name:
 | |
|         type: string
 | |
|       auth_mode:
 | |
|         type: string
 | |
|     required:
 | |
|     - asset_id
 | |
|     type: object
 | |
|   web_proxy.StartWebSessionResponse:
 | |
|     properties:
 | |
|       message:
 | |
|         type: string
 | |
|       proxy_url:
 | |
|         type: string
 | |
|       session_id:
 | |
|         type: string
 | |
|     type: object
 | |
| info:
 | |
|   contact: {}
 | |
| paths:
 | |
|   /account:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or account
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: account id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: account ids
 | |
|         in: query
 | |
|         name: ids
 | |
|         type: string
 | |
|       - description: account name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       - description: is info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       - description: account type
 | |
|         in: query
 | |
|         name: type
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Account'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - account
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: account
 | |
|         in: body
 | |
|         name: account
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Account'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - account
 | |
|   /account/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: account id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - account
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: account id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account
 | |
|         in: body
 | |
|         name: account
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Account'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - account
 | |
|   /asset:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or ip
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: asset id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: asset ids
 | |
|         in: query
 | |
|         name: ids
 | |
|         type: string
 | |
|       - description: asset's parent id
 | |
|         in: query
 | |
|         name: parent_id
 | |
|         type: integer
 | |
|       - description: asset name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       - description: asset ip
 | |
|         in: query
 | |
|         name: ip
 | |
|         type: string
 | |
|       - description: is info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Asset'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - asset
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: asset
 | |
|         in: body
 | |
|         name: asset
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Asset'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - asset
 | |
|   /asset/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: asset id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - asset
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: asset id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: asset
 | |
|         in: body
 | |
|         name: asset
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Asset'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - asset
 | |
|   /asset/:id/permissions:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: asset id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account ids (comma separated, e.g. 123,456,789)
 | |
|         in: query
 | |
|         name: account_ids
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/controller.AssetPermissionMultiAccountResult'
 | |
|               type: object
 | |
|       tags:
 | |
|       - asset
 | |
|   /authorization:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: node id
 | |
|         in: query
 | |
|         name: node_id
 | |
|         type: integer
 | |
|       - description: asset id
 | |
|         in: query
 | |
|         name: asset_id
 | |
|         type: integer
 | |
|       - description: account id
 | |
|         in: query
 | |
|         name: account_id
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Account'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - authorization
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: authorization
 | |
|         in: body
 | |
|         name: authorization
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Authorization'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - authorization
 | |
|   /authorization/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: authorization id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - authorization
 | |
|   /authorization_v2:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         type: integer
 | |
|       - description: page size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         type: integer
 | |
|       - description: filter by enabled status
 | |
|         in: query
 | |
|         name: enabled
 | |
|         type: boolean
 | |
|       - description: search by name or description
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.AuthorizationV2'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: authorization rule
 | |
|         in: body
 | |
|         name: authorization
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.AuthorizationV2'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|   /authorization_v2/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: authorization id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: authorization id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.AuthorizationV2'
 | |
|               type: object
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: authorization id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: authorization rule
 | |
|         in: body
 | |
|         name: authorization
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.AuthorizationV2'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|   /authorization_v2/:id/clone:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: source authorization id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: clone request
 | |
|         in: body
 | |
|         name: body
 | |
|         required: true
 | |
|         schema:
 | |
|           type: object
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.AuthorizationV2'
 | |
|               type: object
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|   /authorization_v2/check:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: permission check request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/controller.CheckPermissionRequest'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.AuthResult'
 | |
|               type: object
 | |
|       tags:
 | |
|       - authorization_v2
 | |
|   /command:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or cmd
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: command id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: command ids
 | |
|         in: query
 | |
|         name: ids
 | |
|         type: string
 | |
|       - description: command name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       - description: command enable
 | |
|         in: query
 | |
|         name: enable
 | |
|         type: integer
 | |
|       - description: command category
 | |
|         in: query
 | |
|         name: category
 | |
|         type: string
 | |
|       - description: command risk level
 | |
|         in: query
 | |
|         name: risk_level
 | |
|         type: integer
 | |
|       - description: is info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       - description: name or cmd
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Command'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - command
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: command
 | |
|         in: body
 | |
|         name: command
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Command'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command
 | |
|   /command/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: command id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: command id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: command
 | |
|         in: body
 | |
|         name: command
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Command'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command
 | |
|   /command_template:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         type: integer
 | |
|       - description: page size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         type: integer
 | |
|       - description: search by name or description
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: template category
 | |
|         in: query
 | |
|         name: category
 | |
|         type: string
 | |
|       - description: filter by builtin status
 | |
|         in: query
 | |
|         name: builtin
 | |
|         type: boolean
 | |
|       - description: info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     $ref: '#/definitions/model.CommandTemplate'
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - command_template
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: command template
 | |
|         in: body
 | |
|         name: template
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.CommandTemplate'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command_template
 | |
|   /command_template/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: template id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command_template
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: template id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: command template
 | |
|         in: body
 | |
|         name: template
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.CommandTemplate'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - command_template
 | |
|   /command_template/:id/commands:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: template id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     $ref: '#/definitions/model.Command'
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - command_template
 | |
|   /command_template/builtin:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     $ref: '#/definitions/model.CommandTemplate'
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - command_template
 | |
|   /config:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: is info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.Config'
 | |
|               type: object
 | |
|       tags:
 | |
|       - config
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: config
 | |
|         in: body
 | |
|         name: command
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Config'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - config
 | |
|   /connect/:asset_id/:account_id/:protocol:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: width
 | |
|         in: query
 | |
|         name: w
 | |
|         type: integer
 | |
|       - description: height
 | |
|         in: query
 | |
|         name: h
 | |
|         type: integer
 | |
|       - description: dpi
 | |
|         in: query
 | |
|         name: dpi
 | |
|         type: integer
 | |
|       - description: session_id
 | |
|         in: query
 | |
|         name: session_id
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - connect
 | |
|   /connect/close/:session_id:
 | |
|     post:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - connect
 | |
|   /connect/monitor/:session_id:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - connect
 | |
|   /file/download/:asset_id/:account_id:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: asset_id
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account_id
 | |
|         in: path
 | |
|         name: account_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: dir
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: names (comma-separated for multiple files)
 | |
|         in: query
 | |
|         name: names
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/history:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: search
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: saction
 | |
|         in: query
 | |
|         name: action
 | |
|         type: integer
 | |
|       - description: start, RFC3339
 | |
|         in: query
 | |
|         name: start
 | |
|         type: string
 | |
|       - description: end, RFC3339
 | |
|         in: query
 | |
|         name: end
 | |
|         type: string
 | |
|       - description: uid
 | |
|         in: query
 | |
|         name: uid
 | |
|         type: integer
 | |
|       - description: asset id
 | |
|         in: query
 | |
|         name: asset_id
 | |
|         type: integer
 | |
|       - description: account id
 | |
|         in: query
 | |
|         name: account_id
 | |
|         type: integer
 | |
|       - description: client_ip
 | |
|         in: query
 | |
|         name: client_ip
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Session'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - file
 | |
|   /file/ls/:asset_id/:account_id:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: asset_id
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account_id
 | |
|         in: path
 | |
|         name: account_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: dir
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: 'show hidden files (default: false)'
 | |
|         in: query
 | |
|         name: show_hidden
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/mkdir/:asset_id/:account_id:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: asset_id
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account_id
 | |
|         in: path
 | |
|         name: account_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: 'dir '
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/session/:session_id/download:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: session_id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: dir
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: names (comma-separated for multiple files)
 | |
|         in: query
 | |
|         name: names
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/session/:session_id/ls:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: session_id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: dir
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: 'show hidden files (default: false)'
 | |
|         in: query
 | |
|         name: show_hidden
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/session/:session_id/mkdir:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: session_id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: dir
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/session/:session_id/upload:
 | |
|     post:
 | |
|       consumes:
 | |
|       - multipart/form-data
 | |
|       parameters:
 | |
|       - description: session_id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: 'target directory path (default: /tmp)'
 | |
|         in: query
 | |
|         name: dir
 | |
|         type: string
 | |
|       - description: Custom transfer ID for progress tracking (frontend generated)
 | |
|         in: query
 | |
|         name: transfer_id
 | |
|         type: string
 | |
|       - description: file to upload
 | |
|         in: formData
 | |
|         name: file
 | |
|         required: true
 | |
|         type: file
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /file/transfer/progress/id/:transfer_id:
 | |
|     get:
 | |
|       responses: {}
 | |
|       tags:
 | |
|       - file
 | |
|   /file/upload/:asset_id/:account_id:
 | |
|     post:
 | |
|       consumes:
 | |
|       - multipart/form-data
 | |
|       parameters:
 | |
|       - description: asset_id
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: account_id
 | |
|         in: path
 | |
|         name: account_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: 'target directory path (default: /tmp)'
 | |
|         in: query
 | |
|         name: dir
 | |
|         type: string
 | |
|       - description: Custom transfer ID for progress tracking (frontend generated)
 | |
|         in: query
 | |
|         name: transfer_id
 | |
|         type: string
 | |
|       - description: file to upload
 | |
|         in: formData
 | |
|         name: file
 | |
|         required: true
 | |
|         type: file
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - file
 | |
|   /gateway:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: gateway id
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: gateway id
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or host or account or port
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: gateway id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: gateway ids
 | |
|         in: query
 | |
|         name: ids
 | |
|         type: string
 | |
|       - description: gateway name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       - description: is info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       - description: account type
 | |
|         in: query
 | |
|         name: type
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Gateway'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - gateway
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: gateway
 | |
|         in: body
 | |
|         name: gateway
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Gateway'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - gateway
 | |
|   /gateway/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: gateway id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - gateway
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: gateway id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: gateway
 | |
|         in: body
 | |
|         name: gateway
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Gateway'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - gateway
 | |
|   /history:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: type
 | |
|         enum:
 | |
|         - account
 | |
|         - asset
 | |
|         - command
 | |
|         - gateway
 | |
|         - node
 | |
|         - public_key
 | |
|         in: query
 | |
|         name: type
 | |
|         type: string
 | |
|       - description: target_id
 | |
|         in: query
 | |
|         name: target_id
 | |
|         type: integer
 | |
|       - description: uid
 | |
|         in: query
 | |
|         name: uid
 | |
|         type: integer
 | |
|       - description: create=1 delete=2 update=3
 | |
|         in: query
 | |
|         name: action_type
 | |
|         type: integer
 | |
|       - description: start time, RFC3339
 | |
|         in: query
 | |
|         name: start
 | |
|         type: string
 | |
|       - description: end time, RFC3339
 | |
|         in: query
 | |
|         name: end
 | |
|         type: string
 | |
|       - description: search
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.History'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - history
 | |
|   /history/type/mapping:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   additionalProperties:
 | |
|                     type: string
 | |
|                   type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - session
 | |
|   /node:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: node id
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: node id
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: node id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: node ids
 | |
|         in: query
 | |
|         name: ids
 | |
|         type: string
 | |
|       - description: node's parent id
 | |
|         in: query
 | |
|         name: parent_id
 | |
|         type: integer
 | |
|       - description: node name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       - description: exclude itself and its child
 | |
|         in: query
 | |
|         name: no_self_child
 | |
|         type: integer
 | |
|       - description: include itself and its parent
 | |
|         in: query
 | |
|         name: self_parent
 | |
|         type: integer
 | |
|       - description: return tree structure with children
 | |
|         in: query
 | |
|         name: recursive
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Node'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - node
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: node
 | |
|         in: body
 | |
|         name: node
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Node'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - node
 | |
|   /node/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: node id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - node
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: node id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: node
 | |
|         in: body
 | |
|         name: node
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.Node'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - node
 | |
|   /preference:
 | |
|     get:
 | |
|       description: Get terminal preferences for the current user
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.UserPreference'
 | |
|               type: object
 | |
|       summary: Get user preferences
 | |
|       tags:
 | |
|       - Preference
 | |
|     put:
 | |
|       description: Update terminal preferences for the current user
 | |
|       parameters:
 | |
|       - description: User preferences
 | |
|         in: body
 | |
|         name: preference
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.UserPreference'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.UserPreference'
 | |
|               type: object
 | |
|       summary: Update user preferences
 | |
|       tags:
 | |
|       - Preference
 | |
|   /proxy:
 | |
|     get:
 | |
|       consumes:
 | |
|       - '*/*'
 | |
|       description: Handle web proxy requests for subdomain-based assets
 | |
|       parameters:
 | |
|       - description: Asset subdomain (asset-123.domain.com)
 | |
|         in: header
 | |
|         name: Host
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Session ID (alternative to cookie)
 | |
|         in: query
 | |
|         name: session_id
 | |
|         type: string
 | |
|       produces:
 | |
|       - '*/*'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: Proxied content
 | |
|         "400":
 | |
|           description: Invalid subdomain format
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "401":
 | |
|           description: Session expired page
 | |
|         "403":
 | |
|           description: Access denied
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Proxy web requests
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /public_key:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: publicKey id
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: publicKey id
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or mac
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: publicKey id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: publicKey name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.PublicKey'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - public_key
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: publicKey
 | |
|         in: body
 | |
|         name: publicKey
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.PublicKey'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - public_key
 | |
|   /public_key/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: publicKey id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - public_key
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: publicKey id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: publicKey
 | |
|         in: body
 | |
|         name: publicKey
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.PublicKey'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - public_key
 | |
|   /quick_command:
 | |
|     get:
 | |
|       description: Get all quick commands available to the user
 | |
|       parameters:
 | |
|       - description: page index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or command
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: command id
 | |
|         in: query
 | |
|         name: id
 | |
|         type: integer
 | |
|       - description: command name
 | |
|         in: query
 | |
|         name: name
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.QuickCommand'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - QuickCommand
 | |
|     post:
 | |
|       description: Create a new quick command
 | |
|       parameters:
 | |
|       - description: Quick command data
 | |
|         in: body
 | |
|         name: quick_command
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.QuickCommand'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - QuickCommand
 | |
|   /quick_command/{id}:
 | |
|     delete:
 | |
|       description: Delete a quick command by ID
 | |
|       parameters:
 | |
|       - description: Quick command ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - QuickCommand
 | |
|     put:
 | |
|       description: Update an existing quick command by ID
 | |
|       parameters:
 | |
|       - description: Quick command ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: Updated quick command data
 | |
|         in: body
 | |
|         name: quick_command
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.QuickCommand'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - QuickCommand
 | |
|   /rdp/sessions/{session_id}/files:
 | |
|     get:
 | |
|       description: Get file list for RDP session drive
 | |
|       parameters:
 | |
|       - description: Session ID
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Directory path
 | |
|         in: query
 | |
|         name: path
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: List RDP session files
 | |
|       tags:
 | |
|       - RDP File
 | |
|   /rdp/sessions/{session_id}/files/download:
 | |
|     get:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Download files from RDP session drive (supports multiple files
 | |
|         via names parameter)
 | |
|       parameters:
 | |
|       - description: Session ID
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Directory path
 | |
|         in: query
 | |
|         name: dir
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: File names (comma-separated for multiple files)
 | |
|         in: query
 | |
|         name: names
 | |
|         required: true
 | |
|         type: string
 | |
|       produces:
 | |
|       - application/octet-stream
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             type: file
 | |
|       summary: Download files from RDP session
 | |
|       tags:
 | |
|       - RDP File
 | |
|   /rdp/sessions/{session_id}/files/mkdir:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Create directory in RDP session drive
 | |
|       parameters:
 | |
|       - description: Session ID
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Directory path
 | |
|         in: query
 | |
|         name: path
 | |
|         required: true
 | |
|         type: string
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Create directory in RDP session
 | |
|       tags:
 | |
|       - RDP File
 | |
|   /rdp/sessions/{session_id}/files/prepare:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Create transfer record before RDP upload starts for progress tracking
 | |
|       parameters:
 | |
|       - description: Session ID
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Custom transfer ID
 | |
|         in: query
 | |
|         name: transfer_id
 | |
|         type: string
 | |
|       - description: Filename
 | |
|         in: query
 | |
|         name: filename
 | |
|         type: string
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Create transfer record for RDP upload
 | |
|       tags:
 | |
|       - RDP File
 | |
|   /rdp/sessions/{session_id}/files/upload:
 | |
|     post:
 | |
|       consumes:
 | |
|       - multipart/form-data
 | |
|       description: Upload file to RDP session drive
 | |
|       parameters:
 | |
|       - description: Session ID
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: Custom transfer ID for progress tracking (frontend generated)
 | |
|         in: query
 | |
|         name: transfer_id
 | |
|         type: string
 | |
|       - description: Target directory path
 | |
|         in: query
 | |
|         name: path
 | |
|         type: string
 | |
|       - description: File to upload
 | |
|         in: formData
 | |
|         name: file
 | |
|         required: true
 | |
|         type: file
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Upload file to RDP session
 | |
|       tags:
 | |
|       - RDP File
 | |
|   /session:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: search
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: status, online=1, offline=2
 | |
|         in: query
 | |
|         name: status
 | |
|         type: integer
 | |
|       - description: start, RFC3339
 | |
|         in: query
 | |
|         name: start
 | |
|         type: string
 | |
|       - description: end, RFC3339
 | |
|         in: query
 | |
|         name: end
 | |
|         type: string
 | |
|       - description: uid
 | |
|         in: query
 | |
|         name: uid
 | |
|         type: integer
 | |
|       - description: asset id
 | |
|         in: query
 | |
|         name: asset_id
 | |
|         type: integer
 | |
|       - description: client_ip
 | |
|         in: query
 | |
|         name: client_ip
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Session'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - session
 | |
|   /session/:session_id/cmd:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: session id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       - description: search
 | |
|         in: query
 | |
|         name: search
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.SessionCmd'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - session
 | |
|   /session/cmd:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: SessionCmd
 | |
|         in: body
 | |
|         name: sessioncmd
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.SessionCmd'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - session
 | |
|   /session/option/asset:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.SessionOptionAsset'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - session
 | |
|   /session/option/clientip:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     type: string
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - session
 | |
|   /session/replay/:session_id:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: session id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             type: string
 | |
|       tags:
 | |
|       - session
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: session id
 | |
|         in: path
 | |
|         name: session_id
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - session
 | |
|   /share:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: name or ip
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: start, RFC3339
 | |
|         in: query
 | |
|         name: start
 | |
|         type: string
 | |
|       - description: end, RFC3339
 | |
|         in: query
 | |
|         name: end
 | |
|         type: string
 | |
|       - description: asset id
 | |
|         in: query
 | |
|         name: asset_id
 | |
|         type: string
 | |
|       - description: account id
 | |
|         in: query
 | |
|         name: account_id
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.Share'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - share
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: share
 | |
|         in: body
 | |
|         name: share
 | |
|         required: true
 | |
|         schema:
 | |
|           items:
 | |
|             $ref: '#/definitions/model.Share'
 | |
|           type: array
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           type: string
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - share
 | |
|   /share/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: share id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - share
 | |
|   /share/connect/:uuid:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: width
 | |
|         in: query
 | |
|         name: w
 | |
|         type: integer
 | |
|       - description: height
 | |
|         in: query
 | |
|         name: h
 | |
|         type: integer
 | |
|       - description: dpi
 | |
|         in: query
 | |
|         name: dpi
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - share
 | |
|   /stat/account:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: account name
 | |
|         enum:
 | |
|         - day
 | |
|         - week
 | |
|         - month
 | |
|         in: query
 | |
|         name: type
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.StatAccount'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /stat/asset:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: account name
 | |
|         enum:
 | |
|         - day
 | |
|         - week
 | |
|         - month
 | |
|         in: query
 | |
|         name: type
 | |
|         required: true
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.StatAsset'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /stat/assettype:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.StatAssetType'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /stat/count:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.StatCount'
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /stat/count/ofuser:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.StatCountOfUser'
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /stat/rank/ofuser:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.StatRankOfUser'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       tags:
 | |
|       - stat
 | |
|   /storage/configs:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page_index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         type: integer
 | |
|       - description: page_size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         type: integer
 | |
|       - description: search
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: storage type filter
 | |
|         in: query
 | |
|         name: type
 | |
|         type: string
 | |
|       - description: enabled filter (true/false)
 | |
|         in: query
 | |
|         name: enabled
 | |
|         type: string
 | |
|       - description: primary filter (true/false)
 | |
|         in: query
 | |
|         name: primary
 | |
|         type: string
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   allOf:
 | |
|                   - $ref: '#/definitions/controller.ListData'
 | |
|                   - properties:
 | |
|                       list:
 | |
|                         items:
 | |
|                           $ref: '#/definitions/model.StorageConfig'
 | |
|                         type: array
 | |
|                     type: object
 | |
|               type: object
 | |
|       summary: List all storage configurations
 | |
|       tags:
 | |
|       - storage
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: Storage configuration
 | |
|         in: body
 | |
|         name: config
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.StorageConfig'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Create a new storage configuration
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/configs/{id}:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: Storage ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Delete a storage configuration
 | |
|       tags:
 | |
|       - storage
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: Storage ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/model.StorageConfig'
 | |
|               type: object
 | |
|       summary: Get storage configuration by ID
 | |
|       tags:
 | |
|       - storage
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: Storage ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: Storage configuration
 | |
|         in: body
 | |
|         name: config
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.StorageConfig'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Update an existing storage configuration
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/configs/{id}/set-primary:
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: Storage ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Set a storage provider as primary
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/configs/{id}/toggle:
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: Storage ID
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Enable or disable a storage provider
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/health:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   additionalProperties: true
 | |
|                   type: object
 | |
|               type: object
 | |
|       summary: Get health status of all storage providers
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/metrics:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   additionalProperties: true
 | |
|                   type: object
 | |
|               type: object
 | |
|       summary: Get storage usage metrics
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/metrics/refresh:
 | |
|     post:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Refresh storage usage metrics
 | |
|       tags:
 | |
|       - storage
 | |
|   /storage/test-connection:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: Storage configuration to test
 | |
|         in: body
 | |
|         name: config
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.StorageConfig'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       summary: Test storage connection
 | |
|       tags:
 | |
|       - storage
 | |
|   /time_template:
 | |
|     get:
 | |
|       parameters:
 | |
|       - description: page index
 | |
|         in: query
 | |
|         name: page_index
 | |
|         type: integer
 | |
|       - description: page size
 | |
|         in: query
 | |
|         name: page_size
 | |
|         type: integer
 | |
|       - description: search by name or description
 | |
|         in: query
 | |
|         name: search
 | |
|         type: string
 | |
|       - description: template category
 | |
|         in: query
 | |
|         name: category
 | |
|         type: string
 | |
|       - description: filter by active status
 | |
|         in: query
 | |
|         name: active
 | |
|         type: boolean
 | |
|       - description: info mode
 | |
|         in: query
 | |
|         name: info
 | |
|         type: boolean
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     $ref: '#/definitions/model.TimeTemplate'
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - time_template
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: time template
 | |
|         in: body
 | |
|         name: template
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.TimeTemplate'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - time_template
 | |
|   /time_template/:id:
 | |
|     delete:
 | |
|       parameters:
 | |
|       - description: template id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - time_template
 | |
|     put:
 | |
|       parameters:
 | |
|       - description: template id
 | |
|         in: path
 | |
|         name: id
 | |
|         required: true
 | |
|         type: integer
 | |
|       - description: time template
 | |
|         in: body
 | |
|         name: template
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/model.TimeTemplate'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - time_template
 | |
|   /time_template/builtin:
 | |
|     get:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   items:
 | |
|                     $ref: '#/definitions/model.TimeTemplate'
 | |
|                   type: array
 | |
|               type: object
 | |
|       tags:
 | |
|       - time_template
 | |
|   /time_template/check:
 | |
|     post:
 | |
|       parameters:
 | |
|       - description: time access check request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/controller.CheckTimeAccessRequest'
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             allOf:
 | |
|             - $ref: '#/definitions/controller.HttpResponse'
 | |
|             - properties:
 | |
|                 data:
 | |
|                   $ref: '#/definitions/controller.CheckTimeAccessResponse'
 | |
|               type: object
 | |
|       tags:
 | |
|       - time_template
 | |
|   /time_template/init:
 | |
|     post:
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/controller.HttpResponse'
 | |
|       tags:
 | |
|       - time_template
 | |
|   /web_proxy/cleanup:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Clean up web session when browser tab is closed
 | |
|       parameters:
 | |
|       - description: Cleanup request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           additionalProperties:
 | |
|             type: string
 | |
|           type: object
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: Session cleaned up
 | |
|           schema:
 | |
|             additionalProperties:
 | |
|               type: string
 | |
|             type: object
 | |
|       summary: Cleanup web session
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/close:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Close an active web session and clean up resources
 | |
|       parameters:
 | |
|       - description: Session close request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           additionalProperties:
 | |
|             type: string
 | |
|           type: object
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: Session closed successfully
 | |
|           schema:
 | |
|             additionalProperties:
 | |
|               type: string
 | |
|             type: object
 | |
|         "400":
 | |
|           description: Invalid request
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "404":
 | |
|           description: Session not found
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Close web session
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/config/{asset_id}:
 | |
|     get:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Get web asset configuration by asset ID
 | |
|       parameters:
 | |
|       - description: Asset ID
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/model.WebConfig'
 | |
|         "400":
 | |
|           description: Invalid asset ID
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "404":
 | |
|           description: Asset not found
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Get web asset configuration
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/external_redirect:
 | |
|     get:
 | |
|       consumes:
 | |
|       - text/html
 | |
|       description: Show a page when an external redirect is blocked by the proxy
 | |
|       parameters:
 | |
|       - description: Target URL that was blocked
 | |
|         in: query
 | |
|         name: url
 | |
|         required: true
 | |
|         type: string
 | |
|       produces:
 | |
|       - text/html
 | |
|       responses:
 | |
|         "200":
 | |
|           description: External redirect blocked page
 | |
|       summary: Handle external redirect
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/heartbeat:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Update the last activity time for a web session (heartbeat)
 | |
|       parameters:
 | |
|       - description: Heartbeat request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           additionalProperties:
 | |
|             type: string
 | |
|           type: object
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: Heartbeat updated
 | |
|           schema:
 | |
|             additionalProperties:
 | |
|               type: string
 | |
|             type: object
 | |
|         "400":
 | |
|           description: Invalid request
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "404":
 | |
|           description: Session not found
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Update session heartbeat
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/sessions/{asset_id}:
 | |
|     get:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Get list of active web sessions for a specific asset
 | |
|       parameters:
 | |
|       - description: Asset ID
 | |
|         in: path
 | |
|         name: asset_id
 | |
|         required: true
 | |
|         type: integer
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: List of active sessions
 | |
|           schema:
 | |
|             items:
 | |
|               additionalProperties: true
 | |
|               type: object
 | |
|             type: array
 | |
|         "400":
 | |
|           description: Invalid asset ID
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Get active web sessions
 | |
|       tags:
 | |
|       - WebProxy
 | |
|   /web_proxy/start:
 | |
|     post:
 | |
|       consumes:
 | |
|       - application/json
 | |
|       description: Start a new web session for the specified asset
 | |
|       parameters:
 | |
|       - description: Start session request
 | |
|         in: body
 | |
|         name: request
 | |
|         required: true
 | |
|         schema:
 | |
|           $ref: '#/definitions/web_proxy.StartWebSessionRequest'
 | |
|       produces:
 | |
|       - application/json
 | |
|       responses:
 | |
|         "200":
 | |
|           description: OK
 | |
|           schema:
 | |
|             $ref: '#/definitions/web_proxy.StartWebSessionResponse'
 | |
|         "400":
 | |
|           description: Invalid request
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "403":
 | |
|           description: No permission
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "404":
 | |
|           description: Asset not found
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "429":
 | |
|           description: Maximum concurrent connections exceeded
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|         "500":
 | |
|           description: Internal server error
 | |
|           schema:
 | |
|             additionalProperties: true
 | |
|             type: object
 | |
|       summary: Start web session
 | |
|       tags:
 | |
|       - WebProxy
 | |
| swagger: "2.0"
 | 
