APIs & services / Reporting datasets (rtld)

Get acreage already used by ATM/natural farming, used to validate entries.

Endpointtoday's app
Call
GET /rtld/api/dataset/v1/execute?name=PlusOneGetATMNFUsedAcreageByIEID
Service
Reporting datasets (rtld)
Features
Leased land, Land assets, ATM model (Anytime Money plot)
When
User adds/edits land or ATM
Auth
X-SESSIONID set by CoreAPI (dooNowOrThrow)
In the App Service

Use case

Runs in parallel with PlusOneGetOwnedLandByIEID in IeAssetRepositoryImpl.getTotalAvailableLandOnline, used by the add/edit land (lease) dialog. For each parcel the app subtracts total_combined_value (land already used by ATM and natural-farming entries) from total_available_land, so a farmer cannot lease out land already in use. Failure returns an empty list and the full available land is shown.

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
namequeryYesPlusOneGetATMNFUsedAcreageByIEIDDataset 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. IEID

Response

Example response body (synthetic data)
[
  {
    "owning_entity_id": "100001",
    "asset_id": "3001",
    "total_nf_value": "0.50",
    "total_atm_value": "0.25",
    "total_combined_value": "0.75"
  }
]
FieldTypeRequiredNotes
asset_idstringMatches the owned-land asset_id.
total_combined_valuestringUsed acreage (ATM + NF) subtracted from total_available_land.
owning_entity_id, total_nf_value, total_atm_valuestringParsed; not read by the app.

Errors

StatusWhenWhat the app does
non-2xxServer rejects the call or the dataset query fails (CoreAPI handles session refresh internally)Empty list; available land is not reduced.
network errorNo connectivity or timeoutEmpty list; available land is not reduced.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/repository/impl/IeAssetRepositoryImpl.kt
  • app/src/main/java/org/platformcommons/urvi/view/landasset/LandAssetViewModel.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/responsedto/CropActualUsedLandDTO.kt