$API_TOKEN=<YOUR_API_TOKEN>
$cat > input.json << 'EOF'
<{
< "jobs": [
< {
< "slug": "nightly-backup",
< "name": "Nightly database backup",
< "expected_max_gap_minutes": 1440,
< "grace_minutes": 30
< },
< {
< "slug": "hourly-etl",
< "name": "Hourly ETL step",
< "expected_max_gap_minutes": 60,
< "grace_minutes": 10
< },
< {
< "slug": "queue-worker",
< "name": "Queue worker heartbeat",
< "expected_max_gap_minutes": 15,
< "grace_minutes": 5
< }
< ],
< "mode": "evaluate",
< "ledgerStoreName": "heartbeat-ledger",
< "alertWebhookUrl": "",
< "defaultGraceMinutes": 5,
< "suppressRepeatAlerts": true,
< "timeoutSeconds": 15,
< "receiveMaxSeconds": 60,
< "maxRequestBytes": 16384
<}
<EOF
$curl "https://api.apify.com/v2/actors/kingii98~scheduled-job-heartbeat-and-silence-ledger/runs?token=$API_TOKEN" \
< -X POST \
< -d @input.json \
< -H 'Content-Type: application/json'