ข้อมูล
/osc/info
API แสดงข้อมูลพื้นฐานเกี่ยวกับกล้องและฟังก์ชันการทำงาน
ที่รองรับ
เอาต์พุต
ชื่อ
ประเภท
คำอธิบาย
manufacturer
สตริง
ผู้ผลิตกล้อง
model
สตริง
รุ่นของกล้อง
serialNumber
สตริง
หมายเลขซีเรียล
firmwareVersion
สตริง
เฟิร์มแวร์เวอร์ชันปัจจุบัน
supportUrl
สตริง
URL สำหรับหน้าเว็บการสนับสนุนของกล้อง
gps
บูลีน
เป็นจริงหากกล้องมี GPS
gyro
บูลีน
เป็นจริงหากกล้องมีเครื่องวัดการหมุน
uptime
จำนวนเต็ม
จำนวนวินาทีนับตั้งแต่เปิดกล้อง
api
อาร์เรย์สตริง
รายการ API ที่รองรับ
endpoints
ออบเจ็กต์
ออบเจ็กต์ JSON ที่มีข้อมูลเกี่ยวกับปลายทางของกล้อง ดูตารางถัดไป
apiLevel
อาร์เรย์จำนวนเต็ม
ค่านี้จะเป็น [1] โดยค่าเริ่มต้นเมื่อไม่มีช่องนี้ [1, 2] หมายถึง API 1 และ 2 ได้รับการสนับสนุน ในขณะที่ [2] แสดงถึง API 2 เท่านั้นที่รองรับ นักพัฒนาแอปเป็นผู้รับผิดชอบในการดึงข้อมูลนี้และนำไปใช้โดยอิงตามมูลค่า เพิ่มช่องนี้ใน API ระดับ 2 แล้ว โปรดใช้รหัส 2 ด้วยหากรองรับ API 2.1
cameraId
สตริง
รหัสที่ไม่ซ้ำกันซึ่งใช้แทนกล้อง ช่องนี้เพิ่มเข้ามาใน API ระดับ 2.1 และเกี่ยวข้องกับการอัปโหลดโดยตรง
_vendorSpecific
ประเภท
ข้อมูลเพิ่มเติมเกี่ยวกับกล้องโดยผู้ให้บริการแต่ละราย โปรดใส่เครื่องหมายขีดล่าง ( _ ) นำหน้าคีย์เฉพาะผู้ให้บริการด้วยเครื่องหมายขีดล่าง ( _ ) เพื่อไม่ให้เกิดการขัดแย้งกันของเนมสเปซ
วัตถุ endpoints
รายการ
ออบเจ็กต์ JSON นี้ให้ข้อมูลเกี่ยวกับพอร์ตที่กล้องใช้สำหรับปลายทาง
หมายเหตุ: ปลายทาง HTTPS เป็นตัวเลือกที่ไม่บังคับ
ชื่อ
ประเภท
คำอธิบาย
httpPort
จำนวนเต็ม
พอร์ตสำหรับเซิร์ฟเวอร์ HTTP (ค่าเริ่มต้น 80)
httpUpdatesPort
จำนวนเต็ม
พอร์ตเพื่อรับการอัปเดตผ่าน HTTP
httpsPort
จำนวนเต็ม
(ไม่บังคับ) พอร์ตสำหรับเซิร์ฟเวอร์ HTTPs (ค่าเริ่มต้น 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" ] }
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-08-21 UTC
[null,null,["อัปเดตล่าสุด 2024-08-21 UTC"],[[["The `/osc/info` API provides essential details about the camera, such as manufacturer, model, firmware, and supported features."],["The response includes information on available endpoints, including HTTP and HTTPS ports for communication."],["The API also indicates the camera's API level, which determines the set of supported commands and features."],["The `endpoints` object within the response provides details on the camera's communication ports, including HTTP and optional HTTPS ports."]]],["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"]]