- Legion API
- Control
- Get the status of a 'guaranteed' QoS command
Get the status of a 'guaranteed' QoS command
const url = 'https://legion.picogrid.com/v2/control/example';const options = {method: 'GET'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://legion.picogrid.com/v2/control/exampleRetrieve the current status of a command that was executed with a quality of service of ‘GUARANTEED’. This endpoint allows clients to track the progress of commands that are queued for execution. The command ID is generated upon successful acceptance of the command execution and can be used to retrieve the status.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The ID of the command to retrieve the status for
Query Parameters
Section titled “Query Parameters”The identifier of the terminal to retrieve the command status for. This is required if the command was executed on a terminal level
The identifier of the stream to retrieve the command status for. This is required if the command was executed on a stream level
Responses
Section titled “Responses”Command status retrieved successfully for a ‘GUARANTEED’ QoS command
Represents the response to a command execution request. The structure provides information about the command’s processing status and any relevant results.
object
A unique identifier for the command request. This can be used for tracking or referencing the command execution. This is only generated for commands with a quality of service of ‘GUARANTEED’.
A human-readable message providing additional context about the command status. This can include details about success, failure reasons, or next steps.
The current status of the command execution. Possible values are:
-
ACCEPTED: The command was accepted for processing
-
REJECTED: The command was not accepted for processing
-
SUCCESS: The command was successfully executed
-
FAILED: The command failed during execution
Command-specific result data. The structure varies depending on the executed command. This is typically present for SUCCESS or FAILED statuses. Refer to the specific command documentation for details on the expected result structure.
object
Example
{ "command_id": "123e4567-e89b-12d3-a456-426614174000", "message": "Command execution was accepted.", "status": "ACCEPTED", "result": { "newPosition": { "pan": 45, "tilt": 30, "zoom": 2 } }}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Request Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Authentication Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Unauthorized Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Resource Not Found Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Timeout Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Bad Gateway Error
object
Examplegenerated
{ "message": "example"}Headers
Section titled “Headers”The Access-Control-Allow-Credentials response header tells browsers whether to expose the response to the frontend JavaScript code when the request’s credentials mode (Request.credentials) is include. - MDN Link
Version 2 · commit 0771262
