GET /service/api/console/gsm/{gsmKey}/sites/{siteId}/dnsp/trafficbycategory
 ?categories={categories}
 &startDate={startDate}
 &endDate={endDate}
 &pageSize={pageSize}
 &pageNr={pageNr}

Returns information about DNS requests that were seen by the DNS Protection service for one or more specified categories. Traffic information can be queried for a defined subset of available DNS Protection categories. Please refer to the description of the categories field in the API specification for a complete list of supported categories.

NOTE: The maximum allowed time difference between 'startDate' and 'endDate' is 30 days.
WARNING: The maximum number of returned traffic records is limited to ensure that requests can complete in reasonable time. The amount of data accumulating over an increasing timespan can become very large, reaching into the millions of records for the maximum allowed time interval of 30 days. When querying traffic by category for high-use sites, it is advised to query more regularly for shorter periods of time, instead of trying to pull the entire data once per month only.

Request Information

URI Parameters

NameDescriptionTypeAdditional Information
gsmKey

The GSM console keycode.

string

Required

siteId

The site identifier.

string

Required

categories

A comma separated list of one or more DNS Protection category identifiers (e.g. 14,47,81). This query parameter is mandatory.

Traffic can be queried for the following DNS Protection categories:

  • 3 - Financial Services
  • 7 - Shopping
  • 14 - Social Networking
  • 25 - Streaming Media
  • 31 - Peer to Peer
  • 34 - Games
  • 42 - Sports
  • 47 - Personal Storage
  • 55 - Web based email
  • 81 - Motor Vehicles

string

Required

startDate

If specified, returns requests after (or at) the given date. If omitted, defaults to 'endDate' minus 24 hours.

date

None.

endDate

If specified, returns requests before (or at) the given date. If omitted, defaults to the current date and time.

date

None.

pageSize

Specifies the maximum number of records to return. Valid values are between 100 and 10000.

integer

Default value is 1000

pageNr

Specifies the page number. Can be used to retrieve the next batch of records.

integer

Default value is 1

Body Parameters

None.

Response Information

Resource Description

Information about DNS requests for a set of DNS Protection categories.

GetDNSPTrafficByCategoryResponseModel
NameDescriptionTypeAdditional Information
MoreAvailable

Value indicating whether more records are available in the queried time window. Increment the page number in the query to obtain additional request records.

boolean

None.

PageNr

The number of the page that was requested.

integer

None.

PageSize

The size of the page that was requested.

integer

None.

StartDate

The start date that was used for the data query.

date

None.

EndDate

The end date that was used for the data query.

date

None.

SiteId

The identifier of the GSM site traffic information was queried for.

string

None.

SiteName

The name of the GSM site traffic information was queried for.

string

None.

Requests

The list of request records.

Collection of GetDNSPTrafficByCategoryResponseModel_DNSRequest

None.

Sample Response

{
  "MoreAvailable": false,
  "PageNr": 1,
  "PageSize": 1000,
  "StartDate": "2019-09-18T04:52:02.6425748Z",
  "EndDate": "2019-09-19T04:52:02.6425748Z",
  "SiteId": "30cdf4a6-7c65-4a25-ab89-2cce7bb33974",
  "SiteName": "Site 1",
  "Requests": [
    {
      "Timestamp": "2019-09-19T04:51:02.6425748Z",
      "HostName": "MyComputer1",
      "UserName": "User1",
      "AgentVersion": "1.3.0.197",
      "SourceIp": "95.248.151.233",
      "Domain": "www.category-domain1.com",
      "DomainIps": [
        "95.126.216.249",
        "95.218.73.1"
      ],
      "CategoryIds": [
        34,
        42
      ],
      "ActionTaken": 0
    },
    {
      "Timestamp": "2019-09-19T04:50:02.6425748Z",
      "HostName": "MyComputer2",
      "UserName": "User2",
      "AgentVersion": "1.3.0.197",
      "SourceIp": "95.202.166.151",
      "Domain": "www.category-domain2.com",
      "DomainIps": [
        "95.9.125.102",
        "95.37.145.64"
      ],
      "CategoryIds": [
        7,
        81
      ],
      "ActionTaken": 1
    }
  ]
}                    
<GetDNSPTrafficByCategoryResponseModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Webroot.UnityAPI.ServiceExtension.Console.Models">
  <EndDate>2019-09-19T04:52:02.6425748Z</EndDate>
  <MoreAvailable>false</MoreAvailable>
  <PageNr>1</PageNr>
  <PageSize>1000</PageSize>
  <Requests>
    <GetDNSPTrafficByCategoryResponseModel_DNSRequest>
      <ActionTaken>0</ActionTaken>
      <AgentVersion>1.3.0.197</AgentVersion>
      <CategoryIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>34</d4p1:int>
        <d4p1:int>42</d4p1:int>
      </CategoryIds>
      <Domain>www.category-domain1.com</Domain>
      <DomainIps xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>95.126.216.249</d4p1:string>
        <d4p1:string>95.218.73.1</d4p1:string>
      </DomainIps>
      <HostName>MyComputer1</HostName>
      <SourceIp>95.248.151.233</SourceIp>
      <Timestamp>2019-09-19T04:51:02.6425748Z</Timestamp>
      <UserName>User1</UserName>
    </GetDNSPTrafficByCategoryResponseModel_DNSRequest>
    <GetDNSPTrafficByCategoryResponseModel_DNSRequest>
      <ActionTaken>1</ActionTaken>
      <AgentVersion>1.3.0.197</AgentVersion>
      <CategoryIds xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:int>7</d4p1:int>
        <d4p1:int>81</d4p1:int>
      </CategoryIds>
      <Domain>www.category-domain2.com</Domain>
      <DomainIps xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
        <d4p1:string>95.9.125.102</d4p1:string>
        <d4p1:string>95.37.145.64</d4p1:string>
      </DomainIps>
      <HostName>MyComputer2</HostName>
      <SourceIp>95.202.166.151</SourceIp>
      <Timestamp>2019-09-19T04:50:02.6425748Z</Timestamp>
      <UserName>User2</UserName>
    </GetDNSPTrafficByCategoryResponseModel_DNSRequest>
  </Requests>
  <SiteId>30cdf4a6-7c65-4a25-ab89-2cce7bb33974</SiteId>
  <SiteName>Site 1</SiteName>
  <StartDate>2019-09-18T04:52:02.6425748Z</StartDate>
</GetDNSPTrafficByCategoryResponseModel>