SatSure Connector

FarmStack SatSure connector will provide the Bengal gram data of

Maharastra(Solapur,Osmanabad, Ahmadnagar ) and Karnataka(Gadag) districts in .csv files from the SatSure Sparta.

Architecture flow diagram https://app.diagrams.net/#G1Ie3Bpw6WkaE46YUQJKFQ0zsaDcHAkv-f

 

Expected List of files:

This link have the expected outcome files from SatSure .

Prerequisites :

To access and fetch data from SatSure below values should be available.

  • API Key

  • country_id

  • state_id

  • district_id

  • crop_id

  • start_date

  • end_date

 

Crop acreage, Rainfall, Harvest, Yield Estimation and Yield and temp data are good to proceed.

 

API’s to fetch data:

As we already know the country, districts, date range and crop(gram) we can keep the country, state, districts, date_range and crop id’s will be static.

API path to fetch sub-districts “/product/country/{country_id}/state/{state_id}/district/{district_id}/sub-district”.

  • Input parameters country_id, state_id and district_id

API path to fetch village id “/product/country/{country_id}/state/{state_id}/district/{district_id}/sub-district/{subdistrict_id}/village“.

  • Input parameters country_id, state_id, district_id and village_id

API path to fetch product(Acreage, Rainfall, harvest and temp) details API: “/product/{product_id}“.

  • Input parameters region_id, level, product_id, start_date and end_date.

  • For Acreage data region_id(Village id), level(6) and product_id(1).

  • For Rainfall data region_id(sub-district id), level(4) and product_id(9).

  • For temp data region_id(sub-district id), level(4) and product_id(10).

  • For Harvest data region_id(village_id), level(6), crop_id(4) and product_id(5)

Data ranges we have the access:

  • start_date : 2021-10-01

  • ens_date: 2022-03-31

 

Connectors:

IDSCP2 web socket will be used to send data securely from provider core to consumer core.

  • Provider connector

  • Consumer connector

Consumer connector

Consumer connector will be running on t2.micro AWS infra along with provider core , There will be timeRepeat route which will trigger provider core route for every 7 days to fetch data.

  • The data which is provided by the provider core will be loaded to google sheets or make it available to user through consumer custom(python) application.

Provider Connector

Digital Green/ SatSure operated on AWS T2.micro instance along with consumer core and python application to fetch data from SatSure. Custom python application will make the API calls to fetch the data from SatSure DB.

  • Whenever provider core gets the request for data it will trigger the custom application route.

  • The custom application will make the API calls to SatSure DB and combines the data as required in .csv formate and send back to provider core .