This MVP release provides a complete full-stack solution for managing action mappings in Geutebruck's GeViScope and GeViSoft video surveillance systems. ## Features ### Flutter Web Application (Port 8081) - Modern, responsive UI for managing action mappings - Action picker dialog with full parameter configuration - Support for both GSC (GeViScope) and G-Core server actions - Consistent UI for input and output actions with edit/delete capabilities - Real-time action mapping creation, editing, and deletion - Server categorization (GSC: prefix for GeViScope, G-Core: prefix for G-Core servers) ### FastAPI REST Backend (Port 8000) - RESTful API for action mapping CRUD operations - Action template service with comprehensive action catalog (247 actions) - Server management (G-Core and GeViScope servers) - Configuration tree reading and writing - JWT authentication with role-based access control - PostgreSQL database integration ### C# SDK Bridge (gRPC, Port 50051) - Native integration with GeViSoft SDK (GeViProcAPINET_4_0.dll) - Action mapping creation with correct binary format - Support for GSC and G-Core action types - Proper Camera parameter inclusion in action strings (fixes CrossSwitch bug) - Action ID lookup table with server-specific action IDs - Configuration reading/writing via SetupClient ## Bug Fixes - **CrossSwitch Bug**: GSC and G-Core actions now correctly display camera/PTZ head parameters in GeViSet - Action strings now include Camera parameter: `@ PanLeft (Comment: "", Camera: 101028)` - Proper filter flags and VideoInput=0 for action mappings - Correct action ID assignment (4198 for GSC, 9294 for G-Core PanLeft) ## Technical Stack - **Frontend**: Flutter Web, Dart, Dio HTTP client - **Backend**: Python FastAPI, PostgreSQL, Redis - **SDK Bridge**: C# .NET 8.0, gRPC, GeViSoft SDK - **Authentication**: JWT tokens - **Configuration**: GeViSoft .set files (binary format) ## Credentials - GeViSoft/GeViScope: username=sysadmin, password=masterkey - Default admin: username=admin, password=admin123 ## Deployment All services run on localhost: - Flutter Web: http://localhost:8081 - FastAPI: http://localhost:8000 - SDK Bridge gRPC: localhost:50051 - GeViServer: localhost (default port) Generated with Claude Code (https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
1845 lines
52 KiB
YAML
1845 lines
52 KiB
YAML
openapi: 3.1.0
|
|
info:
|
|
title: Geutebruck Cross-Switching API
|
|
description: REST API for Geutebruck GeViScope/GeViSoft Cross-Switching Control
|
|
version: 1.0.0
|
|
paths:
|
|
/health:
|
|
get:
|
|
tags:
|
|
- system
|
|
summary: Health Check
|
|
description: 'Enhanced health check endpoint
|
|
|
|
|
|
Checks connectivity to:
|
|
|
|
- Database (PostgreSQL)
|
|
|
|
- Redis cache
|
|
|
|
- SDK Bridge (gRPC)
|
|
|
|
|
|
Returns overall status and individual component statuses'
|
|
operationId: health_check_health_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
/metrics:
|
|
get:
|
|
tags:
|
|
- system
|
|
summary: Metrics
|
|
description: 'Metrics endpoint
|
|
|
|
|
|
Provides basic API metrics:
|
|
|
|
- Total routes registered
|
|
|
|
- API version
|
|
|
|
- Environment'
|
|
operationId: metrics_metrics_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
/:
|
|
get:
|
|
tags:
|
|
- system
|
|
summary: Root
|
|
description: API root endpoint
|
|
operationId: root__get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
/api/v1/auth/login:
|
|
post:
|
|
tags:
|
|
- authentication
|
|
summary: User login
|
|
description: Authenticate with username and password to receive JWT tokens
|
|
operationId: login_api_v1_auth_login_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/LoginRequest'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/TokenResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/auth/logout:
|
|
post:
|
|
tags:
|
|
- authentication
|
|
summary: User logout
|
|
description: Logout by blacklisting the current access token
|
|
operationId: logout_api_v1_auth_logout_post
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/LogoutResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/auth/refresh:
|
|
post:
|
|
tags:
|
|
- authentication
|
|
summary: Refresh access token
|
|
description: Generate new access token using refresh token
|
|
operationId: refresh_token_api_v1_auth_refresh_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RefreshTokenRequest'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/auth/me:
|
|
get:
|
|
tags:
|
|
- authentication
|
|
summary: Get current user
|
|
description: Get information about the currently authenticated user
|
|
operationId: get_me_api_v1_auth_me_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/UserInfo'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/cameras:
|
|
get:
|
|
tags:
|
|
- cameras
|
|
summary: List all cameras
|
|
description: Get list of all cameras discovered from GeViScope
|
|
operationId: list_cameras_api_v1_cameras_get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: use_cache
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
description: Use Redis cache (60s TTL)
|
|
default: true
|
|
title: Use Cache
|
|
description: Use Redis cache (60s TTL)
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraListResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/cameras/{camera_id}:
|
|
get:
|
|
tags:
|
|
- cameras
|
|
summary: Get camera details
|
|
description: Get detailed information about a specific camera
|
|
operationId: get_camera_api_v1_cameras__camera_id__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: camera_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Camera Id
|
|
- name: use_cache
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
description: Use Redis cache (60s TTL)
|
|
default: true
|
|
title: Use Cache
|
|
description: Use Redis cache (60s TTL)
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraDetailResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/cameras/refresh:
|
|
post:
|
|
tags:
|
|
- cameras
|
|
summary: Refresh camera list
|
|
description: Force refresh camera list from SDK Bridge (bypass cache)
|
|
operationId: refresh_cameras_api_v1_cameras_refresh_post
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/cameras/search/{query}:
|
|
get:
|
|
tags:
|
|
- cameras
|
|
summary: Search cameras
|
|
description: Search cameras by name or description
|
|
operationId: search_cameras_api_v1_cameras_search__query__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: query
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Query
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraListResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/cameras/filter/online:
|
|
get:
|
|
tags:
|
|
- cameras
|
|
summary: Get online cameras
|
|
description: Get list of online cameras only
|
|
operationId: get_online_cameras_api_v1_cameras_filter_online_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/cameras/filter/ptz:
|
|
get:
|
|
tags:
|
|
- cameras
|
|
summary: Get PTZ cameras
|
|
description: Get list of cameras with PTZ capabilities
|
|
operationId: get_ptz_cameras_api_v1_cameras_filter_ptz_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CameraListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/monitors:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: List all monitors
|
|
description: Get list of all monitors (video outputs) from GeViScope
|
|
operationId: list_monitors_api_v1_monitors_get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: use_cache
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
description: Use Redis cache (60s TTL)
|
|
default: true
|
|
title: Use Cache
|
|
description: Use Redis cache (60s TTL)
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorListResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/monitors/{monitor_id}:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: Get monitor details
|
|
description: Get detailed information about a specific monitor
|
|
operationId: get_monitor_api_v1_monitors__monitor_id__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: monitor_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Monitor Id
|
|
- name: use_cache
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: boolean
|
|
description: Use Redis cache (60s TTL)
|
|
default: true
|
|
title: Use Cache
|
|
description: Use Redis cache (60s TTL)
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorDetailResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/monitors/refresh:
|
|
post:
|
|
tags:
|
|
- monitors
|
|
summary: Refresh monitor list
|
|
description: Force refresh monitor list from SDK Bridge (bypass cache)
|
|
operationId: refresh_monitors_api_v1_monitors_refresh_post
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/monitors/search/{query}:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: Search monitors
|
|
description: Search monitors by name or description
|
|
operationId: search_monitors_api_v1_monitors_search__query__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: query
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Query
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorListResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/monitors/filter/available:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: Get available monitors
|
|
description: Get list of available (idle/free) monitors
|
|
operationId: get_available_monitors_api_v1_monitors_filter_available_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/monitors/filter/active:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: Get active monitors
|
|
description: Get list of active monitors (displaying a camera)
|
|
operationId: get_active_monitors_api_v1_monitors_filter_active_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/MonitorListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/monitors/routing:
|
|
get:
|
|
tags:
|
|
- monitors
|
|
summary: Get current routing state
|
|
description: Get current routing state (monitor -> camera mapping)
|
|
operationId: get_routing_state_api_v1_monitors_routing_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/crossswitch:
|
|
post:
|
|
tags:
|
|
- crossswitch
|
|
summary: Execute cross-switch
|
|
description: Route a camera to a monitor (requires Operator role or higher)
|
|
operationId: execute_crossswitch_api_v1_crossswitch_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CrossSwitchRequest'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/CrossSwitchResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/crossswitch/clear:
|
|
post:
|
|
tags:
|
|
- crossswitch
|
|
summary: Clear monitor
|
|
description: Clear camera from monitor (requires Operator role or higher)
|
|
operationId: clear_monitor_api_v1_crossswitch_clear_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ClearMonitorRequest'
|
|
required: true
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ClearMonitorResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/crossswitch/routing:
|
|
get:
|
|
tags:
|
|
- crossswitch
|
|
summary: Get routing state
|
|
description: Get current routing state (active camera-to-monitor mappings)
|
|
operationId: get_routing_state_api_v1_crossswitch_routing_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RoutingStateResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/crossswitch/history:
|
|
get:
|
|
tags:
|
|
- crossswitch
|
|
summary: Get routing history
|
|
description: Get historical routing records (all routes including cleared)
|
|
operationId: get_routing_history_api_v1_crossswitch_history_get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: limit
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
maximum: 1000
|
|
minimum: 1
|
|
description: Maximum records to return
|
|
default: 100
|
|
title: Limit
|
|
description: Maximum records to return
|
|
- name: offset
|
|
in: query
|
|
required: false
|
|
schema:
|
|
type: integer
|
|
minimum: 0
|
|
description: Number of records to skip
|
|
default: 0
|
|
title: Offset
|
|
description: Number of records to skip
|
|
- name: camera_id
|
|
in: query
|
|
required: false
|
|
schema:
|
|
anyOf:
|
|
- type: integer
|
|
exclusiveMinimum: 0
|
|
- type: 'null'
|
|
description: Filter by camera ID
|
|
title: Camera Id
|
|
description: Filter by camera ID
|
|
- name: monitor_id
|
|
in: query
|
|
required: false
|
|
schema:
|
|
anyOf:
|
|
- type: integer
|
|
exclusiveMinimum: 0
|
|
- type: 'null'
|
|
description: Filter by monitor ID
|
|
title: Monitor Id
|
|
description: Filter by monitor ID
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/RouteHistoryResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/configuration:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: Get configuration tree (root level)
|
|
description: Get root-level folders - fast overview
|
|
operationId: read_configuration_tree_root_api_v1_configuration_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/configuration/path:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: Get specific configuration folder
|
|
description: Get a specific folder (e.g., MappingRules, Users)
|
|
operationId: read_configuration_path_api_v1_configuration_path_get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: path
|
|
in: query
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Path
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/configuration/action-mappings:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: List all action mappings
|
|
description: Get all action mappings with input/output actions
|
|
operationId: list_action_mappings_api_v1_configuration_action_mappings_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingListResponse'
|
|
security:
|
|
- HTTPBearer: []
|
|
post:
|
|
tags:
|
|
- configuration
|
|
summary: Create action mapping
|
|
description: Create a new action mapping
|
|
operationId: create_action_mapping_api_v1_configuration_action_mappings_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingCreate'
|
|
required: true
|
|
responses:
|
|
'201':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingOperationResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/configuration/action-mappings/{mapping_id}:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: Get single action mapping
|
|
description: Get details of a specific action mapping by ID
|
|
operationId: get_action_mapping_api_v1_configuration_action_mappings__mapping_id__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: mapping_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Mapping Id
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
put:
|
|
tags:
|
|
- configuration
|
|
summary: Update action mapping
|
|
description: Update an existing action mapping
|
|
operationId: update_action_mapping_api_v1_configuration_action_mappings__mapping_id__put
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: mapping_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Mapping Id
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingUpdate'
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingOperationResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
delete:
|
|
tags:
|
|
- configuration
|
|
summary: Delete action mapping
|
|
description: Delete an action mapping
|
|
operationId: delete_action_mapping_api_v1_configuration_action_mappings__mapping_id__delete
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: mapping_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: integer
|
|
title: Mapping Id
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/ActionMappingOperationResponse'
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
/api/v1/configuration/servers:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: List all servers
|
|
description: Get all G-core servers from GeViGCoreServer folder
|
|
operationId: list_servers_api_v1_configuration_servers_get
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
security:
|
|
- HTTPBearer: []
|
|
post:
|
|
tags:
|
|
- configuration
|
|
summary: Create server
|
|
description: Create a new G-core server
|
|
operationId: create_server_api_v1_configuration_servers_post
|
|
requestBody:
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
title: Server Data
|
|
required: true
|
|
responses:
|
|
'201':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
security:
|
|
- HTTPBearer: []
|
|
/api/v1/configuration/servers/{server_id}:
|
|
get:
|
|
tags:
|
|
- configuration
|
|
summary: Get single server
|
|
description: Get details of a specific G-core server by ID
|
|
operationId: get_server_api_v1_configuration_servers__server_id__get
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: server_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Server Id
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
put:
|
|
tags:
|
|
- configuration
|
|
summary: Update server
|
|
description: Update an existing G-core server
|
|
operationId: update_server_api_v1_configuration_servers__server_id__put
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: server_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Server Id
|
|
requestBody:
|
|
required: true
|
|
content:
|
|
application/json:
|
|
schema:
|
|
type: object
|
|
title: Server Data
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
delete:
|
|
tags:
|
|
- configuration
|
|
summary: Delete server
|
|
description: Delete a G-core server
|
|
operationId: delete_server_api_v1_configuration_servers__server_id__delete
|
|
security:
|
|
- HTTPBearer: []
|
|
parameters:
|
|
- name: server_id
|
|
in: path
|
|
required: true
|
|
schema:
|
|
type: string
|
|
title: Server Id
|
|
responses:
|
|
'200':
|
|
description: Successful Response
|
|
content:
|
|
application/json:
|
|
schema: {}
|
|
'422':
|
|
description: Validation Error
|
|
content:
|
|
application/json:
|
|
schema:
|
|
$ref: '#/components/schemas/HTTPValidationError'
|
|
components:
|
|
schemas:
|
|
Action:
|
|
properties:
|
|
action:
|
|
type: string
|
|
title: Action
|
|
description: Action name/command
|
|
parameters:
|
|
additionalProperties:
|
|
type: string
|
|
type: object
|
|
title: Parameters
|
|
description: Action parameters as key-value pairs
|
|
type: object
|
|
required:
|
|
- action
|
|
title: Action
|
|
description: Single action with parameters
|
|
example:
|
|
action: CrossSwitch C_101027 -> M
|
|
parameters:
|
|
SwitchMode: 'True'
|
|
VideoInput: '101027'
|
|
VideoOutput: '1'
|
|
ActionMappingCreate:
|
|
properties:
|
|
name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Name
|
|
description: Optional descriptive name for the mapping
|
|
input_actions:
|
|
items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
title: Input Actions
|
|
description: Input/trigger actions (currently not distinguished in binary
|
|
format)
|
|
output_actions:
|
|
items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
minItems: 1
|
|
title: Output Actions
|
|
description: Output/response actions (at least one required)
|
|
type: object
|
|
required:
|
|
- output_actions
|
|
title: ActionMappingCreate
|
|
description: Request to create a new action mapping
|
|
example:
|
|
input_actions: []
|
|
name: Switch to Camera 101027
|
|
output_actions:
|
|
- action: CrossSwitch C_101027 -> M
|
|
parameters:
|
|
SwitchMode: 'True'
|
|
VideoInput: '101027'
|
|
ActionMappingListResponse:
|
|
properties:
|
|
total_mappings:
|
|
type: integer
|
|
title: Total Mappings
|
|
description: Total number of mappings
|
|
mappings_with_parameters:
|
|
type: integer
|
|
title: Mappings With Parameters
|
|
description: Count of mappings that have parameters
|
|
mappings:
|
|
items:
|
|
$ref: '#/components/schemas/ActionMappingResponse'
|
|
type: array
|
|
title: Mappings
|
|
description: List of action mappings
|
|
type: object
|
|
required:
|
|
- total_mappings
|
|
- mappings_with_parameters
|
|
- mappings
|
|
title: ActionMappingListResponse
|
|
description: Response with list of action mappings
|
|
example:
|
|
mappings:
|
|
- id: 1
|
|
input_actions: []
|
|
offset: 252173
|
|
output_actions:
|
|
- action: CrossSwitch C_101027 -> M
|
|
parameters:
|
|
SwitchMode: 'True'
|
|
mappings_with_parameters: 11
|
|
total_mappings: 51
|
|
ActionMappingOperationResponse:
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
title: Success
|
|
description: Operation success status
|
|
message:
|
|
type: string
|
|
title: Message
|
|
description: Operation result message
|
|
mapping:
|
|
anyOf:
|
|
- $ref: '#/components/schemas/ActionMappingResponse'
|
|
- type: 'null'
|
|
description: The created/updated mapping (null for delete)
|
|
type: object
|
|
required:
|
|
- success
|
|
- message
|
|
title: ActionMappingOperationResponse
|
|
description: Response for create/update/delete operations
|
|
example:
|
|
mapping:
|
|
id: 52
|
|
input_actions: []
|
|
name: New mapping
|
|
offset: 275000
|
|
output_actions:
|
|
- action: TestAction
|
|
parameters: {}
|
|
message: Action mapping created successfully
|
|
success: true
|
|
ActionMappingResponse:
|
|
properties:
|
|
name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Name
|
|
description: Optional descriptive name for the mapping
|
|
input_actions:
|
|
items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
title: Input Actions
|
|
description: Input/trigger actions (currently not distinguished in binary
|
|
format)
|
|
output_actions:
|
|
items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
minItems: 1
|
|
title: Output Actions
|
|
description: Output/response actions (at least one required)
|
|
id:
|
|
type: integer
|
|
title: Id
|
|
description: Sequential ID (1-based index)
|
|
offset:
|
|
type: integer
|
|
title: Offset
|
|
description: Byte offset in .set file
|
|
type: object
|
|
required:
|
|
- output_actions
|
|
- id
|
|
- offset
|
|
title: ActionMappingResponse
|
|
description: Response with action mapping details
|
|
example:
|
|
id: 1
|
|
input_actions: []
|
|
name: Switch to Camera 101027
|
|
offset: 252173
|
|
output_actions:
|
|
- action: CrossSwitch C_101027 -> M
|
|
parameters:
|
|
SwitchMode: 'True'
|
|
VideoInput: '101027'
|
|
- action: GSC ViewerConnectLive V <- C
|
|
parameters: {}
|
|
ActionMappingUpdate:
|
|
properties:
|
|
name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Name
|
|
description: Updated name
|
|
input_actions:
|
|
anyOf:
|
|
- items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
- type: 'null'
|
|
title: Input Actions
|
|
description: Updated input actions
|
|
output_actions:
|
|
anyOf:
|
|
- items:
|
|
$ref: '#/components/schemas/Action'
|
|
type: array
|
|
- type: 'null'
|
|
title: Output Actions
|
|
description: Updated output actions
|
|
type: object
|
|
title: ActionMappingUpdate
|
|
description: Request to update an existing action mapping
|
|
example:
|
|
output_actions:
|
|
- action: CrossSwitch C_101027 -> M
|
|
parameters:
|
|
SwitchMode: 'True'
|
|
VideoInput: '101027'
|
|
VideoOutput: '2'
|
|
CameraDetailResponse:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
title: Id
|
|
description: Camera ID
|
|
name:
|
|
type: string
|
|
title: Name
|
|
description: Camera name
|
|
description:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Description
|
|
description: Camera description
|
|
has_ptz:
|
|
type: boolean
|
|
title: Has Ptz
|
|
description: PTZ capability
|
|
default: false
|
|
has_video_sensor:
|
|
type: boolean
|
|
title: Has Video Sensor
|
|
description: Video sensor capability
|
|
default: false
|
|
status:
|
|
type: string
|
|
title: Status
|
|
description: Camera status
|
|
last_seen:
|
|
anyOf:
|
|
- type: string
|
|
format: date-time
|
|
- type: 'null'
|
|
title: Last Seen
|
|
description: Last seen timestamp
|
|
channel_id:
|
|
anyOf:
|
|
- type: integer
|
|
- type: 'null'
|
|
title: Channel Id
|
|
description: Physical channel ID
|
|
ip_address:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Ip Address
|
|
description: Camera IP address
|
|
model:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Model
|
|
description: Camera model
|
|
firmware_version:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Firmware Version
|
|
description: Firmware version
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- status
|
|
title: CameraDetailResponse
|
|
description: Response schema for single camera detail
|
|
examples:
|
|
- channel_id: 1
|
|
description: Main entrance monitoring
|
|
firmware_version: 7.9.975.68
|
|
has_ptz: true
|
|
has_video_sensor: true
|
|
id: 1
|
|
ip_address: 192.168.1.100
|
|
last_seen: '2025-12-09T10:30:00Z'
|
|
model: Geutebruck G-Cam/E2510
|
|
name: Entrance Camera
|
|
status: online
|
|
CameraInfo:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
title: Id
|
|
description: Camera ID (channel number in GeViScope)
|
|
name:
|
|
type: string
|
|
title: Name
|
|
description: Camera name
|
|
description:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Description
|
|
description: Camera description
|
|
has_ptz:
|
|
type: boolean
|
|
title: Has Ptz
|
|
description: Whether camera has PTZ capabilities
|
|
default: false
|
|
has_video_sensor:
|
|
type: boolean
|
|
title: Has Video Sensor
|
|
description: Whether camera has video sensor (motion detection)
|
|
default: false
|
|
status:
|
|
type: string
|
|
title: Status
|
|
description: Camera status (online, offline, unknown)
|
|
last_seen:
|
|
anyOf:
|
|
- type: string
|
|
format: date-time
|
|
- type: 'null'
|
|
title: Last Seen
|
|
description: Last time camera was seen online
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- status
|
|
title: CameraInfo
|
|
description: Camera information schema
|
|
examples:
|
|
- description: Main entrance monitoring
|
|
has_ptz: true
|
|
has_video_sensor: true
|
|
id: 1
|
|
last_seen: '2025-12-09T10:30:00Z'
|
|
name: Entrance Camera
|
|
status: online
|
|
CameraListResponse:
|
|
properties:
|
|
cameras:
|
|
items:
|
|
$ref: '#/components/schemas/CameraInfo'
|
|
type: array
|
|
title: Cameras
|
|
description: List of cameras
|
|
total:
|
|
type: integer
|
|
title: Total
|
|
description: Total number of cameras
|
|
type: object
|
|
required:
|
|
- cameras
|
|
- total
|
|
title: CameraListResponse
|
|
description: Response schema for camera list endpoint
|
|
examples:
|
|
- cameras:
|
|
- description: Main entrance
|
|
has_ptz: true
|
|
has_video_sensor: true
|
|
id: 1
|
|
last_seen: '2025-12-09T10:30:00Z'
|
|
name: Entrance Camera
|
|
status: online
|
|
- description: Parking area monitoring
|
|
has_ptz: false
|
|
has_video_sensor: true
|
|
id: 2
|
|
last_seen: '2025-12-09T10:30:00Z'
|
|
name: Parking Lot
|
|
status: online
|
|
total: 2
|
|
ClearMonitorRequest:
|
|
properties:
|
|
monitor_id:
|
|
type: integer
|
|
exclusiveMinimum: 0.0
|
|
title: Monitor Id
|
|
description: Monitor ID to clear (must be positive)
|
|
type: object
|
|
required:
|
|
- monitor_id
|
|
title: ClearMonitorRequest
|
|
description: Request schema for clearing a monitor
|
|
examples:
|
|
- monitor_id: 1
|
|
ClearMonitorResponse:
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
title: Success
|
|
description: Whether operation succeeded
|
|
message:
|
|
type: string
|
|
title: Message
|
|
description: Success message
|
|
monitor_id:
|
|
type: integer
|
|
title: Monitor Id
|
|
description: Monitor ID that was cleared
|
|
type: object
|
|
required:
|
|
- success
|
|
- message
|
|
- monitor_id
|
|
title: ClearMonitorResponse
|
|
description: Response schema for successful clear monitor operation
|
|
examples:
|
|
- message: Successfully cleared monitor 1
|
|
monitor_id: 1
|
|
success: true
|
|
CrossSwitchRequest:
|
|
properties:
|
|
camera_id:
|
|
type: integer
|
|
exclusiveMinimum: 0.0
|
|
title: Camera Id
|
|
description: Camera ID (must be positive)
|
|
monitor_id:
|
|
type: integer
|
|
exclusiveMinimum: 0.0
|
|
title: Monitor Id
|
|
description: Monitor ID (must be positive)
|
|
mode:
|
|
type: integer
|
|
minimum: 0.0
|
|
title: Mode
|
|
description: 'Cross-switch mode (default: 0=normal)'
|
|
default: 0
|
|
type: object
|
|
required:
|
|
- camera_id
|
|
- monitor_id
|
|
title: CrossSwitchRequest
|
|
description: Request schema for executing cross-switch
|
|
examples:
|
|
- camera_id: 1
|
|
mode: 0
|
|
monitor_id: 1
|
|
CrossSwitchResponse:
|
|
properties:
|
|
success:
|
|
type: boolean
|
|
title: Success
|
|
description: Whether operation succeeded
|
|
message:
|
|
type: string
|
|
title: Message
|
|
description: Success message
|
|
route:
|
|
allOf:
|
|
- $ref: '#/components/schemas/RouteInfo'
|
|
description: Route information
|
|
type: object
|
|
required:
|
|
- success
|
|
- message
|
|
- route
|
|
title: CrossSwitchResponse
|
|
description: Response schema for successful cross-switch execution
|
|
examples:
|
|
- message: Successfully switched camera 1 to monitor 1
|
|
route:
|
|
camera_id: 1
|
|
camera_name: Entrance Camera
|
|
executed_at: '2025-12-09T10:30:00Z'
|
|
executed_by: 550e8400-e29b-41d4-a716-446655440001
|
|
executed_by_username: operator
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
is_active: true
|
|
mode: 0
|
|
monitor_id: 1
|
|
monitor_name: Control Room Monitor 1
|
|
success: true
|
|
HTTPValidationError:
|
|
properties:
|
|
detail:
|
|
items:
|
|
$ref: '#/components/schemas/ValidationError'
|
|
type: array
|
|
title: Detail
|
|
type: object
|
|
title: HTTPValidationError
|
|
LoginRequest:
|
|
properties:
|
|
username:
|
|
type: string
|
|
maxLength: 50
|
|
minLength: 1
|
|
title: Username
|
|
description: Username
|
|
password:
|
|
type: string
|
|
minLength: 1
|
|
title: Password
|
|
description: Password
|
|
type: object
|
|
required:
|
|
- username
|
|
- password
|
|
title: LoginRequest
|
|
description: Request schema for user login
|
|
examples:
|
|
- password: admin123
|
|
username: admin
|
|
LogoutResponse:
|
|
properties:
|
|
message:
|
|
type: string
|
|
title: Message
|
|
description: Logout confirmation message
|
|
default: Successfully logged out
|
|
type: object
|
|
title: LogoutResponse
|
|
description: Response schema for successful logout
|
|
examples:
|
|
- message: Successfully logged out
|
|
MonitorDetailResponse:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
title: Id
|
|
description: Monitor ID
|
|
name:
|
|
type: string
|
|
title: Name
|
|
description: Monitor name
|
|
description:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Description
|
|
description: Monitor description
|
|
status:
|
|
type: string
|
|
title: Status
|
|
description: Monitor status
|
|
current_camera_id:
|
|
anyOf:
|
|
- type: integer
|
|
- type: 'null'
|
|
title: Current Camera Id
|
|
description: Currently displayed camera ID
|
|
current_camera_name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Current Camera Name
|
|
description: Currently displayed camera name
|
|
last_update:
|
|
anyOf:
|
|
- type: string
|
|
format: date-time
|
|
- type: 'null'
|
|
title: Last Update
|
|
description: Last update timestamp
|
|
channel_id:
|
|
anyOf:
|
|
- type: integer
|
|
- type: 'null'
|
|
title: Channel Id
|
|
description: Physical channel ID
|
|
resolution:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Resolution
|
|
description: Monitor resolution (e.g., 1920x1080)
|
|
is_available:
|
|
type: boolean
|
|
title: Is Available
|
|
description: Whether monitor is available for cross-switching
|
|
default: true
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- status
|
|
title: MonitorDetailResponse
|
|
description: Response schema for single monitor detail
|
|
examples:
|
|
- channel_id: 1
|
|
current_camera_id: 5
|
|
current_camera_name: Entrance Camera
|
|
description: Main monitoring display
|
|
id: 1
|
|
is_available: true
|
|
last_update: '2025-12-09T10:30:00Z'
|
|
name: Control Room Monitor 1
|
|
resolution: 1920x1080
|
|
status: active
|
|
MonitorInfo:
|
|
properties:
|
|
id:
|
|
type: integer
|
|
title: Id
|
|
description: Monitor ID (output channel number in GeViScope)
|
|
name:
|
|
type: string
|
|
title: Name
|
|
description: Monitor name
|
|
description:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Description
|
|
description: Monitor description
|
|
status:
|
|
type: string
|
|
title: Status
|
|
description: Monitor status (active, idle, offline, unknown)
|
|
current_camera_id:
|
|
anyOf:
|
|
- type: integer
|
|
- type: 'null'
|
|
title: Current Camera Id
|
|
description: Currently displayed camera ID (None if no camera)
|
|
last_update:
|
|
anyOf:
|
|
- type: string
|
|
format: date-time
|
|
- type: 'null'
|
|
title: Last Update
|
|
description: Last update timestamp
|
|
type: object
|
|
required:
|
|
- id
|
|
- name
|
|
- status
|
|
title: MonitorInfo
|
|
description: Monitor information schema
|
|
examples:
|
|
- current_camera_id: 5
|
|
description: Main monitoring display
|
|
id: 1
|
|
last_update: '2025-12-09T10:30:00Z'
|
|
name: Control Room Monitor 1
|
|
status: active
|
|
MonitorListResponse:
|
|
properties:
|
|
monitors:
|
|
items:
|
|
$ref: '#/components/schemas/MonitorInfo'
|
|
type: array
|
|
title: Monitors
|
|
description: List of monitors
|
|
total:
|
|
type: integer
|
|
title: Total
|
|
description: Total number of monitors
|
|
type: object
|
|
required:
|
|
- monitors
|
|
- total
|
|
title: MonitorListResponse
|
|
description: Response schema for monitor list endpoint
|
|
examples:
|
|
- monitors:
|
|
- current_camera_id: 5
|
|
description: Main display
|
|
id: 1
|
|
last_update: '2025-12-09T10:30:00Z'
|
|
name: Control Room Monitor 1
|
|
status: active
|
|
- description: Secondary display
|
|
id: 2
|
|
last_update: '2025-12-09T10:30:00Z'
|
|
name: Control Room Monitor 2
|
|
status: idle
|
|
total: 2
|
|
RefreshTokenRequest:
|
|
properties:
|
|
refresh_token:
|
|
type: string
|
|
title: Refresh Token
|
|
description: Refresh token
|
|
type: object
|
|
required:
|
|
- refresh_token
|
|
title: RefreshTokenRequest
|
|
description: Request schema for token refresh
|
|
examples:
|
|
- refresh_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
RouteHistoryResponse:
|
|
properties:
|
|
history:
|
|
items:
|
|
$ref: '#/components/schemas/RouteInfo'
|
|
type: array
|
|
title: History
|
|
description: List of historical routes
|
|
total:
|
|
type: integer
|
|
title: Total
|
|
description: Total number of historical records
|
|
limit:
|
|
type: integer
|
|
title: Limit
|
|
description: Pagination limit
|
|
offset:
|
|
type: integer
|
|
title: Offset
|
|
description: Pagination offset
|
|
type: object
|
|
required:
|
|
- history
|
|
- total
|
|
- limit
|
|
- offset
|
|
title: RouteHistoryResponse
|
|
description: Response schema for routing history query
|
|
examples:
|
|
- history:
|
|
- camera_id: 1
|
|
camera_name: Entrance Camera
|
|
executed_at: '2025-12-09T10:30:00Z'
|
|
executed_by: 550e8400-e29b-41d4-a716-446655440001
|
|
executed_by_username: operator
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
is_active: false
|
|
mode: 0
|
|
monitor_id: 1
|
|
monitor_name: Control Room Monitor 1
|
|
limit: 10
|
|
offset: 0
|
|
total: 50
|
|
RouteInfo:
|
|
properties:
|
|
id:
|
|
type: string
|
|
title: Id
|
|
description: Route UUID
|
|
camera_id:
|
|
type: integer
|
|
title: Camera Id
|
|
description: Camera ID
|
|
monitor_id:
|
|
type: integer
|
|
title: Monitor Id
|
|
description: Monitor ID
|
|
mode:
|
|
type: integer
|
|
title: Mode
|
|
description: Cross-switch mode
|
|
default: 0
|
|
executed_at:
|
|
type: string
|
|
format: date-time
|
|
title: Executed At
|
|
description: When route was executed
|
|
executed_by:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Executed By
|
|
description: User ID who executed the route
|
|
executed_by_username:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Executed By Username
|
|
description: Username who executed the route
|
|
is_active:
|
|
type: boolean
|
|
title: Is Active
|
|
description: Whether route is currently active
|
|
camera_name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Camera Name
|
|
description: Camera name
|
|
monitor_name:
|
|
anyOf:
|
|
- type: string
|
|
- type: 'null'
|
|
title: Monitor Name
|
|
description: Monitor name
|
|
type: object
|
|
required:
|
|
- id
|
|
- camera_id
|
|
- monitor_id
|
|
- executed_at
|
|
- is_active
|
|
title: RouteInfo
|
|
description: Route information schema
|
|
examples:
|
|
- camera_id: 1
|
|
camera_name: Entrance Camera
|
|
executed_at: '2025-12-09T10:30:00Z'
|
|
executed_by: 550e8400-e29b-41d4-a716-446655440001
|
|
executed_by_username: operator
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
is_active: true
|
|
mode: 0
|
|
monitor_id: 1
|
|
monitor_name: Control Room Monitor 1
|
|
RoutingStateResponse:
|
|
properties:
|
|
routes:
|
|
items:
|
|
$ref: '#/components/schemas/RouteInfo'
|
|
type: array
|
|
title: Routes
|
|
description: List of active routes
|
|
total:
|
|
type: integer
|
|
title: Total
|
|
description: Total number of active routes
|
|
type: object
|
|
required:
|
|
- routes
|
|
- total
|
|
title: RoutingStateResponse
|
|
description: Response schema for routing state query
|
|
examples:
|
|
- routes:
|
|
- camera_id: 1
|
|
camera_name: Entrance Camera
|
|
executed_at: '2025-12-09T10:30:00Z'
|
|
executed_by: 550e8400-e29b-41d4-a716-446655440001
|
|
executed_by_username: operator
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
is_active: true
|
|
mode: 0
|
|
monitor_id: 1
|
|
monitor_name: Control Room Monitor 1
|
|
total: 1
|
|
TokenResponse:
|
|
properties:
|
|
access_token:
|
|
type: string
|
|
title: Access Token
|
|
description: JWT access token
|
|
refresh_token:
|
|
type: string
|
|
title: Refresh Token
|
|
description: JWT refresh token
|
|
token_type:
|
|
type: string
|
|
title: Token Type
|
|
description: Token type (always 'bearer')
|
|
default: bearer
|
|
expires_in:
|
|
type: integer
|
|
title: Expires In
|
|
description: Access token expiration time in seconds
|
|
user:
|
|
allOf:
|
|
- $ref: '#/components/schemas/UserInfo'
|
|
description: Authenticated user information
|
|
type: object
|
|
required:
|
|
- access_token
|
|
- refresh_token
|
|
- expires_in
|
|
- user
|
|
title: TokenResponse
|
|
description: Response schema for successful authentication
|
|
examples:
|
|
- access_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
expires_in: 3600
|
|
refresh_token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
|
|
token_type: bearer
|
|
user:
|
|
created_at: '2025-12-08T10:00:00Z'
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
role: administrator
|
|
updated_at: '2025-12-08T10:00:00Z'
|
|
username: admin
|
|
UserInfo:
|
|
properties:
|
|
id:
|
|
type: string
|
|
title: Id
|
|
description: User UUID
|
|
username:
|
|
type: string
|
|
title: Username
|
|
description: Username
|
|
role:
|
|
type: string
|
|
title: Role
|
|
description: User role (viewer, operator, administrator)
|
|
created_at:
|
|
type: string
|
|
format: date-time
|
|
title: Created At
|
|
description: Account creation timestamp
|
|
updated_at:
|
|
type: string
|
|
format: date-time
|
|
title: Updated At
|
|
description: Last update timestamp
|
|
type: object
|
|
required:
|
|
- id
|
|
- username
|
|
- role
|
|
- created_at
|
|
- updated_at
|
|
title: UserInfo
|
|
description: User information schema (excludes sensitive data)
|
|
examples:
|
|
- created_at: '2025-12-08T10:00:00Z'
|
|
id: 550e8400-e29b-41d4-a716-446655440000
|
|
role: administrator
|
|
updated_at: '2025-12-08T10:00:00Z'
|
|
username: admin
|
|
ValidationError:
|
|
properties:
|
|
loc:
|
|
items:
|
|
anyOf:
|
|
- type: string
|
|
- type: integer
|
|
type: array
|
|
title: Location
|
|
msg:
|
|
type: string
|
|
title: Message
|
|
type:
|
|
type: string
|
|
title: Error Type
|
|
type: object
|
|
required:
|
|
- loc
|
|
- msg
|
|
- type
|
|
title: ValidationError
|
|
securitySchemes:
|
|
HTTPBearer:
|
|
type: http
|
|
scheme: bearer
|
|
|