Skip to content

Scheduled Testing

Anes Berbic edited this page Mar 13, 2026 · 1 revision

Scheduled Testing (Monitors)

Run API tests on a schedule to catch issues before your users do. Everything runs locally — no cloud infrastructure needed.


Overview

Monitors are cron-based scheduled tasks that:

  1. Run a collection or individual request on a schedule
  2. Execute all assertions and tests
  3. Notify you on failure (desktop notifications, webhooks)
  4. Track results over time with charts

Creating a Monitor

  1. Right-click a collection or request in the sidebar
  2. Select Schedule Monitor
  3. Configure the schedule:
    • Name: "Production Health Check"
    • Schedule: Every 5 minutes / hourly / daily / custom cron
    • Environment: Select which environment to use
    • Notifications: Desktop notification on failure, webhook URL

Cron Expressions

Preset Cron Expression Description
Every minute * * * * * For critical endpoints
Every 5 minutes */5 * * * * Standard monitoring
Every hour 0 * * * * Moderate frequency
Every day at 9am 0 9 * * * Daily checks
Every Monday 8am 0 8 * * 1 Weekly reports
Custom Any valid cron Full flexibility

Monitor Dashboard

View all monitors in the Monitors panel:

  • Status indicator: Green (all passing), Yellow (some failures), Red (critical)
  • Last run: Time and result of the most recent execution
  • Success rate: Percentage over the last 24h / 7d / 30d
  • Average response time: Trend over time
  • Charts: Response time and success rate graphs

Notifications

Desktop Notifications

When a monitor detects a failure, you get an OS-level notification:

ApiArk Monitor Alert "Production Health Check" failed: GET /api/health returned 503

Webhook Notifications

Send alerts to Slack, Discord, PagerDuty, or any webhook endpoint:

Webhook URL: https://hooks.slack.com/services/T00/B00/xxxx

Webhook payload:

{
  "monitor": "Production Health Check",
  "status": "failed",
  "timestamp": "2026-03-13T12:00:00Z",
  "results": {
    "total": 5,
    "passed": 4,
    "failed": 1,
    "failedRequests": [
      {
        "name": "GET /api/health",
        "status": 503,
        "responseTime": 5234,
        "error": "Expected status 200 but got 503"
      }
    ]
  }
}

Result History

Monitor results are stored in the local SQLite database:

  • Response times over time
  • Success/failure history
  • Individual test results per run
  • Export as CSV for analysis

Retention

  • Last 30 days of detailed results
  • Aggregated daily summaries kept for 1 year
  • Configurable in Settings

Offline Behavior

  • Monitors run locally — they continue working even without internet (for localhost/LAN APIs)
  • If the target API is unreachable, the monitor logs a network error
  • Webhook notifications fail silently when offline — no error spam
  • Desktop notifications always work (they're local)

Tips

  • Start with your most critical endpoints (health checks, auth)
  • Use a dedicated "monitoring" environment with read-only credentials
  • Set up Slack/Discord webhooks for team visibility
  • Review response time trends weekly to catch gradual degradation
  • Monitors run in the background — they don't block your work

Clone this wiki locally