v1
OpenAPI 3.1.02026-07-13632897.9 KBPriority Guardian Snapshots
Ensure Snapshots
Ensure weekly snapshots are up to date.
Called by get_priorities MCP handler on every dashboard load. Creates missing snapshots for up to 3 completed weeks. Updates running aggregates (streak_count, total_hours_invested, avg_target_achievement).
This endpoint:
- Is idempotent (safe to call repeatedly)
- Never fails with error status (returns 200 with partial results)
- Runs in parallel with other dashboard data fetches
Args: request: FastAPI request (for http_client and correlation_id) user_id: User ID from validated JWT (via X-User-ID header) session: Database session
Returns: 200: { "success": true, "data": { "checked": 3, # Weeks checked "created": 1, # Weeks with new snapshots "errors": 0 # Weeks that failed } }
post/api/priority-guardian/snapshots/ensure
Headers
X-Internal-Secretstring nullable
X-User-IDstring nullable
Response
Successful Response
{"stackTrail":"paths:/api/priority-guardian/snapshots/ensure:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}