GET /service/api/usage/gsm/{keyCode}
 ?billingDate={billingDate}
 &continuation={continuation}

Returns usage information for a master keycode.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
keyCode

A master keycode for which usage information is to be retrieved.

string

Required

billingDate

The Date up to which the statistics are calculated; if not specified then the current date is used.

date

None.

continuation

A continuation token for batched requests

string

None.

Body Parameters

None.

Response Information

Resource Description

Returns a list of site keycode usage statistics having the specified master key as parent. Results are returned for different time intervals

KeycodeUsage
NameDescriptionTypeAdditional Information
ContinuationToken

Provides a continuation token for follow-up calls if more data is available than the given batch size.

string

None.

ContinuationURI

Provides a URI for follow-up calls if more data is available than the given batch size

string

None.

Date

End date up to which usage statistics is collected

date

None.

QueryResults

Seat count statistics matching the given query parameters

Collection of UsageInfo

None.

Sample Response

{
  "QueryResults": [
    {
      "PeriodInfo": [
        {
          "Period": 1,
          "Seen": 172
        },
        {
          "Period": 7,
          "Seen": 235
        },
        {
          "Period": 30,
          "Seen": 369
        },
        {
          "Period": 90,
          "Seen": 393
        }
      ],
      "KC": "BBA7-C4CB-31BA-4558-BA0D"
    },
    {
      "PeriodInfo": [
        {
          "Period": 1,
          "Seen": 31
        },
        {
          "Period": 7,
          "Seen": 50
        },
        {
          "Period": 30,
          "Seen": 61
        },
        {
          "Period": 90,
          "Seen": 210
        }
      ],
      "KC": "E0E6-9C1A-7AB3-44EA-BB50"
    }
  ],
  "ContinuationToken": null,
  "ContinuationURI": null,
  "Date": "2019-09-19T04:45:04.0294021Z"
}                    
<KeycodeUsage xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.AgentStatus.Models">
  <ContinuationToken i:nil="true" />
  <ContinuationURI i:nil="true" />
  <Date>2019-09-19T04:45:04.0294021Z</Date>
  <QueryResults>
    <UsageInfo>
      <KC>BBA7-C4CB-31BA-4558-BA0D</KC>
      <PeriodInfo>
        <UsagePeriodInfo>
          <Period>1</Period>
          <Seen>172</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>7</Period>
          <Seen>235</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>30</Period>
          <Seen>369</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>90</Period>
          <Seen>393</Seen>
        </UsagePeriodInfo>
      </PeriodInfo>
    </UsageInfo>
    <UsageInfo>
      <KC>E0E6-9C1A-7AB3-44EA-BB50</KC>
      <PeriodInfo>
        <UsagePeriodInfo>
          <Period>1</Period>
          <Seen>31</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>7</Period>
          <Seen>50</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>30</Period>
          <Seen>61</Seen>
        </UsagePeriodInfo>
        <UsagePeriodInfo>
          <Period>90</Period>
          <Seen>210</Seen>
        </UsagePeriodInfo>
      </PeriodInfo>
    </UsageInfo>
  </QueryResults>
</KeycodeUsage>