APIs & services / Reporting datasets (rtld)

Load the signed-in user, tenant, roles and assigned work nodes; decides cadre vs Unit In-charge/FMT flow.

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=PlusOneTenantUserData
Service
Reporting datasets (rtld)
Features
Login, App startup and role detection
When
On login
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

Verified live on 2026-10-22 against the dev server (debug build, emulator, ap.gov test user). Called through CoreAPI right after login (first call after the session is created). Runs on the splash screen right after sign-in (SplashActivity.fetchAndPersistStaticData). The app reads the user, tenant, roles and assigned work nodes, saves them in SharedPreferences, and uses the role codes and tenant to choose the flow: a role containing "unit-incharge" or "fmt_l1" sets KEY_IS_UNIT_LOGIN, and the ap.gov tenant goes to SetUpWorknode while others go to SetupPieWorkNode. The unit-login variants also collect the VO alias ids (WorkNodeMajorType = MAJOR_TYPE.VO) for the farmer download. If the call fails or returns nothing, the splash shows "Unable to set up account" and closes.

Headers

HeaderValueNotes
X-SESSIONID<session token>Added by Bridge CoreAPI from the AccountManager session when the Operation is executed with dooNowOrThrow. The app code does not set it.

Parameters

ParamInRequiredExampleNotes
namequeryYesPlusOneTenantUserDataDataset name. The rtld executor (/rtld/api/dataset/v1/execute) picks the dataset by this query param.
versionqueryYes1Dataset version. Always 1.
formatqueryYesjsonResponse format. Always json, so the body is a JSON array of row objects.
start / range / body / paramqueryNoDataSetAPI.executeDataSet supports these, but the app passes null so they are not sent.

Request

No body.

Response

Example response body (synthetic data)
[
  {
    "TenantId": 11,
    "TenantLoginName": "tenant.example",
    "TenantName": "Tenant A",
    "UserId": 2001,
    "UserFirstName": "Cadre A",
    "UserLoginName": "9XXXXXXXX1@@tenant.example",
    "UserRoleId": 31,
    "UserRoleCode": "role.cadre",
    "WorkForceId": 4001,
    "WorkNodeId": 5001,
    "WorkNodeMajorType": "MAJOR_TYPE.VO",
    "WorkNodeAliasId": "VO-ALIAS-001"
  },
  {
    "TenantId": 11,
    "TenantLoginName": "tenant.example",
    "TenantName": "Tenant A",
    "UserId": 2001,
    "UserFirstName": "Cadre A",
    "UserLoginName": "9XXXXXXXX1@@tenant.example",
    "UserRoleId": 32,
    "UserRoleCode": "role.unit-incharge",
    "WorkForceId": 4001,
    "WorkNodeId": 5002,
    "WorkNodeMajorType": "MAJOR_TYPE.VO",
    "WorkNodeAliasId": "VO-ALIAS-002"
  }
]
FieldTypeRequiredNotes
TenantId, TenantLoginName, TenantNamenumber, stringRead from the first row; saved to KEY_TENANT_ID / KEY_TENANT_LOGIN / KEY_TENANT_NAME. TenantLoginName decides ap.gov vs other tenant flow.
UserId, UserFirstName, UserLoginNamenumber, stringRead from the first row; saved to KEY_USER_ID / KEY_USER_FIRST_NAME / KEY_USER_LOGIN.
UserRoleId, UserRoleCodenumber, stringCollected from every row into userRoleMap (KEY_USER_ROLES). Codes containing unit-incharge or fmt_l1 mark a Unit In-charge / FMT login.
WorkForceId, WorkNodeId, WorkNodeMajorType, WorkNodeAliasIdnumber, stringOne work node per row; saved as JSON in KEY_FACILITY_DATA. WorkNodeId / WorkNodeAliasId are passed to the work-node setup; VO alias ids feed the unit farmer download.

Errors

StatusWhenWhat the app does
non-200 or empty resultDataset fails or the user has no tenant datafetchBasicData returns null; SplashActivity shows the "Unable to set up account" dialog and finishes.
exceptiondooNowOrThrow throws (network or auth)Caught in fetchAndPersistStaticData; same error dialog.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/service/SetupServiceHelper.kt
  • app/src/main/java/org/platformcommons/urvi/view/splash/SplashActivity.kt
  • app/src/main/java/org/platformcommons/urvi/vo/AppConstants.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/database/entity/TenantUserRole.kt
  • ~/.gradle/caches/.../BRREPORTTLD_V2-generated-java-api-8.0.1.jar (com.mindtree.bridge.framework.rest.client.DataSetAPI.executeDataSet)