Question
Can I get specific usage data on macros, triggers, and automations?
Answer
It is not possible to pull usage date for a specific date. However, you can obtain usage data for specific time ranges using the API: last hour, 24 hours, 7 days, or 30 days.
While managing your triggers, you can view or add columns that display how often the trigger has fired in the last 24 hours, 7 days, or 30 days. Managing macros or automations allows you to view how often they have been executed in the last 7 day period.
Option 1: Filtered API Request
Make a filtered request for each. The parameters described below are supported when filtering this information via the API.
- usage_1h
- usage_24h
- usage_7d
Example:
https://yoursubdomain.zendesk.com/api/v2/macros.json?sort_by=usage_1h,usage_24h,usage_7d
Make sure you're logged in, then select your subdomain from the dropdown below to be redirected directly to this API call in your account.
Option 2: Sideload API Request
Make a sideload request to obtain the usage data for each. Sideloading gives you an option for tracking usage over a larger amount of time by allowing you to add the parameter of 30 days to the request. The sideloading parameters described below are currently supported.
- usage_1h
- usage_24h
- usage_7d
- usage_30d
Example:
https://yoursubdomain.zendesk.com/api/v2/macros.json?include=usage_1h,usage_24h,usage_7d