信息
使用集合让一切井井有条
根据您的偏好保存内容并对其进行分类。
/osc/info
API 会返回有关相机和功能的基本信息
支持的存储类型
输出
名称 |
类型 |
说明 |
manufacturer |
字符串 |
相机制造商。 |
model |
字符串 |
相机型号。 |
serialNumber |
字符串 |
序列号。 |
firmwareVersion |
字符串 |
当前固件版本。 |
supportUrl |
字符串 |
摄像头的支持网页的网址。 |
gps |
布尔值 |
如果相机具有 GPS,则为 True。 |
gyro |
布尔值 |
如果相机具有陀螺仪,则为 True。 |
uptime |
整数 |
相机启动后经过的秒数。 |
api |
字符串数组 |
受支持的 API 列表。 |
endpoints |
对象 |
包含相机端点相关信息的 JSON 对象。请参阅下表。 |
apiLevel |
整数数组 |
如果此字段缺失,默认值为 [1]。[1, 2] 表示同时支持 API 1 和 2,而 [2] 表示仅支持 API 2。开发者应负责检索此信息,并根据此信息的值采用不同的实现方式。此字段是 API 级别 2 中的新增字段。如果您支持 API 2.1,也请使用 2。 |
cameraId |
字符串 |
表示相机的唯一 ID。此字段是在 API 级别 2.1 中添加的,与直接上传相关。 |
_vendorSpecific |
type |
有关相机的供应商特定额外信息。请在供应商专用密钥前加上下划线 ( _ ) 作为前缀,以避免命名空间冲突。 |
endpoints
对象
此 JSON 对象提供有关相机端点使用的端口的信息。
注意:HTTPS 端点是可选的。
名称 |
类型 |
说明 |
httpPort |
整数 |
HTTP 服务器的端口。(默认值 80) |
httpUpdatesPort |
整数 |
通过 HTTP 接收更新的端口 |
httpsPort |
整数 |
(可选)HTTPS 服务器的端口。(默认值 443) |
httpsUpdatesPort |
整数 |
(可选)通过 HTTPS 接收更新的端口。 |
错误
示例 |
请求 |
GET /osc/info HTTP/1.1
Host: [camera ip address]:[httpPort]
Accept: application/json
X-XSRF-Protected: 1 |
响应 (API 2) |
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: {CONTENT_LENGTH}
X-Content-Type-Options: nosniff
{
"manufacturer": "AAA",
"model": "BBB",
"serialNumber": "CCC",
"firmwareVersion": "DDD",
"supportUrl": "EEE",
"endpoints": {
"httpPort": 80,
"httpUpdatesPort": 10080,
...
},
"gps": true,
"gyro": false,
"uptime": 600,
"api": [
"/osc/info",
"/osc/state",
"/osc/checkForUpdates",
"/osc/commands/execute",
"/osc/commands/status"
],
"apiLevel": [1, 2]
} |
响应 (API 1) |
HTTP/1.1 200 OK
Content-Type: application/json;charset=utf-8
Content-Length: {CONTENT_LENGTH}
X-Content-Type-Options: nosniff
{
"manufacturer": "AAA",
"model": "BBB",
"serialNumber": "CCC",
"firmwareVersion": "DDD",
"supportUrl": "EEE",
"endpoints": {
"httpPort": 80,
"httpUpdatesPort": 10080,
...
},
"gps": true,
"gyro": false,
"uptime": 600,
"api": [
"/osc/info",
"/osc/state",
"/osc/checkForUpdates",
"/osc/commands/execute",
"/osc/commands/status"
]
} |
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-07-25。
[null,null,["最后更新时间 (UTC):2025-07-25。"],[[["\u003cp\u003eThe \u003ccode\u003e/osc/info\u003c/code\u003e API provides essential details about the camera, such as manufacturer, model, firmware, and supported features.\u003c/p\u003e\n"],["\u003cp\u003eThe response includes information on available endpoints, including HTTP and HTTPS ports for communication.\u003c/p\u003e\n"],["\u003cp\u003eThe API also indicates the camera's API level, which determines the set of supported commands and features.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eendpoints\u003c/code\u003e object within the response provides details on the camera's communication ports, including HTTP and optional HTTPS ports.\u003c/p\u003e\n"]]],["The `/osc/info` API, using a GET request, retrieves camera details without requiring input. The output includes the camera's manufacturer, model, serial number, firmware version, support URL, GPS/gyro status, uptime, supported APIs, and API level. It also provides an `endpoints` object with HTTP/HTTPS port information, and optionally vendor-specific data. API level determines support, with `cameraId` introduced in API 2.1. It doesn't have error responses.\n"],null,["# Info\n\nThe `/osc/info` API returns basic information about the camera and functionality\nit supports.\n\nInput\n-----\n\n- This command takes no input.\n\nOutput\n------\n\n| Name | Type | Description |\n|-------------------|---------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `manufacturer` | String | The camera manufacturer. |\n| `model` | String | The camera model. |\n| `serialNumber` | String | Serial number. |\n| `firmwareVersion` | String | Current firmware version. |\n| `supportUrl` | String | URL for the camera's support webpage. |\n| `gps` | Boolean | True if the camera has GPS. |\n| `gyro` | Boolean | True if the camera has Gyroscope. |\n| `uptime` | Integer | Number of seconds since the camera boot. |\n| `api` | String Array | List of supported APIs. |\n| `endpoints` | Object | A JSON object containing information about the camera's endpoints. See the next table. |\n| `apiLevel` | Integer Array | It is \\[1\\] by default when this field is missing. \\[1, 2\\] represents both API 1 and 2 are supported while \\[2\\] represents only API 2 is supported. It is the developer's responsibility to retrieve this information and implement differently based on the value. **This field was added in API level 2. Please also use 2 if you support API 2.1.** |\n| `cameraId` | String | A unique id representing the camera. **This field was added in API level 2.1 and is relevant to [Direct Upload](/streetview/open-spherical-camera/guides/direct-upload).** |\n| `_vendorSpecific` | [type](/streetview/open-spherical-camera/guides/osc/optional) | Vendor specific additional info about the camera. Please prefix vendor-specific keys with an underscore ( _ ) to avoid namespace collisions. |\n\n### `endpoints` object\n\nThis JSON object provides information on the ports the camera uses for endpoints.\n\n***Note: HTTPS endpoints are optional.***\n\n| Name | Type | Description |\n|--------------------|---------|-------------------------------------------------|\n| `httpPort` | Integer | Port for HTTP server. (Default 80) |\n| `httpUpdatesPort` | Integer | Port to receive updates over HTTP |\n| `httpsPort` | Integer | (Optional) Port for HTTPs server. (Default 443) |\n| `httpsUpdatesPort` | Integer | (Optional) Port to receive updates over HTTPs. |\n\nError\n-----\n\n- This command returns no errors.\n\n| Example ------- ||\n|----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| **Request** | ```http GET /osc/info HTTP/1.1 Host: [camera ip address]:[httpPort] Accept: application/json X-XSRF-Protected: 1 ``` |\n| **Response (API 2)** | ```http HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: {CONTENT_LENGTH} X-Content-Type-Options: nosniff { \"manufacturer\": \"AAA\", \"model\": \"BBB\", \"serialNumber\": \"CCC\", \"firmwareVersion\": \"DDD\", \"supportUrl\": \"EEE\", \"endpoints\": { \"httpPort\": 80, \"httpUpdatesPort\": 10080, ... }, \"gps\": true, \"gyro\": false, \"uptime\": 600, \"api\": [ \"/osc/info\", \"/osc/state\", \"/osc/checkForUpdates\", \"/osc/commands/execute\", \"/osc/commands/status\" ], \"apiLevel\": [1, 2] } ``` |\n| **Response (API 1)** | ```http HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: {CONTENT_LENGTH} X-Content-Type-Options: nosniff { \"manufacturer\": \"AAA\", \"model\": \"BBB\", \"serialNumber\": \"CCC\", \"firmwareVersion\": \"DDD\", \"supportUrl\": \"EEE\", \"endpoints\": { \"httpPort\": 80, \"httpUpdatesPort\": 10080, ... }, \"gps\": true, \"gyro\": false, \"uptime\": 600, \"api\": [ \"/osc/info\", \"/osc/state\", \"/osc/checkForUpdates\", \"/osc/commands/execute\", \"/osc/commands/status\" ] } ``` |"]]