openapi: 3.0.3 info: contact: email: engineering@lablabee.com name: LabLabee Engineering Team description: | Simulated 5G network environment for testing intelligent agent capabilities. This API provides basic network operations that an AI agent must orchestrate to fulfill high-level user commands. title: 5G Network Sandbox API version: 1.0.0 servers: - description: Local sandbox environment url: http://localhost:8080/api/v1 - description: Remote sandbox environment url: https://sandbox.5gnetwork.test/api/v1 security: - {} - ApiKeyAuth: [] paths: /device/connect: post: description: | Attempts to connect a device to the 5G network. Connection may fail if network is offline, at capacity, or device is unauthorized. operationId: connect_device requestBody: content: application/json: schema: $ref: "#/components/schemas/connectDevice_request" required: true responses: "200": content: application/json: examples: success: value: success: true message: Device device_001 connected successfully device_id: device_001 connection_details: ip_address: 10.0.1.15 signal_strength: 92 assigned_bandwidth_mbps: 100 connection_quality: excellent schema: $ref: "#/components/schemas/DeviceOperationResponse" description: Device connected successfully "400": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Bad request - invalid device ID or parameters "403": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Forbidden - device not authorized "409": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Conflict - device already connected "503": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Service unavailable - network offline or at capacity summary: Connect Device to Network tags: - Device Management x-openapi-router-controller: openapi_server.controllers.device_management_controller /device/disconnect: post: description: Disconnects a device from the 5G network. operationId: disconnect_device requestBody: content: application/json: schema: $ref: "#/components/schemas/disconnectDevice_request" required: true responses: "200": content: application/json: schema: $ref: "#/components/schemas/DeviceOperationResponse" description: Device disconnected successfully "404": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Device not found or not connected summary: Disconnect Device from Network tags: - Device Management x-openapi-router-controller: openapi_server.controllers.device_management_controller /logs: get: description: Get recent system logs and events operationId: get_logs parameters: - explode: true in: query name: limit required: false schema: default: 100 maximum: 1000 minimum: 1 type: integer style: form - explode: true in: query name: severity required: false schema: enum: - debug - info - warning - error - critical type: string style: form - description: ISO 8601 timestamp explode: true in: query name: since required: false schema: format: date-time type: string style: form responses: "200": content: application/json: schema: $ref: "#/components/schemas/LogsResponse" description: System logs retrieved summary: Retrieve System Logs tags: - Network Monitoring x-openapi-router-controller: openapi_server.controllers.network_monitoring_controller /network/start: post: description: | Initiates the 5G network service. The network will transition through states: offline → initializing → online. This operation is idempotent. operationId: start_network requestBody: content: application/json: schema: $ref: "#/components/schemas/startNetwork_request" required: false responses: "200": content: application/json: examples: success: value: success: true message: 5G network service started successfully operation_id: op_1234567890 timestamp: 2024-01-15T10:30:00Z network_state: status: initializing uptime_seconds: 0 schema: $ref: "#/components/schemas/NetworkOperationResponse" description: Network started successfully or already running "503": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Service temporarily unavailable summary: Start 5G Network Service tags: - Network Control x-openapi-router-controller: openapi_server.controllers.network_control_controller /network/status: get: description: | Returns comprehensive status information about the 5G network including health metrics, connected devices, and performance indicators. operationId: get_network_status responses: "200": content: application/json: examples: online: value: status: online uptime_seconds: 3600 metrics: signal_strength: 95 bandwidth_utilization: 45 latency_ms: 12 packet_loss_rate: 0.01 connected_devices: 5 device_list: - device_id: device_001 connection_quality: excellent connected_at: 2024-01-15T09:00:00Z error_count: 0 errors: [] health_score: 98 degraded: value: status: degraded uptime_seconds: 7200 metrics: signal_strength: 65 bandwidth_utilization: 85 latency_ms: 45 packet_loss_rate: 0.05 connected_devices: 12 error_count: 3 errors: - code: BANDWIDTH_WARNING message: Bandwidth utilization above 80% severity: warning timestamp: 2024-01-15T10:25:00Z health_score: 72 schema: $ref: "#/components/schemas/NetworkStatus" description: Current network status summary: Get Network Status tags: - Network Monitoring x-openapi-router-controller: openapi_server.controllers.network_monitoring_controller /network/stop: post: description: | Gracefully shuts down the 5G network service. Will disconnect all connected devices before stopping. operationId: stop_network requestBody: content: application/json: schema: $ref: "#/components/schemas/stopNetwork_request" required: false responses: "200": content: application/json: schema: $ref: "#/components/schemas/NetworkOperationResponse" description: Network stopped successfully "409": content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" description: Conflict - devices still connected (when not forced) summary: Stop 5G Network Service tags: - Network Control x-openapi-router-controller: openapi_server.controllers.network_control_controller components: schemas: NetworkOperationResponse: example: success: true operation_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 network_state: uptime_seconds: 0 status: offline message: message timestamp: 2000-01-23T04:56:07.000+00:00 properties: success: title: success type: boolean message: title: message type: string operation_id: format: uuid title: operation_id type: string timestamp: format: date-time title: timestamp type: string network_state: $ref: "#/components/schemas/NetworkOperationResponse_network_state" required: - message - operation_id - success - timestamp title: NetworkOperationResponse type: object DeviceOperationResponse: example: device_id: device_id success: true connection_details: connection_quality: excellent ip_address: ip_address signal_strength: 8 assigned_bandwidth_mbps: 0 message: message properties: success: title: success type: boolean message: title: message type: string device_id: title: device_id type: string connection_details: $ref: "#/components/schemas/DeviceOperationResponse_connection_details" required: - device_id - message - success title: DeviceOperationResponse type: object NetworkStatus: example: connected_devices: 0 device_list: - connection_quality: excellent device_id: device_id device_type: device_type connected_at: 2000-01-23T04:56:07.000+00:00 signal_strength: 14 - connection_quality: excellent device_id: device_id device_type: device_type connected_at: 2000-01-23T04:56:07.000+00:00 signal_strength: 14 uptime_seconds: 0 health_score: 36 metrics: bandwidth_utilization: 56 packet_loss_rate: 0.7061401241503109 signal_strength: 59 latency_ms: 0.23021358869347652 error_count: 0 errors: - severity: info code: code details: key: "" message: message timestamp: 2000-01-23T04:56:07.000+00:00 - severity: info code: code details: key: "" message: message timestamp: 2000-01-23T04:56:07.000+00:00 status: offline properties: status: $ref: "#/components/schemas/NetworkStatusEnum" uptime_seconds: minimum: 0 title: uptime_seconds type: integer connected_devices: minimum: 0 title: connected_devices type: integer device_list: items: $ref: "#/components/schemas/NetworkStatus_device_list_inner" title: device_list type: array metrics: $ref: "#/components/schemas/NetworkStatus_metrics" error_count: minimum: 0 title: error_count type: integer errors: items: $ref: "#/components/schemas/NetworkError" title: errors type: array health_score: description: Overall network health score maximum: 100 minimum: 0 title: health_score type: integer required: - connected_devices - metrics - status - uptime_seconds title: NetworkStatus type: object NetworkStatusEnum: enum: - offline - initializing - online - degraded - maintenance - error title: NetworkStatusEnum type: string NetworkError: example: severity: info code: code details: key: "" message: message timestamp: 2000-01-23T04:56:07.000+00:00 properties: code: title: code type: string message: title: message type: string severity: enum: - info - warning - error - critical title: severity type: string timestamp: format: date-time title: timestamp type: string details: additionalProperties: true title: details type: object required: - code - message - severity - timestamp title: NetworkError type: object LogsResponse: example: total_count: 0 has_more: true logs: - severity: debug metadata: key: "" source: source message: message timestamp: 2000-01-23T04:56:07.000+00:00 - severity: debug metadata: key: "" source: source message: message timestamp: 2000-01-23T04:56:07.000+00:00 properties: logs: items: $ref: "#/components/schemas/LogsResponse_logs_inner" title: logs type: array total_count: title: total_count type: integer has_more: title: has_more type: boolean required: - logs - total_count title: LogsResponse type: object ErrorResponse: example: details: key: "" error: error message: message request_id: 046b6c7f-0b8a-43b9-b35d-6489e6daee91 timestamp: 2000-01-23T04:56:07.000+00:00 properties: error: title: error type: string message: title: message type: string timestamp: format: date-time title: timestamp type: string details: additionalProperties: true title: details type: object request_id: format: uuid title: request_id type: string required: - error - message - timestamp title: ErrorResponse type: object startNetwork_request_config: properties: max_devices: default: 100 maximum: 1000 minimum: 1 title: max_devices type: integer target_bandwidth: default: 1000 description: Target bandwidth in Mbps title: target_bandwidth type: integer optimization_mode: default: balanced enum: - performance - balanced - power_saving title: optimization_mode type: string title: startNetwork_request_config type: object startNetwork_request: properties: config: $ref: "#/components/schemas/startNetwork_request_config" title: startNetwork_request type: object stopNetwork_request: properties: force: default: false description: Force stop without graceful disconnect title: force type: boolean timeout_seconds: default: 30 maximum: 300 minimum: 0 title: timeout_seconds type: integer title: stopNetwork_request type: object connectDevice_request: properties: device_id: description: Unique identifier for the device maxLength: 50 minLength: 1 pattern: "^[a-zA-Z0-9_-]+$" title: device_id type: string device_type: default: phone enum: - phone - tablet - iot - laptop - other title: device_type type: string priority: default: 5 description: Connection priority (10 = highest) maximum: 10 minimum: 1 title: priority type: integer auth_token: description: Optional authentication token title: auth_token type: string required: - device_id title: connectDevice_request type: object disconnectDevice_request: properties: device_id: maxLength: 50 minLength: 1 pattern: "^[a-zA-Z0-9_-]+$" title: device_id type: string reason: default: user_requested enum: - user_requested - admin_action - maintenance - violation title: reason type: string required: - device_id title: disconnectDevice_request type: object NetworkOperationResponse_network_state: example: uptime_seconds: 0 status: offline properties: status: $ref: "#/components/schemas/NetworkStatusEnum" uptime_seconds: minimum: 0 title: uptime_seconds type: integer title: NetworkOperationResponse_network_state type: object DeviceOperationResponse_connection_details: example: connection_quality: excellent ip_address: ip_address signal_strength: 8 assigned_bandwidth_mbps: 0 properties: ip_address: format: ipv4 title: ip_address type: string signal_strength: maximum: 100 minimum: 0 title: signal_strength type: integer assigned_bandwidth_mbps: minimum: 0 title: assigned_bandwidth_mbps type: integer connection_quality: enum: - excellent - good - fair - poor title: connection_quality type: string title: DeviceOperationResponse_connection_details type: object NetworkStatus_device_list_inner: example: connection_quality: excellent device_id: device_id device_type: device_type connected_at: 2000-01-23T04:56:07.000+00:00 signal_strength: 14 properties: device_id: title: device_id type: string device_type: title: device_type type: string connection_quality: enum: - excellent - good - fair - poor title: connection_quality type: string connected_at: format: date-time title: connected_at type: string signal_strength: maximum: 100 minimum: 0 title: signal_strength type: integer title: NetworkStatus_device_list_inner type: object NetworkStatus_metrics: example: bandwidth_utilization: 56 packet_loss_rate: 0.7061401241503109 signal_strength: 59 latency_ms: 0.23021358869347652 properties: signal_strength: description: Average signal strength percentage maximum: 100 minimum: 0 title: signal_strength type: integer bandwidth_utilization: description: Bandwidth utilization percentage maximum: 100 minimum: 0 title: bandwidth_utilization type: integer latency_ms: description: Average latency in milliseconds minimum: 0 title: latency_ms type: number packet_loss_rate: description: Packet loss rate (0-1) maximum: 1 minimum: 0 title: packet_loss_rate type: number title: NetworkStatus_metrics type: object LogsResponse_logs_inner: example: severity: debug metadata: key: "" source: source message: message timestamp: 2000-01-23T04:56:07.000+00:00 properties: timestamp: format: date-time title: timestamp type: string severity: enum: - debug - info - warning - error - critical title: severity type: string source: title: source type: string message: title: message type: string metadata: additionalProperties: true title: metadata type: object title: LogsResponse_logs_inner type: object securitySchemes: ApiKeyAuth: description: Optional API key for sandbox access in: header name: X-API-Key type: apiKey x-apikeyInfoFunc: openapi_server.controllers.security_controller.info_from_ApiKeyAuth