cURL
curl --request PATCH \ --url https://upcron.io/api/heartbeats/{id} \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data ' { "name": "Daily Backup Job", "grace_period": 3600, "cron_schedule": "0 2 * * *", "next_ping_at": "2024-01-02T12:00:00Z" } '
{ "message": "Heartbeat updated successfully", "data": { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "Daily Backup Job", "project_id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "grace_period": 3600, "next_ping_at": "2024-01-02T12:00:00.000000Z", "cron_schedule": "0 2 * * *", "created_at": "2024-01-01T12:00:00.000000Z", "updated_at": "2024-01-01T12:00:00.000000Z", "ping_url": "https://ping.upcron.io/heartbeat/uuid", "start_url": "https://ping.upcron.io/heartbeat/uuid/start", "fail_url": "https://ping.upcron.io/heartbeat/uuid/fail", "project": { "id": "9b1deb4d-3b7d-4bad-9bdd-2b0d7b3dcb6d", "name": "My Project", "description": "Project description" } } }
Partially update an existing heartbeat
Laravel Sanctum Bearer token authentication
Heartbeat ID
255
"Daily Backup Job"
Grace period in seconds (60 to 86400)
60 <= x <= 86400
3600
"0 2 * * *"
"2024-01-02T12:00:00Z"
Heartbeat updated successfully
"Heartbeat updated successfully"
Show child attributes