Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Supply a way to retrieve unique key values #104

Open
dionhaefner opened this issue Nov 13, 2018 · 0 comments · May be fixed by #234
Open

Supply a way to retrieve unique key values #104

dionhaefner opened this issue Nov 13, 2018 · 0 comments · May be fixed by #234
Labels
enhancement New feature or request

Comments

@dionhaefner
Copy link
Collaborator

dionhaefner commented Nov 13, 2018

When serving heterogeneous datasets (e.g. data with a type key), if could be very useful to be able to retrieve all unique key values.

Examples:

  1. Get all unique keys
>>> /unique_endpoint
{
    'type': ['reflectance', 'index', 'composite'],
    'date': ['20180101', '20180101_20180201'],
    'id': ['1', '2', '3']
}
  1. Get keys valid for reflectances
>>> /unique_endpoint?type=reflectance
{
    'type': ['reflectance'],
    'date': ['20180101'],
    'id': ['1']
}
  1. Get all data for a specific date
>>> /unique_endpoint?date=20180101
{
    'type': ['reflectance', 'index'],
    'date': ['20180101'],
    'id': ['1', '2']
}

An alternative could be to find a better abstraction / separation between datasets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant