Documentation of DAHITI-API (Version 2) - "download-volume-variation"
DAHITI-API arguments
Argument Value Description
api_key ---' DAHITI API-Key
(Where can I get the API key?)
dahiti_id e.g. '8813' DAHITI ID
API-Request URL
https://dahiti.dgfi.tum.de/api/v2/download-volume-variation/
JSON response from DAHITI server
{
	'code': 200,
	'message': 'Request successful!'
	'target' : {
		'id': '8814',
		'target_name': 'Richland Chambers, Reservoir',
		'location': None,
		'country': 'United States of America',	
		'continent': 'North America',
		'longitude': -96.181,
		'latitude': 31.9766,	
		'points': 449,
		'software': '1.20',
		'download': '2024-02-02 14:40:14',
	},
	'data': [
		{
			'date': '1982-11-15',
			'volume': 0.321,
			'error': 0.03
		},{		
			'date': '1982-12-17', 
			'volume': 0.419,
			'error': 0.037
		},{
			'date': '1983-02-03',
			'volume': 0.424,
			'error': 0.055
		}, ... ,{
			'date': '2020-01-13',
			'volume': 0.335,
			'error': 0.004
		},{
			'date': '2020-02-22', 
			'volume': 0.433,
			'error': 0.0
		},{
			'date': '2020-03-03',
			'volume': 0.414,
			'error': 0.004
		}		
	]
}
API-Request Examples:

Python request using POST method:

import requests
import json
import pprint

url = "https://dahiti.dgfi.tum.de/api/v2/download-volume-variation/"

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)				
				

Python request using GET method:

import requests
import json
import pprint

url = "https://dahiti.dgfi.tum.de/api/v2/download-volume-variation/"

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 request using POST method:

curl --data "api_key=### ADD HERE API_KEY ###&dahiti_id=8813" -X POST https://dahiti.dgfi.tum.de/api/v2/download-volume-variation/
			

CURL request using GET method:

curl -X GET "https://dahiti.dgfi.tum.de/api/v2/download-volume-variation/?api_key=### ADD HERE API_KEY ###&dahiti_id=8813"