Skip to content

Add Get Sensor IDs Method#35

Merged
keenanjohnson merged 3 commits into
mainfrom
get-sensor-ids
May 23, 2026
Merged

Add Get Sensor IDs Method#35
keenanjohnson merged 3 commits into
mainfrom
get-sensor-ids

Conversation

@keenanjohnson
Copy link
Copy Markdown
Member

@keenanjohnson keenanjohnson commented May 23, 2026

Resolves #27

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new authenticated /sensors endpoint to list known sensor IDs, along with documentation and a small helper script for retrieving them from the API.

Changes:

  • Added GET /sensors route in the server and documented the endpoint in the README.
  • Implemented internal/sensors handler that queries InfluxDB for tag values (host) and returns them as JSON.
  • Added Go tests for the new handler and a Python script to print sensor IDs from the CLI.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
scripts/list_sensors.py CLI helper to call /sensors and print returned sensor IDs.
README.md Documents the new GET /sensors endpoint, auth requirements, and response shape.
main.go Wires the new /sensors handler behind auth + rate limiting.
internal/sensors/sensors.go Implements the /sensors handler and Influx query/serialization logic.
internal/sensors/sensors_test.go Adds unit tests for handler behavior and query/id collection helpers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/sensors/sensors.go
@keenanjohnson keenanjohnson merged commit adeb404 into main May 23, 2026
6 checks passed
@keenanjohnson keenanjohnson deleted the get-sensor-ids branch May 23, 2026 17:30
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 this pull request may close these issues.

Add API Method to Get All Sensor IDs

2 participants