DAHITI-API

Download

Download of a DAHITI volume variations time series

DAHITI-API arguments

Argument Value Description
username e.g. 'username' Username to login on the DAHITI website
password e.g. 'password' Password to login on the DAHITI website
action 'download-volume-variation' Action of the request
dahiti_id e.g. '10146' DAHITI ID

JSON response from DAHITI server

[
    {
	'date': '1989-07-28'
        'volume': 0.08202,
	'volume_error': 0.02538
    },{
        'date': '1989-08-29',
	'volume': 0.0871,
	'volume_error': 0.02193, 	
    }, ..., {
        'date': '2020-02-25'
        'volume': 0.33687,
        'volume_error': 0.00074
    },{
        'date': '2020-03-06'
        'volume': 0.33516, 
        'volume_error':  0.00382
    }
]

Python-Example

import requests
import json
import pprint

url = 'https://dahiti.dgfi.tum.de/api/v1/'

args = {}
""" required options """
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'download-volume-variation'
args['dahiti_id'] = '10146'

""" send request as method POST """
response = requests.post(url, data=args)

if response.status_code == 200:
	""" convert json string in python list """
	data = json.loads(response.text)
	pprint.pprint(data)
else:
	print response.status_code


Find more topics on the central web site of the Technical University of Munich: www.tum.de