Page Summary
-
The
/osc/commands/statusAPI is used to check the status of previously executed commands, likecamera.takePicture, that were in progress. -
It requires the
idof the command, obtained from the/osc/commands/executeAPI, 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
idparameters.
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.
Input
| Name | Type | Description |
|---|---|---|
id
|
String | Command ID returned by a previous call to
|
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" } } |


