List satellites from the EDC.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'list-satellites'
''' optional options '''
#args['status'] = 'present'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text
Returns detail information about selected satellite from the EDC.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'satellite-info'
''' optional options '''
#args['satellite_id'] = '0901301'
#args['satellite_name'] = 'goce'
''' 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)
for key in data.keys():
print key,':',data[key]
else:
print response.status_code
print response.text
List stations from the EDC.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'list-stations'
''' optional options '''
#args['active'] = 'yes'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text
Returns detail information about selected station from the EDC.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'station-info'
args['station_id'] = '7080'
''' 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)
for key in data.keys():
print key,':',data[key]
else:
print response.status_code
print response.text
List valid CPF prediction from the EDC data holding.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'list-predictions'
''' optional options '''
#args['provider'] = 'COD'
#args['satellite'] = '0606203'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text
List valid CPF prediction (Version 2) from the EDC data holding.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'list-predictions-v2'
''' optional options '''
#args['provider'] = 'COD'
#args['satellite'] = '0606203'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text
Search in the EDC data holding using user-defined criteria.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'data-query'
args['data_type'] = 'NPT'
# available data types: 'NPT','FRD','LTT','CPF','NP','FR','CPF_v2','NPT_v2','FRD_v2'
''' optional options '''
#args['start_data_date'] = '2016-02%'
#args['end_data_date'] = '2016-02%'
#args['satellite'] = '0803201'
#args['provider'] = 'COD'
#args['station'] = '78403501'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text
Get detailed information about a certain dataset in the EDC data holding.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'data-info'
args['id'] = '1300505'
args['data_type'] = 'NPT'
# available data types: 'NPT','FRD','LTT','CPF','NP','FR','CPF_v2','NPT_v2','FRD_v2'
''' 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)
for key in data.keys():
print key,':',data[key]
else:
print response.status_code
print response.text
Download a dataset of the EDC data holding.
import requests
import json
url = 'https://edc.dgfi.tum.de/api/v1/'
args = {}
''' required options '''
args['username'] = 'username'
args['password'] = 'password'
args['action'] = 'data-download'
args['id'] = '1300505'
args['data_type'] = 'NPT'
# available data types: 'NPT','FRD','LTT','CPF','NP','FR','CPF_v2','NPT_v2','FRD_v2'
''' 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)
for record in data:
print record
else:
print response.status_code
print response.text