APIs & services / Reporting datasets (rtld)

Load program configuration for the program info screen.

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=PlusOnePortfolioAppConfig
Service
Reporting datasets (rtld)
Features
Program configuration and instructions
When
User opens program info
Auth
X-SESSIONID header (AuthInterceptor adds it; re-auth on 401/400)
In the App Service

Use case

Runs when the user opens Program Configuration (ProgramConfigurationFragment -> ProgramInfoRepositoryImpl.fetchProgramConfigurations). The code/value list replaces the copy in SharedPreferences and the screen renders it from there. With no network the screen shows "no internet" and keeps the cached list; an exception shows the error message.

Headers

HeaderValueNotes
X-SESSIONID<session token>Not set by the call site. AuthInterceptor (OkHttpClientInterceptor) adds it from AndroidSessionManager. On a 401 or 400 it invalidates the token, gets a fresh one and retries once.

Parameters

ParamInRequiredExampleNotes
namequeryYesPlusOnePortfolioAppConfigDataset 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.

Request

No body.

Response

Example response body (synthetic data)
[
  {
    "code": "CURRENT_SEASON",
    "value": "Kharif 2025"
  },
  {
    "code": "PORTFOLIO_EDIT_WINDOW_DAYS",
    "value": "15"
  }
]
FieldTypeRequiredNotes
codestringConfiguration key shown on the screen.
valuestringConfiguration value shown next to it.

Errors

StatusWhenWhat the app does
non-2xxDataset failsNo success or error is emitted (the else branch is missing); the screen keeps the cached list.
network error / exceptionOffline or call throwsResource.error with "no internet" or the exception message.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/ProgramInfoRepositoryImpl.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/responsedto/ProgramConfigurationDTO.kt
  • app/src/main/java/org/platformcommons/urvi/view/home/program_configuration/ProgramConfigurationFragment.kt