Phase 2 of WIA-ROB-006 defines standardized Application Programming Interfaces (APIs) enabling programmatic control, monitoring, and integration of surgical robots. RESTful APIs, WebSocket connections, and standardized protocols create an open ecosystem where third-party developers can build compatible applications, research tools, training simulators, and OR integration systems.
| Endpoint | Method | Purpose | Authentication |
|---|---|---|---|
| /api/v1/robot/status | GET | Retrieve robot system status | OAuth 2.0 |
| /api/v1/robot/control | POST | Send control commands | OAuth 2.0 + Role |
| /api/v1/instruments | GET | List installed instruments | OAuth 2.0 |
| /api/v1/instruments/{id}/move | POST | Command instrument movement | OAuth 2.0 + Role |
| /api/v1/video/stream | WebSocket | Real-time video streaming | OAuth 2.0 |
| /api/v1/telemetry | WebSocket | Real-time telemetry stream | OAuth 2.0 |
| /api/v1/procedures | GET/POST | Procedure management | OAuth 2.0 |
| /api/v1/emergency/stop | POST | Emergency stop activation | None (safety critical) |
POST /api/v1/instruments/ARM-1/move
Authorization: Bearer {access_token}
Content-Type: application/json
{
"target_position": {
"x": 125.5,
"y": 68.3,
"z": -24.1
},
"target_orientation": {
"roll": 15.0,
"pitch": -9.0,
"yaw": 46.0
},
"velocity": 10.0,
"acceleration": 5.0,
"collision_avoidance": true
}
WIA-ROB-006 specifies WebRTC (Web Real-Time Communication) for low-latency video streaming:
| Stream Type | Resolution | FPS | Use Case |
|---|---|---|---|
| Primary Surgical View | 4K (3840x2160) | 60 | Main display at console |
| Secondary View | 1080p | 30 | Assistant surgeon display |
| Teaching Stream | 1080p | 30 | Observation room broadcast |
| Recording Stream | 4K | 60 | Archival and review |
| Thumbnail Preview | 480p | 15 | OR monitoring dashboard |
Standardized haptic feedback API enables force-reflecting master manipulators:
WebSocket: ws://robot.example.com/api/v1/haptic
// Incoming force data from robot (100-1000 Hz)
{
"timestamp": "2025-01-15T14:23:45.123Z",
"instrument_id": "ARM-1",
"force_vector": {"x": 0.23, "y": -0.15, "z": 0.87},
"contact_state": "soft_tissue",
"vibration": {"frequency": 120, "amplitude": 0.05}
}
// Outgoing haptic rendering command
{
"master_id": "CONSOLE-RIGHT",
"force_feedback": {"x": 0.23, "y": -0.15, "z": 0.87},
"scaling_factor": 1.5,
"damping": 0.1
}
| Constraint | Limit | Enforcement |
|---|---|---|
| Maximum Velocity | 100 mm/s | Hardware + software limiting |
| Maximum Force | 10 N | Torque limiting + monitoring |
| Workspace Boundaries | Configurable 3D volume | Collision detection + prevention |
| Joint Limits | Per-joint angle limits | Encoder monitoring |
| Collision Avoidance | 50mm minimum separation | Real-time proximity detection |
All API access requires OAuth 2.0 authentication with role-based access control:
WebSocket: wss://robot.example.com/api/v1/telemetry
// Real-time data stream (30-60 Hz)
{
"timestamp": "2025-01-15T14:23:45.123Z",
"instruments": [
{
"id": "ARM-1",
"position": {"x": 123.45, "y": 67.89, "z": -23.45},
"velocity": {"x": 5.2, "y": -2.1, "z": 1.3},
"force": {"x": 0.23, "y": -0.15, "z": 0.87}
}
],
"camera": {
"zoom": 1.5,
"focus": 150.0,
"exposure": "auto"
}
}
| Code | Meaning | Response Action |
|---|---|---|
| 200 | Success | Continue operation |
| 400 | Invalid request | Correct request format |
| 401 | Unauthorized | Re-authenticate |
| 403 | Forbidden | Insufficient privileges |
| 409 | Conflict | Resolve state conflict |
| 500 | Server error | Retry with backoff |
| 503 | Service unavailable | System maintenance mode |
Complex surgical maneuvers require coordinated multi-instrument movements. Batch APIs enable atomic execution of multiple commands with rollback on failure:
POST /api/v1/batch
Authorization: Bearer {access_token}
Content-Type: application/json
{
"transactionId": "txn-2025-01-15-001",
"atomicity": "all_or_nothing",
"timeout": 5000,
"commands": [
{
"commandId": "cmd-1",
"endpoint": "/api/v1/instruments/ARM-1/move",
"payload": {
"target_position": {"x": 125.5, "y": 68.3, "z": -24.1},
"velocity": 10.0
}
},
{
"commandId": "cmd-2",
"endpoint": "/api/v1/instruments/ARM-2/move",
"payload": {
"target_position": {"x": 135.2, "y": 72.1, "z": -22.8},
"velocity": 10.0
}
},
{
"commandId": "cmd-3",
"endpoint": "/api/v1/camera/zoom",
"payload": {
"zoom_level": 2.5,
"focus_point": {"x": 130.0, "y": 70.0, "z": -23.5}
}
}
]
}
Response:
{
"transactionId": "txn-2025-01-15-001",
"status": "success",
"executionTime": 234,
"results": [
{"commandId": "cmd-1", "status": "completed", "latency": 87},
{"commandId": "cmd-2", "status": "completed", "latency": 91},
{"commandId": "cmd-3", "status": "completed", "latency": 56}
]
}
from wia_surgical_robot import SurgicalRobotAPI, InstrumentController
# Initialize API client with OAuth 2.0
api = SurgicalRobotAPI(
base_url="https://robot.hospital.org/api/v1",
client_id="surgical-app-001",
client_secret="secret-key",
scopes=["robot:read", "robot:control"]
)
# Authenticate
api.authenticate()
# Get instrument controller
arm1 = InstrumentController(api, instrument_id="ARM-1")
# Move to target position
arm1.move_to(
position=(125.5, 68.3, -24.1),
orientation=(15.0, -9.0, 46.0),
velocity=10.0,
collision_avoidance=True
)
# Monitor movement progress
while not arm1.is_at_target():
status = arm1.get_status()
print(f"Progress: {status.progress_percent}% - Distance: {status.distance_to_target}mm")
time.sleep(0.1)
print("Movement complete")
import { SurgicalRobotClient, TelemetryStream } from '@wia/surgical-robot-sdk';
// Initialize client
const client = new SurgicalRobotClient({
baseUrl: 'https://robot.hospital.org/api/v1',
apiKey: process.env.ROBOT_API_KEY
});
// Subscribe to real-time telemetry
const stream = new TelemetryStream(client, {
robotId: 'davinci-si-001',
streams: ['pose', 'force', 'video'],
sampleRate: 100 // Hz
});
stream.on('pose', (data) => {
console.log(`Position: (${data.position.x}, ${data.position.y}, ${data.position.z})`);
updateVisualization(data);
});
stream.on('force', (data) => {
if (data.magnitude > 5.0) {
console.warn(`High force detected: ${data.magnitude}N`);
}
});
stream.connect();
WIA-ROB-006 APIs evolve over time. Version management ensures backward compatibility while enabling innovation:
| API Version | Release Date | Status | End of Support | Major Changes |
|---|---|---|---|---|
| v1.0 | 2023-01-15 | Deprecated | 2025-12-31 | Initial release |
| v1.1 | 2023-06-20 | Active | 2026-06-30 | Added haptic feedback API |
| v2.0 | 2024-03-10 | Current | TBD | WebRTC streaming, batch operations, improved auth |
| v2.1 | 2024-09-15 | Current | TBD | AI surgical planning integration |