kvk_reset_usage: Reset session usage tracking data

kvk_reset_usageR Documentation

Reset session usage tracking data

Description

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.

Usage

kvk_reset_usage()

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 data

  • Session 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

Value

Invisibly returns NULL. The function is called for its side effect of clearing session usage data.

See Also

kvk_usage_report for viewing current usage, kvk_export_usage for exporting session data, kvk_usage_alert for setting usage limits

Examples


# 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


kvkapiR documentation built on June 25, 2025, 5:11 p.m.