Here given example of REST Client: CURL and Python. In Observation data access by web services (JSON) with login credential.
For JSON data testing use browser based plugins. e.g.: Google Chrome baased plugin: chrome-extension://aejoelaoggembcahagimdiliamlcdmfm/restlet_client.html
By a linux terminal utility CURL, you can access Observation Data as by given example for IARI: ( here also user as Query Parameter for OffSet use for start of records and Limit use for number of records (?OffSet=50&Limit=1) and need to convert username and password into Basic Authorization token )
curl -X GET -H "Content-Type: application/json" -H "Accept: application/json" -H "Authorization:Basic dXNlcjFAZ21haWwuY29tOnVzZXJi" https://krishi.icar.gov.in/ObservationData/REST/GetUrl/iari | json_reformatOutput:
[ { "date": "2017-09-14", "max_temp": "35.8", "min_temp": "25.0", "rainfall": "0.00", "windspeed": "2.9", "wdc_I": "C", "wdc_II": "W", "weathercon_I": "1", "weathercon_II": "1", "rh_I": "94.0", "rh_II": "58.0", "bss": "8.4", "evap": "4.3" }, . .
Python code example given here:
## call headers import requests from requests.auth import HTTPBasicAuth ## fech data by URL r = requests.get('https://krishi.icar.gov.in/ObservationData/REST/GetUrl/iari?OffSet=50&Limit=1', auth=HTTPBasicAuth('username', 'password')) ## store data into dictionary json_data=r.json() ## Print dictionary dataJson=r.json() for x in dataJson: for key,val in x.items(): print key, " => ", valOutput:
weathercon_I => 1 rainfall => 0.00 rh_I => 50.0 evap => 8.3 bss => 6.0 wdc_I => N windspeed => 6.0 wdc_II => NW date => 2018-06-24 min_temp => 26.0 weathercon_II => 0 rh_II => 37.0 max_temp => 43.0
A client web application for KRISHI Observation Data Repository given here
Observation Data Client Example
and source code available here
List of URI for agro-meteorology center to use in iframe
Center List (Manual Data Feeding): https://krishi.icar.gov.in/ObservationData/REST/GetUrl/CenterRecord?OffSet=0&Limit=60&InstituteId=38 Record List (Manual Data Feeding): https://krishi.icar.gov.in/ObservationData/REST/GetUrl/CenterDataRecord?OffSet=0&Limit=60&CenterId=4 IARI: https://krishi.icar.gov.in/ObservationData/REST/GetUrl/iari IIHR: https://krishi.icar.gov.in/ObservationData/REST/GetUrl/iihr