Get device reports

GET /accounts/{account_id}/reports/devices

Fetch reports for the observed unique devices in the given period.

Available on: AuditGUARD AlertGUARD PremiumGUARD EliteGUARD

Path parameters

  • account_id string Required

    ID of an account

Query parameters

  • period string Required

    Observed period for the report

    Values are TODAY, YESTERDAY, THIS_WEEK, LAST_WEEK, THIS_MONTH, LAST_MONTH, LAST_30_DAYS, or LAST_3_MONTHS.

  • sort string

    Sort the devices by a specified parameter. Use '-' prefix to indicate a descending sort. Default: '-total_clicks'.

    Values are last_seen, first_seen, total_clicks, invalid_clicks, or flagged_clicks.

  • offset number

    Paginating parameter. Offset the result by a specified number. Default: 0.

  • limit number

    Paginating parameter. Limit the number of result by a specified number. Max: 100. Default: 50.

  • query string

    Search device IDs by given query

  • ids[] array[string]

    Fetch all device reports for the given array of device IDs.

  • status string

    Status of a device

    Values are NORMAL, SUSPICIOUS, or FLAGGED.

Responses

  • 200

    Successful operation

    Hide response attributes Show response attributes array[object]
    • device_id string

      Unique ID of the device

    • status string

      The current status of the device

    • total_clicks number

      Total number of clicks from this device

    • normal_clicks number

      Total number of normal clicks from this device

    • suspicious_clicks number

      Total number of suspicious clicks from this device

    • flagged_clicks number

      Total number of flagged clicks from this device

    • invalid_clicks number

      Total number of invalid clicks from this device

    • first_seen string(date-time)

      Timestamp of the first occurrence of this device

    • last_seen string(date-time)

      Timestamp of the last occurrence of this device

    • last_campaign_id string

      The ID of the last campaign this device interacted with

    • last_country string

      The last country this device was reported from

    • last_city string

      The last city this device was reported from

    • last_device_type string

      The last device type this device was reported as

    • last_browser string

      The last browser this device was reported from

    • last_browser_version string

      The last browser version this device was reported from

    • last_os string

      The last OS this device was reported from

    • last_os_version string

      The last OS version this device was reported from

GET /accounts/{account_id}/reports/devices
curl \
 -X GET https://api.clickguard.com/accounts/{account_id}/reports/devices?period=TODAY \
 -H "X-API-KEY: $API_KEY"
Response examples (200)
"[\n  {\n    \"device_id\": \"q1w2e3r4t5y6\",\n    \"status\": \"NORMAL\",\n    \"total_clicks\": 3,\n    \"normal_clicks\": 2,\n    \"invalid_clicks\": 1,\n    \"suspicious_clicks\": 0,\n    \"flagged_clicks\": 0,\n    \"first_seen\": \"2020-07-22T16:39:51.327Z\",\n    \"last_seen\": \"2020-07-27T12:05:04.941Z\",\n    \"last_ip\": \"200.0.12.145\",\n    \"last_campaign_id\": \"2003832146\",\n    \"last_country\": \"Brazil\",\n    \"last_country_code\": \"BR\",\n    \"last_region\": \"Niterói (Rio de Janeiro)\",\n    \"last_city\": \"Icaraí\",\n    \"last_device_type\": \"computer\",\n    \"last_browser\": \"Safari\",\n    \"last_browser_version\": \"14.0.3\",\n    \"last_os\": \"Mac OS\",\n    \"last_os_version\": \"10.15.7\"\n  },\n  ...\n]"
Response examples (200)
[
  {
    "device_id": "string",
    "status": "string",
    "total_clicks": 42.0,
    "normal_clicks": 42.0,
    "suspicious_clicks": 42.0,
    "flagged_clicks": 42.0,
    "invalid_clicks": 42.0,
    "first_seen": "2025-05-04T09:42:00Z",
    "last_seen": "2025-05-04T09:42:00Z",
    "last_campaign_id": "string",
    "last_country": "string",
    "last_city": "string",
    "last_device_type": "string",
    "last_browser": "string",
    "last_browser_version": "string",
    "last_os": "string",
    "last_os_version": "string"
  }
]