APIs & services / commons-report-service

List village organisations (VOs) in a village. Same call duplicated in three client classes.

Endpointtoday's app
Call
GET /gateway/commons-report-service/api/v1/datasets/name/PlusOneGetAllVOForVillage/execute
Service
commons-report-service
Features
VO geographic filter (FCCC), Leased land
When
User drills down a geography filter
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

Fourth level of the drill-down: lists village organisations in the selected village for the endorsement geo filter and the land-lease farmer picker. The picked VOAlias drives the habitation, non-SHG farmer and farmer-list calls. Errors leave the VO 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
namequeryYesPlusOneGetAllVOForVillageDataset 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.
paramsqueryYesVILLAGE_ALIAS=V01Dataset input parameters as KEY=value pairs joined with "--". VILLAGE_ALIAS = VillageCode of the selected village. 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. VILLAGE_ALIAS

Response

Example response body (synthetic data)
[
  {
    "VOAlias": "VO-ALIAS-001",
    "VOName": "VO A"
  }
]
FieldTypeRequiredNotes
VOAliasstringDropdown value; sent as VO_ALIAS_ID / VO_CODE in the next calls.
VONamestringDropdown label.

Errors

StatusWhenWhat the app does
non-2xxServer rejects the call or the dataset query fails (CoreAPI handles session refresh internally)Resource.error with the raw response; the dropdown stays empty. In EndorsementRepositoryImpl the call runs without try/catch, so a thrown exception is not caught there. VoFilterRepoImpl catches it and shows "Something went wrong".
network errorNo connectivity or timeoutResource.error with the raw response; the dropdown stays empty. In EndorsementRepositoryImpl the call runs without try/catch, so a thrown exception is not caught there. VoFilterRepoImpl catches it and shows "Something went wrong".

Source

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