Closed
Description
Problem Statement
Currently triggering a monitor check-in requires two calls:
-> POST .../monitors/{monitor_id}/checkins/
-> PUT .../monitors/{monitor_id}/checkins/{checkin_in}/ {"status": "ok"}
This creates a minor hurdle as it requires you to track the checkin_id returned in the first step, to publish the second step (to mark a job as finished, for example).
Solution Brainstorm
Instead we could provide a simplified API along the lines of:
-> PUT .../monitors/{monitor_id}/checkins/latest/
This request would modify the most recent unfinished check-in, meaning a few behaviors could be implemented:
- With no checkins, this returns a 404 (same as invalid ID).
- With no unfinished checkin, this returns a 404 (same as invalid ID).
- With one unfinished checkin, this would modify that checkin.
- With multiple unfinished checkins, this would modify the most recent checkin. Meaning likely the previous checkin would time out and fail.
Refs GH-42283
Metadata
Metadata
Assignees
Labels
No labels