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

csv file does not give back network when requested #21

Closed
xrise75 opened this issue Jan 24, 2023 · 11 comments
Closed

csv file does not give back network when requested #21

xrise75 opened this issue Jan 24, 2023 · 11 comments

Comments

@xrise75
Copy link

xrise75 commented Jan 24, 2023

@jschaeff
Copy link
Collaborator

If you aggregate on networks, you will have the result for all the networks.
If you want to see the statistics for each network, you need to remove the network from the "aggregate_on" parameter, which would give:

https://ws.resif.fr/eidaws/statistics/1//dataselect/query?start=2022-01&end=2022-12&datacenter=NOA&network=HP&aggregate_on=location,channel,month,datacenter,station,country&format=csv

What would you like a format text to look like ?

@xrise75
Copy link
Author

xrise75 commented Jan 24, 2023

Ok my fault about the network agregation

format issue:
csv is fine for me as a simple choice BUT in the builder, when I choose format Text/csv then the url has ...&format-=text instead of csv and does not work

@jschaeff
Copy link
Collaborator

OK, nice catch, this is a bug. @vpet98 will fix it.

@vpet98
Copy link
Contributor

vpet98 commented Jan 24, 2023

Thank you for the note,

Bug is fixed on main branch. Needs to be deployed again I suppose.

@jschaeff
Copy link
Collaborator

@vpet98
if the value of format is not supported, the webservice should reply a better error message.
For now, it says if format=text:

http "http://ws-staging.resif.fr/eidaws/statistics/1/dataselect/query?start=2022-01&end=2022-02&aggregate_on=month,datacenter,country,network,station,location,channel&format=text"
HTTP/1.1 400 BAD REQUEST
content-length: 48
content-type: text/plain
date: Tue, 24 Jan 2023 14:50:43 GMT

BAD REQUEST: invalid value of parameter 'format'

could you fix it ?

@vpet98
Copy link
Contributor

vpet98 commented Jan 24, 2023

Yes, I can, but what we would like to reply in this case? Maybe print the wrong value as well?

@jschaeff
Copy link
Collaborator

something like "Unsupported value for parameter format." would do, I guess ?

@vpet98
Copy link
Contributor

vpet98 commented Jan 24, 2023

Done!

@xrise75
Copy link
Author

xrise75 commented Jan 25, 2023

Not fixed yet!
still when in query form I click format text/csv then the url given has "&format=text" instead of "&format=csv"

@vpet98
Copy link
Contributor

vpet98 commented Jan 25, 2023

The code is fixed. New version is not deployed yet. I suppose it will be deployed soon together with some other fixes which are in progress.

@jschaeff
Copy link
Collaborator

Fix deployed.
Thank you @vpet98

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

No branches or pull requests

3 participants