APIs & services / S3 static data

Load asset (land/cattle) reference data.

Endpointtoday's app
Call
GET S3 igx-static-data/asset/ref_data.json
Service
S3 static data
Features
Home and bottom bar, Land assets, Livestock
When
Every Home open
Auth
None (public)
In the App Service

Use case

Each time Home opens, HomeActivity.fetchAssetData calls DataUtil.initData. It clears the asset reference tables and downloads asset labels (code, label, language, class code) from the public S3 bucket configured as R.string.asset_base_url (https://pcf-static-public-data.s3.ap-south-1.amazonaws.com/igx-static-data/). This is an online, asynchronous Retrofit enqueue. On success it then downloads classification.json and merges both into the assets DAO (insertAssetData). If either call fails or returns empty, the app falls back to the bundled local asset JSON (insertAssetLocal).

Headers

HeaderValueNotes
X-SESSIONID<session id>PII/secret leak: the S3 client uses the shared OkHttpClientInterceptor, so AuthInterceptor attaches the user session token to this public S3 request (and to the product_base_url JSON fetch). The bucket is public and does not need it.

Request

No body.

Response

Example response body (synthetic data)
[
  {
    "id": 1,
    "label": "Land - Owned",
    "code": "ASSET_SUB_CATEGORY.LAND_OWNED",
    "languageCode": "ENG",
    "classCode": {
      "code": "ASSET_SUB_CATEGORY"
    }
  },
  {
    "id": 2,
    "label": "Irrigated",
    "code": "ASSET_FUNCTIONALITY.IRRIGATED",
    "languageCode": "ENG",
    "classCode": {
      "code": "ASSET_FUNCTIONALITY"
    }
  }
]
FieldTypeRequiredNotes
[].idintLocal key.
[].labelstringDisplay text shown in land and livestock pickers.
[].codestringRef-data code (category, sub-category, functionality or quality).
[].languageCodestringENG or TEL.
[].classCode.codestringRef class the code belongs to.

Errors

StatusWhenWhat the app does
403Observed on 2026-10-22: the public bucket returns AccessDenied (XML body) for igx-static-data/asset/ref_data.jsonTreated as a failure: insertAssetLocal() falls back to the bundled reference data. The live S3 copy is currently not used at all.
non-2xx, empty list or network failureS3 unreachableinsertAssetLocal() loads the bundled reference data. The user sees no error.

Source

  • app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/APIInterface.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/URLInjector.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/network/retrofit/RetrofitAPIClient.kt
  • app/src/main/java/org/platformcommons/urvi/utility/DataUtil.kt
  • app/src/main/java/org/platformcommons/urvi/view/home/HomeActivity.kt
  • app/src/main/java/org/platformcommons/urvi/datasource/database/entity/AssetRefData.kt
  • app/src/release/res/values/build_type_config.xml
  • data/src/main/java/org/mindtree/app/agricultor/data/net/OkHttpClientInterceptor.kt