Gets a list of executed commands on a given group.

GET {{baseUrl}}/api/console/gsm/:gsmKey/sites/:siteId/groups/:groupId/commands?command=uninstall&commandState=3&startDate=2022-10-30T10:36:04.2160774Z&endDate=2022-11-29T10:36:04.2160774Z&order=hostname&orderDirection=A&pageSize=50&pageNr=1

Only returns the executed commands from the past 6 months.

Request Params

KeyDatatypeRequiredDescription
commandstringUsed to filter by command type. Valid values are "scan", "cleanup", "uninstall", "changekeycode", "restart".
commandStatenumberUsed to filter by the state. Valid values are:
  • 1 for "elapsed": The command elapsed as the endpoint did not report in within a valid time window.
  • 2 for "not yet received": The endpoint has not yet reported to pick up the command, but is still in a valid time window.
  • 3 for "executed": The endpoint reported in and the command has been sent.
  • 4 for "scheduled": The command has not been sent yet. | | startDate | string | | If specified, returns all issued commands after (or at) the given date. | | endDate | string | | If specified, returns all issued commands before (or at) the given date. | | order | string | | Used to determine the order field. Valid values are "daterequested", "hostname", "commandstate", "command". Default value is "daterequested". | | orderDirection | string | | Used to sort the data. "A" for ascending, "D" for descending. If orderDirection is omitted or invalid, the data will be sorted in descending order. | | pageSize | number | | Specifies the number of records being returned. | | pageNr | number | | Specifies the page number. Can be used to retrieve the next batch of records. Default value is 1. |

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"TotalAvailable":2,"PageNr":1,"PageSize":50,"Commands":[{"DateRequested":"2022-11-29T04:36:04.2160774Z","EndpointId":"3d707d81-4eb1-4205-be9a-4aacdc11fdb8","HostName":"MyComputer1","StartDate":"2022-11-29T07:36:04.2160774Z","EndDate":"2022-11-29T17:36:04.2160774Z","Command":"scan","Parameters":null,"CommandState":1},{"DateRequested":"2022-11-29T03:36:04.2160774Z","EndpointId":"0fa2ddf2-da60-4569-afd0-0ed3687940b7","HostName":"MyComputer2","StartDate":"2022-11-29T08:36:04.2160774Z","EndDate":"2022-11-29T18:36:04.2160774Z","Command":"scan","Parameters":null,"CommandState":1}]}