APIs & services / Reporting datasets (rtld)

Cadre login history.

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=PlusOneCadreLoginHistory
Service
Reporting datasets (rtld)
Features
Login history
When
User opens login history
Auth
X-SESSIONID header (AuthInterceptor adds it; re-auth on 401/400)
In the App Service

Use case

Runs when the user opens Login History (LoginHistoryFragment -> LoginHistoryViewModel -> LoginHistoryRepositoryImp.fetchLoginHistory). The rows are saved as JSON in SharedPreferences KEY_LOGIN_HISTORY and listed from there, showing each login date and the number of devices. Offline or failed calls show "no internet" or "Something went wrong" and the last cached list.

Headers

HeaderValueNotes
X-SESSIONID<session token>Passed explicitly as @Header from AndroidSessionManager.sessionId. AuthInterceptor still retries once with a fresh token on 401 or 400.

Parameters

ParamInRequiredExampleNotes
namequeryYesPlusOneCadreLoginHistoryHard-coded in the @GET path with version and format.
versionqueryYes1Dataset version. Always 1.
formatqueryYesjsonResponse format. Always json, so the body is a JSON array of row objects.
paramsqueryYesCADRE_LOGIN=9XXXXXXXX1@@tenant.exampleDataset input parameters as KEY=value pairs joined with "--". CADRE_LOGIN = AndroidSessionManager.userId as-is (here the full user id is sent, not trimmed at "@@").

Request

No body. cadre params

Response

Example response body (synthetic data)
[
  {
    "loginName": "9XXXXXXXX1",
    "attemptedDate": "2026-10-20",
    "different_devices": 1
  },
  {
    "loginName": "9XXXXXXXX1",
    "attemptedDate": "2026-10-21",
    "different_devices": 2
  }
]
FieldTypeRequiredNotes
loginNamestringLogin shown in the row.
attemptedDatestringLogin date shown in the row.
different_devicesintNumber of devices used that day (LoginHistoryDTO.differentDevices).

Errors

StatusWhenWhat the app does
401 / 400Session token expired or rejectedAuthInterceptor refreshes the token and retries once; if the retry also fails, Resource.error "Something went wrong"; the cached list is shown.
5xxDataset query failed on the serverResource.error "Something went wrong"; the cached list is shown.
network errorNo connectivity or timeoutResource.error "Something went wrong"; the cached list is shown.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/LoginHistoryRepositoryImp.kt
  • app/src/main/java/org/platformcommons/urvi/view/login_history/LoginHistoryFragment.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/responsedto/LoginHistoryDTO.kt