Returns the newest active lock session, including segment history. If multiple active rows exist, reads select the latest createdAt, breaking ties by highest ID; no session is modified or ended. Returns null in the data field if no session is active. By default reads your own session; pass targetUserId to read the active session of a user you have access to — e.g. a keyholder checking the lockee's lock. When the keyholder hid the timer (isTimeDisplayed: false) and the caller is not a keyholder of the session, endDate and duration are null, matching what the lockee sees on the dashboard; they become visible again once the revealTimeBeforeUnlock window starts.
Query Parameters
targetUserIdintegerqueryRead another user's active session instead of your own. The target must be a user you have access to; otherwise the request fails with 403.
Response
200application/jsonActive lock session or null
Active lock session or null
400application/jsonInvalid targetUserId
Invalid targetUserId
401
403application/jsonTarget user not accessible
Target user not accessible
404application/jsonUser not found
User not found