# get command history for device API to get and filter deivce command history Endpoint: GET /v0/enterprise/{enterprise_id}/device/{device_id}/command-history/ Version: 1.0.0 Security: apiKey ## Path parameters: - `enterprise_id` (string, required) Id of the enterprise - `device_id` (string, required) Id for the command request ## Query parameters: - `state` (string) Filter by command state ## Response 200 fields (application/json): - `count` (integer) - `next` (string) - `previous` (string) - `results` (array) - `results.id` (string) Unique command identifier - `results.request` (string) Request Id associated with this command - `results.command` (string) - `results.command_args` (object) arguments in command - `results.issued_by` (object) - `results.issued_by.id` (integer) - `results.issued_by.username` (string) - `results.device` (string) Device associated with this command - `results.state` (string) Current state of the command Enum: "Command Queued", "Command Initiated", "Command Acknowledged", "Command In Progress", "Command TimeOut", "Command Success", "Command Failure", "Command Scheduled", "Command Cancelled" - `results.reason` (string) details briefing the reason for current command state - `results.requeue_value` (integer) indicates the command's requeue count for the device, which is limited to a maximum of 3 retries. - `results.created_on` (string) Timestamp of command creation - `results.updated_on` (string) Last updated timestamp of command ## Response 401 fields (application/json): - `errors` (array) - `message` (string) - `status` (integer) ## Response 404 fields (application/json): - `errors` (array) - `message` (string) - `status` (integer) ## Response 500 fields (application/json): - `errors` (array) - `message` (string) - `status` (integer)