APIs & services / Reporting datasets (rtld)

2024-25 farmer abstract by IE id (first try).

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=PlusOneMasterFarmerIEID2425
Service
Reporting datasets (rtld)
Features
Farmer endorsement details
When
User opens farmer abstract
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

Opens the farmer abstract bottom sheet (FarmerAbstractBottomSheet / FarmerAbstract2425BottomSheet -> EndorsementViewModel.fetchAbstract2425) during endorsement review. It gets the farmer's 2024-25 vs 2025-26 action-plan figures by IE id, and DataAbstractMapper turns them into last-year / current-year rows. If the result is empty it retries with PlusOneMasterFarmerIEUUID2425. Offline shows "no internet".

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
namequeryYesPlusOneMasterFarmerIEID2425Dataset 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.
paramsqueryYesIEID=100001Dataset input parameters as KEY=value pairs joined with "--". IEID = IE id of the farmer.

Request

No body. IE id

Response

Example response body (synthetic data)
[
  {
    "aap_25_26_id": "5001",
    "aap_25_26_unique_identifier": "aap-uuid-0001",
    "owner_entity_id": "100001",
    "owner_entity_type": "ENTITY_TYPE.IE",
    "action_plan_year": "2025-26",
    "status": "SUBMITTED",
    "c1_extent202425_pre_populated_data": "1.0",
    "c1_extent202425_updated_data": "1.2",
    "c1_extent202526": "1.5",
    "pmds_extent202425_pre_populated_data": "0.5",
    "pmds_extent202425_updated_data": "0.5",
    "pmds_extent202526": "1.0",
    "s2s_extent202425_pre_populated_data": "0.5",
    "s2s_extent202425_updated_data": "0.5",
    "s2s_extent202526": "0.75",
    "dkg_extent202425_pre_populated_data": "0.05",
    "dkg_extent202425_updated_data": "0.05",
    "dkg_extent202526": "0.05",
    "desi_cows202425_pre_populated_data": "1",
    "desi_cows202425_updated_data": "1",
    "desi_cows202526": "2",
    "nf_extent_in_cb202425_pre_populated_data": "1.0",
    "nf_extent_in_cb202425_updated_data": "1.0",
    "nf_extent_in_cb202526": "1.5",
    "atm202425": "Yes",
    "atm202526": "Yes",
    "a_grade202425": "No",
    "a_grade202526": "Yes",
    "participating_in_app_202526": "true",
    "participation_remarks_app_202526": null,
    "pmds_201920": "false",
    "pmds_202021": "false",
    "pmds_202122": "true",
    "pmds_202223": "true",
    "pmds_202324": "true"
  }
]
FieldTypeRequiredNotes
c1_extent202425_pre_populated_data / _updated_data / c1_extent202526stringC1 extent: last-year pre-populated, last-year updated, current year (AbstractDataNew via DataAbstractMapper).
pmds_extent202425_* / pmds_extent202526stringPMDS extent, same three columns.
s2s_extent202425_* / s2s_extent202526stringS2S extent, same three columns.
dkg_extent202425_* / dkg_extent202526stringKitchen-garden extent, same three columns.
desi_cows202425_* / desi_cows202526stringDesi cows, same three columns.
nf_extent_in_cb202425_* / nf_extent_in_cb202526stringNF extent in compact block, same three columns.
atm202425 / atm202526, a_grade202425 / a_grade202526stringATM and A-grade last / current year.
aap_25_26_id, aap_25_26_unique_identifier, owner_entity_id, owner_entity_type, action_plan_year, status, participating_in_app_202526, participation_remarks_app_202526, pmds_2019..2024stringParsed into DataAbstract2425DTO but not read by the mapper.

Errors

StatusWhenWhat the app does
401 / 400Session token expired or rejectedAuthInterceptor refreshes the token and retries once; if the retry also fails, Falls back to the UUID variant; if that also fails, Resource.error "Some error occurred".
5xxDataset query failed on the serverFalls back to the UUID variant; if that also fails, Resource.error "Some error occurred".
network errorNo connectivity or timeoutFalls back to the UUID variant; if that also fails, Resource.error "Some error occurred".

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/EndorsementRepositoryImpl.kt
  • app/src/main/java/org/platformcommons/urvi/bridge/mapper/DataAbstractMapper.kt
  • app/src/main/java/org/platformcommons/urvi/view/endorsements/farmer/FarmerAbstract2425BottomSheet.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/responsedto/DataAbstract2425DTO.kt