Skip to content

Conversation

@gideonmaina
Copy link
Collaborator

Description

Update the /data endpoint by adding more filtering options and omitting unnecessary data

Type of change

  • New feature (non-breaking change which adds functionality)

  • Add filtering options by node uid, node owner, sensor type name choices and country name choices.

  • Breaking change (fix or feature that would cause existing functionality not to work as expected)

    • Remove filtering by sensor id: this approach is cumbersome as it requires tracking sensors by their PKs. A node uid is sufficient for the user and further filtering can be done by sensor types inside the node.
  • This change requires a documentation update

Screenshots

Screenshot 2025-08-21 at 13 15 53 Screenshot 2025-08-21 at 13 13 20 Screenshot 2025-08-21 at 13 16 30

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code

Use node uid instead of sensor id as it is more readable. Make location country to be a dropdown. Add sensor type filter
Sampling rate, DB record id, software version etc not needed
@gideonmaina
Copy link
Collaborator Author

@thepsalmist This is what I meant about the sensor name instead of the id. We can keep the sensor id and add sensor_type name or update sensor value to the name instead of the id. Whichever is acceptable.

I thought you had commented on this PR yesterday  🤔

Screenshot 2025-10-22 at 12 55 08 Screenshot 2025-10-22 at 12 52 11

@thepsalmist
Copy link
Contributor

@thepsalmist This is what I meant about the sensor name instead of the id. We can keep the sensor id and add sensor_type name or update sensor value to the name instead of the id. Whichever is acceptable.

I thought you had commented on this PR yesterday  🤔

Screenshot 2025-10-22 at 12 55 08 Screenshot 2025-10-22 at 12 52 11

Makes sense @gideonmaina , I ad commented on issue #152 . I got it covered, including a number of optimizations from the serializers we inherited from feinstaub. Should have the PR up tomorrow

@gideonmaina
Copy link
Collaborator Author

@thepsalmist I would like to first test out the casting for the PM value types

@gideonmaina
Copy link
Collaborator Author

@thepsalmist. I have made the final changes to this issue #152. Please continue with the review . Cc. @usmanbiu

Screenshot 2025-10-24 at 10 48 18

@usmanbiu
Copy link

@gideonmaina great job!!
I think we should add the approximations of latitude and longitude of the sensors

@gideonmaina
Copy link
Collaborator Author

@usmanbiu That information is useful for node details. For mobile sensors, that is part of the data already

@gideonmaina great job!!
I think we should add the approximations of latitude and longitude of the sensors

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 this pull request may close these issues.

4 participants