APIs & services / commons-report-service

List farmers in a geography without paging (endorsement screens).

Endpointtoday's app
Call
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneWorkNodeFarmerListGeoWiseNoPagination/execute
Service
commons-report-service
Features
VO geographic filter (FCCC), VO / SHG / Farmer endorsement
When
User opens endorsement lists
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

When a reviewer finishes the endorsement geo filter (EndorsementFragment -> EndorsementViewModel.getFarmersGeoWise), the app loads farmers for that habitation / VO / village. The live path clears ie_flat_entity and inserts these rows (insertFlatSchemDataForVoids), so the endorsement lists show only that geography. An unused repository variant builds the same request through CoreAPI. Errors show an error state and leave the local table unchanged.

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
namequeryYesPlusOneWorkNodeFarmerListGeoWiseNoPaginationDataset 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.
paramsqueryYesWORK_NODE_HABITATION_ALIAS='H01'--WORK_NODE_VO_ALIAS='VO-ALIAS-001'--WORK_NODE_VILLAGE_ALIAS='V01'--OFFSET_VALUE=0--LIMIT_VALUE=10Dataset input parameters as KEY=value pairs joined with "--". Aliases are wrapped in single quotes. WORK_NODE_HABITATION_ALIAS / WORK_NODE_VO_ALIAS / WORK_NODE_VILLAGE_ALIAS = selected geography; OFFSET_VALUE=0 and LIMIT_VALUE=10 are hard-coded (the dataset name says no pagination, so the server presumably ignores them). Note: the live code calls this on the rtld executor (GET /rtld/api/dataset/v1/execute?name=...), not the commons-report-service path in the key.

Request

No body. habitation / VO / village alias, offset, limit

Response

Example response body (synthetic data)
[
  {
    "IEOLTPId": "100001",
    "uuid": "3f2a9c1e-0000-4000-8000-000000000001",
    "Member_ID": "M-000001",
    "Member_Name": "Farmer A",
    "Member_Surname": "Surname A",
    "Husband_father_Name": "Relative A",
    "Husband_father_Name_Surname": "Surname A",
    "member_phno": "9XXXXXXXX1",
    "Aadhar_no": "XXXX-XXXX-1234",
    "Member_gender": "GENDER.FEMALE",
    "Member_Age": "42",
    "DOB": "1983-01-01",
    "Maritual_status": "Married",
    "maritalStatusCode": "MARITAL_STATUS.MARRIED",
    "relationshipCode": "RELATIONSHIP.HUSBAND",
    "Educational_Qualification": "Primary",
    "educationalQualificationCode": "EDUCATION.PRIMARY",
    "Ration_card_number": "RC-XXXX-0001",
    "Category_ID": "11",
    "Category_Name": "Farmer/C1",
    "categoryCode": "CATEGORY.C1",
    "wellbeing_code": "WB.POOR",
    "District_code": "D01",
    "District_name": "District A",
    "DistrictOLTPId": "501",
    "Mandal_code": "M01",
    "Mandal_Name": "Mandal A",
    "MandalOLTPId": "601",
    "Panchayat_code": "P01",
    "Panchayat_Name": "Panchayat A",
    "PanchayatOLTPId": "701",
    "Village_code": "V01",
    "Village_name": "Village A",
    "VillageOLTPId": "801",
    "Village_Phase": "Phase 1",
    "Habitation_code": "H01",
    "Habitation_name": "Habitation A",
    "HabitationOLTPId": "901",
    "VO_id": "VO-ALIAS-001",
    "VO_Name": "VO A",
    "VOOLTPId": "1001",
    "VO_Formation_date": "2010-04-01",
    "SHG_ID": "SHG-ALIAS-001",
    "SHG_Name": "SHG A",
    "SHGOLTPId": "1101",
    "SHG_Registration_Date": "2011-06-01",
    "Member_Reg_Date": "2012-01-15",
    "IS_Active_": "Y",
    "IS_disabled": "N",
    "REMARK": null,
    "id": 1,
    "lifeStatus": "LIFE_STATUS.ALIVE",
    "inActiveReason": null
  }
]
FieldTypeRequiredNotes
IEOLTPIdstringServer IE (farmer) id. Stored as ie_flat_entity.iEOLTPId; used as the IEID in later dataset calls.
uuidstringFarmer UUID; unique key of ie_flat_entity.uuid.
Member_IDstringSERP member id; ie_flat_entity.memberID.
Member_Name / Member_SurnamestringFarmer name shown in lists and the farmer hub.
Husband_father_Name / Husband_father_Name_SurnamestringRelative name. The app concatenates surname into husbandFatherName and blanks the surname column.
member_phnostringPhone number column.
Aadhar_nostringAadhaar column (masked in docs).
Member_gender, Member_Age, DOB, Maritual_status, maritalStatusCode, relationshipCode, Educational_Qualification, educationalQualificationCode, Ration_card_number, wellbeing_codestringProfile columns stored as-is in ie_flat_entity and used by the IE profile screens.
Category_ID / Category_Name / categoryCodestringMember category. "?" in Category_Name is replaced with "-" before saving; the part after "/" is the farmer category.
District_* / Mandal_* / Panchayat_* / Village_* / Habitation_* (code, name, OLTPId)stringGeography columns used for filters and display.
VO_id / VO_Name / VOOLTPId / VO_Formation_datestringVillage organisation columns; VO_id drives VO filters and analytics.
SHG_ID / SHG_Name / SHGOLTPId / SHG_Registration_DatestringSHG columns. Empty SHG_Name is replaced with the NON_SHG constant.
Member_Reg_Date, Village_Phase, IS_Active_, IS_disabled, REMARK, id, lifeStatus, inActiveReasonstring|intStored as-is; lifeStatus decides whether the farmer counts as active.

Errors

StatusWhenWhat the app does
401 / 400Session token expired or rejectedAuthInterceptor refreshes the token and retries once; if the retry also fails, Resource.error with the error body; the farmer table is not cleared.
5xxDataset query failed on the serverResource.error with the error body; the farmer table is not cleared.
network errorNo connectivity or timeoutResource.error with the error body; the farmer table is not cleared.

Source

  • data/src/main/java/org/mindtree/app/agricultor/data/setup_new/SetupServiceNew.kt
  • app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementViewModel.kt
  • app/src/main/java/org/platformcommons/urvi/view/endorsements/vo/EndorsementFragment.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/EndorsementRepositoryImpl.kt
  • data/src/main/java/org/mindtree/app/agricultor/data/entity/IEFlatEntity.kt