APIs & services / Reporting datasets (rtld)

Load the reasons a reviewer can pick when rejecting an annual action plan.

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=AAP_REJECT_REASON
Service
Reporting datasets (rtld)
Features
KAP / Annual Action Plan 2025-26, Home and bottom bar
When
Every Home open
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

HomeViewModel.fetchAAPReasons runs each time Home opens. It caches the list as JSON in SharedPreferences (KEY_AAP_REJECT_REASONS); AppUtils.getAApRejectReasons filters it by the selected language for the 2025-26 action plan reject dialog. That reader is currently commented out in ActionPlanFragment2025To2026, so the cache is filled but not shown. Failures are logged and ignored.

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
namequeryYesAAP_REJECT_REASONDataset 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": "REASON.LAND_MISMATCH",
    "label": "Land details do not match",
    "Language": "ENG"
  },
  {
    "code": "REASON.LAND_MISMATCH",
    "label": "<Telugu label>",
    "Language": "TEL"
  }
]
FieldTypeRequiredNotes
codestringReason code to submit with a rejection.
labelstringText shown to the reviewer.
LanguagestringLanguage code; rows are filtered to LanguageUtil.getSelectedLanguage().

Errors

StatusWhenWhat the app does
non-2xxServer rejects the call or the dataset query fails (CoreAPI handles session refresh internally)Exception caught and logged; the previous cached list stays.
network errorNo connectivity or timeoutException caught and logged; the previous cached list stays.

Source

  • app/src/main/java/org/platformcommons/urvi/view/home/HomeViewModel.kt
  • app/src/main/java/org/platformcommons/urvi/utility/AppUtils.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/responsedto/AAPRejectReasonsDTO.kt
  • app/src/main/java/org/platformcommons/urvi/view/aap_25_26/ActionPlanFragment2025To2026.kt