स्थिति
/osc/commands/status
एपीआई, पिछले inProgress
निर्देशों का स्टेटस दिखाता है. status
एपीआई की मदद से, पहले जारी किए गए निर्देश की प्रोग्रेस की पोलिंग की जा सकती है; उदाहरण के लिए, यह तय करना कि camera.takePicture
पूरा हुआ या नहीं.
नाम |
टाइप |
ब्यौरा |
id |
स्ट्रिंग |
/osc/commands/execute को पिछले कॉल से कमांड आईडी लौटाया गया. |
आउटपुट
आउटपुट एक कमांड ऑब्जेक्ट भी है (/osc/commands/execute
का आउटपुट देखें)
गड़बड़ी
गड़बड़ी का कोड |
ब्यौरा |
missingParameter |
id की जानकारी नहीं दी गई है. इस पैरामीटर के लिए, /osc/commands/execute को पिछले कॉल से लौटाया गया कमांड आईडी होना ज़रूरी है. |
invalidParameterName |
इनपुट पैरामीटर की पहचान नहीं की जा सकी. |
invalidParameterValue |
इनपुट पैरामीटर की पहचान कर ली गई है, लेकिन उसकी वैल्यू अमान्य है; उदाहरण के लिए, id वैल्यू मौजूद नहीं है या उसका टाइप गलत है. |
उदाहरण |
अनुरोध करें |
POST /osc/commands/status HTTP/1.1 Host: [camera ip address]:[httpPort] Content-Type: application/json;charset=utf-8 Accept: application/json Content-Length: {CONTENT_LENGTH} X-XSRF-Protected: 1
{ "id": "90ABCD" } |
जवाब |
HTTP/1.1 200 OK Content-Type: application/json;charset=utf-8 Content-Length: {CONTENT_LENGTH} X-Content-Type-Options: nosniff
{ "name": "camera.takePicture", "state": "done", "results": { "fileUri": "ABC.JPG" } } |
जब तक कुछ अलग से न बताया जाए, तब तक इस पेज की सामग्री को Creative Commons Attribution 4.0 License के तहत और कोड के नमूनों को Apache 2.0 License के तहत लाइसेंस मिला है. ज़्यादा जानकारी के लिए, Google Developers साइट नीतियां देखें. Oracle और/या इससे जुड़ी हुई कंपनियों का, Java एक रजिस्टर किया हुआ ट्रेडमार्क है.
आखिरी बार 2024-08-21 (UTC) को अपडेट किया गया.
[null,null,["आखिरी बार 2024-08-21 (UTC) को अपडेट किया गया."],[[["The `/osc/commands/status` API is used to check the status of previously executed commands, like `camera.takePicture`, that were in progress."],["It requires the `id` of the command, obtained from the `/osc/commands/execute` API, to retrieve the status."],["The API response provides details like command name, state (e.g., \"done\"), and any results, such as a file URI."],["Potential errors include missing or invalid `id` parameters."]]],["The `/osc/commands/status` API retrieves the status of prior `inProgress` commands, using a command ID from `/osc/commands/execute`. Input requires the `id` parameter; output mirrors the command object format of `/osc/commands/execute`. Errors include `missingParameter` (no ID), `invalidParameterName`, or `invalidParameterValue` (incorrect ID type/value). An example shows a POST request with ID \"90ABCD\" and a successful response indicating \"camera.takePicture\" is \"done\" with the file URI.\n"]]