Gets a list of executed commands on a given GSM site.

GET {{baseUrl}}/api/console/gsm/:gsmKey/sites/:siteId/commands?endpointId=fb223541-ca9d-479f-9994-b8c7c95d3c2d&command=restart&commandState=1&startDate=2022-10-30T10:36:04.1848254Z&endDate=2022-11-29T10:36:04.1848254Z&order=hostname&orderDirection=D&pageSize=50&pageNr=1

Request Params

KeyDatatypeRequiredDescription
endpointIdstringThe endpoint identifier to get the executed command for.
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.1848254Z","EndpointId":"9b908d3c-b719-40ed-bf8a-3a80f0f11bff","HostName":"MyComputer1","StartDate":"2022-11-29T07:36:04.1848254Z","EndDate":"2022-11-29T17:36:04.1848254Z","Command":"scan","Parameters":null,"CommandState":4},{"DateRequested":"2022-11-29T03:36:04.1848254Z","EndpointId":"6d08f8d7-15a1-4684-8344-c6c4d3c1d6fb","HostName":"MyComputer2","StartDate":"2022-11-29T08:36:04.1848254Z","EndDate":"2022-11-29T18:36:04.1848254Z","Command":"scan","Parameters":null,"CommandState":2}]}