Status
The /osc/commands/status
API returns the status for previous inProgress
commands. The status
API is useful for polling the progress of a previously issued command; for example, determining whether camera.takePicture
has completed.
Name |
Type |
Description |
id |
String |
Command ID returned by a previous call to /osc/commands/execute. |
Output
The output is also a command object (see Output of /osc/commands/execute
)
Error
Error code |
Description |
missingParameter |
The id is not specified. This parameter requires a command ID returned by a previous call to /osc/commands/execute . |
invalidParameterName |
The input parameter is unrecognized. |
invalidParameterValue |
The input parameter is recognized, but its value is invalid; for example, id value doesn't exist or its type is incorrect. |
Example |
Request |
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"
} |
Response |
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"
}
} |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-09 UTC.
[null,null,["Last updated 2024-10-09 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."]]],[]]