Counts farmers per VO for a Unit In-charge / FMT. UnitDataSetupViewModel calls it once per VO work node that has no page total yet and stores totalIEPages per VO; SetupForUnitInChargeLogin (the splash path for unit logins) calls it per VO with a 1000-row page size. A failure is recorded for that VO and the rest continue; a count of 0 marks the VO as having nothing to pull.
Headers
Header
Value
Notes
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
Param
In
Required
Example
Notes
datasetName
path
Yes
PlusOneWorkNodeFarmerListGeoWiseCountUnit
Dataset name in the path of commons-report-service /api/v1/datasets/name/{name}/execute.
version
query
Yes
1
Dataset version. Always 1.
format
query
Yes
json
Response format. Always json, so the body is a JSON array of row objects.
params
query
Yes
IN_PARAM_VO_ID_CSV=VO-ALIAS-001
Dataset input parameters as KEY=value pairs joined with "--". IN_PARAM_VO_ID_CSV = one VO alias id per call (the name allows CSV, but both callers send one VO at a time).
Request
No body. VO alias list
Response
Example response body (synthetic data)
[
{
"TotalFarmer": 845
}
]
Field
Type
Required
Notes
TotalFarmer
int
Farmers in that VO; total pages = ceil(TotalFarmer / page size), saved per VO with Data.repository.updateWorkNodeIESyncProgress.
Errors
Status
When
What the app does
401 / 400
Session token expired or rejected
AuthInterceptor refreshes the token and retries once; if the retry also fails, UnitDataSetupViewModel records the error for that VO and moves on; SetupForUnitInChargeLogin calls onError(InvalidResponseException).
5xx
Dataset query failed on the server
UnitDataSetupViewModel records the error for that VO and moves on; SetupForUnitInChargeLogin calls onError(InvalidResponseException).
network error
No connectivity or timeout
UnitDataSetupViewModel records the error for that VO and moves on; SetupForUnitInChargeLogin calls onError(InvalidResponseException).
200 with TotalFarmer 0
VO has no farmers
VO progress set to 0/0 (unit VM) or onError(FarmerCountZero) (splash path).