扩展市场 API
所有端点以 /api/v1/devices/{device_id} 为前缀。
GET /api/v1/devices/{device_id}/extensions
获取设备上已安装的扩展列表。
响应
{
"success": true,
"extensions": [
{
"id": "ext_001",
"name": "My Extension",
"version": "1.0.0",
"installed": true
}
]
}
GET /api/v1/devices/{device_id}/extensions/marketplace
获取扩展市场中的可用扩展列表。
响应
{
"success": true,
"marketplace": [
{
"id": "ext_001",
"name": "My Extension",
"version": "1.0.0",
"description": "扩展描述",
"downloads": 100
}
]
}
GET /api/v1/devices/{device_id}/extensions/stats
获取扩展的使用统计数据。
响应
POST /api/v1/devices/{device_id}/extensions/{eid}/install
安装指定扩展到设备。
响应
POST /api/v1/devices/{device_id}/extensions/{eid}/uninstall
从设备卸载指定扩展。