Recurring Queries
Learn how to use our six recurring query endpoints to submit a new query, check the query run status, fetch query results and manage existing queries.
Recurring queries are only submitted once, but they continue to generate new reports for every calendar day, week, or month. This is a good option for teams that want to pull in the same traffic data with every day, week, or month that passes. The query start and end times are defined by the selected date range option:
  • Daily recurring queries (date_range=day) return data for the previous 24-hour calendar day based on your selected timezone for the query. These queries begin a new run at 12:01AM each day for their selected timezone, and should be completed (available to fetch) by 4AM.
  • Weekly recurring queries (date_range=week) return data for the previous 7-day calendar week (12:00AM Monday - 11:59PM Sunday) based on your selected timezone for the query. These queries begin a new run at 12:01AM every Monday for their selected timezone, and should be completed (available to fetch) by 4AM Monday.
  • Monthly recurring queries (date_range=month) return data for the previous calendar month based on your selected timezone for the query. These queries begin a new run at 12:01AM on the first calendar day of every month for their selected timezone, and should be completed (available to fetch) by 4AM on the first day.
Getting data back from a recurring query for the first time is a three-step process:
  1. 1.
    Run a /submit/ call to submit your new query and receive a query ID.
  2. 2.
    Wait for your first query run to complete — 4AM the next day for daily queries, 4AM the next Monday for weekly queries, 4AM the next first calendar month day for monthly queries. THEN, run a /status/ call to check the status of your submitted query using the query ID from your previous call to the /submit/ endpoint. Continue running as frequently as every ten seconds or so until you receive a completed status for your query.
  3. 3.
    Once the status of your query is completed, run a /fetch/ call with the original query ID to download your completed query results. Continue using the same query ID to check status and fetch your updated results with every day, week, or month that passes.
get
https://api.chartbeat.com
/query/v2/recurring/submit/
Submit Recurring Query
get
https://api.chartbeat.com
/query/v2/recurring/status/
Get Status of Recurring Query
get
https://api.chartbeat.com
/query/v2/recurring/fetch/
Fetch Recent Recurring Query Run
get
https://api.chartbeat.com
/query/v2/recurring/runs/
Get Previous Recurring Query Runs
get
https://dashapi.chartbeat.com
/query/v2/recurring/list/
Get Recurring Queries List
get
https://api.chartbeat.com
/query/v2/recurring/cancel/
Cancel Recurring Query
Last modified 9mo ago