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

[API] Split /values endpoint in two simpler endpoints #3

Open
ForcamPB opened this issue Dec 5, 2022 · 3 comments
Open

[API] Split /values endpoint in two simpler endpoints #3

ForcamPB opened this issue Dec 5, 2022 · 3 comments

Comments

@ForcamPB
Copy link

ForcamPB commented Dec 5, 2022

Currently the /values endpont is very complex and could be split in two separate endpoints. One endpoint for querying values. And one endpoint for aggregating values.

@kenwenzel
Copy link
Member

I am a bit unsure if the splitting really helps clients to work with the API. I could imagine that it lowers the burden to implement the values endpoint when it is not required to integrate any aggregation operations.

@ForcamPB
Copy link
Author

ForcamPB commented Dec 6, 2022

As you said I also see potential in the split in lowering the burden to implement only one of them. And if the two concerns are separated in their own endpoints it's easier to evolve them independently.

@kenwenzel
Copy link
Member

kenwenzel commented Dec 8, 2022

One option could be:

  • /values (without op, interval)
  • /aggregates (with op, interval)

I currently see a small issue with this approach: The Grafana data source uses /values and the "avg" operation to resample the data. Hence the data source would be unusable with endpoints that don't support aggregates.
Do we need some kind of profiles (operation-wise) for the endpoints? Or some kind of discovery mechanism for the supported ops?

@kenwenzel kenwenzel reopened this Dec 8, 2022
@kenwenzel kenwenzel changed the title Split /values endpoint in two simpler endpoints [API] Split /values endpoint in two simpler endpoints Mar 22, 2024
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

2 participants