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

The "/statistics" endpoint's query parameter "time" should be optional #1066

Closed
forman opened this issue Sep 6, 2024 · 0 comments · Fixed by #1070
Closed

The "/statistics" endpoint's query parameter "time" should be optional #1066

forman opened this issue Sep 6, 2024 · 0 comments · Fixed by #1070
Assignees

Comments

@forman
Copy link
Member

forman commented Sep 6, 2024

Is your feature request related to a problem? Please describe.

Datasets and individual dataset variables published by xcube server are not forced to have a "time" dimension. If the /statistics/{datasetId}/{varName} endpoint is invoked without the "time" parameter, a request error is raised (HTTP status 400):

image

But if the endpoint is invoked with given "time" parameter but the dataset variable is lacking it, an internal error is raised (HTTP status 500):

image

Describe the solution you'd like

  1. Make the query parameter "time" optional for both GET /statistics and POST /statistics endpoints.
  2. Ignore a given "time" query parameter if the variable does not have a time dimension.
  3. Return empty result if "time" query parameter is not given but the variable has a time dimension.

Additional context

After the change xcube Viewer should be adapted to not pass the "time" query parameter".

See also xcube-dev/xcube-viewer#408.
See also this for the frontend issue

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

Successfully merging a pull request may close this issue.

2 participants