jlu-ilr-hydro / odmf

Observatory Data Management Framework
MIT License
4 stars 5 forks source link

API: Get last record fpr a bunch of datasets in one query #150

Closed philippkraft closed 1 month ago

philippkraft commented 7 months ago

Auto-Uplaod scripts generally need to know the time of the ladt upload to avoid duplicates. Asking for a number of datasets needs many http queries - this should be simpler

philippkraft commented 1 month ago

This is already possible with odmfclient, provided the datasets end property is set correctly:

from odmfclient import login

with login('https://path/to/odmf', 'user', 'password') as api:
    return {ds['id']: ds['end'] for ds in api.dataset.listobj(site=1)}