Timeline stats

GET /accounts/{account_id}/timeline

Fetch statistics with timeline data to be plotted on a chart

Available on: AuditGUARD AlertGUARD PremiumGUARD EliteGUARD

Path parameters

Query parameters

  • period string Required

    Period to fetch stats for

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

Responses

  • Successful operation

    Hide response attributes Show response attributes object
    • total_clicks array[object]

      Array of timeline data for total clicks

      Hide total_clicks attributes Show total_clicks attributes array[object]
      • x string(date-time)

        The time period

      • y number

        The number of total clicks in the given time period

    • flagged_clicks array[object]

      Array of timeline data for flagged clicks

      Hide flagged_clicks attributes Show flagged_clicks attributes array[object]
      • x string(date-time)

        The time period

      • y number

        The number of flagged clicks in the given time period

    • invalid_clicks array[object]

      Array of timeline data for invalid clicks

      Hide invalid_clicks attributes Show invalid_clicks attributes array[object]
      • x string(date-time)

        The time period

      • y number

        The number of invalid clicks in the given time period

GET /accounts/{account_id}/timeline
curl \
 -X GET https://api.clickguard.com/accounts/{account_id}/timeline?period=TODAY \
 -H "X-API-KEY: $API_KEY"
Response examples (200)
"{\n  \"total_clicks\": [\n    {\n      \"x\": \"2021-04-18T15:00\",\n      \"y\": 10\n    },\n    ...\n  ],\n  \"flagged_clicks\": [\n    {\n      \"x\": \"2021-04-18T15:00\",\n      \"y\": 2\n    },\n    ...\n  ],\n  \"invalid_clicks\": [\n    {\n      \"x\": \"2021-04-18T15:00\",\n      \"y\": 3\n    },\n    ...\n  ]\n}"
Response examples (200)
{
  "total_clicks": [
    {
      "x": "2024-05-04T09:42:00+00:00",
      "y": 42.0
    }
  ],
  "flagged_clicks": [
    {
      "x": "2024-05-04T09:42:00+00:00",
      "y": 42.0
    }
  ],
  "invalid_clicks": [
    {
      "x": "2024-05-04T09:42:00+00:00",
      "y": 42.0
    }
  ]
}