GET /service/api/console/gsm/{gsmKey}/sites/{siteId}/groups/{groupId}/commands
 ?command={command}
 &commandState={commandState}
 &startDate={startDate}
 &endDate={endDate}
 &order={order}
 &orderDirection={orderDirection}
 &pageSize={pageSize}
 &pageNr={pageNr}

Gets a list of executed commands on a given group.

Only returns the executed commands from the past 6 months.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
gsmKey

The GSM console keycode.

string

Required

siteId

The site identifier.

string

Required

groupId

The group identifier to get the executed commands for.

string

Required

command

Used to filter by command type. Valid values are "scan", "cleanup", "uninstall", "changekeycode", "restart".

string

None.

commandState

Used 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.

string

None.

startDate

If specified, returns all issued commands after (or at) the given date.

date

None.

endDate

If specified, returns all issued commands before (or at) the given date.

date

None.

order

Used to determine the order field. Valid values are "daterequested", "hostname", "commandstate", "command". Default value is "daterequested".

string

None.

orderDirection

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.

string

None.

pageSize

Specifies the number of records being returned.

integer

Default value is 50

pageNr

Specifies the page number. Can be used to retrieve the next batch of records. Default value is 1.

integer

Default value is 1

URI Sample(s)

GET
https://unityapi.webrootcloudav.com/service/api/console/gsm/3515-3EC8-3018-4DAB-A776/sites/3c5b599c-f244-4c7e-a78b-b3e9f252fac8/groups/4f08f3ad-7688-4d40-98a6-89bbf7df3daf/commands
GET
https://unityapi.webrootcloudav.com/service/api/console/gsm/3515-3EC8-3018-4DAB-A776/sites/3c5b599c-f244-4c7e-a78b-b3e9f252fac8/groups/4f08f3ad-7688-4d40-98a6-89bbf7df3daf/commands?command=scan
GET
https://unityapi.webrootcloudav.com/service/api/console/gsm/3515-3EC8-3018-4DAB-A776/sites/3c5b599c-f244-4c7e-a78b-b3e9f252fac8/groups/4f08f3ad-7688-4d40-98a6-89bbf7df3daf/commands?commandState=3
GET
https://unityapi.webrootcloudav.com/service/api/console/gsm/3515-3EC8-3018-4DAB-A776/sites/3c5b599c-f244-4c7e-a78b-b3e9f252fac8/groups/4f08f3ad-7688-4d40-98a6-89bbf7df3daf/commands?order=command&orderDirection=A
GET
https://unityapi.webrootcloudav.com/service/api/console/gsm/3515-3EC8-3018-4DAB-A776/sites/3c5b599c-f244-4c7e-a78b-b3e9f252fac8/groups/4f08f3ad-7688-4d40-98a6-89bbf7df3daf/commands?startDate=2018-09-01&endDate=2018-09-30&pageSize=100&pageNr=3

Body Parameters

None.

Response Information

Resource Description

Information about the executed commands.

GetCommandsResponseModel
NameDescriptionTypeAdditional Information
TotalAvailable

The total number of commands in the past 6 months. Use this value to determine if you need to retrieve additional pages of data.

integer

None.

PageNr

The number of the page that was requested.

integer

None.

PageSize

The size of the page that was requested.

integer

None.

Commands

List of command records.

Collection of GetCommandsResponseModel_Command

None.

Sample Response

{
  "TotalAvailable": 2,
  "PageNr": 1,
  "PageSize": 50,
  "Commands": [
    {
      "DateRequested": "2024-04-19T06:27:30.619873Z",
      "EndpointId": "cac47ffb-ee7f-41e5-85b8-bbb67a98f6e9",
      "HostName": "MyComputer1",
      "StartDate": "2024-04-19T09:27:30.619873Z",
      "EndDate": "2024-04-19T19:27:30.619873Z",
      "Command": "scan",
      "Parameters": null,
      "CommandState": 4
    },
    {
      "DateRequested": "2024-04-19T05:27:30.619873Z",
      "EndpointId": "b5bde865-1db5-4529-981f-0a1513a409e1",
      "HostName": "MyComputer2",
      "StartDate": "2024-04-19T10:27:30.619873Z",
      "EndDate": "2024-04-19T20:27:30.619873Z",
      "Command": "scan",
      "Parameters": null,
      "CommandState": 3
    }
  ]
}                    
<GetCommandsResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.Console.Models">
  <Commands>
    <GetCommandsResponseModel_Command>
      <Command>scan</Command>
      <CommandState>4</CommandState>
      <DateRequested>2024-04-19T06:27:30.619873Z</DateRequested>
      <EndDate>2024-04-19T19:27:30.619873Z</EndDate>
      <EndpointId>cac47ffb-ee7f-41e5-85b8-bbb67a98f6e9</EndpointId>
      <HostName>MyComputer1</HostName>
      <Parameters i:nil="true" />
      <StartDate>2024-04-19T09:27:30.619873Z</StartDate>
    </GetCommandsResponseModel_Command>
    <GetCommandsResponseModel_Command>
      <Command>scan</Command>
      <CommandState>3</CommandState>
      <DateRequested>2024-04-19T05:27:30.619873Z</DateRequested>
      <EndDate>2024-04-19T20:27:30.619873Z</EndDate>
      <EndpointId>b5bde865-1db5-4529-981f-0a1513a409e1</EndpointId>
      <HostName>MyComputer2</HostName>
      <Parameters i:nil="true" />
      <StartDate>2024-04-19T10:27:30.619873Z</StartDate>
    </GetCommandsResponseModel_Command>
  </Commands>
  <PageNr>1</PageNr>
  <PageSize>50</PageSize>
  <TotalAvailable>2</TotalAvailable>
</GetCommandsResponseModel>