Argument | Value | Description |
api_key | ---' | DAHITI API-Key (Where can I get the API key?) |
dahiti_id | e.g. '8813' | DAHITI ID |
https://dahiti.dgfi.tum.de/api/v2/download-hypsometry/
{
'code': 200,
'message': 'Request successful!'
'target': {
'dahiti_id': '8813',
'target_name': 'Tawakoni, Lake',
'location': None,
'country': 'us',
'continent': 'North America',
'longitude': -95.9748,
'latitude': 32.8696,
'download': '2024-01-31 15:51:47'
},
'data': {
'x_min': 1.01489138634e-14,
'x_max': 157.932154173,
'x_wp': 157.931795874,
'y_min': 105.42316521,
'y_scale': 50.0817465757,
'z': 0.056100761651
},
}
import requests
import json
import pprint
url = "https://dahiti.dgfi.tum.de/api/v2/download-hypsometry/"
args = {}
args['api_key'] = '### ADD HERE API_KEY ###'
args['dahiti_id'] = 8813
response = requests.post(url, json=args)
if response.status_code == 200:
''' convert json string in python list '''
data = json.loads(response.text)
pprint.pprint(data)
else:
print (response.text)
print (response.status_code)
import requests
import json
import pprint
url = "https://dahiti.dgfi.tum.de/api/v2/download-hypsometry/"
args = {}
args['api_key'] = '### ADD HERE API_KEY ###'
args['dahiti_id'] = 8813
response = requests.get(url,params=args)
if response.status_code == 200:
''' convert json string in python list '''
data = json.loads(response.text)
pprint.pprint(data)
else:
print (response.text)
print (response.status_code)
curl --data "api_key=### ADD HERE API_KEY ###&dahiti_id=8813" -X POST https://dahiti.dgfi.tum.de/api/v2/download-hypsometry/
curl -X GET "https://dahiti.dgfi.tum.de/api/v2/download-hypsometry/?api_key=### ADD HERE API_KEY ###&dahiti_id=8813"