APIs & services / commons-report-service

List farmers (with husband/father names) in an SHG.

Endpointtoday's app
Call
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneWorkNodeFarmerHusbandFatherSHGWise/execute
Service
commons-report-service
Features
Leased land
When
User filters farmers by SHG
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

In the land-lease dialog, once an SHG is picked, this lists its farmers with their husband/father names (LandAssetViewModel.getFarmersForSHG). The selected farmer's IEID is then used for the owned-land lookup. Errors leave the farmer dropdown empty.

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
namequeryYesPlusOneWorkNodeFarmerHusbandFatherSHGWiseDataset 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.
paramsqueryYesSHG_CODE=SHG-ALIAS-001Dataset input parameters as KEY=value pairs joined with "--". SHG_CODE = WorkNodeSHGAlias of the selected SHG. 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. SHG_CODE

Response

Example response body (synthetic data)
[
  {
    "IEID": "100001",
    "FarmerName": "Farmer A",
    "HusbandFatherName": "Relative A"
  },
  {
    "IEID": "100002",
    "FarmerName": "Farmer B",
    "HusbandFatherName": "Relative B"
  }
]
FieldTypeRequiredNotes
IEIDstringDropdown value (DropDownBinder.code); the selected farmer becomes the lessor/lessee and their IEID is used for the owned-land lookup.
FarmerNamestringDropdown label.
HusbandFatherNamestringShown as the dropdown description to tell same-name farmers apart.

Errors

StatusWhenWhat the app does
non-2xxServer rejects the call or the dataset query fails (CoreAPI handles session refresh internally)Resource.error; empty farmer dropdown.
network errorNo connectivity or timeoutResource.error; empty farmer dropdown.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/VoFilterRepoImpl.kt
  • app/src/main/java/org/platformcommons/urvi/view/landasset/LandAssetViewModel.kt
  • app/src/main/java/org/platformcommons/urvi/view/landasset/AddUpdateAssetNewDialog.kt
  • data/src/main/java/org/mindtree/app/agricultor/data/entity/voFilters/FarmerDetails.kt