DAHITI-API

Download

Download of a DAHITI surface area 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-surface-area' Action of the request
dahiti_id e.g. '10146' DAHITI ID

JSON response from DAHITI server

[
    {
	'date': '1989-07-28'
        'area': 86.51,
	'area_error': 2.55
    },{
        'date': '1989-08-29',
	'area': 86.77,
	'area_error': 2.21, 	
    }, ..., {
        'date': '2019-05-04'
        'area': 115.93,
        'area_error': 7.77
    },{
        'date': '2019-06-13'
        'area': 119.52, 
        'area_error': 1.9, 
    }
]

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-surface-area'
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