Clear all API usage data from the current R session. This action cannot be undone and will reset your session usage history including call counts, timestamps, and cost calculations.
Value
Invisibly returns NULL. The function is called for its side effect of clearing session usage data.
Details
This function clears the session-based usage tracking data stored in memory. After reset:
All session usage history is cleared
kvk_usage_report
will show no dataSession cost calculations restart from zero
Usage alerts continue with the new baseline
The function only affects session usage data. It does not change:
Usage alert settings (these are stored in R options)
API key configuration
Package preferences
This can be useful for:
Starting fresh tracking within a long R session
Clearing test data before production use
Resetting session counters for specific analyses
Troubleshooting usage tracking issues
See also
kvk_usage_report
for viewing current usage,
kvk_export_usage
for exporting session data,
kvk_usage_alert
for setting usage limits
Examples
if (FALSE) { # interactive()
# Clear session usage history
kvk_reset_usage()
# Verify reset worked
kvk_usage_report() # Should show "No usage data found"
# Usage tracking will restart with new API calls
results <- kvk_search(plaats = "Amsterdam")
kvk_usage_report() # Will show the new call
}