اطلاعات
با مجموعهها، منظم بمانید
ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
API /osc/info
اطلاعات اولیه در مورد دوربین و عملکردی که پشتیبانی می کند را برمی گرداند.
- این دستور هیچ ورودی نمی گیرد.
خروجی
نام | تایپ کنید | توضیحات |
---|
manufacturer | رشته | سازنده دوربین |
model | رشته | مدل دوربین. |
serialNumber | رشته | شماره سریال. |
firmwareVersion | رشته | نسخه سیستم عامل فعلی |
supportUrl | رشته | URL برای صفحه وب پشتیبانی دوربین. |
gps | بولی | اگر دوربین GPS داشته باشد درست است. |
gyro | بولی | اگر دوربین دارای ژیروسکوپ باشد درست است. |
uptime | عدد صحیح | تعداد ثانیه از زمان بوت شدن دوربین. |
api | آرایه رشته ای | لیست API های پشتیبانی شده |
endpoints | شیء | یک شی JSON حاوی اطلاعاتی در مورد نقاط انتهایی دوربین. جدول بعدی را ببینید. |
apiLevel | آرایه عدد صحیح | زمانی که این فیلد وجود نداشته باشد به طور پیش فرض [1] است. [1، 2] نشان دهنده هر دو API 1 و 2 است در حالی که [2] نشان دهنده تنها API 2 پشتیبانی می شود. این مسئولیت توسعهدهنده است که این اطلاعات را بازیابی کند و براساس مقدار آن را به روشی متفاوت پیادهسازی کند. این فیلد در سطح 2 API اضافه شده است. اگر از API 2.1 پشتیبانی می کنید، لطفاً از 2 نیز استفاده کنید. |
cameraId | رشته | یک شناسه منحصر به فرد که نشان دهنده دوربین است. این فیلد در سطح API 2.1 اضافه شده است و مربوط به آپلود مستقیم است. |
_vendorSpecific | نوع | اطلاعات اضافی خاص فروشنده درباره دوربین. لطفاً برای جلوگیری از برخورد فضای نام، کلیدهای خاص فروشنده را با یک زیرخط ( _ ) قرار دهید. |
شی endpoints
این شی JSON اطلاعاتی را در مورد پورت هایی که دوربین برای نقاط پایانی استفاده می کند ارائه می دهد.
توجه: نقاط پایانی HTTPS اختیاری هستند.
نام | تایپ کنید | توضیحات |
---|
httpPort | عدد صحیح | پورت برای سرور HTTP. (پیش فرض 80) |
httpUpdatesPort | عدد صحیح | پورت برای دریافت به روز رسانی از طریق HTTP |
httpsPort | عدد صحیح | (اختیاری) پورت برای سرور HTTP. (پیش فرض 443) |
httpsUpdatesPort | عدد صحیح | (اختیاری) پورت برای دریافت بهروزرسانیها از طریق HTTP. |
خطا
- این دستور هیچ خطایی را بر نمی گرداند.
مثال |
---|
درخواست کنید | 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"
]
} |
جز در مواردی که غیر از این ذکر شده باشد،محتوای این صفحه تحت مجوز Creative Commons Attribution 4.0 License است. نمونه کدها نیز دارای مجوز Apache 2.0 License است. برای اطلاع از جزئیات، به خطمشیهای سایت Google Developers مراجعه کنید. جاوا علامت تجاری ثبتشده Oracle و/یا شرکتهای وابسته به آن است.
تاریخ آخرین بهروزرسانی 2025-07-25 بهوقت ساعت هماهنگ جهانی.
[null,null,["تاریخ آخرین بهروزرسانی 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\" ] } ``` |"]]